https://github.com/akkartik/mu/blob/main/linux/mu.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238 == data
239
240 Program:
241 _Program-functions:
242 0/imm32
243 _Program-functions->payload:
244 0/imm32
245 _Program-types:
246 0/imm32
247 _Program-types->payload:
248 0/imm32
249 _Program-signatures:
250 0/imm32
251 _Program-signatures->payload:
252 0/imm32
253
254
255
256
257
258
259
260
261
262
263
264
265 Function-name:
266 0/imm32
267 Function-inouts:
268 8/imm32
269 Function-outputs:
270 0x10/imm32
271 Function-body:
272 0x18/imm32
273 Function-next:
274 0x20/imm32
275 Function-size:
276 0x28/imm32/40
277
278 Primitive-name:
279 0/imm32
280 Primitive-inouts:
281 8/imm32
282 Primitive-outputs:
283 0x10/imm32
284 Primitive-subx-name:
285 0x18/imm32
286 Primitive-subx-rm32:
287 0x20/imm32
288 Primitive-subx-r32:
289 0x24/imm32
290 Primitive-subx-imm32:
291 0x28/imm32
292 Primitive-subx-imm8:
293 0x2c/imm32
294 Primitive-subx-disp32:
295 0x30/imm32
296 Primitive-subx-xm32:
297 0x34/imm32
298 Primitive-subx-x32:
299 0x38/imm32
300 Primitive-next:
301 0x3c/imm32
302 Primitive-size:
303 0x44/imm32/68
304
305 Stmt-tag:
306 0/imm32
307
308 Block-stmts:
309 4/imm32
310 Block-var:
311 0xc/imm32
312
313 Stmt1-operation:
314 4/imm32
315 Stmt1-inouts:
316 0xc/imm32
317 Stmt1-outputs:
318 0x14/imm32
319
320 Vardef-var:
321 4/imm32
322
323 Regvardef-operation:
324 4/imm32
325 Regvardef-inouts:
326 0xc/imm32
327 Regvardef-outputs:
328 0x14/imm32
329
330 Stmt-size:
331 0x1c/imm32
332
333 Var-name:
334 0/imm32
335 Var-type:
336 8/imm32
337 Var-block-depth:
338 0x10/imm32
339 Var-offset:
340 0x14/imm32
341 Var-register:
342 0x18/imm32
343 Var-size:
344 0x20/imm32
345
346 List-value:
347 0/imm32
348 List-next:
349 8/imm32
350 List-size:
351 0x10/imm32
352
353
354 Stmt-var-value:
355 0/imm32
356 Stmt-var-next:
357 8/imm32
358 Stmt-var-is-deref:
359 0x10/imm32
360 Stmt-var-size:
361 0x14/imm32
362
363
364
365 Live-var-value:
366 0/imm32
367 Live-var-register-spilled:
368 8/imm32
369 Live-var-size:
370 0xc/imm32
371
372
373
374 Type-tree-is-atom:
375 0/imm32
376
377 Type-tree-value:
378 4/imm32
379 Type-tree-value-size:
380 8/imm32
381 Type-tree-parameter-name:
382 8/imm32
383
384 Type-tree-left:
385 4/imm32
386 Type-tree-right:
387 0xc/imm32
388
389 Type-tree-size:
390 0x14/imm32
391
392
393
394
395 Type-id:
396 0/imm32/write
397 0/imm32/read
398 0x100/imm32/size
399
400 0/imm32
401
402 "int"/imm32
403 "addr"/imm32
404 "array"/imm32
405 "handle"/imm32
406 "boolean"/imm32
407 0/imm32
408
409 "offset"/imm32
410
411 "byte"/imm32
412 0/imm32
413
414 0/imm32
415
416 "stream"/imm32
417 "slice"/imm32
418 "code-point"/imm32
419 "code-point-utf8"/imm32
420
421
422 "float"/imm32
423
424 0/imm32
425
426
427
428 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
429 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
430 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
431 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
432 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
433 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
434
435 Primitive-type-ids:
436 0x44
437
438
439
440
441 Typeinfo-id:
442 0/imm32
443 Typeinfo-fields:
444 4/imm32
445
446
447
448
449
450 Typeinfo-total-size-in-bytes:
451 0xc/imm32
452 Typeinfo-next:
453 0x10/imm32
454 Typeinfo-size:
455 0x18/imm32
456
457
458
459 Typeinfo-fields-row-size:
460 0x10/imm32
461
462
463
464
465
466
467
468
469 Typeinfo-entry-input-var:
470 0/imm32
471 Typeinfo-entry-index:
472 8/imm32
473 Typeinfo-entry-output-var:
474 0xc/imm32
475 Typeinfo-entry-size:
476 0x14/imm32
477
478 == code
479
480 Entry:
481
482 89/<- %ebp 4/r32/esp
483 (new-segment *Heap-size Heap)
484
485
486 {
487
488 81 7/subop/compare *ebp 1/imm32
489 7e/jump-if-<= break/disp8
490
491 (kernel-string-equal? *(ebp+8) "test")
492 3d/compare-eax-and 0/imm32/false
493 74/jump-if-= break/disp8
494
495 (run-tests)
496
497 8b/-> *Num-test-failures 3/r32/ebx
498 eb/jump $mu-main:end/disp8
499 }
500
501 (write-buffered Stdout "== code\n")
502 (convert-mu Stdin Stdout Stderr 0)
503 (flush Stdout)
504
505 bb/copy-to-ebx 0/imm32
506 $mu-main:end:
507 e8/call syscall_exit/disp32
508
509 convert-mu:
510
511 55/push-ebp
512 89/<- %ebp 4/r32/esp
513
514 50/push-eax
515
516 c7 0/subop/copy *Next-block-index 1/imm32
517 8b/-> *Primitive-type-ids 0/r32/eax
518 89/<- *Type-id 0/r32/eax
519 c7 0/subop/copy *_Program-functions 0/imm32
520 c7 0/subop/copy *_Program-functions->payload 0/imm32
521 c7 0/subop/copy *_Program-types 0/imm32
522 c7 0/subop/copy *_Program-types->payload 0/imm32
523 c7 0/subop/copy *_Program-signatures 0/imm32
524 c7 0/subop/copy *_Program-signatures->payload 0/imm32
525
526 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
527 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
528
529 (check-mu-types *(ebp+0x10) *(ebp+0x14))
530 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
531 $convert-mu:end:
532
533 58/pop-to-eax
534
535 89/<- %esp 5/r32/ebp
536 5d/pop-to-ebp
537 c3/return
538
539 test-convert-empty-input:
540
541
542 55/push-ebp
543 89/<- %ebp 4/r32/esp
544
545 (clear-stream _test-input-stream)
546 (clear-stream $_test-input-buffered-file->buffer)
547 (clear-stream _test-output-stream)
548 (clear-stream $_test-output-buffered-file->buffer)
549
550 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
551 (flush _test-output-buffered-file)
552 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
553
554 89/<- %esp 5/r32/ebp
555 5d/pop-to-ebp
556 c3/return
557
558 test-convert-function-skeleton:
559
560 55/push-ebp
561 89/<- %ebp 4/r32/esp
562
563 (clear-stream _test-input-stream)
564 (clear-stream $_test-input-buffered-file->buffer)
565 (clear-stream _test-output-stream)
566 (clear-stream $_test-output-buffered-file->buffer)
567
568 (write _test-input-stream "fn foo {\n")
569 (write _test-input-stream "}\n")
570
571 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
572 (flush _test-output-buffered-file)
573 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
579
580 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
581 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
582 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
583 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
584 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
585 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
586 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
587 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
588
589 89/<- %esp 5/r32/ebp
590 5d/pop-to-ebp
591 c3/return
592
593 test-convert-multiple-function-skeletons:
594
595 55/push-ebp
596 89/<- %ebp 4/r32/esp
597
598 (clear-stream _test-input-stream)
599 (clear-stream $_test-input-buffered-file->buffer)
600 (clear-stream _test-output-stream)
601 (clear-stream $_test-output-buffered-file->buffer)
602
603 (write _test-input-stream "fn foo {\n")
604 (write _test-input-stream "}\n")
605 (write _test-input-stream "fn bar {\n")
606 (write _test-input-stream "}\n")
607
608 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
609 (flush _test-output-buffered-file)
610 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
616
617 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
618 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
619 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
620 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
621 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
622 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
623 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
624 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
625
626 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
627 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
628 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
629 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
630 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
631 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
632 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
633 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
634
635 89/<- %esp 5/r32/ebp
636 5d/pop-to-ebp
637 c3/return
638
639 test-convert-function-with-arg:
640
641 55/push-ebp
642 89/<- %ebp 4/r32/esp
643
644 (clear-stream _test-input-stream)
645 (clear-stream $_test-input-buffered-file->buffer)
646 (clear-stream _test-output-stream)
647 (clear-stream $_test-output-buffered-file->buffer)
648
649 (write _test-input-stream "fn foo n: int {\n")
650 (write _test-input-stream "}\n")
651
652 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
653 (flush _test-output-buffered-file)
654 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
660
661 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
662 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
663 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
664 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
665 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
666 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
667 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
668 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
669
670 89/<- %esp 5/r32/ebp
671 5d/pop-to-ebp
672 c3/return
673
674 test-function-with-redefined-name:
675
676 55/push-ebp
677 89/<- %ebp 4/r32/esp
678
679 (clear-stream _test-input-stream)
680 (clear-stream $_test-input-buffered-file->buffer)
681 (clear-stream _test-output-stream)
682 (clear-stream $_test-output-buffered-file->buffer)
683 (clear-stream _test-error-stream)
684 (clear-stream $_test-error-buffered-file->buffer)
685
686 68/push 0/imm32
687 68/push 0/imm32
688 89/<- %edx 4/r32/esp
689 (tailor-exit-descriptor %edx 0x10)
690
691 (write _test-input-stream "fn foo {\n")
692 (write _test-input-stream "}\n")
693 (write _test-input-stream "fn foo {\n")
694 (write _test-input-stream "}\n")
695
696 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
697
698
699 89/<- %edx 4/r32/esp
700 (flush _test-output-buffered-file)
701 (flush _test-error-buffered-file)
702 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
708
709 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name: output should be empty")
710 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name: error message")
711
712 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name: exit status")
713
714 81 0/subop/add %esp 8/imm32
715
716 5d/pop-to-ebp
717 c3/return
718
719 test-function-with-redefined-name-2:
720
721 55/push-ebp
722 89/<- %ebp 4/r32/esp
723
724 (clear-stream _test-input-stream)
725 (clear-stream $_test-input-buffered-file->buffer)
726 (clear-stream _test-output-stream)
727 (clear-stream $_test-output-buffered-file->buffer)
728 (clear-stream _test-error-stream)
729 (clear-stream $_test-error-buffered-file->buffer)
730
731 68/push 0/imm32
732 68/push 0/imm32
733 89/<- %edx 4/r32/esp
734 (tailor-exit-descriptor %edx 0x10)
735
736 (write _test-input-stream "fn foo {\n")
737 (write _test-input-stream "}\n")
738 (write _test-input-stream "sig foo\n")
739
740 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
741
742
743 89/<- %edx 4/r32/esp
744 (flush _test-output-buffered-file)
745 (flush _test-error-buffered-file)
746 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
752
753 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-2: output should be empty")
754 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-2: error message")
755
756 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-2: exit status")
757
758 81 0/subop/add %esp 8/imm32
759
760 5d/pop-to-ebp
761 c3/return
762
763 test-function-with-redefined-name-3:
764
765 55/push-ebp
766 89/<- %ebp 4/r32/esp
767
768 (clear-stream _test-input-stream)
769 (clear-stream $_test-input-buffered-file->buffer)
770 (clear-stream _test-output-stream)
771 (clear-stream $_test-output-buffered-file->buffer)
772 (clear-stream _test-error-stream)
773 (clear-stream $_test-error-buffered-file->buffer)
774
775 68/push 0/imm32
776 68/push 0/imm32
777 89/<- %edx 4/r32/esp
778 (tailor-exit-descriptor %edx 0x10)
779
780 (write _test-input-stream "sig foo\n")
781 (write _test-input-stream "fn foo {\n")
782 (write _test-input-stream "}\n")
783
784 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
785
786
787 89/<- %edx 4/r32/esp
788 (flush _test-output-buffered-file)
789 (flush _test-error-buffered-file)
790 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
796
797 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-3: output should be empty")
798 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-3: error message")
799
800 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-3: exit status")
801
802 81 0/subop/add %esp 8/imm32
803
804 5d/pop-to-ebp
805 c3/return
806
807 test-function-with-inout-in-register:
808
809 55/push-ebp
810 89/<- %ebp 4/r32/esp
811
812 (clear-stream _test-input-stream)
813 (clear-stream $_test-input-buffered-file->buffer)
814 (clear-stream _test-output-stream)
815 (clear-stream $_test-output-buffered-file->buffer)
816 (clear-stream _test-error-stream)
817 (clear-stream $_test-error-buffered-file->buffer)
818
819 68/push 0/imm32
820 68/push 0/imm32
821 89/<- %edx 4/r32/esp
822 (tailor-exit-descriptor %edx 0x10)
823
824 (write _test-input-stream "fn foo x/eax: int {\n")
825 (write _test-input-stream "}\n")
826
827 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
828
829
830 89/<- %edx 4/r32/esp
831 (flush _test-output-buffered-file)
832 (flush _test-error-buffered-file)
833 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
839
840 (check-stream-equal _test-output-stream "" "F - test-function-with-inout-in-register: output should be empty")
841 (check-next-stream-line-equal _test-error-stream "fn foo: function inout 'x' cannot be in a register" "F - test-function-with-inout-in-register: error message")
842
843 (check-ints-equal *(edx+4) 2 "F - test-function-with-inout-in-register: exit status")
844
845 81 0/subop/add %esp 8/imm32
846
847 5d/pop-to-ebp
848 c3/return
849
850 test-function-with-addr-output:
851
852 55/push-ebp
853 89/<- %ebp 4/r32/esp
854
855 (clear-stream _test-input-stream)
856 (clear-stream $_test-input-buffered-file->buffer)
857 (clear-stream _test-output-stream)
858 (clear-stream $_test-output-buffered-file->buffer)
859 (clear-stream _test-error-stream)
860 (clear-stream $_test-error-buffered-file->buffer)
861
862 68/push 0/imm32
863 68/push 0/imm32
864 89/<- %edx 4/r32/esp
865 (tailor-exit-descriptor %edx 0x10)
866
867 (write _test-input-stream "fn foo -> _/eax: (addr int) {\n")
868 (write _test-input-stream "}\n")
869
870 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
871
872
873 89/<- %edx 4/r32/esp
874 (flush _test-output-buffered-file)
875 (flush _test-error-buffered-file)
876 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
882
883 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-output: output should be empty")
884 (check-next-stream-line-equal _test-error-stream "fn foo: output cannot have an addr type; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-output: error message")
885
886 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-output: exit status")
887
888 81 0/subop/add %esp 8/imm32
889
890 5d/pop-to-ebp
891 c3/return
892
893 test-function-with-addr-inout:
894
895 55/push-ebp
896 89/<- %ebp 4/r32/esp
897
898 (clear-stream _test-input-stream)
899 (clear-stream $_test-input-buffered-file->buffer)
900 (clear-stream _test-output-stream)
901 (clear-stream $_test-output-buffered-file->buffer)
902 (clear-stream _test-error-stream)
903 (clear-stream $_test-error-buffered-file->buffer)
904
905 68/push 0/imm32
906 68/push 0/imm32
907 89/<- %edx 4/r32/esp
908 (tailor-exit-descriptor %edx 0x10)
909
910 (write _test-input-stream "fn foo a: (addr addr int) {\n")
911 (write _test-input-stream "}\n")
912
913 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
914
915
916 89/<- %edx 4/r32/esp
917 (flush _test-output-buffered-file)
918 (flush _test-error-buffered-file)
919 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
925
926 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout: output should be empty")
927 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout: error message")
928
929 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout: exit status")
930
931 81 0/subop/add %esp 8/imm32
932
933 5d/pop-to-ebp
934 c3/return
935
936 test-function-with-addr-inout-2:
937
938 55/push-ebp
939 89/<- %ebp 4/r32/esp
940
941 (clear-stream _test-input-stream)
942 (clear-stream $_test-input-buffered-file->buffer)
943 (clear-stream _test-output-stream)
944 (clear-stream $_test-output-buffered-file->buffer)
945 (clear-stream _test-error-stream)
946 (clear-stream $_test-error-buffered-file->buffer)
947
948 68/push 0/imm32
949 68/push 0/imm32
950 89/<- %edx 4/r32/esp
951 (tailor-exit-descriptor %edx 0x10)
952
953 (write _test-input-stream "fn foo a: (addr array addr int) {\n")
954 (write _test-input-stream "}\n")
955
956 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
957
958
959 89/<- %edx 4/r32/esp
960 (flush _test-output-buffered-file)
961 (flush _test-error-buffered-file)
962 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
968
969 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-2: output should be empty")
970 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-2: error message")
971
972 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-2: exit status")
973
974 81 0/subop/add %esp 8/imm32
975
976 5d/pop-to-ebp
977 c3/return
978
979 test-function-with-addr-inout-3:
980
981 55/push-ebp
982 89/<- %ebp 4/r32/esp
983
984 (clear-stream _test-input-stream)
985 (clear-stream $_test-input-buffered-file->buffer)
986 (clear-stream _test-output-stream)
987 (clear-stream $_test-output-buffered-file->buffer)
988 (clear-stream _test-error-stream)
989 (clear-stream $_test-error-buffered-file->buffer)
990
991 68/push 0/imm32
992 68/push 0/imm32
993 89/<- %edx 4/r32/esp
994 (tailor-exit-descriptor %edx 0x10)
995
996 (write _test-input-stream "fn foo a: (addr array (addr int) 3) {\n")
997 (write _test-input-stream "}\n")
998
999 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1000
1001
1002 89/<- %edx 4/r32/esp
1003 (flush _test-output-buffered-file)
1004 (flush _test-error-buffered-file)
1005 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1011
1012 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-3: output should be empty")
1013 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-3: error message")
1014
1015 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-3: exit status")
1016
1017 81 0/subop/add %esp 8/imm32
1018
1019 5d/pop-to-ebp
1020 c3/return
1021
1022 test-function-with-addr-inout-4:
1023
1024 55/push-ebp
1025 89/<- %ebp 4/r32/esp
1026
1027 (clear-stream _test-input-stream)
1028 (clear-stream $_test-input-buffered-file->buffer)
1029 (clear-stream _test-output-stream)
1030 (clear-stream $_test-output-buffered-file->buffer)
1031 (clear-stream _test-error-stream)
1032 (clear-stream $_test-error-buffered-file->buffer)
1033
1034 68/push 0/imm32
1035 68/push 0/imm32
1036 89/<- %edx 4/r32/esp
1037 (tailor-exit-descriptor %edx 0x10)
1038
1039 (write _test-input-stream "fn foo a: (array (addr int) 3) {\n")
1040 (write _test-input-stream "}\n")
1041
1042 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1043
1044
1045 89/<- %edx 4/r32/esp
1046 (flush _test-output-buffered-file)
1047 (flush _test-error-buffered-file)
1048 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1054
1055 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-4: output should be empty")
1056 (check-next-stream-line-equal _test-error-stream "fn foo: inout 'a' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function" "F - test-function-with-addr-inout-4: error message")
1057
1058 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-4: exit status")
1059
1060 81 0/subop/add %esp 8/imm32
1061
1062 5d/pop-to-ebp
1063 c3/return
1064
1065
1066 test-function-main-with-addr-inout:
1067
1068 55/push-ebp
1069 89/<- %ebp 4/r32/esp
1070
1071 (clear-stream _test-input-stream)
1072 (clear-stream $_test-input-buffered-file->buffer)
1073 (clear-stream _test-output-stream)
1074 (clear-stream $_test-output-buffered-file->buffer)
1075
1076 (write _test-input-stream "fn main a: (addr addr int) {\n")
1077 (write _test-input-stream "}\n")
1078
1079 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1080 (flush _test-output-buffered-file)
1081
1082
1083 89/<- %esp 5/r32/ebp
1084 5d/pop-to-ebp
1085 c3/return
1086
1087
1088 test-signature-lookup-with-addr-inout:
1089
1090 55/push-ebp
1091 89/<- %ebp 4/r32/esp
1092
1093 (clear-stream _test-input-stream)
1094 (clear-stream $_test-input-buffered-file->buffer)
1095 (clear-stream _test-output-stream)
1096 (clear-stream $_test-output-buffered-file->buffer)
1097
1098 (write _test-input-stream "sig lookup h: (handle _T) -> _/eax: (addr _T)\n")
1099
1100 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1101 (flush _test-output-buffered-file)
1102
1103
1104 89/<- %esp 5/r32/ebp
1105 5d/pop-to-ebp
1106 c3/return
1107
1108 test-convert-function-with-arg-and-body:
1109
1110 55/push-ebp
1111 89/<- %ebp 4/r32/esp
1112
1113 (clear-stream _test-input-stream)
1114 (clear-stream $_test-input-buffered-file->buffer)
1115 (clear-stream _test-output-stream)
1116 (clear-stream $_test-output-buffered-file->buffer)
1117
1118 (write _test-input-stream "fn foo n: int {\n")
1119 (write _test-input-stream " increment n\n")
1120 (write _test-input-stream "}\n")
1121
1122 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1123 (flush _test-output-buffered-file)
1124 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1130
1131 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
1132 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
1133 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
1134 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
1135 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
1136 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
1137 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
1138 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
1139 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
1140 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
1141 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
1142 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
1143 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
1144
1145 89/<- %esp 5/r32/ebp
1146 5d/pop-to-ebp
1147 c3/return
1148
1149 test-convert-function-distinguishes-args:
1150
1151 55/push-ebp
1152 89/<- %ebp 4/r32/esp
1153
1154 (clear-stream _test-input-stream)
1155 (clear-stream $_test-input-buffered-file->buffer)
1156 (clear-stream _test-output-stream)
1157 (clear-stream $_test-output-buffered-file->buffer)
1158
1159 (write _test-input-stream "fn foo a: int, b: int {\n")
1160 (write _test-input-stream " increment b\n")
1161 (write _test-input-stream "}\n")
1162
1163 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1164 (flush _test-output-buffered-file)
1165 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1171
1172 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
1173 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
1174 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
1175 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
1176 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
1177 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
1178 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
1179 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
1180 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
1181 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
1182 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
1183 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
1184 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
1185
1186 89/<- %esp 5/r32/ebp
1187 5d/pop-to-ebp
1188 c3/return
1189
1190 test-convert-function-with-return-literal:
1191
1192 55/push-ebp
1193 89/<- %ebp 4/r32/esp
1194
1195 (clear-stream _test-input-stream)
1196 (clear-stream $_test-input-buffered-file->buffer)
1197 (clear-stream _test-output-stream)
1198 (clear-stream $_test-output-buffered-file->buffer)
1199
1200 (write _test-input-stream "fn foo -> _/eax: int {\n")
1201 (write _test-input-stream " return 0\n")
1202 (write _test-input-stream "}\n")
1203
1204 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1205 (flush _test-output-buffered-file)
1206 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1212
1213 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-literal/0")
1214 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-literal/1")
1215 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-literal/2")
1216 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-literal/3")
1217 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-literal/4")
1218 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-literal/5")
1219 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-literal/6")
1220 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-literal/7")
1221 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-literal/8")
1222 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-literal/9")
1223 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-literal/10")
1224 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-literal/11")
1225 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-literal/12")
1226 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-literal/13")
1227
1228 89/<- %esp 5/r32/ebp
1229 5d/pop-to-ebp
1230 c3/return
1231
1232 test-convert-function-with-return:
1233
1234 55/push-ebp
1235 89/<- %ebp 4/r32/esp
1236
1237 (clear-stream _test-input-stream)
1238 (clear-stream $_test-input-buffered-file->buffer)
1239 (clear-stream _test-output-stream)
1240 (clear-stream $_test-output-buffered-file->buffer)
1241
1242 (write _test-input-stream "fn foo -> _/eax: int {\n")
1243 (write _test-input-stream " var y: int\n")
1244 (write _test-input-stream " return y\n")
1245 (write _test-input-stream "}\n")
1246
1247 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1248 (flush _test-output-buffered-file)
1249 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1255
1256 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
1257 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
1258 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
1259 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1260 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1261 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1262 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1263 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-function-with-return/7")
1264 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1265 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1266 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1267 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1268 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1269 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1270 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1271 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1272
1273 89/<- %esp 5/r32/ebp
1274 5d/pop-to-ebp
1275 c3/return
1276
1277 test-convert-function-with-return-float:
1278
1279 55/push-ebp
1280 89/<- %ebp 4/r32/esp
1281
1282 (clear-stream _test-input-stream)
1283 (clear-stream $_test-input-buffered-file->buffer)
1284 (clear-stream _test-output-stream)
1285 (clear-stream $_test-output-buffered-file->buffer)
1286
1287 (write _test-input-stream "fn foo -> _/xmm0: float {\n")
1288 (write _test-input-stream " var y: float\n")
1289 (write _test-input-stream " return y\n")
1290 (write _test-input-stream "}\n")
1291
1292 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1293 (flush _test-output-buffered-file)
1294 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1300
1301 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
1302 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
1303 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
1304 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1305 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1306 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1307 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1308 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *(ebp+0xfffffffc) 0x00000000/x32" "F - test-convert-function-with-return/7")
1309 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1310 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1311 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1312 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1313 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1314 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1315 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1316 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1317
1318 89/<- %esp 5/r32/ebp
1319 5d/pop-to-ebp
1320 c3/return
1321
1322 test-convert-function-with-return-register:
1323
1324 55/push-ebp
1325 89/<- %ebp 4/r32/esp
1326
1327 (clear-stream _test-input-stream)
1328 (clear-stream $_test-input-buffered-file->buffer)
1329 (clear-stream _test-output-stream)
1330 (clear-stream $_test-output-buffered-file->buffer)
1331
1332 (write _test-input-stream "fn foo -> _/eax: int {\n")
1333 (write _test-input-stream " var y/eax: int <- copy 3\n")
1334 (write _test-input-stream " return y\n")
1335 (write _test-input-stream "}\n")
1336
1337 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1338 (flush _test-output-buffered-file)
1339 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1345
1346 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register/0")
1347 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register/1")
1348 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register/2")
1349 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register/3")
1350 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register/4")
1351 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register/5")
1352 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register/6")
1353 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register/7")
1354 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register/8")
1355 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register/9")
1356 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register/10")
1357 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register/11")
1358 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register/12")
1359 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register/13")
1360 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register/14")
1361 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register/15")
1362 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register/16")
1363
1364 89/<- %esp 5/r32/ebp
1365 5d/pop-to-ebp
1366 c3/return
1367
1368 test-function-with-output-without-register:
1369
1370 55/push-ebp
1371 89/<- %ebp 4/r32/esp
1372
1373 (clear-stream _test-input-stream)
1374 (clear-stream $_test-input-buffered-file->buffer)
1375 (clear-stream _test-output-stream)
1376 (clear-stream $_test-output-buffered-file->buffer)
1377 (clear-stream _test-error-stream)
1378 (clear-stream $_test-error-buffered-file->buffer)
1379
1380 68/push 0/imm32
1381 68/push 0/imm32
1382 89/<- %edx 4/r32/esp
1383 (tailor-exit-descriptor %edx 0x10)
1384
1385 (write _test-input-stream "fn foo -> _: int {\n")
1386 (write _test-input-stream "}\n")
1387
1388 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1389
1390
1391 89/<- %edx 4/r32/esp
1392 (flush _test-output-buffered-file)
1393 (flush _test-error-buffered-file)
1394 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1400
1401 (check-stream-equal _test-output-stream "" "F - test-function-with-output-without-register: output should be empty")
1402 (check-next-stream-line-equal _test-error-stream "fn foo: function output '_' must be in a register, in instruction 'fn foo -> _: int {" "F - test-function-with-output-without-register: error message")
1403
1404 (check-ints-equal *(edx+4) 2 "F - test-function-with-output-without-register: exit status")
1405
1406 81 0/subop/add %esp 8/imm32
1407
1408 5d/pop-to-ebp
1409 c3/return
1410
1411 test-function-with-outputs-in-conflicting-registers:
1412
1413 55/push-ebp
1414 89/<- %ebp 4/r32/esp
1415
1416 (clear-stream _test-input-stream)
1417 (clear-stream $_test-input-buffered-file->buffer)
1418 (clear-stream _test-output-stream)
1419 (clear-stream $_test-output-buffered-file->buffer)
1420 (clear-stream _test-error-stream)
1421 (clear-stream $_test-error-buffered-file->buffer)
1422
1423 68/push 0/imm32
1424 68/push 0/imm32
1425 89/<- %edx 4/r32/esp
1426 (tailor-exit-descriptor %edx 0x10)
1427
1428 (write _test-input-stream "fn foo -> _/eax: int, _/eax: int {\n")
1429 (write _test-input-stream "}\n")
1430
1431 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1432
1433
1434 89/<- %edx 4/r32/esp
1435 (flush _test-output-buffered-file)
1436 (flush _test-error-buffered-file)
1437 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1443
1444 (check-stream-equal _test-output-stream "" "F - test-function-with-outputs-in-conflicting-registers: output should be empty")
1445 (check-next-stream-line-equal _test-error-stream "fn foo: outputs must be in unique registers" "F - test-function-with-outputs-in-conflicting-registers: error message")
1446
1447 (check-ints-equal *(edx+4) 2 "F - test-function-with-outputs-in-conflicting-registers: exit status")
1448
1449 81 0/subop/add %esp 8/imm32
1450
1451 5d/pop-to-ebp
1452 c3/return
1453
1454 test-function-with-named-output:
1455
1456 55/push-ebp
1457 89/<- %ebp 4/r32/esp
1458
1459 (clear-stream _test-input-stream)
1460 (clear-stream $_test-input-buffered-file->buffer)
1461 (clear-stream _test-output-stream)
1462 (clear-stream $_test-output-buffered-file->buffer)
1463 (clear-stream _test-error-stream)
1464 (clear-stream $_test-error-buffered-file->buffer)
1465
1466 68/push 0/imm32
1467 68/push 0/imm32
1468 89/<- %edx 4/r32/esp
1469 (tailor-exit-descriptor %edx 0x10)
1470
1471 (write _test-input-stream "fn foo -> x/eax: int {\n")
1472 (write _test-input-stream " return 0\n")
1473 (write _test-input-stream "}\n")
1474
1475 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1476
1477
1478 89/<- %edx 4/r32/esp
1479 (flush _test-output-buffered-file)
1480 (flush _test-error-buffered-file)
1481 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1487
1488 (check-stream-equal _test-output-stream "" "F - test-function-with-named-output: output should be empty")
1489 (check-next-stream-line-equal _test-error-stream "fn foo: function outputs cannot be named; rename 'x' in the header to '_'" "F - test-function-with-named-output: error message")
1490
1491 (check-ints-equal *(edx+4) 2 "F - test-function-with-named-output: exit status")
1492
1493 81 0/subop/add %esp 8/imm32
1494
1495 5d/pop-to-ebp
1496 c3/return
1497
1498 test-return-with-wrong-type:
1499
1500 55/push-ebp
1501 89/<- %ebp 4/r32/esp
1502
1503 (clear-stream _test-input-stream)
1504 (clear-stream $_test-input-buffered-file->buffer)
1505 (clear-stream _test-output-stream)
1506 (clear-stream $_test-output-buffered-file->buffer)
1507 (clear-stream _test-error-stream)
1508 (clear-stream $_test-error-buffered-file->buffer)
1509
1510 68/push 0/imm32
1511 68/push 0/imm32
1512 89/<- %edx 4/r32/esp
1513 (tailor-exit-descriptor %edx 0x10)
1514
1515 (write _test-input-stream "fn foo -> _/eax: int {\n")
1516 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1517 (write _test-input-stream " return x\n")
1518 (write _test-input-stream "}\n")
1519
1520 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1521
1522
1523 89/<- %edx 4/r32/esp
1524 (flush _test-output-buffered-file)
1525 (flush _test-error-buffered-file)
1526 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1532
1533 (check-stream-equal _test-output-stream "" "F - test-return-with-wrong-type: output should be empty")
1534 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' has the wrong type" "F - test-return-with-wrong-type: error message")
1535
1536 (check-ints-equal *(edx+4) 2 "F - test-return-with-wrong-type: exit status")
1537
1538 81 0/subop/add %esp 8/imm32
1539
1540 5d/pop-to-ebp
1541 c3/return
1542
1543 test-missing-return:
1544
1545 55/push-ebp
1546 89/<- %ebp 4/r32/esp
1547
1548 (clear-stream _test-input-stream)
1549 (clear-stream $_test-input-buffered-file->buffer)
1550 (clear-stream _test-output-stream)
1551 (clear-stream $_test-output-buffered-file->buffer)
1552 (clear-stream _test-error-stream)
1553 (clear-stream $_test-error-buffered-file->buffer)
1554
1555 68/push 0/imm32
1556 68/push 0/imm32
1557 89/<- %edx 4/r32/esp
1558 (tailor-exit-descriptor %edx 0x10)
1559
1560 (write _test-input-stream "fn foo -> _/eax: int {\n")
1561 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1562 (write _test-input-stream "}\n")
1563
1564 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1565
1566
1567 89/<- %edx 4/r32/esp
1568 (flush _test-output-buffered-file)
1569 (flush _test-error-buffered-file)
1570 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1576
1577 (check-stream-equal _test-output-stream "" "F - test-missing-return: output should be empty")
1578 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return: error message")
1579
1580 (check-ints-equal *(edx+4) 2 "F - test-missing-return: exit status")
1581
1582 81 0/subop/add %esp 8/imm32
1583
1584 5d/pop-to-ebp
1585 c3/return
1586
1587 test-missing-return-2:
1588
1589 55/push-ebp
1590 89/<- %ebp 4/r32/esp
1591
1592 (clear-stream _test-input-stream)
1593 (clear-stream $_test-input-buffered-file->buffer)
1594 (clear-stream _test-output-stream)
1595 (clear-stream $_test-output-buffered-file->buffer)
1596 (clear-stream _test-error-stream)
1597 (clear-stream $_test-error-buffered-file->buffer)
1598
1599 68/push 0/imm32
1600 68/push 0/imm32
1601 89/<- %edx 4/r32/esp
1602 (tailor-exit-descriptor %edx 0x10)
1603
1604 (write _test-input-stream "fn foo -> _/eax: int {\n")
1605 (write _test-input-stream "}\n")
1606
1607 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1608
1609
1610 89/<- %edx 4/r32/esp
1611 (flush _test-output-buffered-file)
1612 (flush _test-error-buffered-file)
1613 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1619
1620 (check-stream-equal _test-output-stream "" "F - test-missing-return-2: output should be empty")
1621 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return-2: error message")
1622
1623 (check-ints-equal *(edx+4) 2 "F - test-missing-return-2: exit status")
1624
1625 81 0/subop/add %esp 8/imm32
1626
1627 5d/pop-to-ebp
1628 c3/return
1629
1630 test-early-exit-without-return:
1631
1632 55/push-ebp
1633 89/<- %ebp 4/r32/esp
1634
1635 (clear-stream _test-input-stream)
1636 (clear-stream $_test-input-buffered-file->buffer)
1637 (clear-stream _test-output-stream)
1638 (clear-stream $_test-output-buffered-file->buffer)
1639 (clear-stream _test-error-stream)
1640 (clear-stream $_test-error-buffered-file->buffer)
1641
1642 68/push 0/imm32
1643 68/push 0/imm32
1644 89/<- %edx 4/r32/esp
1645 (tailor-exit-descriptor %edx 0x10)
1646
1647 (write _test-input-stream "fn foo -> _/eax: int {\n")
1648 (write _test-input-stream " break\n")
1649 (write _test-input-stream " return 0\n")
1650 (write _test-input-stream "}\n")
1651
1652 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1653
1654
1655 89/<- %edx 4/r32/esp
1656 (flush _test-output-buffered-file)
1657 (flush _test-error-buffered-file)
1658 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1664
1665 (check-stream-equal _test-output-stream "" "F - test-early-exit-without-return: output should be empty")
1666 (check-next-stream-line-equal _test-error-stream "fn foo has outputs, so you cannot 'break' out of the outermost block. Use 'return'." "F - test-early-exit-without-return: error message")
1667
1668 (check-ints-equal *(edx+4) 2 "F - test-early-exit-without-return: exit status")
1669
1670 81 0/subop/add %esp 8/imm32
1671
1672 5d/pop-to-ebp
1673 c3/return
1674
1675 test-return-with-too-few-inouts:
1676
1677 55/push-ebp
1678 89/<- %ebp 4/r32/esp
1679
1680 (clear-stream _test-input-stream)
1681 (clear-stream $_test-input-buffered-file->buffer)
1682 (clear-stream _test-output-stream)
1683 (clear-stream $_test-output-buffered-file->buffer)
1684 (clear-stream _test-error-stream)
1685 (clear-stream $_test-error-buffered-file->buffer)
1686
1687 68/push 0/imm32
1688 68/push 0/imm32
1689 89/<- %edx 4/r32/esp
1690 (tailor-exit-descriptor %edx 0x10)
1691
1692 (write _test-input-stream "fn foo -> _/eax: int {\n")
1693 (write _test-input-stream " return\n")
1694 (write _test-input-stream "}\n")
1695
1696 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1697
1698
1699 89/<- %edx 4/r32/esp
1700 (flush _test-output-buffered-file)
1701 (flush _test-error-buffered-file)
1702 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1708
1709 (check-stream-equal _test-output-stream "" "F - test-return-with-too-few-inouts: output should be empty")
1710 (check-next-stream-line-equal _test-error-stream "fn foo: return: too few inouts" "F - test-return-with-too-few-inouts: error message")
1711
1712 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-few-inouts: exit status")
1713
1714 81 0/subop/add %esp 8/imm32
1715
1716 5d/pop-to-ebp
1717 c3/return
1718
1719 test-return-with-too-many-inouts:
1720
1721 55/push-ebp
1722 89/<- %ebp 4/r32/esp
1723
1724 (clear-stream _test-input-stream)
1725 (clear-stream $_test-input-buffered-file->buffer)
1726 (clear-stream _test-output-stream)
1727 (clear-stream $_test-output-buffered-file->buffer)
1728 (clear-stream _test-error-stream)
1729 (clear-stream $_test-error-buffered-file->buffer)
1730
1731 68/push 0/imm32
1732 68/push 0/imm32
1733 89/<- %edx 4/r32/esp
1734 (tailor-exit-descriptor %edx 0x10)
1735
1736 (write _test-input-stream "fn foo -> _/eax: int {\n")
1737 (write _test-input-stream " return 0, 0\n")
1738 (write _test-input-stream "}\n")
1739
1740 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1741
1742
1743 89/<- %edx 4/r32/esp
1744 (flush _test-output-buffered-file)
1745 (flush _test-error-buffered-file)
1746 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1752
1753 (check-stream-equal _test-output-stream "" "F - test-return-with-too-many-inouts: output should be empty")
1754 (check-next-stream-line-equal _test-error-stream "fn foo: return: too many inouts" "F - test-return-with-too-many-inouts: error message")
1755
1756 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-many-inouts: exit status")
1757
1758 81 0/subop/add %esp 8/imm32
1759
1760 5d/pop-to-ebp
1761 c3/return
1762
1763 test-return-unavailable-value:
1764
1765 55/push-ebp
1766 89/<- %ebp 4/r32/esp
1767
1768 (clear-stream _test-input-stream)
1769 (clear-stream $_test-input-buffered-file->buffer)
1770 (clear-stream _test-output-stream)
1771 (clear-stream $_test-output-buffered-file->buffer)
1772 (clear-stream _test-error-stream)
1773 (clear-stream $_test-error-buffered-file->buffer)
1774
1775 68/push 0/imm32
1776 68/push 0/imm32
1777 89/<- %edx 4/r32/esp
1778 (tailor-exit-descriptor %edx 0x10)
1779
1780 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1781 (write _test-input-stream " var x/eax: int <- copy 0\n")
1782 (write _test-input-stream " var y/ecx: int <- copy 0\n")
1783 (write _test-input-stream " return y, x\n")
1784 (write _test-input-stream "}\n")
1785
1786 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1787
1788
1789 89/<- %edx 4/r32/esp
1790 (flush _test-output-buffered-file)
1791 (flush _test-error-buffered-file)
1792 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1798
1799 (check-stream-equal _test-output-stream "" "F - test-return-unavailable-value: output should be empty")
1800 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' is no longer available" "F - test-return-unavailable-value: error message")
1801
1802 (check-ints-equal *(edx+4) 2 "F - test-return-unavailable-value: exit status")
1803
1804 81 0/subop/add %esp 8/imm32
1805
1806 5d/pop-to-ebp
1807 c3/return
1808
1809 test-return-literal-to-float:
1810
1811 55/push-ebp
1812 89/<- %ebp 4/r32/esp
1813
1814 (clear-stream _test-input-stream)
1815 (clear-stream $_test-input-buffered-file->buffer)
1816 (clear-stream _test-output-stream)
1817 (clear-stream $_test-output-buffered-file->buffer)
1818 (clear-stream _test-error-stream)
1819 (clear-stream $_test-error-buffered-file->buffer)
1820
1821 68/push 0/imm32
1822 68/push 0/imm32
1823 89/<- %edx 4/r32/esp
1824 (tailor-exit-descriptor %edx 0x10)
1825
1826 (write _test-input-stream "fn foo -> _/xmm0: float {\n")
1827 (write _test-input-stream " return 0\n")
1828 (write _test-input-stream "}\n")
1829
1830 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1831
1832
1833 89/<- %edx 4/r32/esp
1834 (flush _test-output-buffered-file)
1835 (flush _test-error-buffered-file)
1836 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1842
1843 (check-stream-equal _test-output-stream "" "F - test-return-literal-to-float: output should be empty")
1844 (check-next-stream-line-equal _test-error-stream "fn foo: return: cannot copy literal '0' to float" "F - test-return-literal-to-float: error message")
1845
1846 (check-ints-equal *(edx+4) 2 "F - test-return-literal-to-float: exit status")
1847
1848 81 0/subop/add %esp 8/imm32
1849
1850 5d/pop-to-ebp
1851 c3/return
1852
1853 test-convert-return-with-duplicate-values:
1854
1855 55/push-ebp
1856 89/<- %ebp 4/r32/esp
1857
1858 (clear-stream _test-input-stream)
1859 (clear-stream $_test-input-buffered-file->buffer)
1860 (clear-stream _test-output-stream)
1861 (clear-stream $_test-output-buffered-file->buffer)
1862
1863 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1864 (write _test-input-stream " var x/eax: int <- copy 0x34\n")
1865 (write _test-input-stream " return x, x\n")
1866 (write _test-input-stream "}\n")
1867
1868 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1869 (flush _test-output-buffered-file)
1870 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1876
1877 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values/0")
1878 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values/1")
1879 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values/2")
1880 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values/3")
1881 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values/4")
1882 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values/5")
1883 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-return-with-duplicate-values/6")
1884 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0x34/imm32" "F - test-convert-return-with-duplicate-values/7")
1885 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-return-with-duplicate-values/8")
1886 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000001/r32" "F - test-convert-return-with-duplicate-values/9")
1887 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values/10")
1888 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values/11")
1889 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values/12")
1890 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values/13")
1891 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values/14")
1892 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values/15")
1893 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values/16")
1894 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values/17")
1895
1896 89/<- %esp 5/r32/ebp
1897 5d/pop-to-ebp
1898 c3/return
1899
1900 test-convert-return-with-duplicate-values-2:
1901
1902 55/push-ebp
1903 89/<- %ebp 4/r32/esp
1904
1905 (clear-stream _test-input-stream)
1906 (clear-stream $_test-input-buffered-file->buffer)
1907 (clear-stream _test-output-stream)
1908 (clear-stream $_test-output-buffered-file->buffer)
1909
1910 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1911 (write _test-input-stream " var x/ecx: int <- copy 0x34\n")
1912 (write _test-input-stream " return x, x\n")
1913 (write _test-input-stream "}\n")
1914
1915 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1916 (flush _test-output-buffered-file)
1917 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1923
1924 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values-2/0")
1925 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values-2/1")
1926 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values-2/2")
1927 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values-2/3")
1928 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values-2/4")
1929 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values-2/5")
1930 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-return-with-duplicate-values-2/6")
1931 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-convert-return-with-duplicate-values-2/7")
1932 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-return-with-duplicate-values-2/8")
1933 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000001/r32" "F - test-convert-return-with-duplicate-values-2/9")
1934 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values-2/10")
1935 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values-2/11")
1936 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values-2/12")
1937 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values-2/13")
1938 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values-2/14")
1939 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values-2/15")
1940 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values-2/16")
1941 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values-2/17")
1942
1943 89/<- %esp 5/r32/ebp
1944 5d/pop-to-ebp
1945 c3/return
1946
1947 test-stmt-with-unknown-var:
1948
1949 55/push-ebp
1950 89/<- %ebp 4/r32/esp
1951
1952 (clear-stream _test-input-stream)
1953 (clear-stream $_test-input-buffered-file->buffer)
1954 (clear-stream _test-output-stream)
1955 (clear-stream $_test-output-buffered-file->buffer)
1956 (clear-stream _test-error-stream)
1957 (clear-stream $_test-error-buffered-file->buffer)
1958
1959 68/push 0/imm32
1960 68/push 0/imm32
1961 89/<- %edx 4/r32/esp
1962 (tailor-exit-descriptor %edx 0x10)
1963
1964 (write _test-input-stream "fn foo {\n")
1965 (write _test-input-stream " x <- copy 0x34\n")
1966 (write _test-input-stream "}\n")
1967
1968 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1969
1970
1971 89/<- %edx 4/r32/esp
1972 (flush _test-output-buffered-file)
1973 (flush _test-error-buffered-file)
1974 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1980
1981 (check-stream-equal _test-output-stream "" "F - test-stmt-with-unknown-var: output should be empty")
1982 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-stmt-with-unknown-var: error message")
1983
1984 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-unknown-var: exit status")
1985
1986 81 0/subop/add %esp 8/imm32
1987
1988 5d/pop-to-ebp
1989 c3/return
1990
1991 test-stmt-with-missing-var-keyword:
1992
1993 55/push-ebp
1994 89/<- %ebp 4/r32/esp
1995
1996 (clear-stream _test-input-stream)
1997 (clear-stream $_test-input-buffered-file->buffer)
1998 (clear-stream _test-output-stream)
1999 (clear-stream $_test-output-buffered-file->buffer)
2000 (clear-stream _test-error-stream)
2001 (clear-stream $_test-error-buffered-file->buffer)
2002
2003 68/push 0/imm32
2004 68/push 0/imm32
2005 89/<- %edx 4/r32/esp
2006 (tailor-exit-descriptor %edx 0x10)
2007
2008 (write _test-input-stream "fn foo {\n")
2009 (write _test-input-stream " x: int\n")
2010 (write _test-input-stream "}\n")
2011
2012 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2013
2014
2015 89/<- %edx 4/r32/esp
2016 (flush _test-output-buffered-file)
2017 (flush _test-error-buffered-file)
2018 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2024
2025 (check-stream-equal _test-output-stream "" "F - test-stmt-with-missing-var-keyword: output should be empty")
2026 (check-next-stream-line-equal _test-error-stream "fn foo: unexpected ':'; did you forget a 'var'?" "F - test-stmt-with-missing-var-keyword: error message")
2027
2028 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-missing-var-keyword: exit status")
2029
2030 81 0/subop/add %esp 8/imm32
2031
2032 5d/pop-to-ebp
2033 c3/return
2034
2035 test-stmt-with-invalid-identifier:
2036
2037 55/push-ebp
2038 89/<- %ebp 4/r32/esp
2039
2040 (clear-stream _test-input-stream)
2041 (clear-stream $_test-input-buffered-file->buffer)
2042 (clear-stream _test-output-stream)
2043 (clear-stream $_test-output-buffered-file->buffer)
2044 (clear-stream _test-error-stream)
2045 (clear-stream $_test-error-buffered-file->buffer)
2046
2047 68/push 0/imm32
2048 68/push 0/imm32
2049 89/<- %edx 4/r32/esp
2050 (tailor-exit-descriptor %edx 0x10)
2051
2052 (write _test-input-stream "fn foo {\n")
2053 (write _test-input-stream " 1 <- copy 0x34\n")
2054 (write _test-input-stream "}\n")
2055
2056 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2057
2058
2059 89/<- %edx 4/r32/esp
2060 (flush _test-output-buffered-file)
2061 (flush _test-error-buffered-file)
2062 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2068
2069 (check-stream-equal _test-output-stream "" "F - test-stmt-with-invalid-identifier: output should be empty")
2070 (check-next-stream-line-equal _test-error-stream "fn foo: invalid identifier '1'" "F - test-stmt-with-invalid-identifier: error message")
2071
2072 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-invalid-identifier: exit status")
2073
2074 81 0/subop/add %esp 8/imm32
2075
2076 5d/pop-to-ebp
2077 c3/return
2078
2079 test-stmt-with-deref-var:
2080
2081 55/push-ebp
2082 89/<- %ebp 4/r32/esp
2083
2084 (clear-stream _test-input-stream)
2085 (clear-stream $_test-input-buffered-file->buffer)
2086 (clear-stream _test-output-stream)
2087 (clear-stream $_test-output-buffered-file->buffer)
2088 (clear-stream _test-error-stream)
2089 (clear-stream $_test-error-buffered-file->buffer)
2090
2091 68/push 0/imm32
2092 68/push 0/imm32
2093 89/<- %edx 4/r32/esp
2094 (tailor-exit-descriptor %edx 0x10)
2095
2096 (write _test-input-stream "fn foo {\n")
2097 (write _test-input-stream " *x <- copy 0x34\n")
2098 (write _test-input-stream "}\n")
2099
2100 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2101
2102
2103 89/<- %edx 4/r32/esp
2104 (flush _test-output-buffered-file)
2105 (flush _test-error-buffered-file)
2106 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2112
2113 (check-stream-equal _test-output-stream "" "F - test-stmt-with-deref-var: output should be empty")
2114 (check-next-stream-line-equal _test-error-stream "fn foo: output '*x' should write to a register, and therefore cannot be dereferenced" "F - test-stmt-with-deref-var: error message")
2115
2116 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-deref-var: exit status")
2117
2118 81 0/subop/add %esp 8/imm32
2119
2120 5d/pop-to-ebp
2121 c3/return
2122
2123 test-convert-function-with-literal-arg:
2124
2125 55/push-ebp
2126 89/<- %ebp 4/r32/esp
2127
2128 (clear-stream _test-input-stream)
2129 (clear-stream $_test-input-buffered-file->buffer)
2130 (clear-stream _test-output-stream)
2131 (clear-stream $_test-output-buffered-file->buffer)
2132
2133 (write _test-input-stream "fn foo a: int, b: int -> _/eax: int {\n")
2134 (write _test-input-stream " var result/eax: int <- copy a\n")
2135 (write _test-input-stream " result <- add 1\n")
2136 (write _test-input-stream " return result\n")
2137 (write _test-input-stream "}\n")
2138
2139 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2140 (flush _test-output-buffered-file)
2141 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2147
2148 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
2149 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
2150 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
2151 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
2152 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
2153 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
2154 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-literal-arg/6")
2155 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/7")
2156 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/8")
2157 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-literal-arg/9")
2158 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg/10")
2159 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg/11")
2160 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/12")
2161 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/13")
2162 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/14")
2163 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/15")
2164 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/16")
2165 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/17")
2166
2167 89/<- %esp 5/r32/ebp
2168 5d/pop-to-ebp
2169 c3/return
2170
2171 test-convert-function-with-literal-arg-2:
2172
2173 55/push-ebp
2174 89/<- %ebp 4/r32/esp
2175
2176 (clear-stream _test-input-stream)
2177 (clear-stream $_test-input-buffered-file->buffer)
2178 (clear-stream _test-output-stream)
2179 (clear-stream $_test-output-buffered-file->buffer)
2180
2181 (write _test-input-stream "fn foo a: int, b: int -> _/ebx: int {\n")
2182 (write _test-input-stream " var result/ebx: int <- copy a\n")
2183 (write _test-input-stream " result <- add 1\n")
2184 (write _test-input-stream " return result\n")
2185 (write _test-input-stream "}\n")
2186
2187 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2188 (flush _test-output-buffered-file)
2189 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2195
2196 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
2197 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
2198 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
2199 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
2200 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
2201 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
2202 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-with-literal-arg-2/6")
2203 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/7")
2204 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/8")
2205 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/9")
2206 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg-2/10")
2207 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg-2/11")
2208 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/12")
2209 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/13")
2210 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/14")
2211 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/15")
2212 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/16")
2213 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/17")
2214
2215 89/<- %esp 5/r32/ebp
2216 5d/pop-to-ebp
2217 c3/return
2218
2219 test-convert-function-call-with-literal-arg:
2220
2221 55/push-ebp
2222 89/<- %ebp 4/r32/esp
2223
2224 (clear-stream _test-input-stream)
2225 (clear-stream $_test-input-buffered-file->buffer)
2226 (clear-stream _test-output-stream)
2227 (clear-stream $_test-output-buffered-file->buffer)
2228
2229 (write _test-input-stream "fn main -> _/ebx: int {\n")
2230 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2231 (write _test-input-stream " return result\n")
2232 (write _test-input-stream "}\n")
2233 (write _test-input-stream "fn do-add a: int, b: int -> _/eax: int {\n")
2234 (write _test-input-stream " var result/eax: int <- copy a\n")
2235 (write _test-input-stream " result <- add b\n")
2236 (write _test-input-stream " return result\n")
2237 (write _test-input-stream "}\n")
2238
2239 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2240 (flush _test-output-buffered-file)
2241 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2247
2248 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
2249 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
2250 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
2251 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
2252 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
2253 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
2254 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2255 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/7")
2256 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2257 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2258 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2259 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/11")
2260 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/12")
2261 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/13")
2262 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/14")
2263 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/15")
2264 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/16")
2265 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/17")
2266 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/18")
2267 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/19")
2268 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/20")
2269 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/21")
2270 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/22")
2271 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/23")
2272 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/24")
2273 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/25")
2274 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/26")
2275 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2276 (check-next-stream-line-equal _test-output-stream " e9/jump $do-add:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/28")
2277 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/29")
2278 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/30")
2279 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/31")
2280 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/32")
2281 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/33")
2282 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/34")
2283
2284 89/<- %esp 5/r32/ebp
2285 5d/pop-to-ebp
2286 c3/return
2287
2288 test-convert-function-call-with-literal-string-arg:
2289
2290 55/push-ebp
2291 89/<- %ebp 4/r32/esp
2292
2293 (clear-stream _test-input-stream)
2294 (clear-stream $_test-input-buffered-file->buffer)
2295 (clear-stream _test-output-stream)
2296 (clear-stream $_test-output-buffered-file->buffer)
2297
2298 (write _test-input-stream "fn foo {\n")
2299 (write _test-input-stream " string-func \"abc\"\n")
2300 (write _test-input-stream "}\n")
2301 (write _test-input-stream "sig string-func in: (addr array byte)\n")
2302
2303 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2304
2305
2306
2307 89/<- %esp 5/r32/ebp
2308 5d/pop-to-ebp
2309 c3/return
2310
2311 test-convert-function-call-with-literal-string-arg-and-type-parameter-in-signature:
2312
2313 55/push-ebp
2314 89/<- %ebp 4/r32/esp
2315
2316 (clear-stream _test-input-stream)
2317 (clear-stream $_test-input-buffered-file->buffer)
2318 (clear-stream _test-output-stream)
2319 (clear-stream $_test-output-buffered-file->buffer)
2320
2321 (write _test-input-stream "fn foo {\n")
2322 (write _test-input-stream " string-func \"abc\"\n")
2323 (write _test-input-stream "}\n")
2324 (write _test-input-stream "sig string-func in: (addr array _)\n")
2325
2326 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2327
2328
2329
2330 89/<- %esp 5/r32/ebp
2331 5d/pop-to-ebp
2332 c3/return
2333
2334 test-convert-function-call-with-null-addr:
2335
2336 55/push-ebp
2337 89/<- %ebp 4/r32/esp
2338
2339 (clear-stream _test-input-stream)
2340 (clear-stream $_test-input-buffered-file->buffer)
2341 (clear-stream _test-output-stream)
2342 (clear-stream $_test-output-buffered-file->buffer)
2343
2344 (write _test-input-stream "fn foo {\n")
2345 (write _test-input-stream " bar 0\n")
2346 (write _test-input-stream "}\n")
2347 (write _test-input-stream "sig bar in: (addr int)\n")
2348
2349 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2350
2351
2352
2353 89/<- %esp 5/r32/ebp
2354 5d/pop-to-ebp
2355 c3/return
2356
2357 test-convert-function-call-with-signature:
2358
2359 55/push-ebp
2360 89/<- %ebp 4/r32/esp
2361
2362 (clear-stream _test-input-stream)
2363 (clear-stream $_test-input-buffered-file->buffer)
2364 (clear-stream _test-output-stream)
2365 (clear-stream $_test-output-buffered-file->buffer)
2366
2367 (write _test-input-stream "fn main -> _/ebx: int {\n")
2368 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2369 (write _test-input-stream " return result\n")
2370 (write _test-input-stream "}\n")
2371 (write _test-input-stream "sig do-add a: int, b: int -> _/eax: int\n")
2372
2373 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2374 (flush _test-output-buffered-file)
2375 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2381
2382 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
2383 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
2384 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
2385 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
2386 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
2387 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
2388 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2389 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
2390 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2391 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2392 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2393 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
2394 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
2395 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
2396 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
2397 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
2398 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
2399
2400 89/<- %esp 5/r32/ebp
2401 5d/pop-to-ebp
2402 c3/return
2403
2404 test-convert-function-with-local-var-in-mem:
2405
2406 55/push-ebp
2407 89/<- %ebp 4/r32/esp
2408
2409 (clear-stream _test-input-stream)
2410 (clear-stream $_test-input-buffered-file->buffer)
2411 (clear-stream _test-output-stream)
2412 (clear-stream $_test-output-buffered-file->buffer)
2413
2414 (write _test-input-stream "fn foo {\n")
2415 (write _test-input-stream " var x: int\n")
2416 (write _test-input-stream " increment x\n")
2417 (write _test-input-stream "}\n")
2418
2419 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2420 (flush _test-output-buffered-file)
2421 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2427
2428 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
2429 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
2430 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
2431 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
2432 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
2433 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
2434 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
2435 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
2436 (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")
2437 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
2438 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
2439 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
2440 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
2441 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
2442 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
2443
2444 89/<- %esp 5/r32/ebp
2445 5d/pop-to-ebp
2446 c3/return
2447
2448 test-convert-invalid-literal:
2449
2450 55/push-ebp
2451 89/<- %ebp 4/r32/esp
2452
2453 (clear-stream _test-input-stream)
2454 (clear-stream $_test-input-buffered-file->buffer)
2455 (clear-stream _test-output-stream)
2456 (clear-stream $_test-output-buffered-file->buffer)
2457 (clear-stream _test-error-stream)
2458 (clear-stream $_test-error-buffered-file->buffer)
2459
2460 68/push 0/imm32
2461 68/push 0/imm32
2462 89/<- %edx 4/r32/esp
2463 (tailor-exit-descriptor %edx 0x10)
2464
2465 (write _test-input-stream "fn foo {\n")
2466 (write _test-input-stream " increment 1n\n")
2467 (write _test-input-stream "}\n")
2468
2469 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2470
2471
2472 89/<- %edx 4/r32/esp
2473 (flush _test-output-buffered-file)
2474 (flush _test-error-buffered-file)
2475 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2481
2482 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-literal: output should be empty")
2483 (check-next-stream-line-equal _test-error-stream "fn foo: variable '1n' cannot begin with a digit (or do you have a typo in a number?)" "F - test-convert-invalid-literal: error message")
2484
2485 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-literal: exit status")
2486
2487 81 0/subop/add %esp 8/imm32
2488
2489 5d/pop-to-ebp
2490 c3/return
2491
2492 test-convert-valid-literal-with-metadata:
2493
2494 55/push-ebp
2495 89/<- %ebp 4/r32/esp
2496
2497 (clear-stream _test-input-stream)
2498 (clear-stream $_test-input-buffered-file->buffer)
2499 (clear-stream _test-output-stream)
2500 (clear-stream $_test-output-buffered-file->buffer)
2501
2502 (write _test-input-stream "fn foo {\n")
2503 (write _test-input-stream " var x/eax: int <- copy 1/abc\n")
2504 (write _test-input-stream "}\n")
2505
2506 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2507 (flush _test-output-buffered-file)
2508 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2514
2515
2516 89/<- %esp 5/r32/ebp
2517 5d/pop-to-ebp
2518 c3/return
2519
2520 test-local-var-in-mem-has-no-initializer:
2521
2522 55/push-ebp
2523 89/<- %ebp 4/r32/esp
2524
2525 (clear-stream _test-input-stream)
2526 (clear-stream $_test-input-buffered-file->buffer)
2527 (clear-stream _test-output-stream)
2528 (clear-stream $_test-output-buffered-file->buffer)
2529 (clear-stream _test-error-stream)
2530 (clear-stream $_test-error-buffered-file->buffer)
2531
2532 68/push 0/imm32
2533 68/push 0/imm32
2534 89/<- %edx 4/r32/esp
2535 (tailor-exit-descriptor %edx 0x10)
2536
2537 (write _test-input-stream "fn foo {\n")
2538 (write _test-input-stream " var x: int <- copy 0\n")
2539 (write _test-input-stream " increment x\n")
2540 (write _test-input-stream "}\n")
2541
2542 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2543
2544
2545 89/<- %edx 4/r32/esp
2546 (flush _test-output-buffered-file)
2547 (flush _test-error-buffered-file)
2548 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2554
2555 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
2556 (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")
2557
2558 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
2559
2560 81 0/subop/add %esp 8/imm32
2561
2562 5d/pop-to-ebp
2563 c3/return
2564
2565 test-convert-function-with-local-var-with-compound-type-in-mem:
2566
2567 55/push-ebp
2568 89/<- %ebp 4/r32/esp
2569
2570 (clear-stream _test-input-stream)
2571 (clear-stream $_test-input-buffered-file->buffer)
2572 (clear-stream _test-output-stream)
2573 (clear-stream $_test-output-buffered-file->buffer)
2574
2575 (write _test-input-stream "fn foo {\n")
2576 (write _test-input-stream " var x: (addr int)\n")
2577 (write _test-input-stream " copy-to x, 0\n")
2578 (write _test-input-stream "}\n")
2579
2580 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2581 (flush _test-output-buffered-file)
2582 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2588
2589 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
2590 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
2591 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
2592 (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")
2593 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
2594 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
2595 (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")
2596 (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")
2597 (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")
2598 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
2599 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
2600 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
2601 (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")
2602 (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")
2603 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
2604
2605 89/<- %esp 5/r32/ebp
2606 5d/pop-to-ebp
2607 c3/return
2608
2609 test-convert-function-with-local-var-in-reg:
2610
2611 55/push-ebp
2612 89/<- %ebp 4/r32/esp
2613
2614 (clear-stream _test-input-stream)
2615 (clear-stream $_test-input-buffered-file->buffer)
2616 (clear-stream _test-output-stream)
2617 (clear-stream $_test-output-buffered-file->buffer)
2618
2619 (write _test-input-stream "fn foo {\n")
2620 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2621 (write _test-input-stream " x <- increment\n")
2622 (write _test-input-stream "}\n")
2623
2624 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2625 (flush _test-output-buffered-file)
2626 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2632
2633 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
2634 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
2635 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
2636 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
2637 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
2638 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
2639 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
2640 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
2641 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
2642 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
2643 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
2644 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
2645 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
2646 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
2647 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
2648 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
2649
2650 89/<- %esp 5/r32/ebp
2651 5d/pop-to-ebp
2652 c3/return
2653
2654 test-convert-function-with-local-var-in-same-reg:
2655
2656 55/push-ebp
2657 89/<- %ebp 4/r32/esp
2658
2659 (clear-stream _test-input-stream)
2660 (clear-stream $_test-input-buffered-file->buffer)
2661 (clear-stream _test-output-stream)
2662 (clear-stream $_test-output-buffered-file->buffer)
2663
2664 (write _test-input-stream "fn foo {\n")
2665 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2666 (write _test-input-stream " var y/ecx: int <- copy x\n")
2667 (write _test-input-stream "}\n")
2668
2669 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2670 (flush _test-output-buffered-file)
2671 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2677
2678 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-same-reg/0")
2679 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-same-reg/1")
2680 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-same-reg/2")
2681 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-same-reg/3")
2682 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-same-reg/4")
2683 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-same-reg/5")
2684 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-same-reg/6")
2685 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-same-reg/7")
2686
2687 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-same-reg/8")
2688 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-same-reg/9")
2689 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-same-reg/10")
2690 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-same-reg/11")
2691 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-same-reg/12")
2692 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-same-reg/13")
2693 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-same-reg/14")
2694
2695 89/<- %esp 5/r32/ebp
2696 5d/pop-to-ebp
2697 c3/return
2698
2699 test-convert-function-with-local-var-in-same-reg-dereferenced:
2700
2701 55/push-ebp
2702 89/<- %ebp 4/r32/esp
2703
2704 (clear-stream _test-input-stream)
2705 (clear-stream $_test-input-buffered-file->buffer)
2706 (clear-stream _test-output-stream)
2707 (clear-stream $_test-output-buffered-file->buffer)
2708
2709 (write _test-input-stream "fn foo {\n")
2710 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
2711 (write _test-input-stream " var y/ecx: int <- copy *x\n")
2712 (write _test-input-stream "}\n")
2713
2714 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2715 (flush _test-output-buffered-file)
2716 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2722
2723 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/0")
2724 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/1")
2725 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/2")
2726 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/3")
2727 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/4")
2728 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/5")
2729 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/6")
2730 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/7")
2731 (check-next-stream-line-equal _test-output-stream " 8b/-> *ecx 0x00000001/r32" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/8")
2732 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/9")
2733 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/10")
2734 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/11")
2735 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/12")
2736 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/13")
2737 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/14")
2738 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/15")
2739
2740 89/<- %esp 5/r32/ebp
2741 5d/pop-to-ebp
2742 c3/return
2743
2744 test-float-var-in-wrong-register:
2745
2746 55/push-ebp
2747 89/<- %ebp 4/r32/esp
2748
2749 (clear-stream _test-input-stream)
2750 (clear-stream $_test-input-buffered-file->buffer)
2751 (clear-stream _test-output-stream)
2752 (clear-stream $_test-output-buffered-file->buffer)
2753 (clear-stream _test-error-stream)
2754 (clear-stream $_test-error-buffered-file->buffer)
2755
2756 68/push 0/imm32
2757 68/push 0/imm32
2758 89/<- %edx 4/r32/esp
2759 (tailor-exit-descriptor %edx 0x10)
2760
2761 (write _test-input-stream "fn foo {\n")
2762 (write _test-input-stream " var x/eax: int <- copy 0\n")
2763 (write _test-input-stream " var y/eax: float <- convert x\n")
2764 (write _test-input-stream "}\n")
2765
2766 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2767
2768
2769 89/<- %edx 4/r32/esp
2770 (flush _test-output-buffered-file)
2771 (flush _test-error-buffered-file)
2772 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2778
2779 (check-stream-equal _test-output-stream "" "F - test-float-var-in-wrong-register: output should be empty")
2780 (check-next-stream-line-equal _test-error-stream "fn foo: float var 'y' should be in a floating-point register" "F - test-float-var-in-wrong-register: error message")
2781
2782 (check-ints-equal *(edx+4) 2 "F - test-float-var-in-wrong-register: exit status")
2783
2784 81 0/subop/add %esp 8/imm32
2785
2786 5d/pop-to-ebp
2787 c3/return
2788
2789 test-non-float-var-in-wrong-register:
2790
2791 55/push-ebp
2792 89/<- %ebp 4/r32/esp
2793
2794 (clear-stream _test-input-stream)
2795 (clear-stream $_test-input-buffered-file->buffer)
2796 (clear-stream _test-output-stream)
2797 (clear-stream $_test-output-buffered-file->buffer)
2798 (clear-stream _test-error-stream)
2799 (clear-stream $_test-error-buffered-file->buffer)
2800
2801 68/push 0/imm32
2802 68/push 0/imm32
2803 89/<- %edx 4/r32/esp
2804 (tailor-exit-descriptor %edx 0x10)
2805
2806 (write _test-input-stream "fn foo {\n")
2807 (write _test-input-stream " var x/xmm5: int <- copy 0\n")
2808 (write _test-input-stream "}\n")
2809
2810 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2811
2812
2813 89/<- %edx 4/r32/esp
2814 (flush _test-output-buffered-file)
2815 (flush _test-error-buffered-file)
2816 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2822
2823 (check-stream-equal _test-output-stream "" "F - test-non-float-var-in-wrong-register: output should be empty")
2824 (check-next-stream-line-equal _test-error-stream "fn foo: non-float var 'x' should be in an integer register" "F - test-non-float-var-in-wrong-register: error message")
2825
2826 (check-ints-equal *(edx+4) 2 "F - test-non-float-var-in-wrong-register: exit status")
2827
2828 81 0/subop/add %esp 8/imm32
2829
2830 5d/pop-to-ebp
2831 c3/return
2832
2833 test-convert-function-with-allocate:
2834
2835 55/push-ebp
2836 89/<- %ebp 4/r32/esp
2837
2838 (clear-stream _test-input-stream)
2839 (clear-stream $_test-input-buffered-file->buffer)
2840 (clear-stream _test-output-stream)
2841 (clear-stream $_test-output-buffered-file->buffer)
2842
2843 (write _test-input-stream "fn foo {\n")
2844 (write _test-input-stream " var x/ecx: (addr handle int) <- copy 0\n")
2845 (write _test-input-stream " allocate x\n")
2846 (write _test-input-stream "}\n")
2847
2848 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2849 (flush _test-output-buffered-file)
2850 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2856
2857 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-allocate/0")
2858 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-allocate/1")
2859 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-allocate/2")
2860 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-allocate/3")
2861 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-allocate/4")
2862 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-allocate/5")
2863 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-allocate/6")
2864 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-allocate/7")
2865 (check-next-stream-line-equal _test-output-stream " (allocate Heap 0x00000004 %ecx)" "F - test-convert-function-with-allocate/8")
2866 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-allocate/9")
2867 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-allocate/10")
2868 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-allocate/11")
2869 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-allocate/12")
2870 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-allocate/13")
2871 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-allocate/14")
2872 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-allocate/15")
2873
2874 89/<- %esp 5/r32/ebp
2875 5d/pop-to-ebp
2876 c3/return
2877
2878 test-initializer-in-hex:
2879
2880 55/push-ebp
2881 89/<- %ebp 4/r32/esp
2882
2883 (clear-stream _test-input-stream)
2884 (clear-stream $_test-input-buffered-file->buffer)
2885 (clear-stream _test-output-stream)
2886 (clear-stream $_test-output-buffered-file->buffer)
2887 (clear-stream _test-error-stream)
2888 (clear-stream $_test-error-buffered-file->buffer)
2889
2890 68/push 0/imm32
2891 68/push 0/imm32
2892 89/<- %edx 4/r32/esp
2893 (tailor-exit-descriptor %edx 0x10)
2894
2895 (write _test-input-stream "fn foo {\n")
2896 (write _test-input-stream " var x/ecx: int <- copy 10\n")
2897 (write _test-input-stream "}\n")
2898
2899 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2900
2901
2902 89/<- %edx 4/r32/esp
2903 (flush _test-output-buffered-file)
2904 (flush _test-error-buffered-file)
2905 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2911
2912 (check-stream-equal _test-output-stream "" "F - test-initializer-in-hex: output should be empty")
2913 (check-next-stream-line-equal _test-error-stream "literal integers are always hex in Mu; start '10' with a '0x' to be unambiguous, converting it to hexadecimal as necessary." "F - test-initializer-in-hex: error message")
2914
2915 (check-ints-equal *(edx+4) 2 "F - test-initializer-in-hex: exit status")
2916
2917 81 0/subop/add %esp 8/imm32
2918
2919 5d/pop-to-ebp
2920 c3/return
2921
2922 test-convert-function-with-second-local-var-in-same-reg:
2923
2924 55/push-ebp
2925 89/<- %ebp 4/r32/esp
2926
2927 (clear-stream _test-input-stream)
2928 (clear-stream $_test-input-buffered-file->buffer)
2929 (clear-stream _test-output-stream)
2930 (clear-stream $_test-output-buffered-file->buffer)
2931
2932 (write _test-input-stream "fn foo {\n")
2933 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2934 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2935 (write _test-input-stream " y <- increment\n")
2936 (write _test-input-stream "}\n")
2937
2938 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2939 (flush _test-output-buffered-file)
2940 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2946
2947 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
2948 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
2949 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
2950 (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")
2951 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
2952 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
2953 (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")
2954 (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")
2955 (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")
2956 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
2957 (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")
2958 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
2959 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
2960 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
2961 (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")
2962 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
2963 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
2964
2965 89/<- %esp 5/r32/ebp
2966 5d/pop-to-ebp
2967 c3/return
2968
2969 test-read-clobbered-reg-var:
2970
2971 55/push-ebp
2972 89/<- %ebp 4/r32/esp
2973
2974 (clear-stream _test-input-stream)
2975 (clear-stream $_test-input-buffered-file->buffer)
2976 (clear-stream _test-output-stream)
2977 (clear-stream $_test-output-buffered-file->buffer)
2978 (clear-stream _test-error-stream)
2979 (clear-stream $_test-error-buffered-file->buffer)
2980
2981 68/push 0/imm32
2982 68/push 0/imm32
2983 89/<- %edx 4/r32/esp
2984 (tailor-exit-descriptor %edx 0x10)
2985
2986 (write _test-input-stream "fn foo {\n")
2987 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2988 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2989 (write _test-input-stream " x <- increment\n")
2990 (write _test-input-stream "}\n")
2991
2992 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2993
2994
2995 89/<- %edx 4/r32/esp
2996 (flush _test-output-buffered-file)
2997 (flush _test-error-buffered-file)
2998 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3004
3005 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
3006 (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")
3007
3008 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
3009
3010 81 0/subop/add %esp 8/imm32
3011
3012 5d/pop-to-ebp
3013 c3/return
3014
3015 test-overlapping-int-fp-registers:
3016
3017 55/push-ebp
3018 89/<- %ebp 4/r32/esp
3019
3020 (clear-stream _test-input-stream)
3021 (clear-stream $_test-input-buffered-file->buffer)
3022 (clear-stream _test-output-stream)
3023 (clear-stream $_test-output-buffered-file->buffer)
3024 (clear-stream _test-error-stream)
3025 (clear-stream $_test-error-buffered-file->buffer)
3026
3027 68/push 0/imm32
3028 68/push 0/imm32
3029 89/<- %edx 4/r32/esp
3030 (tailor-exit-descriptor %edx 0x10)
3031
3032 (write _test-input-stream "fn foo {\n")
3033 (write _test-input-stream " var x/eax: int <- copy 3\n")
3034 (write _test-input-stream " var y/xmm0: float <- convert x\n")
3035 (write _test-input-stream " x <- increment\n")
3036 (write _test-input-stream "}\n")
3037
3038 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3039
3040
3041 89/<- %edx 4/r32/esp
3042 (flush _test-output-buffered-file)
3043 (flush _test-error-buffered-file)
3044 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3050
3051 (check-next-stream-line-equal _test-error-stream "" "F - test-overlapping-int-fp-registers: error message")
3052
3053
3054 81 0/subop/add %esp 8/imm32
3055
3056 5d/pop-to-ebp
3057 c3/return
3058
3059 test-convert-function-call:
3060
3061 55/push-ebp
3062 89/<- %ebp 4/r32/esp
3063
3064 (clear-stream _test-input-stream)
3065 (clear-stream $_test-input-buffered-file->buffer)
3066 (clear-stream _test-output-stream)
3067 (clear-stream $_test-output-buffered-file->buffer)
3068
3069 (write _test-input-stream "fn main -> _/ebx: int {\n")
3070 (write _test-input-stream " var result/ebx: int <- foo\n")
3071 (write _test-input-stream " return result\n")
3072 (write _test-input-stream "}\n")
3073 (write _test-input-stream "fn foo -> _/ebx: int {\n")
3074 (write _test-input-stream " var result/ebx: int <- copy 3\n")
3075 (write _test-input-stream " return result\n")
3076 (write _test-input-stream "}\n")
3077
3078 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3079 (flush _test-output-buffered-file)
3080 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3086
3087 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
3088 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
3089 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
3090 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
3091 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
3092 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
3093 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
3094 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
3095 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
3096 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
3097 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
3098 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
3099 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
3100 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
3101 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
3102 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
3103 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
3104 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
3105 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
3106 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
3107 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
3108 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
3109 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
3110 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
3111 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
3112 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
3113 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
3114 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
3115 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
3116 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
3117 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
3118 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
3119 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
3120 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
3121
3122 89/<- %esp 5/r32/ebp
3123 5d/pop-to-ebp
3124 c3/return
3125
3126 test-convert-function-call-with-inout-with-compound-type:
3127
3128 55/push-ebp
3129 89/<- %ebp 4/r32/esp
3130
3131 (clear-stream _test-input-stream)
3132 (clear-stream $_test-input-buffered-file->buffer)
3133 (clear-stream _test-output-stream)
3134 (clear-stream $_test-output-buffered-file->buffer)
3135
3136 (write _test-input-stream "fn f {\n")
3137 (write _test-input-stream " var x: (addr int)\n")
3138 (write _test-input-stream " g x\n")
3139 (write _test-input-stream "}\n")
3140 (write _test-input-stream "fn g a: (addr int) {\n")
3141 (write _test-input-stream "}\n")
3142
3143 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3144 (flush _test-output-buffered-file)
3145 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3151
3152 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-inout-with-compound-type/0")
3153 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/1")
3154 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/2")
3155 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/3")
3156 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-inout-with-compound-type/4")
3157 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-inout-with-compound-type/5")
3158 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-inout-with-compound-type/6")
3159 (check-next-stream-line-equal _test-output-stream " (g *(ebp+0xfffffffc))" "F - test-convert-function-call-with-inout-with-compound-type/7")
3160 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-call-with-inout-with-compound-type/8")
3161 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-inout-with-compound-type/9")
3162 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-inout-with-compound-type/10")
3163 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/11")
3164 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/12")
3165 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/13")
3166 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/14")
3167 (check-next-stream-line-equal _test-output-stream "g:" "F - test-convert-function-call-with-inout-with-compound-type/15")
3168 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/16")
3169 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/17")
3170 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/18")
3171 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/19")
3172 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/20")
3173 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/21")
3174 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/22")
3175
3176 89/<- %esp 5/r32/ebp
3177 5d/pop-to-ebp
3178 c3/return
3179
3180 test-convert-function-call-with-inout-with-type-parameter:
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 (clear-stream _test-error-stream)
3190 (clear-stream $_test-error-buffered-file->buffer)
3191
3192 68/push 0/imm32
3193 68/push 0/imm32
3194 89/<- %edx 4/r32/esp
3195 (tailor-exit-descriptor %edx 0x10)
3196
3197 (write _test-input-stream "fn f {\n")
3198 (write _test-input-stream " var x: (addr int)\n")
3199 (write _test-input-stream " g x\n")
3200 (write _test-input-stream "}\n")
3201 (write _test-input-stream "fn g a: (addr _) {\n")
3202 (write _test-input-stream "}\n")
3203
3204 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3205
3206
3207 89/<- %edx 4/r32/esp
3208 (flush _test-output-buffered-file)
3209 (flush _test-error-buffered-file)
3210 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3216
3217 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-type-parameter: error stream should be empty")
3218
3219
3220 81 0/subop/add %esp 8/imm32
3221
3222 5d/pop-to-ebp
3223 c3/return
3224
3225 test-convert-function-call-with-incorrect-inout-type:
3226
3227 55/push-ebp
3228 89/<- %ebp 4/r32/esp
3229
3230 (clear-stream _test-input-stream)
3231 (clear-stream $_test-input-buffered-file->buffer)
3232 (clear-stream _test-output-stream)
3233 (clear-stream $_test-output-buffered-file->buffer)
3234 (clear-stream _test-error-stream)
3235 (clear-stream $_test-error-buffered-file->buffer)
3236
3237 68/push 0/imm32
3238 68/push 0/imm32
3239 89/<- %edx 4/r32/esp
3240 (tailor-exit-descriptor %edx 0x10)
3241
3242 (write _test-input-stream "fn f {\n")
3243 (write _test-input-stream " var x: int\n")
3244 (write _test-input-stream " g x\n")
3245 (write _test-input-stream "}\n")
3246 (write _test-input-stream "fn g a: foo {\n")
3247 (write _test-input-stream "}\n")
3248
3249 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3250
3251
3252 89/<- %edx 4/r32/esp
3253 (flush _test-output-buffered-file)
3254 (flush _test-error-buffered-file)
3255 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3261
3262 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
3263 (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")
3264
3265 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
3266
3267 81 0/subop/add %esp 8/imm32
3268 5d/pop-to-ebp
3269 c3/return
3270
3271 test-convert-function-call-with-inout-with-incorrect-compound-type:
3272
3273 55/push-ebp
3274 89/<- %ebp 4/r32/esp
3275
3276 (clear-stream _test-input-stream)
3277 (clear-stream $_test-input-buffered-file->buffer)
3278 (clear-stream _test-output-stream)
3279 (clear-stream $_test-output-buffered-file->buffer)
3280 (clear-stream _test-error-stream)
3281 (clear-stream $_test-error-buffered-file->buffer)
3282
3283 68/push 0/imm32
3284 68/push 0/imm32
3285 89/<- %edx 4/r32/esp
3286 (tailor-exit-descriptor %edx 0x10)
3287
3288 (write _test-input-stream "fn f {\n")
3289 (write _test-input-stream " var x: (addr int)\n")
3290 (write _test-input-stream " g x\n")
3291 (write _test-input-stream "}\n")
3292 (write _test-input-stream "fn g a: (addr bool) {\n")
3293 (write _test-input-stream "}\n")
3294
3295 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3296
3297
3298 89/<- %edx 4/r32/esp
3299 (flush _test-output-buffered-file)
3300 (flush _test-error-buffered-file)
3301 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3307
3308 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: output should be empty")
3309 (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-inout-with-incorrect-compound-type: error message")
3310
3311 81 0/subop/add %esp 8/imm32
3312
3313 5d/pop-to-ebp
3314 c3/return
3315
3316 test-convert-function-call-with-inout-with-multiple-type-parameters:
3317
3318 55/push-ebp
3319 89/<- %ebp 4/r32/esp
3320
3321 (clear-stream _test-input-stream)
3322 (clear-stream $_test-input-buffered-file->buffer)
3323 (clear-stream _test-output-stream)
3324 (clear-stream $_test-output-buffered-file->buffer)
3325 (clear-stream _test-error-stream)
3326 (clear-stream $_test-error-buffered-file->buffer)
3327
3328 68/push 0/imm32
3329 68/push 0/imm32
3330 89/<- %edx 4/r32/esp
3331 (tailor-exit-descriptor %edx 0x10)
3332
3333 (write _test-input-stream "fn f {\n")
3334 (write _test-input-stream " var x: (addr int)\n")
3335 (write _test-input-stream " var y: (addr int)\n")
3336 (write _test-input-stream " g x, y\n")
3337 (write _test-input-stream "}\n")
3338 (write _test-input-stream "fn g a: (addr _), b: (addr _) {\n")
3339 (write _test-input-stream "}\n")
3340
3341 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3342
3343
3344 89/<- %edx 4/r32/esp
3345 (flush _test-output-buffered-file)
3346 (flush _test-error-buffered-file)
3347 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3353
3354 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-multiple-type-parameters: error stream should be empty")
3355
3356
3357 81 0/subop/add %esp 8/imm32
3358
3359 5d/pop-to-ebp
3360 c3/return
3361
3362 test-type-parameter-matches-rest-of-type:
3363
3364 55/push-ebp
3365 89/<- %ebp 4/r32/esp
3366
3367 (clear-stream _test-input-stream)
3368 (clear-stream $_test-input-buffered-file->buffer)
3369 (clear-stream _test-output-stream)
3370 (clear-stream $_test-output-buffered-file->buffer)
3371 (clear-stream _test-error-stream)
3372 (clear-stream $_test-error-buffered-file->buffer)
3373
3374 68/push 0/imm32
3375 68/push 0/imm32
3376 89/<- %edx 4/r32/esp
3377 (tailor-exit-descriptor %edx 0x10)
3378
3379 (write _test-input-stream "fn f {\n")
3380 (write _test-input-stream " var x: (addr array int)\n")
3381 (write _test-input-stream " g x\n")
3382 (write _test-input-stream "}\n")
3383 (write _test-input-stream "fn g a: (addr _) {\n")
3384 (write _test-input-stream "}\n")
3385
3386 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3387
3388
3389 89/<- %edx 4/r32/esp
3390 (flush _test-output-buffered-file)
3391 (flush _test-error-buffered-file)
3392 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3398
3399 (check-stream-equal _test-error-stream "" "F - test-type-parameter-matches-rest-of-type: error stream should be empty")
3400
3401
3402 81 0/subop/add %esp 8/imm32
3403
3404 5d/pop-to-ebp
3405 c3/return
3406
3407 test-convert-function-call-with-inout-with-incompatible-type-parameters:
3408
3409 55/push-ebp
3410 89/<- %ebp 4/r32/esp
3411
3412 (clear-stream _test-input-stream)
3413 (clear-stream $_test-input-buffered-file->buffer)
3414 (clear-stream _test-output-stream)
3415 (clear-stream $_test-output-buffered-file->buffer)
3416 (clear-stream _test-error-stream)
3417 (clear-stream $_test-error-buffered-file->buffer)
3418
3419 68/push 0/imm32
3420 68/push 0/imm32
3421 89/<- %edx 4/r32/esp
3422 (tailor-exit-descriptor %edx 0x10)
3423
3424 (write _test-input-stream "fn f {\n")
3425 (write _test-input-stream " var x: (addr int)\n")
3426 (write _test-input-stream " var y: (addr boolean)\n")
3427 (write _test-input-stream " g x, y\n")
3428 (write _test-input-stream "}\n")
3429 (write _test-input-stream "fn g a: (addr _T), b: (addr _T) {\n")
3430 (write _test-input-stream "}\n")
3431
3432 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3433
3434
3435 89/<- %edx 4/r32/esp
3436 (flush _test-output-buffered-file)
3437 (flush _test-error-buffered-file)
3438 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3444
3445 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: output should be empty")
3446 (check-next-stream-line-equal _test-error-stream "fn f: call g: type for inout 'y' is not right" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: error message")
3447
3448 81 0/subop/add %esp 8/imm32
3449
3450 5d/pop-to-ebp
3451 c3/return
3452
3453 test-convert-function-call-with-too-few-inouts:
3454
3455 55/push-ebp
3456 89/<- %ebp 4/r32/esp
3457
3458 (clear-stream _test-input-stream)
3459 (clear-stream $_test-input-buffered-file->buffer)
3460 (clear-stream _test-output-stream)
3461 (clear-stream $_test-output-buffered-file->buffer)
3462 (clear-stream _test-error-stream)
3463 (clear-stream $_test-error-buffered-file->buffer)
3464
3465 68/push 0/imm32
3466 68/push 0/imm32
3467 89/<- %edx 4/r32/esp
3468 (tailor-exit-descriptor %edx 0x10)
3469
3470 (write _test-input-stream "fn f {\n")
3471 (write _test-input-stream " g\n")
3472 (write _test-input-stream "}\n")
3473 (write _test-input-stream "fn g a: int {\n")
3474 (write _test-input-stream "}\n")
3475
3476 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3477
3478
3479 89/<- %edx 4/r32/esp
3480 (flush _test-output-buffered-file)
3481 (flush _test-error-buffered-file)
3482 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3488
3489 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
3490 (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")
3491
3492 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
3493
3494 81 0/subop/add %esp 8/imm32
3495 5d/pop-to-ebp
3496 c3/return
3497
3498 test-convert-function-call-with-too-many-inouts:
3499
3500 55/push-ebp
3501 89/<- %ebp 4/r32/esp
3502
3503 (clear-stream _test-input-stream)
3504 (clear-stream $_test-input-buffered-file->buffer)
3505 (clear-stream _test-output-stream)
3506 (clear-stream $_test-output-buffered-file->buffer)
3507 (clear-stream _test-error-stream)
3508 (clear-stream $_test-error-buffered-file->buffer)
3509
3510 68/push 0/imm32
3511 68/push 0/imm32
3512 89/<- %edx 4/r32/esp
3513 (tailor-exit-descriptor %edx 0x10)
3514
3515 (write _test-input-stream "fn f {\n")
3516 (write _test-input-stream " var x: int\n")
3517 (write _test-input-stream " g x\n")
3518 (write _test-input-stream "}\n")
3519 (write _test-input-stream "fn g {\n")
3520 (write _test-input-stream "}\n")
3521
3522 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3523
3524
3525 89/<- %edx 4/r32/esp
3526 (flush _test-output-buffered-file)
3527 (flush _test-error-buffered-file)
3528 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3534
3535 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
3536 (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")
3537
3538 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
3539
3540 81 0/subop/add %esp 8/imm32
3541 5d/pop-to-ebp
3542 c3/return
3543
3544 test-convert-function-call-with-incorrect-output-type:
3545
3546 55/push-ebp
3547 89/<- %ebp 4/r32/esp
3548
3549 (clear-stream _test-input-stream)
3550 (clear-stream $_test-input-buffered-file->buffer)
3551 (clear-stream _test-output-stream)
3552 (clear-stream $_test-output-buffered-file->buffer)
3553 (clear-stream _test-error-stream)
3554 (clear-stream $_test-error-buffered-file->buffer)
3555
3556 68/push 0/imm32
3557 68/push 0/imm32
3558 89/<- %edx 4/r32/esp
3559 (tailor-exit-descriptor %edx 0x10)
3560
3561 (write _test-input-stream "fn f {\n")
3562 (write _test-input-stream " var x/eax: int <- g\n")
3563 (write _test-input-stream "}\n")
3564 (write _test-input-stream "fn g -> _/eax: foo {\n")
3565 (write _test-input-stream "}\n")
3566
3567 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3568
3569
3570 89/<- %edx 4/r32/esp
3571 (flush _test-output-buffered-file)
3572 (flush _test-error-buffered-file)
3573 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3579
3580 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
3581 (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")
3582
3583 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
3584
3585 81 0/subop/add %esp 8/imm32
3586 5d/pop-to-ebp
3587 c3/return
3588
3589 test-convert-function-call-with-too-few-outputs:
3590
3591 55/push-ebp
3592 89/<- %ebp 4/r32/esp
3593
3594 (clear-stream _test-input-stream)
3595 (clear-stream $_test-input-buffered-file->buffer)
3596 (clear-stream _test-output-stream)
3597 (clear-stream $_test-output-buffered-file->buffer)
3598 (clear-stream _test-error-stream)
3599 (clear-stream $_test-error-buffered-file->buffer)
3600
3601 68/push 0/imm32
3602 68/push 0/imm32
3603 89/<- %edx 4/r32/esp
3604 (tailor-exit-descriptor %edx 0x10)
3605
3606 (write _test-input-stream "fn f {\n")
3607 (write _test-input-stream " g\n")
3608 (write _test-input-stream "}\n")
3609 (write _test-input-stream "fn g -> _/eax: int {\n")
3610 (write _test-input-stream "}\n")
3611
3612 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3613
3614
3615 89/<- %edx 4/r32/esp
3616 (flush _test-output-buffered-file)
3617 (flush _test-error-buffered-file)
3618 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3624
3625 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
3626 (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")
3627
3628 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
3629
3630 81 0/subop/add %esp 8/imm32
3631 5d/pop-to-ebp
3632 c3/return
3633
3634 test-convert-function-call-with-too-many-outputs:
3635
3636 55/push-ebp
3637 89/<- %ebp 4/r32/esp
3638
3639 (clear-stream _test-input-stream)
3640 (clear-stream $_test-input-buffered-file->buffer)
3641 (clear-stream _test-output-stream)
3642 (clear-stream $_test-output-buffered-file->buffer)
3643 (clear-stream _test-error-stream)
3644 (clear-stream $_test-error-buffered-file->buffer)
3645
3646 68/push 0/imm32
3647 68/push 0/imm32
3648 89/<- %edx 4/r32/esp
3649 (tailor-exit-descriptor %edx 0x10)
3650
3651 (write _test-input-stream "fn f {\n")
3652 (write _test-input-stream " var x/eax: int <- g\n")
3653 (write _test-input-stream "}\n")
3654 (write _test-input-stream "fn g {\n")
3655 (write _test-input-stream "}\n")
3656
3657 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3658
3659
3660 89/<- %edx 4/r32/esp
3661 (flush _test-output-buffered-file)
3662 (flush _test-error-buffered-file)
3663 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3669
3670 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
3671 (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")
3672
3673 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
3674
3675 81 0/subop/add %esp 8/imm32
3676 5d/pop-to-ebp
3677 c3/return
3678
3679 test-convert-function-call-with-missing-output-register:
3680
3681 55/push-ebp
3682 89/<- %ebp 4/r32/esp
3683
3684 (clear-stream _test-input-stream)
3685 (clear-stream $_test-input-buffered-file->buffer)
3686 (clear-stream _test-output-stream)
3687 (clear-stream $_test-output-buffered-file->buffer)
3688 (clear-stream _test-error-stream)
3689 (clear-stream $_test-error-buffered-file->buffer)
3690
3691 68/push 0/imm32
3692 68/push 0/imm32
3693 89/<- %edx 4/r32/esp
3694 (tailor-exit-descriptor %edx 0x10)
3695
3696 (write _test-input-stream "fn f {\n")
3697 (write _test-input-stream " var x: int\n")
3698 (write _test-input-stream " x <- g\n")
3699 (write _test-input-stream "}\n")
3700 (write _test-input-stream "fn g -> _/eax: int {\n")
3701 (write _test-input-stream "}\n")
3702
3703 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3704
3705
3706 89/<- %edx 4/r32/esp
3707 (flush _test-output-buffered-file)
3708 (flush _test-error-buffered-file)
3709 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3715
3716 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-missing-output-register: output should be empty")
3717 (check-next-stream-line-equal _test-error-stream "fn f: call g: output 'x' is not in a register" "F - test-convert-function-call-with-missing-output-register: error message")
3718
3719 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-missing-output-register: exit status")
3720
3721 81 0/subop/add %esp 8/imm32
3722 5d/pop-to-ebp
3723 c3/return
3724
3725 test-convert-function-call-with-incorrect-output-register:
3726
3727 55/push-ebp
3728 89/<- %ebp 4/r32/esp
3729
3730 (clear-stream _test-input-stream)
3731 (clear-stream $_test-input-buffered-file->buffer)
3732 (clear-stream _test-output-stream)
3733 (clear-stream $_test-output-buffered-file->buffer)
3734 (clear-stream _test-error-stream)
3735 (clear-stream $_test-error-buffered-file->buffer)
3736
3737 68/push 0/imm32
3738 68/push 0/imm32
3739 89/<- %edx 4/r32/esp
3740 (tailor-exit-descriptor %edx 0x10)
3741
3742 (write _test-input-stream "fn f {\n")
3743 (write _test-input-stream " var x/ecx: int <- g\n")
3744 (write _test-input-stream "}\n")
3745 (write _test-input-stream "fn g -> _/eax: int {\n")
3746 (write _test-input-stream "}\n")
3747
3748 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3749
3750
3751 89/<- %edx 4/r32/esp
3752 (flush _test-output-buffered-file)
3753 (flush _test-error-buffered-file)
3754 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3760
3761 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
3762 (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")
3763
3764 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
3765
3766 81 0/subop/add %esp 8/imm32
3767 5d/pop-to-ebp
3768 c3/return
3769
3770 test-convert-function-with-local-var-dereferenced:
3771
3772 55/push-ebp
3773 89/<- %ebp 4/r32/esp
3774
3775 (clear-stream _test-input-stream)
3776 (clear-stream $_test-input-buffered-file->buffer)
3777 (clear-stream _test-output-stream)
3778 (clear-stream $_test-output-buffered-file->buffer)
3779
3780 (write _test-input-stream "fn foo {\n")
3781 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
3782 (write _test-input-stream " increment *x\n")
3783 (write _test-input-stream "}\n")
3784
3785 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3786 (flush _test-output-buffered-file)
3787 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3793
3794 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
3795 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
3796 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
3797 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
3798 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
3799 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
3800 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
3801 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
3802 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
3803 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
3804 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
3805 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
3806 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
3807 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
3808 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
3809 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
3810
3811 89/<- %esp 5/r32/ebp
3812 5d/pop-to-ebp
3813 c3/return
3814
3815 test-dereference-of-var-on-stack:
3816
3817 55/push-ebp
3818 89/<- %ebp 4/r32/esp
3819
3820 (clear-stream _test-input-stream)
3821 (clear-stream $_test-input-buffered-file->buffer)
3822 (clear-stream _test-output-stream)
3823 (clear-stream $_test-output-buffered-file->buffer)
3824 (clear-stream _test-error-stream)
3825 (clear-stream $_test-error-buffered-file->buffer)
3826
3827 68/push 0/imm32
3828 68/push 0/imm32
3829 89/<- %edx 4/r32/esp
3830 (tailor-exit-descriptor %edx 0x10)
3831
3832 (write _test-input-stream "fn foo {\n")
3833 (write _test-input-stream " var x: (addr int)\n")
3834 (write _test-input-stream " increment *x\n")
3835 (write _test-input-stream "}\n")
3836
3837 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3838
3839
3840 89/<- %edx 4/r32/esp
3841 (flush _test-output-buffered-file)
3842 (flush _test-error-buffered-file)
3843 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3849
3850 (check-stream-equal _test-output-stream "" "F - test-dereference-of-var-on-stack: output should be empty")
3851 (check-next-stream-line-equal _test-error-stream "fn foo: cannot dereference var 'x' on stack" "F - test-dereference-of-var-on-stack: error message")
3852
3853 (check-ints-equal *(edx+4) 2 "F - test-dereference-of-var-on-stack: exit status")
3854
3855 81 0/subop/add %esp 8/imm32
3856
3857 5d/pop-to-ebp
3858 c3/return
3859
3860 test-convert-function-with-byte-operations:
3861
3862 55/push-ebp
3863 89/<- %ebp 4/r32/esp
3864
3865 (clear-stream _test-input-stream)
3866 (clear-stream $_test-input-buffered-file->buffer)
3867 (clear-stream _test-output-stream)
3868 (clear-stream $_test-output-buffered-file->buffer)
3869
3870 (write _test-input-stream "fn foo {\n")
3871 (write _test-input-stream " var x/eax: byte <- copy 0\n")
3872 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
3873 (write _test-input-stream " y <- copy-byte x\n")
3874 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
3875 (write _test-input-stream " y <- copy-byte *z\n")
3876 (write _test-input-stream " copy-byte-to *z, x\n")
3877 (write _test-input-stream "}\n")
3878
3879 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3880 (flush _test-output-buffered-file)
3881 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3887
3888 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
3889 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
3890 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
3891 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
3892 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
3893 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
3894 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
3895 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
3896 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
3897 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
3898 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
3899 (check-next-stream-line-equal _test-output-stream " 81 4/subop/and %ecx 0xff/imm32" "F - test-convert-function-with-byte-operations/11")
3900 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/12")
3901 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/13")
3902 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/14")
3903 (check-next-stream-line-equal _test-output-stream " 81 4/subop/and %ecx 0xff/imm32" "F - test-convert-function-with-byte-operations/15")
3904 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/16")
3905 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/17")
3906 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/18")
3907 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/19")
3908 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/20")
3909 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/21")
3910 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/22")
3911 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/23")
3912 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/24")
3913 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/25")
3914
3915 89/<- %esp 5/r32/ebp
3916 5d/pop-to-ebp
3917 c3/return
3918
3919
3920 test-byte-values-on-stack:
3921
3922 55/push-ebp
3923 89/<- %ebp 4/r32/esp
3924
3925 (clear-stream _test-input-stream)
3926 (clear-stream $_test-input-buffered-file->buffer)
3927 (clear-stream _test-output-stream)
3928 (clear-stream $_test-output-buffered-file->buffer)
3929 (clear-stream _test-error-stream)
3930 (clear-stream $_test-error-buffered-file->buffer)
3931
3932 68/push 0/imm32
3933 68/push 0/imm32
3934 89/<- %edx 4/r32/esp
3935 (tailor-exit-descriptor %edx 0x10)
3936
3937 (write _test-input-stream "fn foo {\n")
3938 (write _test-input-stream " var x: byte\n")
3939 (write _test-input-stream "}\n")
3940
3941 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3942
3943
3944 89/<- %edx 4/r32/esp
3945 (flush _test-output-buffered-file)
3946 (flush _test-error-buffered-file)
3947 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3953
3954 (check-stream-equal _test-output-stream "" "F - test-byte-values-on-stack: output should be empty")
3955 (check-next-stream-line-equal _test-error-stream "fn foo: var 'x' of type 'byte' cannot be on the stack" "F - test-byte-values-on-stack: error message")
3956
3957 (check-ints-equal *(edx+4) 2 "F - test-byte-values-on-stack: exit status")
3958
3959 81 0/subop/add %esp 8/imm32
3960
3961 5d/pop-to-ebp
3962 c3/return
3963
3964
3965 test-byte-values-in-unsupported-registers:
3966
3967 55/push-ebp
3968 89/<- %ebp 4/r32/esp
3969
3970 (clear-stream _test-input-stream)
3971 (clear-stream $_test-input-buffered-file->buffer)
3972 (clear-stream _test-output-stream)
3973 (clear-stream $_test-output-buffered-file->buffer)
3974 (clear-stream _test-error-stream)
3975 (clear-stream $_test-error-buffered-file->buffer)
3976
3977 68/push 0/imm32
3978 68/push 0/imm32
3979 89/<- %edx 4/r32/esp
3980 (tailor-exit-descriptor %edx 0x10)
3981
3982 (write _test-input-stream "fn foo {\n")
3983 (write _test-input-stream " var x/esi: byte <- copy 0\n")
3984 (write _test-input-stream "}\n")
3985
3986 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3987
3988
3989 89/<- %edx 4/r32/esp
3990 (flush _test-output-buffered-file)
3991 (flush _test-error-buffered-file)
3992 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3998
3999 (check-stream-equal _test-output-stream "" "F - test-byte-values-in-unsupported-registers: output should be empty")
4000 (check-next-stream-line-equal _test-error-stream "fn foo: var 'x' of type 'byte' cannot be in esi or edi" "F - test-byte-values-in-unsupported-registers: error message")
4001
4002 (check-ints-equal *(edx+4) 2 "F - test-byte-values-in-unsupported-registers: exit status")
4003
4004 81 0/subop/add %esp 8/imm32
4005
4006 5d/pop-to-ebp
4007 c3/return
4008
4009
4010 test-copy-byte-var-from-fn-arg:
4011
4012 55/push-ebp
4013 89/<- %ebp 4/r32/esp
4014
4015 (clear-stream _test-input-stream)
4016 (clear-stream $_test-input-buffered-file->buffer)
4017 (clear-stream _test-output-stream)
4018 (clear-stream $_test-output-buffered-file->buffer)
4019
4020 (write _test-input-stream "fn foo x: byte, y: int {\n")
4021 (write _test-input-stream " var a/eax: byte <- copy x\n")
4022 (write _test-input-stream " var b/eax: int <- copy y\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-copy-byte-from-fn-arg/0")
4035 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
4036 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
4037 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
4038 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
4039 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
4040 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
4041 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
4042 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
4043 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
4044 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
4045 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
4046 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
4047 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
4048 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
4049 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
4050
4051 89/<- %esp 5/r32/ebp
4052 5d/pop-to-ebp
4053 c3/return
4054
4055 test-convert-compare-register-with-literal:
4056
4057 55/push-ebp
4058 89/<- %ebp 4/r32/esp
4059
4060 (clear-stream _test-input-stream)
4061 (clear-stream $_test-input-buffered-file->buffer)
4062 (clear-stream _test-output-stream)
4063 (clear-stream $_test-output-buffered-file->buffer)
4064
4065 (write _test-input-stream "fn foo {\n")
4066 (write _test-input-stream " var x/ecx: int <- copy 0\n")
4067 (write _test-input-stream " compare x, 0\n")
4068 (write _test-input-stream "}\n")
4069
4070 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4071 (flush _test-output-buffered-file)
4072 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4078
4079 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
4080 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
4081 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
4082 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
4083 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
4084 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
4085 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
4086 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
4087 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
4088 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
4089 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
4090 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
4091 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
4092 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
4093 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
4094 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
4095
4096 89/<- %esp 5/r32/ebp
4097 5d/pop-to-ebp
4098 c3/return
4099
4100 test-convert-compare-byte-with-literal:
4101
4102 55/push-ebp
4103 89/<- %ebp 4/r32/esp
4104
4105 (clear-stream _test-input-stream)
4106 (clear-stream $_test-input-buffered-file->buffer)
4107 (clear-stream _test-output-stream)
4108 (clear-stream $_test-output-buffered-file->buffer)
4109
4110 (write _test-input-stream "fn foo {\n")
4111 (write _test-input-stream " var x/ecx: byte <- copy 0\n")
4112 (write _test-input-stream " compare x, 0\n")
4113 (write _test-input-stream "}\n")
4114
4115 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4116 (flush _test-output-buffered-file)
4117 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4123
4124
4125 89/<- %esp 5/r32/ebp
4126 5d/pop-to-ebp
4127 c3/return
4128
4129 test-unknown-variable:
4130
4131 55/push-ebp
4132 89/<- %ebp 4/r32/esp
4133
4134 (clear-stream _test-input-stream)
4135 (clear-stream $_test-input-buffered-file->buffer)
4136 (clear-stream _test-output-stream)
4137 (clear-stream $_test-output-buffered-file->buffer)
4138 (clear-stream _test-error-stream)
4139 (clear-stream $_test-error-buffered-file->buffer)
4140
4141 68/push 0/imm32
4142 68/push 0/imm32
4143 89/<- %edx 4/r32/esp
4144 (tailor-exit-descriptor %edx 0x10)
4145
4146 (write _test-input-stream "fn foo {\n")
4147 (write _test-input-stream " compare x, 0\n")
4148 (write _test-input-stream "}\n")
4149
4150 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4151
4152
4153 89/<- %edx 4/r32/esp
4154 (flush _test-output-buffered-file)
4155 (flush _test-error-buffered-file)
4156 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4162
4163 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
4164 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
4165
4166 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
4167
4168 81 0/subop/add %esp 8/imm32
4169
4170 5d/pop-to-ebp
4171 c3/return
4172
4173 test-convert-function-with-local-var-in-block:
4174
4175 55/push-ebp
4176 89/<- %ebp 4/r32/esp
4177
4178 (clear-stream _test-input-stream)
4179 (clear-stream $_test-input-buffered-file->buffer)
4180 (clear-stream _test-output-stream)
4181 (clear-stream $_test-output-buffered-file->buffer)
4182
4183 (write _test-input-stream "fn foo {\n")
4184 (write _test-input-stream " {\n")
4185 (write _test-input-stream " var x: int\n")
4186 (write _test-input-stream " increment x\n")
4187 (write _test-input-stream " }\n")
4188 (write _test-input-stream "}\n")
4189
4190 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4191 (flush _test-output-buffered-file)
4192 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4198
4199 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
4200 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
4201 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
4202 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
4203 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
4204 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
4205 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
4206 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
4207 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
4208 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
4209 (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")
4210 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
4211 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
4212 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
4213 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
4214 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
4215 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
4216 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
4217 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
4218
4219 89/<- %esp 5/r32/ebp
4220 5d/pop-to-ebp
4221 c3/return
4222
4223 test-convert-function-with-local-var-in-mem-after-block:
4224
4225 55/push-ebp
4226 89/<- %ebp 4/r32/esp
4227
4228 (clear-stream _test-input-stream)
4229 (clear-stream $_test-input-buffered-file->buffer)
4230 (clear-stream _test-output-stream)
4231 (clear-stream $_test-output-buffered-file->buffer)
4232
4233 (write _test-input-stream "fn foo {\n")
4234 (write _test-input-stream " {\n")
4235 (write _test-input-stream " var y: int\n")
4236 (write _test-input-stream " }\n")
4237 (write _test-input-stream " var x: int\n")
4238 (write _test-input-stream " increment x\n")
4239 (write _test-input-stream "}\n")
4240
4241 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4242 (flush _test-output-buffered-file)
4243 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4249
4250 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem-after-block/0")
4251 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem-after-block/1")
4252 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/2")
4253 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem-after-block/3")
4254 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/4")
4255 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/5")
4256 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/6")
4257 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/7")
4258 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/8")
4259 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/9")
4260 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/10")
4261 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-mem-after-block/11")
4262 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/12")
4263 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem-after-block/13")
4264 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/14")
4265 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/15")
4266 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem-after-block/16")
4267 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem-after-block/17")
4268 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem-after-block/18")
4269 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/19")
4270 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem-after-block/20")
4271
4272 89/<- %esp 5/r32/ebp
4273 5d/pop-to-ebp
4274 c3/return
4275
4276 test-convert-function-with-local-var-in-named-block:
4277
4278 55/push-ebp
4279 89/<- %ebp 4/r32/esp
4280
4281 (clear-stream _test-input-stream)
4282 (clear-stream $_test-input-buffered-file->buffer)
4283 (clear-stream _test-output-stream)
4284 (clear-stream $_test-output-buffered-file->buffer)
4285
4286 (write _test-input-stream "fn foo {\n")
4287 (write _test-input-stream " $bar: {\n")
4288 (write _test-input-stream " var x: int\n")
4289 (write _test-input-stream " increment x\n")
4290 (write _test-input-stream " }\n")
4291 (write _test-input-stream "}\n")
4292
4293 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4294 (flush _test-output-buffered-file)
4295 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4301
4302 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
4303 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
4304 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
4305 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
4306 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
4307 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
4308 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
4309 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
4310 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
4311 (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")
4312 (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")
4313 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
4314 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
4315 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
4316 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
4317 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
4318 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
4319 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
4320 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
4321
4322 89/<- %esp 5/r32/ebp
4323 5d/pop-to-ebp
4324 c3/return
4325
4326 test-unknown-variable-in-named-block:
4327
4328 55/push-ebp
4329 89/<- %ebp 4/r32/esp
4330
4331 (clear-stream _test-input-stream)
4332 (clear-stream $_test-input-buffered-file->buffer)
4333 (clear-stream _test-output-stream)
4334 (clear-stream $_test-output-buffered-file->buffer)
4335 (clear-stream _test-error-stream)
4336 (clear-stream $_test-error-buffered-file->buffer)
4337
4338 68/push 0/imm32
4339 68/push 0/imm32
4340 89/<- %edx 4/r32/esp
4341 (tailor-exit-descriptor %edx 0x10)
4342
4343 (write _test-input-stream "fn foo {\n")
4344 (write _test-input-stream " $a: {\n")
4345 (write _test-input-stream " compare x, 0\n")
4346 (write _test-input-stream " }\n")
4347 (write _test-input-stream "}\n")
4348
4349 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4350
4351
4352 89/<- %edx 4/r32/esp
4353 (flush _test-output-buffered-file)
4354 (flush _test-error-buffered-file)
4355 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4361
4362 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
4363 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
4364
4365 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
4366
4367 81 0/subop/add %esp 8/imm32
4368
4369 5d/pop-to-ebp
4370 c3/return
4371
4372 test-always-shadow-outermost-reg-vars-in-function:
4373
4374 55/push-ebp
4375 89/<- %ebp 4/r32/esp
4376
4377 (clear-stream _test-input-stream)
4378 (clear-stream $_test-input-buffered-file->buffer)
4379 (clear-stream _test-output-stream)
4380 (clear-stream $_test-output-buffered-file->buffer)
4381
4382 (write _test-input-stream "fn foo {\n")
4383 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4384 (write _test-input-stream "}\n")
4385
4386 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4387 (flush _test-output-buffered-file)
4388 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4394
4395 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
4396 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
4397 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
4398 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
4399 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
4400 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
4401 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
4402 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
4403 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
4404 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
4405 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
4406 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
4407 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
4408 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
4409 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
4410
4411 89/<- %esp 5/r32/ebp
4412 5d/pop-to-ebp
4413 c3/return
4414
4415 test-shadow-local:
4416
4417 55/push-ebp
4418 89/<- %ebp 4/r32/esp
4419
4420 (clear-stream _test-input-stream)
4421 (clear-stream $_test-input-buffered-file->buffer)
4422 (clear-stream _test-output-stream)
4423 (clear-stream $_test-output-buffered-file->buffer)
4424
4425 (write _test-input-stream "fn foo {\n")
4426 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4427 (write _test-input-stream " {\n")
4428 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4429 (write _test-input-stream " }\n")
4430 (write _test-input-stream " x <- increment\n")
4431 (write _test-input-stream "}\n")
4432
4433 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4434 (flush _test-output-buffered-file)
4435 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4441
4442 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-local/0")
4443 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-local/1")
4444 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-local/2")
4445 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-local/3")
4446 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/4")
4447 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-local/5")
4448 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/6")
4449 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-local/7")
4450 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/8")
4451 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-local/9")
4452 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/10")
4453 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-local/11")
4454 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/12")
4455 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/13")
4456 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-local/14")
4457 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-local/15")
4458 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/16")
4459 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/17")
4460 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-local/18")
4461 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-local/19")
4462 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-local/20")
4463 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-local/21")
4464 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-local/22")
4465
4466 89/<- %esp 5/r32/ebp
4467 5d/pop-to-ebp
4468 c3/return
4469
4470 test-shadow-name:
4471
4472 55/push-ebp
4473 89/<- %ebp 4/r32/esp
4474
4475 (clear-stream _test-input-stream)
4476 (clear-stream $_test-input-buffered-file->buffer)
4477 (clear-stream _test-output-stream)
4478 (clear-stream $_test-output-buffered-file->buffer)
4479
4480 (write _test-input-stream "fn foo {\n")
4481 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4482 (write _test-input-stream " {\n")
4483 (write _test-input-stream " var x/edx: int <- copy 4\n")
4484 (write _test-input-stream " }\n")
4485 (write _test-input-stream " x <- increment\n")
4486 (write _test-input-stream "}\n")
4487
4488 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4489 (flush _test-output-buffered-file)
4490 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4496
4497 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
4498 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
4499 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
4500 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
4501 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
4502 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
4503 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
4504 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
4505 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
4506 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
4507 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
4508 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
4509 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
4510 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
4511 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
4512 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
4513 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
4514 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
4515 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
4516 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
4517 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
4518 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
4519 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
4520
4521 89/<- %esp 5/r32/ebp
4522 5d/pop-to-ebp
4523 c3/return
4524
4525 test-shadow-name-2:
4526
4527 55/push-ebp
4528 89/<- %ebp 4/r32/esp
4529
4530 (clear-stream _test-input-stream)
4531 (clear-stream $_test-input-buffered-file->buffer)
4532 (clear-stream _test-output-stream)
4533 (clear-stream $_test-output-buffered-file->buffer)
4534
4535 (write _test-input-stream "fn foo {\n")
4536 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4537 (write _test-input-stream " {\n")
4538 (write _test-input-stream " var x/edx: int <- copy 4\n")
4539 (write _test-input-stream " var y/ecx: int <- copy 5\n")
4540 (write _test-input-stream " }\n")
4541 (write _test-input-stream " x <- increment\n")
4542 (write _test-input-stream "}\n")
4543
4544 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4545 (flush _test-output-buffered-file)
4546 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4552
4553 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name-2/0")
4554 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
4555 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
4556 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
4557 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
4558 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
4559 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
4560 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
4561 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
4562 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
4563 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
4564 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
4565 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
4566 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
4567 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
4568 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
4569 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
4570 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
4571 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
4572 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
4573 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
4574 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
4575 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
4576 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
4577 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
4578 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
4579
4580 89/<- %esp 5/r32/ebp
4581 5d/pop-to-ebp
4582 c3/return
4583
4584 test-do-not-spill-same-register-in-block:
4585
4586 55/push-ebp
4587 89/<- %ebp 4/r32/esp
4588
4589 (clear-stream _test-input-stream)
4590 (clear-stream $_test-input-buffered-file->buffer)
4591 (clear-stream _test-output-stream)
4592 (clear-stream $_test-output-buffered-file->buffer)
4593
4594 (write _test-input-stream "fn foo {\n")
4595 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4596 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4597 (write _test-input-stream " y <- increment\n")
4598 (write _test-input-stream "}\n")
4599
4600 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4601 (flush _test-output-buffered-file)
4602 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4608
4609 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
4610 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
4611 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
4612 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
4613 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
4614 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
4615 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
4616 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
4617 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
4618 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
4619 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
4620 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
4621 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
4622 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
4623 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
4624 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
4625 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
4626
4627 89/<- %esp 5/r32/ebp
4628 5d/pop-to-ebp
4629 c3/return
4630
4631 test-spill-different-register-in-block:
4632
4633 55/push-ebp
4634 89/<- %ebp 4/r32/esp
4635
4636 (clear-stream _test-input-stream)
4637 (clear-stream $_test-input-buffered-file->buffer)
4638 (clear-stream _test-output-stream)
4639 (clear-stream $_test-output-buffered-file->buffer)
4640
4641 (write _test-input-stream "fn foo {\n")
4642 (write _test-input-stream " var x/eax: int <- copy 3\n")
4643 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4644 (write _test-input-stream " y <- increment\n")
4645 (write _test-input-stream "}\n")
4646
4647 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4648 (flush _test-output-buffered-file)
4649 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4655
4656 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
4657 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
4658 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
4659 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
4660 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
4661 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
4662 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
4663 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
4664 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
4665 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
4666 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
4667 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
4668 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
4669 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
4670 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
4671 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
4672 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
4673 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
4674 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
4675
4676 89/<- %esp 5/r32/ebp
4677 5d/pop-to-ebp
4678 c3/return
4679
4680 test-convert-function-with-branches-in-block:
4681
4682 55/push-ebp
4683 89/<- %ebp 4/r32/esp
4684
4685 (clear-stream _test-input-stream)
4686 (clear-stream $_test-input-buffered-file->buffer)
4687 (clear-stream _test-output-stream)
4688 (clear-stream $_test-output-buffered-file->buffer)
4689
4690 (write _test-input-stream "fn foo x: int {\n")
4691 (write _test-input-stream " {\n")
4692 (write _test-input-stream " break-if->=\n")
4693 (write _test-input-stream " loop-if-addr<\n")
4694 (write _test-input-stream " increment x\n")
4695 (write _test-input-stream " loop\n")
4696 (write _test-input-stream " }\n")
4697 (write _test-input-stream "}\n")
4698
4699 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4700 (flush _test-output-buffered-file)
4701 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4707
4708 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4709 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4710 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4711 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4712 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4713 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4714 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4715 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4716 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4717 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4718 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4719 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4720 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4721 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4722 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4723 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4724 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4725 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4726 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4727 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4728 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4729 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4730 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4731 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4732 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4733 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4734
4735 89/<- %esp 5/r32/ebp
4736 5d/pop-to-ebp
4737 c3/return
4738
4739 test-convert-function-with-branches-in-block-2:
4740
4741 55/push-ebp
4742 89/<- %ebp 4/r32/esp
4743
4744 (clear-stream _test-input-stream)
4745 (clear-stream $_test-input-buffered-file->buffer)
4746 (clear-stream _test-output-stream)
4747 (clear-stream $_test-output-buffered-file->buffer)
4748
4749 (write _test-input-stream "fn foo x: int {\n")
4750 (write _test-input-stream " {\n")
4751 (write _test-input-stream " break-if->=\n")
4752 (write _test-input-stream " loop-if-float<\n")
4753 (write _test-input-stream " increment x\n")
4754 (write _test-input-stream " loop\n")
4755 (write _test-input-stream " }\n")
4756 (write _test-input-stream "}\n")
4757
4758 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4759 (flush _test-output-buffered-file)
4760 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4766
4767 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4768 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4769 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4770 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4771 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4772 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4773 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4774 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4775 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4776 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4777 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4778 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4779 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4780 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4781 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4782 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4783 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4784 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4785 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4786 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4787 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4788 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4789 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4790 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4791 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4792 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4793
4794 89/<- %esp 5/r32/ebp
4795 5d/pop-to-ebp
4796 c3/return
4797
4798 test-convert-function-with-branches-in-named-block:
4799
4800 55/push-ebp
4801 89/<- %ebp 4/r32/esp
4802
4803 (clear-stream _test-input-stream)
4804 (clear-stream $_test-input-buffered-file->buffer)
4805 (clear-stream _test-output-stream)
4806 (clear-stream $_test-output-buffered-file->buffer)
4807
4808 (write _test-input-stream "fn foo x: int {\n")
4809 (write _test-input-stream " $bar: {\n")
4810 (write _test-input-stream " break-if->= $bar\n")
4811 (write _test-input-stream " loop-if-addr< $bar\n")
4812 (write _test-input-stream " increment x\n")
4813 (write _test-input-stream " loop\n")
4814 (write _test-input-stream " }\n")
4815 (write _test-input-stream "}\n")
4816
4817 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4818 (flush _test-output-buffered-file)
4819 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4825
4826 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
4827 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
4828 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
4829 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
4830 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
4831 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
4832 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
4833 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
4834 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
4835 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
4836 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
4837 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
4838 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
4839 (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")
4840 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
4841 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
4842 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
4843 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
4844 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
4845 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
4846 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
4847 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
4848 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
4849 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
4850 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
4851 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
4852
4853 89/<- %esp 5/r32/ebp
4854 5d/pop-to-ebp
4855 c3/return
4856
4857 test-convert-function-with-var-in-nested-block:
4858
4859 55/push-ebp
4860 89/<- %ebp 4/r32/esp
4861
4862 (clear-stream _test-input-stream)
4863 (clear-stream $_test-input-buffered-file->buffer)
4864 (clear-stream _test-output-stream)
4865 (clear-stream $_test-output-buffered-file->buffer)
4866
4867 (write _test-input-stream "fn foo x: int {\n")
4868 (write _test-input-stream " {\n")
4869 (write _test-input-stream " {\n")
4870 (write _test-input-stream " var x: int\n")
4871 (write _test-input-stream " increment x\n")
4872 (write _test-input-stream " }\n")
4873 (write _test-input-stream " }\n")
4874 (write _test-input-stream "}\n")
4875
4876 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4877 (flush _test-output-buffered-file)
4878 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4884
4885 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
4886 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
4887 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
4888 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
4889 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
4890 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
4891 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
4892 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
4893 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
4894 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
4895 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
4896 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
4897 (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")
4898 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
4899 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
4900 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
4901 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
4902 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
4903 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
4904 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
4905 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
4906 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
4907 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
4908
4909 89/<- %esp 5/r32/ebp
4910 5d/pop-to-ebp
4911 c3/return
4912
4913 test-convert-function-with-multiple-vars-in-nested-blocks:
4914
4915 55/push-ebp
4916 89/<- %ebp 4/r32/esp
4917
4918 (clear-stream _test-input-stream)
4919 (clear-stream $_test-input-buffered-file->buffer)
4920 (clear-stream _test-output-stream)
4921 (clear-stream $_test-output-buffered-file->buffer)
4922
4923 (write _test-input-stream "fn foo x: int {\n")
4924 (write _test-input-stream " {\n")
4925 (write _test-input-stream " var x/eax: int <- copy 0\n")
4926 (write _test-input-stream " {\n")
4927 (write _test-input-stream " var y: int\n")
4928 (write _test-input-stream " x <- add y\n")
4929 (write _test-input-stream " }\n")
4930 (write _test-input-stream " }\n")
4931 (write _test-input-stream "}\n")
4932
4933 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4934 (flush _test-output-buffered-file)
4935 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4941
4942 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
4943 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
4944 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
4945 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
4946 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
4947 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
4948 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
4949 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
4950 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
4951 (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")
4952 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
4953 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
4954 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
4955 (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")
4956 (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")
4957 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
4958 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
4959 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
4960 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
4961 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
4962 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
4963 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
4964 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
4965 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
4966 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
4967 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
4968
4969 89/<- %esp 5/r32/ebp
4970 5d/pop-to-ebp
4971 c3/return
4972
4973 test-convert-function-with-branches-and-local-vars:
4974
4975
4976
4977
4978 55/push-ebp
4979 89/<- %ebp 4/r32/esp
4980
4981 (clear-stream _test-input-stream)
4982 (clear-stream $_test-input-buffered-file->buffer)
4983 (clear-stream _test-output-stream)
4984 (clear-stream $_test-output-buffered-file->buffer)
4985
4986 (write _test-input-stream "fn foo {\n")
4987 (write _test-input-stream " {\n")
4988 (write _test-input-stream " var x: int\n")
4989 (write _test-input-stream " break-if->=\n")
4990 (write _test-input-stream " increment x\n")
4991 (write _test-input-stream " }\n")
4992 (write _test-input-stream "}\n")
4993
4994 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4995 (flush _test-output-buffered-file)
4996 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5002
5003 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
5004 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
5005 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
5006 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
5007 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
5008 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
5009 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
5010 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
5011 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
5012 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
5013 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
5014 (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")
5015 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
5016 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
5017 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
5018 (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")
5019 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
5020 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
5021 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
5022 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
5023 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
5024 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
5025 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
5026 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
5027
5028 89/<- %esp 5/r32/ebp
5029 5d/pop-to-ebp
5030 c3/return
5031
5032 test-convert-function-with-conditional-loops-and-local-vars:
5033
5034
5035
5036
5037 55/push-ebp
5038 89/<- %ebp 4/r32/esp
5039
5040 (clear-stream _test-input-stream)
5041 (clear-stream $_test-input-buffered-file->buffer)
5042 (clear-stream _test-output-stream)
5043 (clear-stream $_test-output-buffered-file->buffer)
5044
5045 (write _test-input-stream "fn foo {\n")
5046 (write _test-input-stream " {\n")
5047 (write _test-input-stream " var x: int\n")
5048 (write _test-input-stream " loop-if->=\n")
5049 (write _test-input-stream " increment x\n")
5050 (write _test-input-stream " }\n")
5051 (write _test-input-stream "}\n")
5052
5053 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5054 (flush _test-output-buffered-file)
5055 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5061
5062 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
5063 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
5064 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
5065 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
5066 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
5067 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
5068 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
5069 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
5070 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
5071 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
5072 (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")
5073 (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")
5074 (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")
5075 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
5076 (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")
5077 (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")
5078 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
5079 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
5080 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
5081 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
5082 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
5083 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
5084 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
5085 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
5086
5087 89/<- %esp 5/r32/ebp
5088 5d/pop-to-ebp
5089 c3/return
5090
5091 test-convert-function-with-unconditional-loops-and-local-vars:
5092
5093
5094
5095
5096 55/push-ebp
5097 89/<- %ebp 4/r32/esp
5098
5099 (clear-stream _test-input-stream)
5100 (clear-stream $_test-input-buffered-file->buffer)
5101 (clear-stream _test-output-stream)
5102 (clear-stream $_test-output-buffered-file->buffer)
5103
5104 (write _test-input-stream "fn foo {\n")
5105 (write _test-input-stream " {\n")
5106 (write _test-input-stream " var x: int\n")
5107 (write _test-input-stream " loop\n")
5108 (write _test-input-stream " increment x\n")
5109 (write _test-input-stream " }\n")
5110 (write _test-input-stream "}\n")
5111
5112 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5113 (flush _test-output-buffered-file)
5114 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5120
5121 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
5122 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
5123 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
5124 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
5125 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
5126 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
5127 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
5128 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
5129 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
5130 (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")
5131 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
5132
5133 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
5134 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
5135 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
5136 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
5137 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
5138 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
5139 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
5140 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
5141
5142 89/<- %esp 5/r32/ebp
5143 5d/pop-to-ebp
5144 c3/return
5145
5146 test-convert-function-with-branches-and-loops-and-local-vars:
5147
5148 55/push-ebp
5149 89/<- %ebp 4/r32/esp
5150
5151 (clear-stream _test-input-stream)
5152 (clear-stream $_test-input-buffered-file->buffer)
5153 (clear-stream _test-output-stream)
5154 (clear-stream $_test-output-buffered-file->buffer)
5155
5156 (write _test-input-stream "fn foo {\n")
5157 (write _test-input-stream " {\n")
5158 (write _test-input-stream " var x: int\n")
5159 (write _test-input-stream " break-if->=\n")
5160 (write _test-input-stream " increment x\n")
5161 (write _test-input-stream " loop\n")
5162 (write _test-input-stream " }\n")
5163 (write _test-input-stream "}\n")
5164
5165 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5166 (flush _test-output-buffered-file)
5167 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5173
5174 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
5175 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
5176 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
5177 (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")
5178 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
5179 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
5180 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
5181 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
5182 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
5183 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
5184 (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")
5185 (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")
5186 (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")
5187 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
5188 (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")
5189 (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")
5190 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
5191 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
5192 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
5193 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
5194 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
5195 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
5196 (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")
5197 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
5198 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
5199
5200 89/<- %esp 5/r32/ebp
5201 5d/pop-to-ebp
5202 c3/return
5203
5204 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
5205
5206 55/push-ebp
5207 89/<- %ebp 4/r32/esp
5208
5209 (clear-stream _test-input-stream)
5210 (clear-stream $_test-input-buffered-file->buffer)
5211 (clear-stream _test-output-stream)
5212 (clear-stream $_test-output-buffered-file->buffer)
5213
5214 (write _test-input-stream "fn foo {\n")
5215 (write _test-input-stream " a: {\n")
5216 (write _test-input-stream " var x: int\n")
5217 (write _test-input-stream " {\n")
5218 (write _test-input-stream " var y: int\n")
5219 (write _test-input-stream " break-if->= a\n")
5220 (write _test-input-stream " increment x\n")
5221 (write _test-input-stream " loop\n")
5222 (write _test-input-stream " }\n")
5223 (write _test-input-stream " }\n")
5224 (write _test-input-stream "}\n")
5225
5226 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5227 (flush _test-output-buffered-file)
5228 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5234
5235 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
5236 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
5237 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
5238 (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")
5239 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
5240 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
5241 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
5242 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
5243 (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")
5244 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
5245 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
5246 (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")
5247 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
5248 (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")
5249 (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")
5250 (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")
5251 (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")
5252 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
5253 (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")
5254 (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")
5255 (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")
5256 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
5257 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
5258 (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")
5259 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
5260 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
5261 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
5262 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
5263 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
5264 (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")
5265 (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")
5266 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
5267
5268 89/<- %esp 5/r32/ebp
5269 5d/pop-to-ebp
5270 c3/return
5271
5272 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
5273
5274 55/push-ebp
5275 89/<- %ebp 4/r32/esp
5276
5277 (clear-stream _test-input-stream)
5278 (clear-stream $_test-input-buffered-file->buffer)
5279 (clear-stream _test-output-stream)
5280 (clear-stream $_test-output-buffered-file->buffer)
5281
5282
5283 (write _test-input-stream "fn foo {\n")
5284 (write _test-input-stream " a: {\n")
5285 (write _test-input-stream " var x: int\n")
5286 (write _test-input-stream " {\n")
5287 (write _test-input-stream " break-if->= a\n")
5288 (write _test-input-stream " }\n")
5289 (write _test-input-stream " }\n")
5290 (write _test-input-stream "}\n")
5291
5292 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5293 (flush _test-output-buffered-file)
5294 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5300
5301 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
5302 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
5303 (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")
5304 (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")
5305 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
5306 (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")
5307 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
5308 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
5309 (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")
5310 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
5311 (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")
5312 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
5313 (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")
5314 (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")
5315 (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")
5316 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
5317 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
5318 (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")
5319 (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")
5320 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
5321 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
5322 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
5323 (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")
5324 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
5325 (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")
5326 (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")
5327 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
5328
5329 89/<- %esp 5/r32/ebp
5330 5d/pop-to-ebp
5331 c3/return
5332
5333 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
5334
5335 55/push-ebp
5336 89/<- %ebp 4/r32/esp
5337
5338 (clear-stream _test-input-stream)
5339 (clear-stream $_test-input-buffered-file->buffer)
5340 (clear-stream _test-output-stream)
5341 (clear-stream $_test-output-buffered-file->buffer)
5342
5343
5344 (write _test-input-stream "fn foo {\n")
5345 (write _test-input-stream " a: {\n")
5346 (write _test-input-stream " var x: int\n")
5347 (write _test-input-stream " {\n")
5348 (write _test-input-stream " break a\n")
5349 (write _test-input-stream " }\n")
5350 (write _test-input-stream " }\n")
5351 (write _test-input-stream "}\n")
5352
5353 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5354 (flush _test-output-buffered-file)
5355 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5361
5362 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
5363 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
5364 (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")
5365 (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")
5366 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
5367 (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")
5368 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
5369 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
5370 (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")
5371 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
5372 (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")
5373 (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")
5374 (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")
5375 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
5376 (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")
5377 (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")
5378 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
5379 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
5380 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
5381 (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")
5382 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
5383 (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")
5384 (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")
5385 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
5386
5387 89/<- %esp 5/r32/ebp
5388 5d/pop-to-ebp
5389 c3/return
5390
5391 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
5392
5393 55/push-ebp
5394 89/<- %ebp 4/r32/esp
5395
5396 (clear-stream _test-input-stream)
5397 (clear-stream $_test-input-buffered-file->buffer)
5398 (clear-stream _test-output-stream)
5399 (clear-stream $_test-output-buffered-file->buffer)
5400
5401 (write _test-input-stream "fn foo {\n")
5402 (write _test-input-stream " a: {\n")
5403 (write _test-input-stream " var x/esi: int <- copy 0\n")
5404 (write _test-input-stream " {\n")
5405 (write _test-input-stream " break a\n")
5406 (write _test-input-stream " }\n")
5407 (write _test-input-stream " }\n")
5408 (write _test-input-stream "}\n")
5409
5410 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5411 (flush _test-output-buffered-file)
5412 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5418
5419 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
5420 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
5421 (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")
5422 (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")
5423 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
5424 (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")
5425 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
5426 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
5427 (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")
5428 (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")
5429 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
5430 (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")
5431 (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")
5432 (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")
5433 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
5434 (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")
5435 (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")
5436 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
5437 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
5438 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
5439 (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")
5440 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
5441 (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")
5442 (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")
5443 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
5444
5445 89/<- %esp 5/r32/ebp
5446 5d/pop-to-ebp
5447 c3/return
5448
5449 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
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
5459 (write _test-input-stream "fn foo {\n")
5460 (write _test-input-stream " a: {\n")
5461 (write _test-input-stream " var x: int\n")
5462 (write _test-input-stream " {\n")
5463 (write _test-input-stream " var y: int\n")
5464 (write _test-input-stream " break a\n")
5465 (write _test-input-stream " increment x\n")
5466 (write _test-input-stream " }\n")
5467 (write _test-input-stream " }\n")
5468 (write _test-input-stream "}\n")
5469
5470 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5471 (flush _test-output-buffered-file)
5472 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5478
5479 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
5480 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
5481 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
5482 (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")
5483 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
5484 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
5485 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
5486 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
5487 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
5488 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
5489 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
5490 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
5491 (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")
5492 (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")
5493 (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")
5494 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
5495 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
5496 (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")
5497 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
5498 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
5499 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
5500 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
5501 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
5502 (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")
5503 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
5504 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
5505
5506 89/<- %esp 5/r32/ebp
5507 5d/pop-to-ebp
5508 c3/return
5509
5510 test-convert-function-with-unconditional-break-and-local-vars:
5511
5512 55/push-ebp
5513 89/<- %ebp 4/r32/esp
5514
5515 (clear-stream _test-input-stream)
5516 (clear-stream $_test-input-buffered-file->buffer)
5517 (clear-stream _test-output-stream)
5518 (clear-stream $_test-output-buffered-file->buffer)
5519
5520 (write _test-input-stream "fn foo {\n")
5521 (write _test-input-stream " {\n")
5522 (write _test-input-stream " var x: int\n")
5523 (write _test-input-stream " {\n")
5524 (write _test-input-stream " var y: int\n")
5525 (write _test-input-stream " break\n")
5526 (write _test-input-stream " increment x\n")
5527 (write _test-input-stream " }\n")
5528 (write _test-input-stream " }\n")
5529 (write _test-input-stream "}\n")
5530
5531 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5532 (flush _test-output-buffered-file)
5533 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5539
5540 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
5541 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
5542 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
5543 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
5544 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
5545 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
5546 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
5547 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
5548 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
5549 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
5550 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
5551 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
5552 (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")
5553 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
5554 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
5555 (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")
5556 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
5557 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
5558 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
5559 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
5560 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
5561 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
5562 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
5563 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
5564
5565 89/<- %esp 5/r32/ebp
5566 5d/pop-to-ebp
5567 c3/return
5568
5569 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
5570
5571 55/push-ebp
5572 89/<- %ebp 4/r32/esp
5573
5574 (clear-stream _test-input-stream)
5575 (clear-stream $_test-input-buffered-file->buffer)
5576 (clear-stream _test-output-stream)
5577 (clear-stream $_test-output-buffered-file->buffer)
5578
5579 (write _test-input-stream "fn foo {\n")
5580 (write _test-input-stream " a: {\n")
5581 (write _test-input-stream " var x: int\n")
5582 (write _test-input-stream " {\n")
5583 (write _test-input-stream " var y: int\n")
5584 (write _test-input-stream " loop a\n")
5585 (write _test-input-stream " increment x\n")
5586 (write _test-input-stream " }\n")
5587 (write _test-input-stream " }\n")
5588 (write _test-input-stream "}\n")
5589
5590 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5591 (flush _test-output-buffered-file)
5592 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5598
5599 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
5600 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
5601 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
5602 (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")
5603 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
5604 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
5605 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
5606 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
5607 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
5608 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
5609 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
5610 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
5611 (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")
5612 (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")
5613 (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")
5614 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
5615 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
5616 (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")
5617 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
5618 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
5619 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
5620 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
5621 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
5622 (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")
5623 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
5624 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
5625
5626 89/<- %esp 5/r32/ebp
5627 5d/pop-to-ebp
5628 c3/return
5629
5630 test-convert-function-with-local-array-var-in-mem:
5631
5632 55/push-ebp
5633 89/<- %ebp 4/r32/esp
5634
5635 (clear-stream _test-input-stream)
5636 (clear-stream $_test-input-buffered-file->buffer)
5637 (clear-stream _test-output-stream)
5638 (clear-stream $_test-output-buffered-file->buffer)
5639
5640 (write _test-input-stream "fn foo {\n")
5641 (write _test-input-stream " var x: (array int 3)\n")
5642 (write _test-input-stream "}\n")
5643
5644 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5645 (flush _test-output-buffered-file)
5646 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5652
5653 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
5654 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
5655 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
5656 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
5657 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
5658 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
5659
5660 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
5661 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
5662
5663 (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")
5664
5665 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
5666 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
5667 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
5668 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
5669 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
5670 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
5671
5672 89/<- %esp 5/r32/ebp
5673 5d/pop-to-ebp
5674 c3/return
5675
5676 test-array-size-in-hex:
5677
5678 55/push-ebp
5679 89/<- %ebp 4/r32/esp
5680
5681 (clear-stream _test-input-stream)
5682 (clear-stream $_test-input-buffered-file->buffer)
5683 (clear-stream _test-output-stream)
5684 (clear-stream $_test-output-buffered-file->buffer)
5685 (clear-stream _test-error-stream)
5686 (clear-stream $_test-error-buffered-file->buffer)
5687
5688 68/push 0/imm32
5689 68/push 0/imm32
5690 89/<- %edx 4/r32/esp
5691 (tailor-exit-descriptor %edx 0x10)
5692
5693 (write _test-input-stream "fn foo {\n")
5694 (write _test-input-stream " var x: (array int 10)\n")
5695 (write _test-input-stream "}\n")
5696
5697 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5698
5699
5700 89/<- %edx 4/r32/esp
5701 (flush _test-output-buffered-file)
5702 (flush _test-error-buffered-file)
5703 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5709
5710 (check-stream-equal _test-output-stream "" "F - test-array-size-in-hex: output should be empty")
5711 (check-next-stream-line-equal _test-error-stream "literal integers are always hex in Mu; start '10' with a '0x' to be unambiguous, converting it to hexadecimal as necessary." "F - test-array-size-in-hex: error message")
5712
5713 (check-ints-equal *(edx+4) 2 "F - test-array-size-in-hex: exit status")
5714
5715 81 0/subop/add %esp 8/imm32
5716
5717 5d/pop-to-ebp
5718 c3/return
5719
5720 test-array-size-with-metadata:
5721
5722 55/push-ebp
5723 89/<- %ebp 4/r32/esp
5724
5725 (clear-stream _test-input-stream)
5726 (clear-stream $_test-input-buffered-file->buffer)
5727 (clear-stream _test-output-stream)
5728 (clear-stream $_test-output-buffered-file->buffer)
5729
5730 (write _test-input-stream "fn foo {\n")
5731 (write _test-input-stream " var x: (array int 3/bar)\n")
5732 (write _test-input-stream "}\n")
5733
5734 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5735 (flush _test-output-buffered-file)
5736 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5742
5743
5744 89/<- %esp 5/r32/ebp
5745 5d/pop-to-ebp
5746 c3/return
5747
5748 test-convert-function-with-populate:
5749
5750 55/push-ebp
5751 89/<- %ebp 4/r32/esp
5752
5753 (clear-stream _test-input-stream)
5754 (clear-stream $_test-input-buffered-file->buffer)
5755 (clear-stream _test-output-stream)
5756 (clear-stream $_test-output-buffered-file->buffer)
5757
5758 (write _test-input-stream "fn foo {\n")
5759 (write _test-input-stream " var x/ecx: (addr handle array int) <- copy 0\n")
5760 (write _test-input-stream " populate x, 7\n")
5761 (write _test-input-stream "}\n")
5762
5763 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5764 (flush _test-output-buffered-file)
5765 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5771
5772 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-populate/0")
5773 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-populate/1")
5774 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-populate/2")
5775 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-populate/3")
5776 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-populate/4")
5777 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-populate/5")
5778 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-populate/6")
5779 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-populate/7")
5780 (check-next-stream-line-equal _test-output-stream " (allocate-array2 Heap 0x00000004 7 %ecx)" "F - test-convert-function-with-populate/8")
5781 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-populate/9")
5782 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-populate/10")
5783 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-populate/11")
5784 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-populate/12")
5785 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-populate/13")
5786 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-populate/14")
5787 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-populate/15")
5788
5789 89/<- %esp 5/r32/ebp
5790 5d/pop-to-ebp
5791 c3/return
5792
5793
5794 test-convert-function-with-local-array-of-bytes-in-mem:
5795
5796 55/push-ebp
5797 89/<- %ebp 4/r32/esp
5798
5799 (clear-stream _test-input-stream)
5800 (clear-stream $_test-input-buffered-file->buffer)
5801 (clear-stream _test-output-stream)
5802 (clear-stream $_test-output-buffered-file->buffer)
5803
5804 (write _test-input-stream "fn foo {\n")
5805 (write _test-input-stream " var x: (array byte 3)\n")
5806 (write _test-input-stream "}\n")
5807
5808 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5809 (flush _test-output-buffered-file)
5810 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5816
5817 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
5818 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
5819 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
5820 (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")
5821 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
5822 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
5823
5824 (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")
5825 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
5826
5827 (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")
5828
5829 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
5830 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
5831 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
5832 (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")
5833 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
5834 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
5835
5836 89/<- %esp 5/r32/ebp
5837 5d/pop-to-ebp
5838 c3/return
5839
5840 test-convert-address:
5841
5842 55/push-ebp
5843 89/<- %ebp 4/r32/esp
5844
5845 (clear-stream _test-input-stream)
5846 (clear-stream $_test-input-buffered-file->buffer)
5847 (clear-stream _test-output-stream)
5848 (clear-stream $_test-output-buffered-file->buffer)
5849
5850 (write _test-input-stream "fn foo {\n")
5851 (write _test-input-stream " var a: int\n")
5852 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
5853 (write _test-input-stream "}\n")
5854
5855 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5856 (flush _test-output-buffered-file)
5857 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5863
5864 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
5865 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
5866 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
5867 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
5868 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
5869 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
5870 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
5871 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
5872 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
5873 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
5874 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
5875 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
5876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
5877 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
5878 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
5879 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
5880 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
5881
5882 89/<- %esp 5/r32/ebp
5883 5d/pop-to-ebp
5884 c3/return
5885
5886 test-convert-floating-point-convert:
5887
5888 55/push-ebp
5889 89/<- %ebp 4/r32/esp
5890
5891 (clear-stream _test-input-stream)
5892 (clear-stream $_test-input-buffered-file->buffer)
5893 (clear-stream _test-output-stream)
5894 (clear-stream $_test-output-buffered-file->buffer)
5895
5896 (write _test-input-stream "fn foo {\n")
5897 (write _test-input-stream " var a/eax: int <- copy 0\n")
5898 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5899 (write _test-input-stream "}\n")
5900
5901 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5902 (flush _test-output-buffered-file)
5903 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5909
5910 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert/0")
5911 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert/1")
5912 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert/2")
5913 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert/3")
5914 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert/4")
5915 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert/5")
5916 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert/6")
5917 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert/7")
5918 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert/8")
5919 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert/9")
5920 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert/10")
5921 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert/11")
5922 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert/12")
5923 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert/13")
5924 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert/14")
5925 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert/15")
5926 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert/16")
5927 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert/17")
5928 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert/18")
5929 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert/19")
5930
5931 89/<- %esp 5/r32/ebp
5932 5d/pop-to-ebp
5933 c3/return
5934
5935 test-convert-floating-point-convert-2:
5936
5937 55/push-ebp
5938 89/<- %ebp 4/r32/esp
5939
5940 (clear-stream _test-input-stream)
5941 (clear-stream $_test-input-buffered-file->buffer)
5942 (clear-stream _test-output-stream)
5943 (clear-stream $_test-output-buffered-file->buffer)
5944
5945 (write _test-input-stream "fn foo {\n")
5946 (write _test-input-stream " var a/eax: int <- copy 0\n")
5947 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5948 (write _test-input-stream " a <- convert b\n")
5949 (write _test-input-stream "}\n")
5950
5951 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5952 (flush _test-output-buffered-file)
5953 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5959
5960 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert-2/0")
5961 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert-2/1")
5962 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert-2/2")
5963 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert-2/3")
5964 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert-2/4")
5965 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert-2/5")
5966 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert-2/6")
5967 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert-2/7")
5968 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert-2/8")
5969 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert-2/9")
5970 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert-2/10")
5971 (check-next-stream-line-equal _test-output-stream " f3 0f 2d/convert-to-int %xmm1 0x00000000/r32" "F - test-convert-floating-point-convert-2/11")
5972 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert-2/12")
5973 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert-2/13")
5974 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert-2/14")
5975 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert-2/15")
5976 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert-2/16")
5977 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert-2/17")
5978 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert-2/18")
5979 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert-2/19")
5980 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert-2/20")
5981
5982 89/<- %esp 5/r32/ebp
5983 5d/pop-to-ebp
5984 c3/return
5985
5986 test-convert-floating-point-operation:
5987
5988 55/push-ebp
5989 89/<- %ebp 4/r32/esp
5990
5991 (clear-stream _test-input-stream)
5992 (clear-stream $_test-input-buffered-file->buffer)
5993 (clear-stream _test-output-stream)
5994 (clear-stream $_test-output-buffered-file->buffer)
5995
5996 (write _test-input-stream "fn f {\n")
5997 (write _test-input-stream " var m: float\n")
5998 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5999 (write _test-input-stream " var y/xmm5: float <- copy m\n")
6000 (write _test-input-stream " x <- copy y\n")
6001 (write _test-input-stream " copy-to m, y\n")
6002 (write _test-input-stream " x <- add y\n")
6003 (write _test-input-stream " x <- add m\n")
6004 (write _test-input-stream " x <- subtract y\n")
6005 (write _test-input-stream " x <- subtract m\n")
6006 (write _test-input-stream " x <- multiply y\n")
6007 (write _test-input-stream " x <- multiply m\n")
6008 (write _test-input-stream " x <- divide y\n")
6009 (write _test-input-stream " x <- divide m\n")
6010 (write _test-input-stream " x <- reciprocal y\n")
6011 (write _test-input-stream " x <- reciprocal m\n")
6012 (write _test-input-stream " x <- square-root y\n")
6013 (write _test-input-stream " x <- square-root m\n")
6014 (write _test-input-stream " x <- inverse-square-root y\n")
6015 (write _test-input-stream " x <- inverse-square-root m\n")
6016 (write _test-input-stream " x <- max y\n")
6017 (write _test-input-stream " x <- max m\n")
6018 (write _test-input-stream " x <- min y\n")
6019 (write _test-input-stream " x <- min m\n")
6020 (write _test-input-stream " compare x, y\n")
6021 (write _test-input-stream " compare x, m\n")
6022 (write _test-input-stream "}\n")
6023
6024 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6025 (flush _test-output-buffered-file)
6026 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6032
6033 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-operation/0")
6034 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-operation/1")
6035 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-operation/2")
6036 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-operation/3")
6037 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-operation/4")
6038 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-operation/5")
6039 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-operation/6")
6040 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/7")
6041 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-operation/8")
6042 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/9")
6043 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/10")
6044 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 5/x32" "F - test-convert-floating-point-operation/11")
6045 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/12")
6046 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/13")
6047 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/14")
6048 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/15")
6049 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/16")
6050 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/17")
6051 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/18")
6052 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/19")
6053 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/20")
6054 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/21")
6055 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/22")
6056 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/23")
6057 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/24")
6058 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/25")
6059 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/26")
6060 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/27")
6061 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/28")
6062 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/29")
6063 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/30")
6064 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/31")
6065 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/32")
6066 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/33")
6067 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/34")
6068 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 5/x32" "F - test-convert-floating-point-operation/35")
6069 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/36")
6070 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-operation/37")
6071 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/38")
6072 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-operation/39")
6073 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-operation/40")
6074 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-operation/41")
6075 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-operation/42")
6076 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-operation/43")
6077 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-operation/44")
6078 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-operation/45")
6079
6080 89/<- %esp 5/r32/ebp
6081 5d/pop-to-ebp
6082 c3/return
6083
6084 test-convert-floating-point-dereferenced:
6085
6086 55/push-ebp
6087 89/<- %ebp 4/r32/esp
6088
6089 (clear-stream _test-input-stream)
6090 (clear-stream $_test-input-buffered-file->buffer)
6091 (clear-stream _test-output-stream)
6092 (clear-stream $_test-output-buffered-file->buffer)
6093
6094 (write _test-input-stream "fn f {\n")
6095 (write _test-input-stream " var m: float\n")
6096 (write _test-input-stream " var x/xmm1: float <- copy m\n")
6097 (write _test-input-stream " var y/eax: (addr float) <- copy 0\n")
6098 (write _test-input-stream " x <- multiply *y\n")
6099 (write _test-input-stream "}\n")
6100
6101 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6102 (flush _test-output-buffered-file)
6103 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6109
6110 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-dereferenced/0")
6111 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-dereferenced/1")
6112 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-dereferenced/2")
6113 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-dereferenced/3")
6114 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-dereferenced/4")
6115 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-dereferenced/5")
6116 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-dereferenced/6")
6117 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-dereferenced/7")
6118 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-dereferenced/8")
6119 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-dereferenced/9")
6120 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-dereferenced/10")
6121 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-dereferenced/11")
6122 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *eax 0x00000001/x32" "F - test-convert-floating-point-dereferenced/12")
6123 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-dereferenced/13")
6124 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-dereferenced/14")
6125 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
6126 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-dereferenced/16")
6127 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-dereferenced/17")
6128 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-dereferenced/18")
6129 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-dereferenced/19")
6130 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-dereferenced/20")
6131 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-dereferenced/21")
6132 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-dereferenced/22")
6133
6134 89/<- %esp 5/r32/ebp
6135 5d/pop-to-ebp
6136 c3/return
6137
6138 test-convert-length-of-array:
6139
6140 55/push-ebp
6141 89/<- %ebp 4/r32/esp
6142
6143 (clear-stream _test-input-stream)
6144 (clear-stream $_test-input-buffered-file->buffer)
6145 (clear-stream _test-output-stream)
6146 (clear-stream $_test-output-buffered-file->buffer)
6147
6148 (write _test-input-stream "fn foo a: (addr array int) {\n")
6149 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
6150 (write _test-input-stream " var c/eax: int <- length b\n")
6151 (write _test-input-stream "}\n")
6152
6153 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6154 (flush _test-output-buffered-file)
6155 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6161
6162 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
6163 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
6164 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
6165 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
6166 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
6167 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
6168 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
6169 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
6170 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
6171 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
6172 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
6173 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
6174 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
6175 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
6176 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
6177 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
6178 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
6179
6180 89/<- %esp 5/r32/ebp
6181 5d/pop-to-ebp
6182 c3/return
6183
6184
6185 test-convert-length-of-array-of-bytes:
6186
6187 55/push-ebp
6188 89/<- %ebp 4/r32/esp
6189
6190 (clear-stream _test-input-stream)
6191 (clear-stream $_test-input-buffered-file->buffer)
6192 (clear-stream _test-output-stream)
6193 (clear-stream $_test-output-buffered-file->buffer)
6194
6195 (write _test-input-stream "fn foo a: (addr array byte) {\n")
6196 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
6197 (write _test-input-stream " var c/eax: int <- length b\n")
6198 (write _test-input-stream "}\n")
6199
6200 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6201 (flush _test-output-buffered-file)
6202 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6208
6209 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
6210 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
6211 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
6212 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
6213 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
6214 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
6215 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
6216 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
6217 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
6218 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
6219 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
6220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
6221 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
6222 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
6223 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
6224 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
6225
6226 89/<- %esp 5/r32/ebp
6227 5d/pop-to-ebp
6228 c3/return
6229
6230 test-convert-length-of-array-on-stack:
6231
6232 55/push-ebp
6233 89/<- %ebp 4/r32/esp
6234
6235 (clear-stream _test-input-stream)
6236 (clear-stream $_test-input-buffered-file->buffer)
6237 (clear-stream _test-output-stream)
6238 (clear-stream $_test-output-buffered-file->buffer)
6239
6240 (write _test-input-stream "fn foo {\n")
6241 (write _test-input-stream " var a: (array int 3)\n")
6242 (write _test-input-stream " var b/eax: int <- length a\n")
6243 (write _test-input-stream "}\n")
6244
6245 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6246 (flush _test-output-buffered-file)
6247 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6253
6254 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
6255 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
6256 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
6257 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
6258 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
6259 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
6260
6261 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
6262 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
6263 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
6264 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
6265 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
6266 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
6267 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
6268 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
6269 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
6270 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
6271 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
6272 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
6273 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
6274
6275 89/<- %esp 5/r32/ebp
6276 5d/pop-to-ebp
6277 c3/return
6278
6279 test-reg-var-def-with-read-of-same-register:
6280
6281 55/push-ebp
6282 89/<- %ebp 4/r32/esp
6283
6284 (clear-stream _test-input-stream)
6285 (clear-stream $_test-input-buffered-file->buffer)
6286 (clear-stream _test-output-stream)
6287 (clear-stream $_test-output-buffered-file->buffer)
6288 (clear-stream _test-error-stream)
6289 (clear-stream $_test-error-buffered-file->buffer)
6290
6291 68/push 0/imm32
6292 68/push 0/imm32
6293 89/<- %edx 4/r32/esp
6294 (tailor-exit-descriptor %edx 0x10)
6295
6296 (write _test-input-stream "fn foo {\n")
6297 (write _test-input-stream " var x/eax: int <- copy 3\n")
6298 (write _test-input-stream " var y/eax: int <- add x\n")
6299 (write _test-input-stream "}\n")
6300
6301 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6302
6303
6304 89/<- %edx 4/r32/esp
6305 (flush _test-output-buffered-file)
6306 (flush _test-error-buffered-file)
6307 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6313 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
6319 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
6320
6321 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
6322 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
6323 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
6324 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
6325 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
6326 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
6327 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
6328 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-reg-var-def-with-read-of-same-register/7")
6329 (check-next-stream-line-equal _test-output-stream " 01/add-to %eax 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/8")
6330 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/9")
6331 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/10")
6332 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/11")
6333 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/12")
6334 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/13")
6335 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/14")
6336 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/15")
6337
6338 81 0/subop/add %esp 8/imm32
6339
6340 5d/pop-to-ebp
6341 c3/return
6342
6343 test-convert-index-into-array:
6344
6345 55/push-ebp
6346 89/<- %ebp 4/r32/esp
6347
6348 (clear-stream _test-input-stream)
6349 (clear-stream $_test-input-buffered-file->buffer)
6350 (clear-stream _test-output-stream)
6351 (clear-stream $_test-output-buffered-file->buffer)
6352
6353 (write _test-input-stream "fn foo {\n")
6354 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6355 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6356 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
6357 (write _test-input-stream "}\n")
6358
6359 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6360 (flush _test-output-buffered-file)
6361 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6367
6368 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
6369 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
6370 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
6371 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
6372 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
6373 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
6374 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
6375 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
6376 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
6377 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
6378 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 0x00000004 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array/10")
6379 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array/11")
6380 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array/12")
6381 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/13")
6382 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/14")
6383 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/15")
6384 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/16")
6385 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/17")
6386 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/18")
6387 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/19")
6388 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/20")
6389 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/21")
6390
6391 89/<- %esp 5/r32/ebp
6392 5d/pop-to-ebp
6393 c3/return
6394
6395 test-convert-index-into-array-of-bytes:
6396
6397 55/push-ebp
6398 89/<- %ebp 4/r32/esp
6399
6400 (clear-stream _test-input-stream)
6401 (clear-stream $_test-input-buffered-file->buffer)
6402 (clear-stream _test-output-stream)
6403 (clear-stream $_test-output-buffered-file->buffer)
6404
6405 (write _test-input-stream "fn foo {\n")
6406 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6407 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6408 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
6409 (write _test-input-stream "}\n")
6410
6411 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6412 (flush _test-output-buffered-file)
6413 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6419
6420 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
6421 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
6422 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
6423 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
6424 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
6425 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
6426 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
6427 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
6428 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
6429 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
6430 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 0x00000001 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-of-bytes/10")
6431 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-of-bytes/11")
6432 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-of-bytes/12")
6433 (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/13")
6434 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/14")
6435 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/15")
6436 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/16")
6437 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/17")
6438 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/18")
6439 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/19")
6440 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/20")
6441 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/21")
6442
6443 89/<- %esp 5/r32/ebp
6444 5d/pop-to-ebp
6445 c3/return
6446
6447 test-convert-index-into-array-with-literal:
6448
6449 55/push-ebp
6450 89/<- %ebp 4/r32/esp
6451
6452 (clear-stream _test-input-stream)
6453 (clear-stream $_test-input-buffered-file->buffer)
6454 (clear-stream _test-output-stream)
6455 (clear-stream $_test-output-buffered-file->buffer)
6456
6457 (write _test-input-stream "fn foo {\n")
6458 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6459 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6460 (write _test-input-stream "}\n")
6461
6462 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6463 (flush _test-output-buffered-file)
6464 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6470
6471 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
6472 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
6473 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
6474 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
6475 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
6476 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
6477 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
6478 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
6479 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds 2 0x00000004 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-with-literal/8")
6480 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-with-literal/9")
6481 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-with-literal/10")
6482
6483 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/11")
6484 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/12")
6485 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/13")
6486 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/14")
6487 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/15")
6488 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/16")
6489 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/17")
6490 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/18")
6491
6492 89/<- %esp 5/r32/ebp
6493 5d/pop-to-ebp
6494 c3/return
6495
6496 test-convert-index-into-array-of-bytes-with-literal:
6497
6498 55/push-ebp
6499 89/<- %ebp 4/r32/esp
6500
6501 (clear-stream _test-input-stream)
6502 (clear-stream $_test-input-buffered-file->buffer)
6503 (clear-stream _test-output-stream)
6504 (clear-stream $_test-output-buffered-file->buffer)
6505
6506 (write _test-input-stream "fn foo {\n")
6507 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6508 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6509 (write _test-input-stream "}\n")
6510
6511 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6512 (flush _test-output-buffered-file)
6513 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6519
6520 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
6521 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
6522 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
6523 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
6524 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
6525 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
6526 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
6527 (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")
6528 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds 2 0x00000001 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-of-bytes-with-literal/8")
6529 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-of-bytes-with-literal/9")
6530 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-of-bytes-with-literal/10")
6531
6532 (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/11")
6533 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/12")
6534 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/13")
6535 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/14")
6536 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/15")
6537 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/16")
6538 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/17")
6539 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/18")
6540
6541 89/<- %esp 5/r32/ebp
6542 5d/pop-to-ebp
6543 c3/return
6544
6545 test-convert-index-into-array-on-stack:
6546
6547 55/push-ebp
6548 89/<- %ebp 4/r32/esp
6549
6550 (clear-stream _test-input-stream)
6551 (clear-stream $_test-input-buffered-file->buffer)
6552 (clear-stream _test-output-stream)
6553 (clear-stream $_test-output-buffered-file->buffer)
6554
6555 (write _test-input-stream "fn foo {\n")
6556 (write _test-input-stream " var arr: (array int 3)\n")
6557 (write _test-input-stream " var idx/eax: int <- copy 2\n")
6558 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
6559 (write _test-input-stream "}\n")
6560
6561 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6562 (flush _test-output-buffered-file)
6563 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6569
6570 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
6571 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
6572 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
6573 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
6574 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
6575 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
6576
6577 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
6578 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
6579
6580 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
6581 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
6582 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %eax 0x00000004 *(ebp+0xfffffff0) \"foo\" \"arr\")" "F - test-convert-index-into-array-on-stack/10")
6583
6584 (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/11")
6585
6586 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/12")
6587
6588 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/13")
6589
6590 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/14")
6591 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/15")
6592 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/16")
6593 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/17")
6594 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/18")
6595 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/19")
6596
6597 89/<- %esp 5/r32/ebp
6598 5d/pop-to-ebp
6599 c3/return
6600
6601 test-convert-index-into-array-on-stack-with-literal:
6602
6603 55/push-ebp
6604 89/<- %ebp 4/r32/esp
6605
6606 (clear-stream _test-input-stream)
6607 (clear-stream $_test-input-buffered-file->buffer)
6608 (clear-stream _test-output-stream)
6609 (clear-stream $_test-output-buffered-file->buffer)
6610
6611 (write _test-input-stream "fn foo {\n")
6612 (write _test-input-stream " var arr: (array int 3)\n")
6613 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6614 (write _test-input-stream "}\n")
6615
6616 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6617 (flush _test-output-buffered-file)
6618 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6624
6625 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
6626 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
6627 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
6628 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
6629 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
6630 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
6631
6632 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
6633 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
6634
6635 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
6636 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds 2 0x00000004 *(ebp+0xfffffff0) \"foo\" \"arr\")" "F - test-convert-index-into-array-on-stack-with-literal/9")
6637
6638 (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/10")
6639
6640 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/11")
6641
6642 (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/12")
6643
6644 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/13")
6645 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/14")
6646 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/15")
6647 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
6648 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/17")
6649 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/18")
6650
6651 89/<- %esp 5/r32/ebp
6652 5d/pop-to-ebp
6653 c3/return
6654
6655 test-convert-index-into-array-of-bytes-on-stack-with-literal:
6656
6657 55/push-ebp
6658 89/<- %ebp 4/r32/esp
6659
6660 (clear-stream _test-input-stream)
6661 (clear-stream $_test-input-buffered-file->buffer)
6662 (clear-stream _test-output-stream)
6663 (clear-stream $_test-output-buffered-file->buffer)
6664
6665 (write _test-input-stream "fn foo {\n")
6666 (write _test-input-stream " var arr: (array byte 3)\n")
6667 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6668 (write _test-input-stream "}\n")
6669
6670 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6671 (flush _test-output-buffered-file)
6672 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6678
6679 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
6680 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
6681 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
6682 (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")
6683 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
6684 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
6685
6686 (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")
6687 (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")
6688
6689 (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")
6690 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds 2 0x00000001 *(ebp+0xfffffff9) \"foo\" \"arr\")" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/9")
6691
6692 (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/10")
6693
6694 (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/11")
6695
6696 (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/12")
6697
6698 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
6699 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
6700 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
6701 (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/16")
6702 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
6703 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/18")
6704
6705 89/<- %esp 5/r32/ebp
6706 5d/pop-to-ebp
6707 c3/return
6708
6709 test-convert-index-into-array-using-offset:
6710
6711 55/push-ebp
6712 89/<- %ebp 4/r32/esp
6713
6714 (clear-stream _test-input-stream)
6715 (clear-stream $_test-input-buffered-file->buffer)
6716 (clear-stream _test-output-stream)
6717 (clear-stream $_test-output-buffered-file->buffer)
6718
6719 (write _test-input-stream "fn foo {\n")
6720 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6721 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6722 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6723 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6724 (write _test-input-stream "}\n")
6725
6726 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6727 (flush _test-output-buffered-file)
6728 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6734
6735 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
6736 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
6737 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
6738 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
6739 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
6740 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
6741 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
6742 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
6743 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
6744 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
6745 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
6746 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 1 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-using-offset/11")
6747 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-using-offset/12")
6748 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-using-offset/13")
6749 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset/15")
6750 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/16")
6751 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/17")
6752 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/18")
6753 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/19")
6754 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/20")
6755 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/21")
6756 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/22")
6757 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/23")
6758
6759 89/<- %esp 5/r32/ebp
6760 5d/pop-to-ebp
6761 c3/return
6762
6763 test-convert-compute-offset-using-literal-index:
6764
6765 55/push-ebp
6766 89/<- %ebp 4/r32/esp
6767
6768 (clear-stream _test-input-stream)
6769 (clear-stream $_test-input-buffered-file->buffer)
6770 (clear-stream _test-output-stream)
6771 (clear-stream $_test-output-buffered-file->buffer)
6772
6773 (write _test-input-stream "fn foo {\n")
6774 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6775 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, 3\n")
6776 (write _test-input-stream "}\n")
6777
6778 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6779 (flush _test-output-buffered-file)
6780 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6786
6787 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compute-offset-using-literal-index/0")
6788 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compute-offset-using-literal-index/1")
6789 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compute-offset-using-literal-index/2")
6790 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compute-offset-using-literal-index/3")
6791 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compute-offset-using-literal-index/4")
6792 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compute-offset-using-literal-index/5")
6793 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-compute-offset-using-literal-index/6")
6794 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-compute-offset-using-literal-index/7")
6795 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compute-offset-using-literal-index/8")
6796 (check-next-stream-line-equal _test-output-stream " c7/copy %ecx 0x0000000c/imm32" "F - test-convert-compute-offset-using-literal-index/9")
6797 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compute-offset-using-literal-index/10")
6798 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-compute-offset-using-literal-index/11")
6799 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compute-offset-using-literal-index/12")
6800 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compute-offset-using-literal-index/13")
6801 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compute-offset-using-literal-index/14")
6802 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compute-offset-using-literal-index/15")
6803 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compute-offset-using-literal-index/16")
6804 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compute-offset-using-literal-index/17")
6805
6806 89/<- %esp 5/r32/ebp
6807 5d/pop-to-ebp
6808 c3/return
6809
6810 test-convert-index-into-array-of-bytes-using-offset:
6811
6812 55/push-ebp
6813 89/<- %ebp 4/r32/esp
6814
6815 (clear-stream _test-input-stream)
6816 (clear-stream $_test-input-buffered-file->buffer)
6817 (clear-stream _test-output-stream)
6818 (clear-stream $_test-output-buffered-file->buffer)
6819
6820 (write _test-input-stream "fn foo {\n")
6821 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6822 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6823 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6824 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6825 (write _test-input-stream "}\n")
6826
6827 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6828 (flush _test-output-buffered-file)
6829 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6835
6836 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
6837 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
6838 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
6839 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
6840 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
6841 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
6842 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
6843 (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")
6844 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
6845 (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")
6846 (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")
6847 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 1 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-of-bytes-using-offset/11")
6848 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset/12")
6849 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-of-bytes-using-offset/13")
6850 (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/14")
6851 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/15")
6852 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/16")
6853 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/17")
6854 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/18")
6855 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/19")
6856 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/20")
6857 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/21")
6858 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/22")
6859
6860 89/<- %esp 5/r32/ebp
6861 5d/pop-to-ebp
6862 c3/return
6863
6864 test-convert-index-into-array-using-offset-on-stack:
6865
6866 55/push-ebp
6867 89/<- %ebp 4/r32/esp
6868
6869 (clear-stream _test-input-stream)
6870 (clear-stream $_test-input-buffered-file->buffer)
6871 (clear-stream _test-output-stream)
6872 (clear-stream $_test-output-buffered-file->buffer)
6873
6874 (write _test-input-stream "fn foo {\n")
6875 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6876 (write _test-input-stream " var idx: int\n")
6877 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6878 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6879 (write _test-input-stream "}\n")
6880
6881 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6882 (flush _test-output-buffered-file)
6883 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6889
6890 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
6891 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
6892 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
6893 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
6894 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
6895 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
6896 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
6897 (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")
6898 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
6899 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
6900 (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")
6901 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 1 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-using-offset-on-stack/11")
6902 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/12")
6903 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-using-offset-on-stack/13")
6904 (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/14")
6905 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/15")
6906 (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/16")
6907 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/17")
6908 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/18")
6909 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/19")
6910 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/20")
6911 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/21")
6912 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/22")
6913 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/23")
6914
6915 89/<- %esp 5/r32/ebp
6916 5d/pop-to-ebp
6917 c3/return
6918
6919 test-convert-index-into-array-of-bytes-using-offset-on-stack:
6920
6921 55/push-ebp
6922 89/<- %ebp 4/r32/esp
6923
6924 (clear-stream _test-input-stream)
6925 (clear-stream $_test-input-buffered-file->buffer)
6926 (clear-stream _test-output-stream)
6927 (clear-stream $_test-output-buffered-file->buffer)
6928
6929 (write _test-input-stream "fn foo {\n")
6930 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6931 (write _test-input-stream " var idx: int\n")
6932 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6933 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6934 (write _test-input-stream "}\n")
6935
6936 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6937 (flush _test-output-buffered-file)
6938 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6944
6945 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
6946 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
6947 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
6948 (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")
6949 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
6950 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
6951 (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")
6952 (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")
6953 (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")
6954 (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")
6955 (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")
6956 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 1 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/11")
6957 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/12")
6958 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/13")
6959 (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/14")
6960 (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/15")
6961 (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/16")
6962 (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/17")
6963 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
6964 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/19")
6965 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
6966 (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/21")
6967 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/22")
6968 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/23")
6969
6970 89/<- %esp 5/r32/ebp
6971 5d/pop-to-ebp
6972 c3/return
6973
6974 test-convert-function-and-type-definition:
6975
6976 55/push-ebp
6977 89/<- %ebp 4/r32/esp
6978
6979 (clear-stream _test-input-stream)
6980 (clear-stream $_test-input-buffered-file->buffer)
6981 (clear-stream _test-output-stream)
6982 (clear-stream $_test-output-buffered-file->buffer)
6983
6984 (write _test-input-stream "fn foo a: (addr t) {\n")
6985 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
6986 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
6987 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
6988 (write _test-input-stream "}\n")
6989 (write _test-input-stream "type t {\n")
6990 (write _test-input-stream " x: int\n")
6991 (write _test-input-stream " y: int\n")
6992 (write _test-input-stream "}\n")
6993
6994 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6995 (flush _test-output-buffered-file)
6996 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7002
7003 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
7004 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
7005 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
7006 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
7007 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
7008 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
7009 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
7010 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
7011 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
7012 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-function-and-type-definition/9")
7013 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-get-base-address/disp32" "F - test-convert-function-and-type-definition/10")
7014 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
7015 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-function-and-type-definition/12")
7016 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-get-base-address/disp32" "F - test-convert-function-and-type-definition/13")
7017 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/14")
7018 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/15")
7019 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/16")
7020 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/17")
7021 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/18")
7022 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/19")
7023 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/20")
7024 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/21")
7025 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/22")
7026
7027 89/<- %esp 5/r32/ebp
7028 5d/pop-to-ebp
7029 c3/return
7030
7031 test-type-definition-with-array:
7032
7033 55/push-ebp
7034 89/<- %ebp 4/r32/esp
7035
7036 (clear-stream _test-input-stream)
7037 (clear-stream $_test-input-buffered-file->buffer)
7038 (clear-stream _test-output-stream)
7039 (clear-stream $_test-output-buffered-file->buffer)
7040 (clear-stream _test-error-stream)
7041 (clear-stream $_test-error-buffered-file->buffer)
7042
7043 68/push 0/imm32
7044 68/push 0/imm32
7045 89/<- %edx 4/r32/esp
7046 (tailor-exit-descriptor %edx 0x10)
7047
7048 (write _test-input-stream "type t {\n")
7049 (write _test-input-stream " a: (array int 3)\n")
7050 (write _test-input-stream "}\n")
7051
7052 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7053
7054
7055 89/<- %edx 4/r32/esp
7056 (flush _test-output-buffered-file)
7057 (flush _test-error-buffered-file)
7058 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7064
7065 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-array: output should be empty")
7066 (check-next-stream-line-equal _test-error-stream "type t: 'array' elements not allowed for now" "F - test-type-definition-with-array: error message")
7067
7068 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-array: exit status")
7069
7070 81 0/subop/add %esp 8/imm32
7071
7072 5d/pop-to-ebp
7073 c3/return
7074
7075 test-type-definition-with-addr:
7076
7077 55/push-ebp
7078 89/<- %ebp 4/r32/esp
7079
7080 (clear-stream _test-input-stream)
7081 (clear-stream $_test-input-buffered-file->buffer)
7082 (clear-stream _test-output-stream)
7083 (clear-stream $_test-output-buffered-file->buffer)
7084 (clear-stream _test-error-stream)
7085 (clear-stream $_test-error-buffered-file->buffer)
7086
7087 68/push 0/imm32
7088 68/push 0/imm32
7089 89/<- %edx 4/r32/esp
7090 (tailor-exit-descriptor %edx 0x10)
7091
7092 (write _test-input-stream "type t {\n")
7093 (write _test-input-stream " a: (addr int)\n")
7094 (write _test-input-stream "}\n")
7095
7096 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7097
7098
7099 89/<- %edx 4/r32/esp
7100 (flush _test-output-buffered-file)
7101 (flush _test-error-buffered-file)
7102 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7108
7109 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-addr: output should be empty")
7110 (check-next-stream-line-equal _test-error-stream "type t: 'addr' elements not allowed" "F - test-type-definition-with-addr: error message")
7111
7112 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-addr: exit status")
7113
7114 81 0/subop/add %esp 8/imm32
7115
7116 5d/pop-to-ebp
7117 c3/return
7118
7119 test-convert-function-with-local-var-with-user-defined-type:
7120
7121 55/push-ebp
7122 89/<- %ebp 4/r32/esp
7123
7124 (clear-stream _test-input-stream)
7125 (clear-stream $_test-input-buffered-file->buffer)
7126 (clear-stream _test-output-stream)
7127 (clear-stream $_test-output-buffered-file->buffer)
7128
7129 (write _test-input-stream "fn foo {\n")
7130 (write _test-input-stream " var a: t\n")
7131 (write _test-input-stream "}\n")
7132 (write _test-input-stream "type t {\n")
7133 (write _test-input-stream " x: int\n")
7134 (write _test-input-stream " y: int\n")
7135 (write _test-input-stream "}\n")
7136
7137 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7138 (flush _test-output-buffered-file)
7139 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7145
7146 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
7147 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
7148 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
7149 (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")
7150 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
7151 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
7152 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
7153 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
7154 (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")
7155 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
7156 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
7157 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
7158 (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")
7159 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
7160 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
7161
7162 89/<- %esp 5/r32/ebp
7163 5d/pop-to-ebp
7164 c3/return
7165
7166 test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type:
7167
7168 55/push-ebp
7169 89/<- %ebp 4/r32/esp
7170
7171 (clear-stream _test-input-stream)
7172 (clear-stream $_test-input-buffered-file->buffer)
7173 (clear-stream _test-output-stream)
7174 (clear-stream $_test-output-buffered-file->buffer)
7175
7176 (write _test-input-stream "fn foo {\n")
7177 (write _test-input-stream " var a: t\n")
7178 (write _test-input-stream "}\n")
7179 (write _test-input-stream "type t {\n")
7180 (write _test-input-stream " x: s\n")
7181 (write _test-input-stream "}\n")
7182 (write _test-input-stream "type s {\n")
7183 (write _test-input-stream " z: int\n")
7184 (write _test-input-stream "}\n")
7185
7186 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7187 (flush _test-output-buffered-file)
7188 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7194
7195 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/0")
7196 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/1")
7197 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/2")
7198 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/3")
7199 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/4")
7200 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/5")
7201 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/7")
7202 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/8")
7203 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/9")
7204 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/10")
7205 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/11")
7206 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/12")
7207 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/13")
7208 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/14")
7209
7210 89/<- %esp 5/r32/ebp
7211 5d/pop-to-ebp
7212 c3/return
7213
7214 test-convert-function-call-with-arg-of-user-defined-type:
7215
7216 55/push-ebp
7217 89/<- %ebp 4/r32/esp
7218
7219 (clear-stream _test-input-stream)
7220 (clear-stream $_test-input-buffered-file->buffer)
7221 (clear-stream _test-output-stream)
7222 (clear-stream $_test-output-buffered-file->buffer)
7223
7224 (write _test-input-stream "fn f {\n")
7225 (write _test-input-stream " var a: t\n")
7226 (write _test-input-stream " foo a\n")
7227 (write _test-input-stream "}\n")
7228 (write _test-input-stream "fn foo x: t {\n")
7229 (write _test-input-stream "}\n")
7230 (write _test-input-stream "type t {\n")
7231 (write _test-input-stream " x: int\n")
7232 (write _test-input-stream " y: int\n")
7233 (write _test-input-stream "}\n")
7234
7235 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7236 (flush _test-output-buffered-file)
7237 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7243
7244 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
7245 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
7246 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
7247 (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")
7248 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
7249 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
7250
7251 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
7252 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
7253
7254 (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")
7255
7256 (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")
7257 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
7258 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
7259 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
7260 (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")
7261 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
7262 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
7263 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
7264 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
7265 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
7266 (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")
7267 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
7268 (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")
7269 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
7270 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
7271
7272 89/<- %esp 5/r32/ebp
7273 5d/pop-to-ebp
7274 c3/return
7275
7276 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
7277
7278 55/push-ebp
7279 89/<- %ebp 4/r32/esp
7280
7281 (clear-stream _test-input-stream)
7282 (clear-stream $_test-input-buffered-file->buffer)
7283 (clear-stream _test-output-stream)
7284 (clear-stream $_test-output-buffered-file->buffer)
7285
7286 (write _test-input-stream "fn f {\n")
7287 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
7288 (write _test-input-stream " foo *a\n")
7289 (write _test-input-stream "}\n")
7290 (write _test-input-stream "fn foo x: t {\n")
7291 (write _test-input-stream "}\n")
7292 (write _test-input-stream "type t {\n")
7293 (write _test-input-stream " x: int\n")
7294 (write _test-input-stream " y: int\n")
7295 (write _test-input-stream "}\n")
7296
7297 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7298 (flush _test-output-buffered-file)
7299 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7305
7306 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
7307 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
7308 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
7309 (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")
7310 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
7311 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
7312
7313 (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")
7314 (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")
7315
7316 (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")
7317
7318 (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")
7319 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
7320 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
7321 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
7322 (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")
7323 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
7324 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
7325 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
7326 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
7327 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
7328 (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")
7329 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
7330 (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")
7331 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
7332 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
7333
7334 89/<- %esp 5/r32/ebp
7335 5d/pop-to-ebp
7336 c3/return
7337
7338
7339
7340 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
7341
7342 55/push-ebp
7343 89/<- %ebp 4/r32/esp
7344
7345 (clear-stream _test-input-stream)
7346 (clear-stream $_test-input-buffered-file->buffer)
7347 (clear-stream _test-output-stream)
7348 (clear-stream $_test-output-buffered-file->buffer)
7349
7350 (write _test-input-stream "fn f {\n")
7351 (write _test-input-stream " var a: t\n")
7352 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
7353 (write _test-input-stream " foo b\n")
7354 (write _test-input-stream "}\n")
7355 (write _test-input-stream "fn foo x: (addr t) {\n")
7356 (write _test-input-stream " var x/ecx: (addr t) <- copy x\n")
7357 (write _test-input-stream "}\n")
7358 (write _test-input-stream "type t {\n")
7359 (write _test-input-stream " x: int\n")
7360 (write _test-input-stream " y: int\n")
7361 (write _test-input-stream "}\n")
7362
7363 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7364 (flush _test-output-buffered-file)
7365 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7371
7372 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
7373 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
7374 (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")
7375 (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")
7376 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
7377 (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")
7378
7379 (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")
7380 (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")
7381
7382 (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")
7383 (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")
7384
7385 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
7386
7387 (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")
7388 (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")
7389 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
7390 (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")
7391 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
7392 (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")
7393 (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")
7394 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
7395 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
7396 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
7397 (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")
7398 (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")
7399 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
7400 (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")
7401 (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")
7402 (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")
7403 (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/27")
7404 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
7405 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
7406 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
7407 (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/31")
7408 (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/32")
7409 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
7410
7411 89/<- %esp 5/r32/ebp
7412 5d/pop-to-ebp
7413 c3/return
7414
7415 test-convert-get-on-local-variable:
7416
7417 55/push-ebp
7418 89/<- %ebp 4/r32/esp
7419
7420 (clear-stream _test-input-stream)
7421 (clear-stream $_test-input-buffered-file->buffer)
7422 (clear-stream _test-output-stream)
7423 (clear-stream $_test-output-buffered-file->buffer)
7424
7425 (write _test-input-stream "fn foo {\n")
7426 (write _test-input-stream " var a: t\n")
7427 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7428 (write _test-input-stream "}\n")
7429 (write _test-input-stream "type t {\n")
7430 (write _test-input-stream " x: int\n")
7431 (write _test-input-stream " y: int\n")
7432 (write _test-input-stream "}\n")
7433
7434 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7435 (flush _test-output-buffered-file)
7436 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7442
7443 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
7444 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
7445 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
7446 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
7447 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
7448 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
7449
7450 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
7451 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
7452
7453 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
7454
7455 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
7456
7457 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
7458
7459 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
7460 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
7461 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
7462 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
7463 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
7464 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
7465 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
7466
7467 89/<- %esp 5/r32/ebp
7468 5d/pop-to-ebp
7469 c3/return
7470
7471 test-convert-get-on-function-argument:
7472
7473 55/push-ebp
7474 89/<- %ebp 4/r32/esp
7475
7476 (clear-stream _test-input-stream)
7477 (clear-stream $_test-input-buffered-file->buffer)
7478 (clear-stream _test-output-stream)
7479 (clear-stream $_test-output-buffered-file->buffer)
7480
7481 (write _test-input-stream "fn foo a: t {\n")
7482 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7483 (write _test-input-stream "}\n")
7484 (write _test-input-stream "type t {\n")
7485 (write _test-input-stream " x: int\n")
7486 (write _test-input-stream " y: int\n")
7487 (write _test-input-stream "}\n")
7488
7489 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7490 (flush _test-output-buffered-file)
7491 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7497
7498 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
7499 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
7500 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
7501 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
7502 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
7503 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
7504
7505 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
7506
7507 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
7508
7509 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
7510 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
7511 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
7512 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
7513 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
7514 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
7515 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
7516
7517 89/<- %esp 5/r32/ebp
7518 5d/pop-to-ebp
7519 c3/return
7520
7521 test-convert-get-on-function-argument-with-known-type:
7522
7523 55/push-ebp
7524 89/<- %ebp 4/r32/esp
7525
7526 (clear-stream _test-input-stream)
7527 (clear-stream $_test-input-buffered-file->buffer)
7528 (clear-stream _test-output-stream)
7529 (clear-stream $_test-output-buffered-file->buffer)
7530
7531 (write _test-input-stream "type t {\n")
7532 (write _test-input-stream " x: int\n")
7533 (write _test-input-stream " y: int\n")
7534 (write _test-input-stream "}\n")
7535 (write _test-input-stream "fn foo a: t {\n")
7536 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7537 (write _test-input-stream "}\n")
7538
7539 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7540 (flush _test-output-buffered-file)
7541 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7547
7548 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
7549 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
7550 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
7551 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
7552 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
7553 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
7554
7555 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
7556
7557 (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")
7558
7559 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
7560 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
7561 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
7562 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
7563 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
7564 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
7565 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
7566
7567 89/<- %esp 5/r32/ebp
7568 5d/pop-to-ebp
7569 c3/return
7570
7571 test-add-with-too-many-inouts:
7572
7573 55/push-ebp
7574 89/<- %ebp 4/r32/esp
7575
7576 (clear-stream _test-input-stream)
7577 (clear-stream $_test-input-buffered-file->buffer)
7578 (clear-stream _test-output-stream)
7579 (clear-stream $_test-output-buffered-file->buffer)
7580 (clear-stream _test-error-stream)
7581 (clear-stream $_test-error-buffered-file->buffer)
7582
7583 68/push 0/imm32
7584 68/push 0/imm32
7585 89/<- %edx 4/r32/esp
7586 (tailor-exit-descriptor %edx 0x10)
7587
7588 (write _test-input-stream "fn foo {\n")
7589 (write _test-input-stream " var a: int\n")
7590 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
7591 (write _test-input-stream "}\n")
7592
7593 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7594
7595
7596 89/<- %edx 4/r32/esp
7597 (flush _test-output-buffered-file)
7598 (flush _test-error-buffered-file)
7599 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7605
7606 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
7607 (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")
7608
7609 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
7610
7611 81 0/subop/add %esp 8/imm32
7612
7613 5d/pop-to-ebp
7614 c3/return
7615
7616 test-add-with-too-many-inouts-2:
7617
7618 55/push-ebp
7619 89/<- %ebp 4/r32/esp
7620
7621 (clear-stream _test-input-stream)
7622 (clear-stream $_test-input-buffered-file->buffer)
7623 (clear-stream _test-output-stream)
7624 (clear-stream $_test-output-buffered-file->buffer)
7625 (clear-stream _test-error-stream)
7626 (clear-stream $_test-error-buffered-file->buffer)
7627
7628 68/push 0/imm32
7629 68/push 0/imm32
7630 89/<- %edx 4/r32/esp
7631 (tailor-exit-descriptor %edx 0x10)
7632
7633 (write _test-input-stream "fn foo {\n")
7634 (write _test-input-stream " var a: int\n")
7635 (write _test-input-stream " add-to a, 0, 1\n")
7636 (write _test-input-stream "}\n")
7637
7638 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7639
7640
7641 89/<- %edx 4/r32/esp
7642 (flush _test-output-buffered-file)
7643 (flush _test-error-buffered-file)
7644 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7650
7651 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
7652 (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")
7653
7654 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
7655
7656 81 0/subop/add %esp 8/imm32
7657
7658 5d/pop-to-ebp
7659 c3/return
7660
7661 test-add-with-too-many-outputs:
7662
7663 55/push-ebp
7664 89/<- %ebp 4/r32/esp
7665
7666 (clear-stream _test-input-stream)
7667 (clear-stream $_test-input-buffered-file->buffer)
7668 (clear-stream _test-output-stream)
7669 (clear-stream $_test-output-buffered-file->buffer)
7670 (clear-stream _test-error-stream)
7671 (clear-stream $_test-error-buffered-file->buffer)
7672
7673 68/push 0/imm32
7674 68/push 0/imm32
7675 89/<- %edx 4/r32/esp
7676 (tailor-exit-descriptor %edx 0x10)
7677
7678 (write _test-input-stream "fn foo {\n")
7679 (write _test-input-stream " var a/eax: int <- copy 0\n")
7680 (write _test-input-stream " var b/ebx: int <- copy 0\n")
7681 (write _test-input-stream " var c/ecx: int <- copy 0\n")
7682 (write _test-input-stream " c, b <- add a\n")
7683 (write _test-input-stream "}\n")
7684
7685 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7686
7687
7688 89/<- %edx 4/r32/esp
7689 (flush _test-output-buffered-file)
7690 (flush _test-error-buffered-file)
7691 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7697
7698 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
7699 (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")
7700
7701 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
7702
7703 81 0/subop/add %esp 8/imm32
7704
7705 5d/pop-to-ebp
7706 c3/return
7707
7708 test-add-with-non-number:
7709
7710 55/push-ebp
7711 89/<- %ebp 4/r32/esp
7712
7713 (clear-stream _test-input-stream)
7714 (clear-stream $_test-input-buffered-file->buffer)
7715 (clear-stream _test-output-stream)
7716 (clear-stream $_test-output-buffered-file->buffer)
7717 (clear-stream _test-error-stream)
7718 (clear-stream $_test-error-buffered-file->buffer)
7719
7720 68/push 0/imm32
7721 68/push 0/imm32
7722 89/<- %edx 4/r32/esp
7723 (tailor-exit-descriptor %edx 0x10)
7724
7725 (write _test-input-stream "fn foo {\n")
7726 (write _test-input-stream " var a: int\n")
7727 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
7728 (write _test-input-stream "}\n")
7729
7730 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7731
7732
7733 89/<- %edx 4/r32/esp
7734 (flush _test-output-buffered-file)
7735 (flush _test-error-buffered-file)
7736 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7742
7743 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
7744 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: 'b' must be a non-addr non-offset scalar" "F - test-add-with-non-number: error message")
7745
7746 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
7747
7748 81 0/subop/add %esp 8/imm32
7749
7750 5d/pop-to-ebp
7751 c3/return
7752
7753 test-add-with-addr-dereferenced:
7754
7755 55/push-ebp
7756 89/<- %ebp 4/r32/esp
7757
7758 (clear-stream _test-input-stream)
7759 (clear-stream $_test-input-buffered-file->buffer)
7760 (clear-stream _test-output-stream)
7761 (clear-stream $_test-output-buffered-file->buffer)
7762
7763 (write _test-input-stream "fn foo {\n")
7764 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
7765 (write _test-input-stream " add-to *a, 1\n")
7766 (write _test-input-stream "}\n")
7767
7768 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7769 (flush _test-output-buffered-file)
7770
7771
7772 89/<- %esp 5/r32/ebp
7773 5d/pop-to-ebp
7774 c3/return
7775
7776 test-copy-with-no-inout:
7777
7778 55/push-ebp
7779 89/<- %ebp 4/r32/esp
7780
7781 (clear-stream _test-input-stream)
7782 (clear-stream $_test-input-buffered-file->buffer)
7783 (clear-stream _test-output-stream)
7784 (clear-stream $_test-output-buffered-file->buffer)
7785 (clear-stream _test-error-stream)
7786 (clear-stream $_test-error-buffered-file->buffer)
7787
7788 68/push 0/imm32
7789 68/push 0/imm32
7790 89/<- %edx 4/r32/esp
7791 (tailor-exit-descriptor %edx 0x10)
7792
7793 (write _test-input-stream "fn foo {\n")
7794 (write _test-input-stream " var x/eax: boolean <- copy\n")
7795 (write _test-input-stream "}\n")
7796
7797 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7798
7799
7800 89/<- %edx 4/r32/esp
7801 (flush _test-output-buffered-file)
7802 (flush _test-error-buffered-file)
7803 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7809
7810 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-inout: output should be empty")
7811 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an inout" "F - test-copy-with-no-inout: error message")
7812
7813 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-inout: exit status")
7814
7815 81 0/subop/add %esp 8/imm32
7816
7817 5d/pop-to-ebp
7818 c3/return
7819
7820 test-copy-with-multiple-inouts:
7821
7822 55/push-ebp
7823 89/<- %ebp 4/r32/esp
7824
7825 (clear-stream _test-input-stream)
7826 (clear-stream $_test-input-buffered-file->buffer)
7827 (clear-stream _test-output-stream)
7828 (clear-stream $_test-output-buffered-file->buffer)
7829 (clear-stream _test-error-stream)
7830 (clear-stream $_test-error-buffered-file->buffer)
7831
7832 68/push 0/imm32
7833 68/push 0/imm32
7834 89/<- %edx 4/r32/esp
7835 (tailor-exit-descriptor %edx 0x10)
7836
7837 (write _test-input-stream "fn foo {\n")
7838 (write _test-input-stream " var x/eax: boolean <- copy 0, 0\n")
7839 (write _test-input-stream "}\n")
7840
7841 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7842
7843
7844 89/<- %edx 4/r32/esp
7845 (flush _test-output-buffered-file)
7846 (flush _test-error-buffered-file)
7847 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7853
7854 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-inouts: output should be empty")
7855 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' must have just one inout" "F - test-copy-with-multiple-inouts: error message")
7856
7857 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-inouts: exit status")
7858
7859 81 0/subop/add %esp 8/imm32
7860
7861 5d/pop-to-ebp
7862 c3/return
7863
7864 test-copy-with-no-output:
7865
7866 55/push-ebp
7867 89/<- %ebp 4/r32/esp
7868
7869 (clear-stream _test-input-stream)
7870 (clear-stream $_test-input-buffered-file->buffer)
7871 (clear-stream _test-output-stream)
7872 (clear-stream $_test-output-buffered-file->buffer)
7873 (clear-stream _test-error-stream)
7874 (clear-stream $_test-error-buffered-file->buffer)
7875
7876 68/push 0/imm32
7877 68/push 0/imm32
7878 89/<- %edx 4/r32/esp
7879 (tailor-exit-descriptor %edx 0x10)
7880
7881 (write _test-input-stream "fn foo {\n")
7882 (write _test-input-stream " copy 0\n")
7883 (write _test-input-stream "}\n")
7884
7885 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7886
7887
7888 89/<- %edx 4/r32/esp
7889 (flush _test-output-buffered-file)
7890 (flush _test-error-buffered-file)
7891 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7897
7898 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-output: output should be empty")
7899 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an output" "F - test-copy-with-no-output: error message")
7900
7901 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-output: exit status")
7902
7903 81 0/subop/add %esp 8/imm32
7904
7905 5d/pop-to-ebp
7906 c3/return
7907
7908 test-copy-with-multiple-outputs:
7909
7910 55/push-ebp
7911 89/<- %ebp 4/r32/esp
7912
7913 (clear-stream _test-input-stream)
7914 (clear-stream $_test-input-buffered-file->buffer)
7915 (clear-stream _test-output-stream)
7916 (clear-stream $_test-output-buffered-file->buffer)
7917 (clear-stream _test-error-stream)
7918 (clear-stream $_test-error-buffered-file->buffer)
7919
7920 68/push 0/imm32
7921 68/push 0/imm32
7922 89/<- %edx 4/r32/esp
7923 (tailor-exit-descriptor %edx 0x10)
7924
7925 (write _test-input-stream "fn foo {\n")
7926 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7927 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7928 (write _test-input-stream " x, y <- copy 0\n")
7929 (write _test-input-stream "}\n")
7930
7931 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7932
7933
7934 89/<- %edx 4/r32/esp
7935 (flush _test-output-buffered-file)
7936 (flush _test-error-buffered-file)
7937 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7943
7944 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-outputs: output should be empty")
7945 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' must have just one output" "F - test-copy-with-multiple-outputs: error message")
7946
7947 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-outputs: exit status")
7948
7949 81 0/subop/add %esp 8/imm32
7950
7951 5d/pop-to-ebp
7952 c3/return
7953
7954 test-copy-invalid-value-to-address:
7955
7956 55/push-ebp
7957 89/<- %ebp 4/r32/esp
7958
7959 (clear-stream _test-input-stream)
7960 (clear-stream $_test-input-buffered-file->buffer)
7961 (clear-stream _test-output-stream)
7962 (clear-stream $_test-output-buffered-file->buffer)
7963 (clear-stream _test-error-stream)
7964 (clear-stream $_test-error-buffered-file->buffer)
7965
7966 68/push 0/imm32
7967 68/push 0/imm32
7968 89/<- %edx 4/r32/esp
7969 (tailor-exit-descriptor %edx 0x10)
7970
7971 (write _test-input-stream "fn foo {\n")
7972 (write _test-input-stream " var x/eax: int <- copy 0\n")
7973 (write _test-input-stream " var y/ecx: (addr int) <- copy x\n")
7974 (write _test-input-stream "}\n")
7975
7976 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7977
7978
7979 89/<- %edx 4/r32/esp
7980 (flush _test-output-buffered-file)
7981 (flush _test-error-buffered-file)
7982 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7988
7989 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7990 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'y' must be a non-addr non-offset scalar" "F - test-copy-invalid-value-to-address: error message")
7991
7992 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-address: exit status")
7993
7994 81 0/subop/add %esp 8/imm32
7995
7996 5d/pop-to-ebp
7997 c3/return
7998
7999 test-copy-null-value-to-address:
8000
8001 55/push-ebp
8002 89/<- %ebp 4/r32/esp
8003
8004 (clear-stream _test-input-stream)
8005 (clear-stream $_test-input-buffered-file->buffer)
8006 (clear-stream _test-output-stream)
8007 (clear-stream $_test-output-buffered-file->buffer)
8008
8009 (write _test-input-stream "fn foo {\n")
8010 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
8011 (write _test-input-stream "}\n")
8012
8013 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8014 (flush _test-output-buffered-file)
8015
8016
8017 89/<- %esp 5/r32/ebp
8018 5d/pop-to-ebp
8019 c3/return
8020
8021 test-copy-string-literal:
8022
8023 55/push-ebp
8024 89/<- %ebp 4/r32/esp
8025
8026 (clear-stream _test-input-stream)
8027 (clear-stream $_test-input-buffered-file->buffer)
8028 (clear-stream _test-output-stream)
8029 (clear-stream $_test-output-buffered-file->buffer)
8030
8031 (write _test-input-stream "fn foo {\n")
8032 (write _test-input-stream " var y/ecx: (addr array byte) <- copy \"a\"\n")
8033 (write _test-input-stream "}\n")
8034
8035 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8036 (flush _test-output-buffered-file)
8037
8038 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
8044
8045 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-string-literal/0")
8046 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-string-literal/1")
8047 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-string-literal/2")
8048 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-string-literal/3")
8049 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-string-literal/4")
8050 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-string-literal/5")
8051 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-copy-string-literal/6")
8052 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx \"a\"/imm32" "F - test-copy-string-literal/7")
8053 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-copy-string-literal/8")
8054 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-string-literal/9")
8055 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-string-literal/10")
8056 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-string-literal/11")
8057 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-string-literal/12")
8058 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-string-literal/13")
8059 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-string-literal/14")
8060
8061 89/<- %esp 5/r32/ebp
8062 5d/pop-to-ebp
8063 c3/return
8064
8065 test-copy-invalid-value-to-offset:
8066
8067 55/push-ebp
8068 89/<- %ebp 4/r32/esp
8069
8070 (clear-stream _test-input-stream)
8071 (clear-stream $_test-input-buffered-file->buffer)
8072 (clear-stream _test-output-stream)
8073 (clear-stream $_test-output-buffered-file->buffer)
8074 (clear-stream _test-error-stream)
8075 (clear-stream $_test-error-buffered-file->buffer)
8076
8077 68/push 0/imm32
8078 68/push 0/imm32
8079 89/<- %edx 4/r32/esp
8080 (tailor-exit-descriptor %edx 0x10)
8081
8082 (write _test-input-stream "fn foo {\n")
8083 (write _test-input-stream " var x/eax: int <- copy 0\n")
8084 (write _test-input-stream " var y/ecx: (offset int) <- copy x\n")
8085 (write _test-input-stream "}\n")
8086
8087 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8088
8089
8090 89/<- %edx 4/r32/esp
8091 (flush _test-output-buffered-file)
8092 (flush _test-error-buffered-file)
8093 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8099
8100 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
8101 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'y' must be a non-addr non-offset scalar" "F - test-copy-invalid-value-to-address: error message")
8102
8103 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-offset: exit status")
8104
8105 81 0/subop/add %esp 8/imm32
8106
8107 5d/pop-to-ebp
8108 c3/return
8109
8110 test-copy-null-value-to-offset:
8111
8112 55/push-ebp
8113 89/<- %ebp 4/r32/esp
8114
8115 (clear-stream _test-input-stream)
8116 (clear-stream $_test-input-buffered-file->buffer)
8117 (clear-stream _test-output-stream)
8118 (clear-stream $_test-output-buffered-file->buffer)
8119
8120 (write _test-input-stream "fn foo {\n")
8121 (write _test-input-stream " var y/ecx: (offset int) <- copy 0\n")
8122 (write _test-input-stream "}\n")
8123
8124 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8125 (flush _test-output-buffered-file)
8126 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8132
8133
8134 89/<- %esp 5/r32/ebp
8135 5d/pop-to-ebp
8136 c3/return
8137
8138 test-copy-non-literal-to-byte:
8139
8140 55/push-ebp
8141 89/<- %ebp 4/r32/esp
8142
8143 (clear-stream _test-input-stream)
8144 (clear-stream $_test-input-buffered-file->buffer)
8145 (clear-stream _test-output-stream)
8146 (clear-stream $_test-output-buffered-file->buffer)
8147 (clear-stream _test-error-stream)
8148 (clear-stream $_test-error-buffered-file->buffer)
8149
8150 68/push 0/imm32
8151 68/push 0/imm32
8152 89/<- %edx 4/r32/esp
8153 (tailor-exit-descriptor %edx 0x10)
8154
8155 (write _test-input-stream "fn foo {\n")
8156 (write _test-input-stream " var x/ecx: int <- copy 3\n")
8157 (write _test-input-stream " var y/ecx: byte <- copy x\n")
8158 (write _test-input-stream "}\n")
8159
8160 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8161
8162
8163 89/<- %edx 4/r32/esp
8164 (flush _test-output-buffered-file)
8165 (flush _test-error-buffered-file)
8166 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8172
8173 (check-stream-equal _test-output-stream "" "F - test-copy-non-literal-to-byte: output should be empty")
8174 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: cannot copy non-literal to 'y' of type byte; use copy-byte" "F - test-copy-non-literal-to-byte: error message")
8175
8176 (check-ints-equal *(edx+4) 2 "F - test-copy-non-literal-to-byte: exit status")
8177
8178 81 0/subop/add %esp 8/imm32
8179
8180 5d/pop-to-ebp
8181 c3/return
8182
8183 test-copy-deref-address:
8184
8185 55/push-ebp
8186 89/<- %ebp 4/r32/esp
8187
8188 (clear-stream _test-input-stream)
8189 (clear-stream $_test-input-buffered-file->buffer)
8190 (clear-stream _test-output-stream)
8191 (clear-stream $_test-output-buffered-file->buffer)
8192
8193 (write _test-input-stream "fn foo {\n")
8194 (write _test-input-stream " var x/eax: (addr addr int) <- copy 0\n")
8195 (write _test-input-stream " var y/ecx: (addr int) <- copy *x\n")
8196 (write _test-input-stream "}\n")
8197
8198 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8199 (flush _test-output-buffered-file)
8200
8201
8202 5d/pop-to-ebp
8203 c3/return
8204
8205 test-copy-to-non-register:
8206
8207 55/push-ebp
8208 89/<- %ebp 4/r32/esp
8209
8210 (clear-stream _test-input-stream)
8211 (clear-stream $_test-input-buffered-file->buffer)
8212 (clear-stream _test-output-stream)
8213 (clear-stream $_test-output-buffered-file->buffer)
8214 (clear-stream _test-error-stream)
8215 (clear-stream $_test-error-buffered-file->buffer)
8216
8217 68/push 0/imm32
8218 68/push 0/imm32
8219 89/<- %edx 4/r32/esp
8220 (tailor-exit-descriptor %edx 0x10)
8221
8222 (write _test-input-stream "fn foo {\n")
8223 (write _test-input-stream " var x: int\n")
8224 (write _test-input-stream " x <- copy 0\n")
8225 (write _test-input-stream "}\n")
8226
8227 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8228
8229
8230 89/<- %edx 4/r32/esp
8231 (flush _test-output-buffered-file)
8232 (flush _test-error-buffered-file)
8233 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8239
8240 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-register: output should be empty")
8241 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: output 'x' not in a register" "F - test-copy-to-non-register: error message")
8242
8243 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-register: exit status")
8244
8245 81 0/subop/add %esp 8/imm32
8246
8247 5d/pop-to-ebp
8248 c3/return
8249
8250 test-copy-from-non-scalar-inout:
8251
8252 55/push-ebp
8253 89/<- %ebp 4/r32/esp
8254
8255 (clear-stream _test-input-stream)
8256 (clear-stream $_test-input-buffered-file->buffer)
8257 (clear-stream _test-output-stream)
8258 (clear-stream $_test-output-buffered-file->buffer)
8259 (clear-stream _test-error-stream)
8260 (clear-stream $_test-error-buffered-file->buffer)
8261
8262 68/push 0/imm32
8263 68/push 0/imm32
8264 89/<- %edx 4/r32/esp
8265 (tailor-exit-descriptor %edx 0x10)
8266
8267 (write _test-input-stream "fn foo {\n")
8268 (write _test-input-stream " var x: (handle int)\n")
8269 (write _test-input-stream " var y/eax: int <- copy x\n")
8270 (write _test-input-stream "}\n")
8271
8272 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8273
8274
8275 89/<- %edx 4/r32/esp
8276 (flush _test-output-buffered-file)
8277 (flush _test-error-buffered-file)
8278 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8284
8285 (check-stream-equal _test-output-stream "" "F - test-copy-from-non-scalar-inout: output should be empty")
8286 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy: 'x' is too large to fit in a register" "F - test-copy-from-non-scalar-inout: error message")
8287
8288 (check-ints-equal *(edx+4) 2 "F - test-copy-from-non-scalar-inout: exit status")
8289
8290 81 0/subop/add %esp 8/imm32
8291
8292 5d/pop-to-ebp
8293 c3/return
8294
8295 test-copy-to-with-no-inout:
8296
8297 55/push-ebp
8298 89/<- %ebp 4/r32/esp
8299
8300 (clear-stream _test-input-stream)
8301 (clear-stream $_test-input-buffered-file->buffer)
8302 (clear-stream _test-output-stream)
8303 (clear-stream $_test-output-buffered-file->buffer)
8304 (clear-stream _test-error-stream)
8305 (clear-stream $_test-error-buffered-file->buffer)
8306
8307 68/push 0/imm32
8308 68/push 0/imm32
8309 89/<- %edx 4/r32/esp
8310 (tailor-exit-descriptor %edx 0x10)
8311
8312 (write _test-input-stream "fn foo {\n")
8313 (write _test-input-stream " copy-to\n")
8314 (write _test-input-stream "}\n")
8315
8316 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8317
8318
8319 89/<- %edx 4/r32/esp
8320 (flush _test-output-buffered-file)
8321 (flush _test-error-buffered-file)
8322 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8328
8329 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-inout: output should be empty")
8330 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-no-inout: error message")
8331
8332 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-inout: exit status")
8333
8334 81 0/subop/add %esp 8/imm32
8335
8336 5d/pop-to-ebp
8337 c3/return
8338
8339 test-copy-to-with-no-source:
8340
8341 55/push-ebp
8342 89/<- %ebp 4/r32/esp
8343
8344 (clear-stream _test-input-stream)
8345 (clear-stream $_test-input-buffered-file->buffer)
8346 (clear-stream _test-output-stream)
8347 (clear-stream $_test-output-buffered-file->buffer)
8348 (clear-stream _test-error-stream)
8349 (clear-stream $_test-error-buffered-file->buffer)
8350
8351 68/push 0/imm32
8352 68/push 0/imm32
8353 89/<- %edx 4/r32/esp
8354 (tailor-exit-descriptor %edx 0x10)
8355
8356 (write _test-input-stream "fn foo {\n")
8357 (write _test-input-stream " var x: boolean\n")
8358 (write _test-input-stream " copy-to x\n")
8359 (write _test-input-stream "}\n")
8360
8361 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8362
8363
8364 89/<- %edx 4/r32/esp
8365 (flush _test-output-buffered-file)
8366 (flush _test-error-buffered-file)
8367 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8373
8374 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-source: output should be empty")
8375 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-no-source: error message")
8376
8377 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-source: exit status")
8378
8379 81 0/subop/add %esp 8/imm32
8380
8381 5d/pop-to-ebp
8382 c3/return
8383
8384 test-copy-to-with-no-register:
8385
8386 55/push-ebp
8387 89/<- %ebp 4/r32/esp
8388
8389 (clear-stream _test-input-stream)
8390 (clear-stream $_test-input-buffered-file->buffer)
8391 (clear-stream _test-output-stream)
8392 (clear-stream $_test-output-buffered-file->buffer)
8393 (clear-stream _test-error-stream)
8394 (clear-stream $_test-error-buffered-file->buffer)
8395
8396 68/push 0/imm32
8397 68/push 0/imm32
8398 89/<- %edx 4/r32/esp
8399 (tailor-exit-descriptor %edx 0x10)
8400
8401 (write _test-input-stream "fn foo {\n")
8402 (write _test-input-stream " var x: boolean\n")
8403 (write _test-input-stream " copy-to x, x\n")
8404 (write _test-input-stream "}\n")
8405
8406 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8407
8408
8409 89/<- %edx 4/r32/esp
8410 (flush _test-output-buffered-file)
8411 (flush _test-error-buffered-file)
8412 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8418
8419 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-register: output should be empty")
8420 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: source (second inout) is in memory" "F - test-copy-to-with-no-register: error message")
8421
8422 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-register: exit status")
8423
8424 81 0/subop/add %esp 8/imm32
8425
8426 5d/pop-to-ebp
8427 c3/return
8428
8429 test-copy-to-with-too-many-inouts:
8430
8431 55/push-ebp
8432 89/<- %ebp 4/r32/esp
8433
8434 (clear-stream _test-input-stream)
8435 (clear-stream $_test-input-buffered-file->buffer)
8436 (clear-stream _test-output-stream)
8437 (clear-stream $_test-output-buffered-file->buffer)
8438 (clear-stream _test-error-stream)
8439 (clear-stream $_test-error-buffered-file->buffer)
8440
8441 68/push 0/imm32
8442 68/push 0/imm32
8443 89/<- %edx 4/r32/esp
8444 (tailor-exit-descriptor %edx 0x10)
8445
8446 (write _test-input-stream "fn foo {\n")
8447 (write _test-input-stream " var x: boolean\n")
8448 (write _test-input-stream " copy-to x, 0, 0\n")
8449 (write _test-input-stream "}\n")
8450
8451 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8452
8453
8454 89/<- %edx 4/r32/esp
8455 (flush _test-output-buffered-file)
8456 (flush _test-error-buffered-file)
8457 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8463
8464 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-too-many-inouts: output should be empty")
8465 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must have two inouts" "F - test-copy-to-with-too-many-inouts: error message")
8466
8467 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-too-many-inouts: exit status")
8468
8469 81 0/subop/add %esp 8/imm32
8470
8471 5d/pop-to-ebp
8472 c3/return
8473
8474 test-copy-to-with-output:
8475
8476 55/push-ebp
8477 89/<- %ebp 4/r32/esp
8478
8479 (clear-stream _test-input-stream)
8480 (clear-stream $_test-input-buffered-file->buffer)
8481 (clear-stream _test-output-stream)
8482 (clear-stream $_test-output-buffered-file->buffer)
8483 (clear-stream _test-error-stream)
8484 (clear-stream $_test-error-buffered-file->buffer)
8485
8486 68/push 0/imm32
8487 68/push 0/imm32
8488 89/<- %edx 4/r32/esp
8489 (tailor-exit-descriptor %edx 0x10)
8490
8491 (write _test-input-stream "fn foo {\n")
8492 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
8493 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
8494 (write _test-input-stream " x <- copy-to y, 0\n")
8495 (write _test-input-stream "}\n")
8496
8497 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8498
8499
8500 89/<- %edx 4/r32/esp
8501 (flush _test-output-buffered-file)
8502 (flush _test-error-buffered-file)
8503 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8509
8510 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-output: output should be empty")
8511 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-to' must not have any outputs" "F - test-copy-to-with-output: error message")
8512
8513 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-output: exit status")
8514
8515 81 0/subop/add %esp 8/imm32
8516
8517 5d/pop-to-ebp
8518 c3/return
8519
8520 test-copy-to-invalid-value-to-address:
8521
8522 55/push-ebp
8523 89/<- %ebp 4/r32/esp
8524
8525 (clear-stream _test-input-stream)
8526 (clear-stream $_test-input-buffered-file->buffer)
8527 (clear-stream _test-output-stream)
8528 (clear-stream $_test-output-buffered-file->buffer)
8529 (clear-stream _test-error-stream)
8530 (clear-stream $_test-error-buffered-file->buffer)
8531
8532 68/push 0/imm32
8533 68/push 0/imm32
8534 89/<- %edx 4/r32/esp
8535 (tailor-exit-descriptor %edx 0x10)
8536
8537 (write _test-input-stream "fn foo {\n")
8538 (write _test-input-stream " var x/eax: int <- copy 0\n")
8539 (write _test-input-stream " var y: (addr int)\n")
8540 (write _test-input-stream " copy-to y, x\n")
8541 (write _test-input-stream "}\n")
8542
8543 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8544
8545
8546 89/<- %edx 4/r32/esp
8547 (flush _test-output-buffered-file)
8548 (flush _test-error-buffered-file)
8549 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8555
8556 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-address: output should be empty")
8557 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: 'y' must be a non-addr non-offset scalar" "F - test-copy-to-invalid-value-to-address: error message")
8558
8559 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-address: exit status")
8560
8561 81 0/subop/add %esp 8/imm32
8562
8563 5d/pop-to-ebp
8564 c3/return
8565
8566 test-copy-to-null-value-to-address:
8567
8568 55/push-ebp
8569 89/<- %ebp 4/r32/esp
8570
8571 (clear-stream _test-input-stream)
8572 (clear-stream $_test-input-buffered-file->buffer)
8573 (clear-stream _test-output-stream)
8574 (clear-stream $_test-output-buffered-file->buffer)
8575
8576 (write _test-input-stream "fn foo {\n")
8577 (write _test-input-stream " var y: (addr int)\n")
8578 (write _test-input-stream " copy-to y, 0\n")
8579 (write _test-input-stream "}\n")
8580
8581 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8582 (flush _test-output-buffered-file)
8583
8584
8585 89/<- %esp 5/r32/ebp
8586 5d/pop-to-ebp
8587 c3/return
8588
8589 test-copy-to-invalid-value-to-offset:
8590
8591 55/push-ebp
8592 89/<- %ebp 4/r32/esp
8593
8594 (clear-stream _test-input-stream)
8595 (clear-stream $_test-input-buffered-file->buffer)
8596 (clear-stream _test-output-stream)
8597 (clear-stream $_test-output-buffered-file->buffer)
8598 (clear-stream _test-error-stream)
8599 (clear-stream $_test-error-buffered-file->buffer)
8600
8601 68/push 0/imm32
8602 68/push 0/imm32
8603 89/<- %edx 4/r32/esp
8604 (tailor-exit-descriptor %edx 0x10)
8605
8606 (write _test-input-stream "fn foo {\n")
8607 (write _test-input-stream " var x/eax: int <- copy 0\n")
8608 (write _test-input-stream " var y: (offset int)\n")
8609 (write _test-input-stream " copy-to y, x\n")
8610 (write _test-input-stream "}\n")
8611
8612 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8613
8614
8615 89/<- %edx 4/r32/esp
8616 (flush _test-output-buffered-file)
8617 (flush _test-error-buffered-file)
8618 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8624
8625 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-offset: output should be empty")
8626 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: 'y' must be a non-addr non-offset scalar" "F - test-copy-to-invalid-value-to-offset: error message")
8627
8628 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-offset: exit status")
8629
8630 81 0/subop/add %esp 8/imm32
8631
8632 5d/pop-to-ebp
8633 c3/return
8634
8635 test-copy-to-null-value-to-offset:
8636
8637 55/push-ebp
8638 89/<- %ebp 4/r32/esp
8639
8640 (clear-stream _test-input-stream)
8641 (clear-stream $_test-input-buffered-file->buffer)
8642 (clear-stream _test-output-stream)
8643 (clear-stream $_test-output-buffered-file->buffer)
8644
8645 (write _test-input-stream "fn foo {\n")
8646 (write _test-input-stream " var y: (offset int)\n")
8647 (write _test-input-stream " copy-to y, 0\n")
8648 (write _test-input-stream "}\n")
8649
8650 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8651 (flush _test-output-buffered-file)
8652
8653
8654 89/<- %esp 5/r32/ebp
8655 5d/pop-to-ebp
8656 c3/return
8657
8658 test-copy-to-non-literal-to-byte:
8659
8660 55/push-ebp
8661 89/<- %ebp 4/r32/esp
8662
8663 (clear-stream _test-input-stream)
8664 (clear-stream $_test-input-buffered-file->buffer)
8665 (clear-stream _test-output-stream)
8666 (clear-stream $_test-output-buffered-file->buffer)
8667 (clear-stream _test-error-stream)
8668 (clear-stream $_test-error-buffered-file->buffer)
8669
8670 68/push 0/imm32
8671 68/push 0/imm32
8672 89/<- %edx 4/r32/esp
8673 (tailor-exit-descriptor %edx 0x10)
8674
8675 (write _test-input-stream "fn foo {\n")
8676 (write _test-input-stream " var x/ecx: byte <- copy 3\n")
8677 (write _test-input-stream " var y/eax: (addr byte) <- copy 0\n")
8678 (write _test-input-stream " copy-to *y, x\n")
8679 (write _test-input-stream "}\n")
8680
8681 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8682
8683
8684 89/<- %edx 4/r32/esp
8685 (flush _test-output-buffered-file)
8686 (flush _test-error-buffered-file)
8687 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8693
8694 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-literal-to-byte: output should be empty")
8695 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: cannot copy non-literal to type byte; use copy-byte-to" "F - test-copy-to-non-literal-to-byte: error message")
8696
8697 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-literal-to-byte: exit status")
8698
8699 81 0/subop/add %esp 8/imm32
8700
8701 5d/pop-to-ebp
8702 c3/return
8703
8704 test-copy-to-deref-address:
8705
8706 55/push-ebp
8707 89/<- %ebp 4/r32/esp
8708
8709 (clear-stream _test-input-stream)
8710 (clear-stream $_test-input-buffered-file->buffer)
8711 (clear-stream _test-output-stream)
8712 (clear-stream $_test-output-buffered-file->buffer)
8713
8714 (write _test-input-stream "fn foo {\n")
8715 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8716 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
8717 (write _test-input-stream " copy-to *y, x\n")
8718 (write _test-input-stream "}\n")
8719
8720 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8721 (flush _test-output-buffered-file)
8722
8723
8724 5d/pop-to-ebp
8725 c3/return
8726
8727 test-copy-to-from-non-scalar-inout:
8728
8729 55/push-ebp
8730 89/<- %ebp 4/r32/esp
8731
8732 (clear-stream _test-input-stream)
8733 (clear-stream $_test-input-buffered-file->buffer)
8734 (clear-stream _test-output-stream)
8735 (clear-stream $_test-output-buffered-file->buffer)
8736 (clear-stream _test-error-stream)
8737 (clear-stream $_test-error-buffered-file->buffer)
8738
8739 68/push 0/imm32
8740 68/push 0/imm32
8741 89/<- %edx 4/r32/esp
8742 (tailor-exit-descriptor %edx 0x10)
8743
8744 (write _test-input-stream "fn foo {\n")
8745 (write _test-input-stream " var x: (handle int)\n")
8746 (write _test-input-stream " var y: int\n")
8747 (write _test-input-stream " copy-to y, x\n")
8748 (write _test-input-stream "}\n")
8749
8750 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8751
8752
8753 89/<- %edx 4/r32/esp
8754 (flush _test-output-buffered-file)
8755 (flush _test-error-buffered-file)
8756 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8762
8763 (check-stream-equal _test-output-stream "" "F - test-copy-to-from-non-scalar-inout: output should be empty")
8764 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-to: 'x' is too large to copy" "F - test-copy-to-from-non-scalar-inout: error message")
8765
8766 (check-ints-equal *(edx+4) 2 "F - test-copy-to-from-non-scalar-inout: exit status")
8767
8768 81 0/subop/add %esp 8/imm32
8769
8770 5d/pop-to-ebp
8771 c3/return
8772
8773 test-copy-byte-with-no-inout:
8774
8775 55/push-ebp
8776 89/<- %ebp 4/r32/esp
8777
8778 (clear-stream _test-input-stream)
8779 (clear-stream $_test-input-buffered-file->buffer)
8780 (clear-stream _test-output-stream)
8781 (clear-stream $_test-output-buffered-file->buffer)
8782 (clear-stream _test-error-stream)
8783 (clear-stream $_test-error-buffered-file->buffer)
8784
8785 68/push 0/imm32
8786 68/push 0/imm32
8787 89/<- %edx 4/r32/esp
8788 (tailor-exit-descriptor %edx 0x10)
8789
8790 (write _test-input-stream "fn foo {\n")
8791 (write _test-input-stream " var x/eax: byte <- copy-byte\n")
8792 (write _test-input-stream "}\n")
8793
8794 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8795
8796
8797 89/<- %edx 4/r32/esp
8798 (flush _test-output-buffered-file)
8799 (flush _test-error-buffered-file)
8800 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8806
8807 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-no-inout: output should be empty")
8808 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte' expects an inout" "F - test-copy-byte-with-no-inout: error message")
8809
8810 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-no-inout: exit status")
8811
8812 81 0/subop/add %esp 8/imm32
8813
8814 5d/pop-to-ebp
8815 c3/return
8816
8817 test-copy-byte-with-multiple-inouts:
8818
8819 55/push-ebp
8820 89/<- %ebp 4/r32/esp
8821
8822 (clear-stream _test-input-stream)
8823 (clear-stream $_test-input-buffered-file->buffer)
8824 (clear-stream _test-output-stream)
8825 (clear-stream $_test-output-buffered-file->buffer)
8826 (clear-stream _test-error-stream)
8827 (clear-stream $_test-error-buffered-file->buffer)
8828
8829 68/push 0/imm32
8830 68/push 0/imm32
8831 89/<- %edx 4/r32/esp
8832 (tailor-exit-descriptor %edx 0x10)
8833
8834 (write _test-input-stream "fn foo {\n")
8835 (write _test-input-stream " var x/eax: byte <- copy-byte 0, 0\n")
8836 (write _test-input-stream "}\n")
8837
8838 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8839
8840
8841 89/<- %edx 4/r32/esp
8842 (flush _test-output-buffered-file)
8843 (flush _test-error-buffered-file)
8844 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8850
8851 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-multiple-inouts: output should be empty")
8852 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte' must have just one inout" "F - test-copy-byte-with-multiple-inouts: error message")
8853
8854 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-multiple-inouts: exit status")
8855
8856 81 0/subop/add %esp 8/imm32
8857
8858 5d/pop-to-ebp
8859 c3/return
8860
8861 test-copy-byte-with-no-output:
8862
8863 55/push-ebp
8864 89/<- %ebp 4/r32/esp
8865
8866 (clear-stream _test-input-stream)
8867 (clear-stream $_test-input-buffered-file->buffer)
8868 (clear-stream _test-output-stream)
8869 (clear-stream $_test-output-buffered-file->buffer)
8870 (clear-stream _test-error-stream)
8871 (clear-stream $_test-error-buffered-file->buffer)
8872
8873 68/push 0/imm32
8874 68/push 0/imm32
8875 89/<- %edx 4/r32/esp
8876 (tailor-exit-descriptor %edx 0x10)
8877
8878 (write _test-input-stream "fn foo {\n")
8879 (write _test-input-stream " copy-byte 0\n")
8880 (write _test-input-stream "}\n")
8881
8882 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8883
8884
8885 89/<- %edx 4/r32/esp
8886 (flush _test-output-buffered-file)
8887 (flush _test-error-buffered-file)
8888 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8894
8895 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-no-output: output should be empty")
8896 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte' expects an output" "F - test-copy-byte-with-no-output: error message")
8897
8898 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-no-output: exit status")
8899
8900 81 0/subop/add %esp 8/imm32
8901
8902 5d/pop-to-ebp
8903 c3/return
8904
8905 test-copy-byte-with-multiple-outputs:
8906
8907 55/push-ebp
8908 89/<- %ebp 4/r32/esp
8909
8910 (clear-stream _test-input-stream)
8911 (clear-stream $_test-input-buffered-file->buffer)
8912 (clear-stream _test-output-stream)
8913 (clear-stream $_test-output-buffered-file->buffer)
8914 (clear-stream _test-error-stream)
8915 (clear-stream $_test-error-buffered-file->buffer)
8916
8917 68/push 0/imm32
8918 68/push 0/imm32
8919 89/<- %edx 4/r32/esp
8920 (tailor-exit-descriptor %edx 0x10)
8921
8922 (write _test-input-stream "fn foo {\n")
8923 (write _test-input-stream " var x/eax: byte <- copy 0\n")
8924 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
8925 (write _test-input-stream " x, y <- copy-byte 0\n")
8926 (write _test-input-stream "}\n")
8927
8928 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8929
8930
8931 89/<- %edx 4/r32/esp
8932 (flush _test-output-buffered-file)
8933 (flush _test-error-buffered-file)
8934 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8940
8941 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-multiple-outputs: output should be empty")
8942 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte' must have just one output" "F - test-copy-byte-with-multiple-outputs: error message")
8943
8944 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-multiple-outputs: exit status")
8945
8946 81 0/subop/add %esp 8/imm32
8947
8948 5d/pop-to-ebp
8949 c3/return
8950
8951 test-copy-byte-deref-address:
8952
8953 55/push-ebp
8954 89/<- %ebp 4/r32/esp
8955
8956 (clear-stream _test-input-stream)
8957 (clear-stream $_test-input-buffered-file->buffer)
8958 (clear-stream _test-output-stream)
8959 (clear-stream $_test-output-buffered-file->buffer)
8960
8961 (write _test-input-stream "fn foo {\n")
8962 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8963 (write _test-input-stream " var y/ecx: byte <- copy-byte *x\n")
8964 (write _test-input-stream "}\n")
8965
8966 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8967 (flush _test-output-buffered-file)
8968 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8974
8975 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-byte-deref-address: error message")
8976
8977 5d/pop-to-ebp
8978 c3/return
8979
8980 test-copy-byte-with-invalid-output-type:
8981
8982 55/push-ebp
8983 89/<- %ebp 4/r32/esp
8984
8985 (clear-stream _test-input-stream)
8986 (clear-stream $_test-input-buffered-file->buffer)
8987 (clear-stream _test-output-stream)
8988 (clear-stream $_test-output-buffered-file->buffer)
8989 (clear-stream _test-error-stream)
8990 (clear-stream $_test-error-buffered-file->buffer)
8991
8992 68/push 0/imm32
8993 68/push 0/imm32
8994 89/<- %edx 4/r32/esp
8995 (tailor-exit-descriptor %edx 0x10)
8996
8997 (write _test-input-stream "fn foo {\n")
8998 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8999 (write _test-input-stream " var y/eax: int <- copy-byte *x\n")
9000 (write _test-input-stream "}\n")
9001
9002 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9003
9004
9005 89/<- %edx 4/r32/esp
9006 (flush _test-output-buffered-file)
9007 (flush _test-error-buffered-file)
9008 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9014
9015 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-invalid-output-type: output should be empty")
9016 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte' must write to output of type byte" "F - test-copy-byte-with-invalid-output-type: error message")
9017
9018 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-invalid-output-type: exit status")
9019
9020 81 0/subop/add %esp 8/imm32
9021
9022 5d/pop-to-ebp
9023 c3/return
9024
9025 test-copy-byte-from-non-scalar-inout:
9026
9027 55/push-ebp
9028 89/<- %ebp 4/r32/esp
9029
9030 (clear-stream _test-input-stream)
9031 (clear-stream $_test-input-buffered-file->buffer)
9032 (clear-stream _test-output-stream)
9033 (clear-stream $_test-output-buffered-file->buffer)
9034 (clear-stream _test-error-stream)
9035 (clear-stream $_test-error-buffered-file->buffer)
9036
9037 68/push 0/imm32
9038 68/push 0/imm32
9039 89/<- %edx 4/r32/esp
9040 (tailor-exit-descriptor %edx 0x10)
9041
9042 (write _test-input-stream "fn foo {\n")
9043 (write _test-input-stream " var x: (handle int)\n")
9044 (write _test-input-stream " var y/eax: byte <- copy-byte x\n")
9045 (write _test-input-stream "}\n")
9046
9047 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9048
9049
9050 89/<- %edx 4/r32/esp
9051 (flush _test-output-buffered-file)
9052 (flush _test-error-buffered-file)
9053 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9059
9060 (check-stream-equal _test-output-stream "" "F - test-copy-byte-from-non-scalar-inout: output should be empty")
9061 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-byte: 'x' is too large to fit in a register" "F - test-copy-byte-from-non-scalar-inout: error message")
9062
9063 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-from-non-scalar-inout: exit status")
9064
9065 81 0/subop/add %esp 8/imm32
9066
9067 5d/pop-to-ebp
9068 c3/return
9069
9070 test-copy-byte-to-with-no-inout:
9071
9072 55/push-ebp
9073 89/<- %ebp 4/r32/esp
9074
9075 (clear-stream _test-input-stream)
9076 (clear-stream $_test-input-buffered-file->buffer)
9077 (clear-stream _test-output-stream)
9078 (clear-stream $_test-output-buffered-file->buffer)
9079 (clear-stream _test-error-stream)
9080 (clear-stream $_test-error-buffered-file->buffer)
9081
9082 68/push 0/imm32
9083 68/push 0/imm32
9084 89/<- %edx 4/r32/esp
9085 (tailor-exit-descriptor %edx 0x10)
9086
9087 (write _test-input-stream "fn foo {\n")
9088 (write _test-input-stream " copy-byte-to\n")
9089 (write _test-input-stream "}\n")
9090
9091 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9092
9093
9094 89/<- %edx 4/r32/esp
9095 (flush _test-output-buffered-file)
9096 (flush _test-error-buffered-file)
9097 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9103
9104 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-no-inout: output should be empty")
9105 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte-to' must have two inouts" "F - test-copy-byte-to-with-no-inout: error message")
9106
9107 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-no-inout: exit status")
9108
9109 81 0/subop/add %esp 8/imm32
9110
9111 5d/pop-to-ebp
9112 c3/return
9113
9114 test-copy-byte-to-with-no-source:
9115
9116 55/push-ebp
9117 89/<- %ebp 4/r32/esp
9118
9119 (clear-stream _test-input-stream)
9120 (clear-stream $_test-input-buffered-file->buffer)
9121 (clear-stream _test-output-stream)
9122 (clear-stream $_test-output-buffered-file->buffer)
9123 (clear-stream _test-error-stream)
9124 (clear-stream $_test-error-buffered-file->buffer)
9125
9126 68/push 0/imm32
9127 68/push 0/imm32
9128 89/<- %edx 4/r32/esp
9129 (tailor-exit-descriptor %edx 0x10)
9130
9131 (write _test-input-stream "fn foo {\n")
9132 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
9133 (write _test-input-stream " copy-byte-to *x\n")
9134 (write _test-input-stream "}\n")
9135
9136 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9137
9138
9139 89/<- %edx 4/r32/esp
9140 (flush _test-output-buffered-file)
9141 (flush _test-error-buffered-file)
9142 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9148
9149 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-no-source: output should be empty")
9150 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte-to' must have two inouts" "F - test-copy-byte-to-with-no-source: error message")
9151
9152 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-no-source: exit status")
9153
9154 81 0/subop/add %esp 8/imm32
9155
9156 5d/pop-to-ebp
9157 c3/return
9158
9159 test-copy-byte-to-with-too-many-inouts:
9160
9161 55/push-ebp
9162 89/<- %ebp 4/r32/esp
9163
9164 (clear-stream _test-input-stream)
9165 (clear-stream $_test-input-buffered-file->buffer)
9166 (clear-stream _test-output-stream)
9167 (clear-stream $_test-output-buffered-file->buffer)
9168 (clear-stream _test-error-stream)
9169 (clear-stream $_test-error-buffered-file->buffer)
9170
9171 68/push 0/imm32
9172 68/push 0/imm32
9173 89/<- %edx 4/r32/esp
9174 (tailor-exit-descriptor %edx 0x10)
9175
9176 (write _test-input-stream "fn foo {\n")
9177 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
9178 (write _test-input-stream " copy-byte-to *x, 0, 0\n")
9179 (write _test-input-stream "}\n")
9180
9181 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9182
9183
9184 89/<- %edx 4/r32/esp
9185 (flush _test-output-buffered-file)
9186 (flush _test-error-buffered-file)
9187 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9193
9194 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-too-many-inouts: output should be empty")
9195 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte-to' must have two inouts" "F - test-copy-byte-to-with-too-many-inouts: error message")
9196
9197 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-too-many-inouts: exit status")
9198
9199 81 0/subop/add %esp 8/imm32
9200
9201 5d/pop-to-ebp
9202 c3/return
9203
9204 test-copy-byte-to-with-output:
9205
9206 55/push-ebp
9207 89/<- %ebp 4/r32/esp
9208
9209 (clear-stream _test-input-stream)
9210 (clear-stream $_test-input-buffered-file->buffer)
9211 (clear-stream _test-output-stream)
9212 (clear-stream $_test-output-buffered-file->buffer)
9213 (clear-stream _test-error-stream)
9214 (clear-stream $_test-error-buffered-file->buffer)
9215
9216 68/push 0/imm32
9217 68/push 0/imm32
9218 89/<- %edx 4/r32/esp
9219 (tailor-exit-descriptor %edx 0x10)
9220
9221 (write _test-input-stream "fn foo {\n")
9222 (write _test-input-stream " var x/eax: byte <- copy 0\n")
9223 (write _test-input-stream " var y/ecx: (addr byte) <- copy 0\n")
9224 (write _test-input-stream " x <- copy-byte-to *y, 0\n")
9225 (write _test-input-stream "}\n")
9226
9227 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9228
9229
9230 89/<- %edx 4/r32/esp
9231 (flush _test-output-buffered-file)
9232 (flush _test-error-buffered-file)
9233 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9239
9240 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-output: output should be empty")
9241 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-byte-to' must not have any outputs" "F - test-copy-byte-to-with-output: error message")
9242
9243 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-output: exit status")
9244
9245 81 0/subop/add %esp 8/imm32
9246
9247 5d/pop-to-ebp
9248 c3/return
9249
9250 test-copy-byte-to-with-invalid-output-type:
9251
9252 55/push-ebp
9253 89/<- %ebp 4/r32/esp
9254
9255 (clear-stream _test-input-stream)
9256 (clear-stream $_test-input-buffered-file->buffer)
9257 (clear-stream _test-output-stream)
9258 (clear-stream $_test-output-buffered-file->buffer)
9259 (clear-stream _test-error-stream)
9260 (clear-stream $_test-error-buffered-file->buffer)
9261
9262 68/push 0/imm32
9263 68/push 0/imm32
9264 89/<- %edx 4/r32/esp
9265 (tailor-exit-descriptor %edx 0x10)
9266
9267 (write _test-input-stream "fn foo {\n")
9268 (write _test-input-stream " var x/eax: byte <- copy 0\n")
9269 (write _test-input-stream " var y: int\n")
9270 (write _test-input-stream " copy-byte-to y, x\n")
9271 (write _test-input-stream "}\n")
9272
9273 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9274
9275
9276 89/<- %edx 4/r32/esp
9277 (flush _test-output-buffered-file)
9278 (flush _test-error-buffered-file)
9279 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9285
9286 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-invalid-output-type: output should be empty")
9287 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-byte-to: 'y' must be a byte" "F - test-copy-byte-to-with-invalid-output-type: error message")
9288
9289 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-invalid-output-type: exit status")
9290
9291 81 0/subop/add %esp 8/imm32
9292
9293 5d/pop-to-ebp
9294 c3/return
9295
9296 test-copy-byte-to-with-literal-inout:
9297
9298 55/push-ebp
9299 89/<- %ebp 4/r32/esp
9300
9301 (clear-stream _test-input-stream)
9302 (clear-stream $_test-input-buffered-file->buffer)
9303 (clear-stream _test-output-stream)
9304 (clear-stream $_test-output-buffered-file->buffer)
9305 (clear-stream _test-error-stream)
9306 (clear-stream $_test-error-buffered-file->buffer)
9307
9308 68/push 0/imm32
9309 68/push 0/imm32
9310 89/<- %edx 4/r32/esp
9311 (tailor-exit-descriptor %edx 0x10)
9312
9313 (write _test-input-stream "fn foo {\n")
9314 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
9315 (write _test-input-stream " copy-byte-to *x, 0\n")
9316 (write _test-input-stream "}\n")
9317
9318 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9319
9320
9321 89/<- %edx 4/r32/esp
9322 (flush _test-output-buffered-file)
9323 (flush _test-error-buffered-file)
9324 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9330
9331 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-literal-inout: output should be empty")
9332 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-byte-to: source (second inout) must be in a register" "F - test-copy-byte-to-with-literal-inout: error message")
9333
9334 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-literal-inout: exit status")
9335
9336 81 0/subop/add %esp 8/imm32
9337
9338 5d/pop-to-ebp
9339 c3/return
9340
9341 test-copy-byte-to-deref-address:
9342
9343 55/push-ebp
9344 89/<- %ebp 4/r32/esp
9345
9346 (clear-stream _test-input-stream)
9347 (clear-stream $_test-input-buffered-file->buffer)
9348 (clear-stream _test-output-stream)
9349 (clear-stream $_test-output-buffered-file->buffer)
9350
9351 (write _test-input-stream "fn foo {\n")
9352 (write _test-input-stream " var x/eax: byte <- copy 0\n")
9353 (write _test-input-stream " var y/ecx: (addr byte) <- copy 0\n")
9354 (write _test-input-stream " copy-byte-to *y, x\n")
9355 (write _test-input-stream "}\n")
9356
9357 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9358 (flush _test-output-buffered-file)
9359
9360
9361 5d/pop-to-ebp
9362 c3/return
9363
9364 test-copy-byte-to-from-non-scalar-inout:
9365
9366 55/push-ebp
9367 89/<- %ebp 4/r32/esp
9368
9369 (clear-stream _test-input-stream)
9370 (clear-stream $_test-input-buffered-file->buffer)
9371 (clear-stream _test-output-stream)
9372 (clear-stream $_test-output-buffered-file->buffer)
9373 (clear-stream _test-error-stream)
9374 (clear-stream $_test-error-buffered-file->buffer)
9375
9376 68/push 0/imm32
9377 68/push 0/imm32
9378 89/<- %edx 4/r32/esp
9379 (tailor-exit-descriptor %edx 0x10)
9380
9381 (write _test-input-stream "fn foo {\n")
9382 (write _test-input-stream " var x: (handle int)\n")
9383 (write _test-input-stream " var y/eax: (addr byte) <- copy 0\n")
9384 (write _test-input-stream " copy-byte-to *y, x\n")
9385 (write _test-input-stream "}\n")
9386
9387 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9388
9389
9390 89/<- %edx 4/r32/esp
9391 (flush _test-output-buffered-file)
9392 (flush _test-error-buffered-file)
9393 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9399
9400 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-from-non-scalar-inout: output should be empty")
9401 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-byte-to: 'x' is too large to copy" "F - test-copy-byte-to-from-non-scalar-inout: error message")
9402
9403 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-from-non-scalar-inout: exit status")
9404
9405 81 0/subop/add %esp 8/imm32
9406
9407 5d/pop-to-ebp
9408 c3/return
9409
9410 test-compare-with-no-inout:
9411
9412 55/push-ebp
9413 89/<- %ebp 4/r32/esp
9414
9415 (clear-stream _test-input-stream)
9416 (clear-stream $_test-input-buffered-file->buffer)
9417 (clear-stream _test-output-stream)
9418 (clear-stream $_test-output-buffered-file->buffer)
9419 (clear-stream _test-error-stream)
9420 (clear-stream $_test-error-buffered-file->buffer)
9421
9422 68/push 0/imm32
9423 68/push 0/imm32
9424 89/<- %edx 4/r32/esp
9425 (tailor-exit-descriptor %edx 0x10)
9426
9427 (write _test-input-stream "fn foo {\n")
9428 (write _test-input-stream " var x: boolean\n")
9429 (write _test-input-stream " compare\n")
9430 (write _test-input-stream "}\n")
9431
9432 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9433
9434
9435 89/<- %edx 4/r32/esp
9436 (flush _test-output-buffered-file)
9437 (flush _test-error-buffered-file)
9438 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9444
9445 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-inout: output should be empty")
9446 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-inout: error message")
9447
9448 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-inout: exit status")
9449
9450 81 0/subop/add %esp 8/imm32
9451
9452 5d/pop-to-ebp
9453 c3/return
9454
9455 test-compare-with-just-one-inout:
9456
9457 55/push-ebp
9458 89/<- %ebp 4/r32/esp
9459
9460 (clear-stream _test-input-stream)
9461 (clear-stream $_test-input-buffered-file->buffer)
9462 (clear-stream _test-output-stream)
9463 (clear-stream $_test-output-buffered-file->buffer)
9464 (clear-stream _test-error-stream)
9465 (clear-stream $_test-error-buffered-file->buffer)
9466
9467 68/push 0/imm32
9468 68/push 0/imm32
9469 89/<- %edx 4/r32/esp
9470 (tailor-exit-descriptor %edx 0x10)
9471
9472 (write _test-input-stream "fn foo {\n")
9473 (write _test-input-stream " var x: boolean\n")
9474 (write _test-input-stream " compare x\n")
9475 (write _test-input-stream "}\n")
9476
9477 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9478
9479
9480 89/<- %edx 4/r32/esp
9481 (flush _test-output-buffered-file)
9482 (flush _test-error-buffered-file)
9483 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9489
9490 (check-stream-equal _test-output-stream "" "F - test-compare-with-just-one-inout: output should be empty")
9491 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-just-one-inout: error message")
9492
9493 (check-ints-equal *(edx+4) 2 "F - test-compare-with-just-one-inout: exit status")
9494
9495 81 0/subop/add %esp 8/imm32
9496
9497 5d/pop-to-ebp
9498 c3/return
9499
9500 test-compare-with-too-many-inouts:
9501
9502 55/push-ebp
9503 89/<- %ebp 4/r32/esp
9504
9505 (clear-stream _test-input-stream)
9506 (clear-stream $_test-input-buffered-file->buffer)
9507 (clear-stream _test-output-stream)
9508 (clear-stream $_test-output-buffered-file->buffer)
9509 (clear-stream _test-error-stream)
9510 (clear-stream $_test-error-buffered-file->buffer)
9511
9512 68/push 0/imm32
9513 68/push 0/imm32
9514 89/<- %edx 4/r32/esp
9515 (tailor-exit-descriptor %edx 0x10)
9516
9517 (write _test-input-stream "fn foo {\n")
9518 (write _test-input-stream " var x: boolean\n")
9519 (write _test-input-stream " compare x, 0, 0\n")
9520 (write _test-input-stream "}\n")
9521
9522 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9523
9524
9525 89/<- %edx 4/r32/esp
9526 (flush _test-output-buffered-file)
9527 (flush _test-error-buffered-file)
9528 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9534
9535 (check-stream-equal _test-output-stream "" "F - test-compare-with-too-many-inouts: output should be empty")
9536 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-too-many-inouts: error message")
9537
9538 (check-ints-equal *(edx+4) 2 "F - test-compare-with-too-many-inouts: exit status")
9539
9540 81 0/subop/add %esp 8/imm32
9541
9542 5d/pop-to-ebp
9543 c3/return
9544
9545 test-compare-with-output:
9546
9547 55/push-ebp
9548 89/<- %ebp 4/r32/esp
9549
9550 (clear-stream _test-input-stream)
9551 (clear-stream $_test-input-buffered-file->buffer)
9552 (clear-stream _test-output-stream)
9553 (clear-stream $_test-output-buffered-file->buffer)
9554 (clear-stream _test-error-stream)
9555 (clear-stream $_test-error-buffered-file->buffer)
9556
9557 68/push 0/imm32
9558 68/push 0/imm32
9559 89/<- %edx 4/r32/esp
9560 (tailor-exit-descriptor %edx 0x10)
9561
9562 (write _test-input-stream "fn foo {\n")
9563 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
9564 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
9565 (write _test-input-stream " x <- compare y, 0\n")
9566 (write _test-input-stream "}\n")
9567
9568 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9569
9570
9571 89/<- %edx 4/r32/esp
9572 (flush _test-output-buffered-file)
9573 (flush _test-error-buffered-file)
9574 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9580
9581 (check-stream-equal _test-output-stream "" "F - test-compare-with-output: output should be empty")
9582 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must not have any outputs" "F - test-compare-with-output: error message")
9583
9584 (check-ints-equal *(edx+4) 2 "F - test-compare-with-output: exit status")
9585
9586 81 0/subop/add %esp 8/imm32
9587
9588 5d/pop-to-ebp
9589 c3/return
9590
9591 test-compare-invalid-value-to-address:
9592
9593 55/push-ebp
9594 89/<- %ebp 4/r32/esp
9595
9596 (clear-stream _test-input-stream)
9597 (clear-stream $_test-input-buffered-file->buffer)
9598 (clear-stream _test-output-stream)
9599 (clear-stream $_test-output-buffered-file->buffer)
9600 (clear-stream _test-error-stream)
9601 (clear-stream $_test-error-buffered-file->buffer)
9602
9603 68/push 0/imm32
9604 68/push 0/imm32
9605 89/<- %edx 4/r32/esp
9606 (tailor-exit-descriptor %edx 0x10)
9607
9608 (write _test-input-stream "fn foo {\n")
9609 (write _test-input-stream " var x/eax: int <- copy 0\n")
9610 (write _test-input-stream " var y: (addr int)\n")
9611 (write _test-input-stream " compare y, x\n")
9612 (write _test-input-stream "}\n")
9613
9614 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9615
9616
9617 89/<- %edx 4/r32/esp
9618 (flush _test-output-buffered-file)
9619 (flush _test-error-buffered-file)
9620 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9626
9627 (check-stream-equal _test-output-stream "" "F - test-compare-invalid-value-to-address: output should be empty")
9628 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: 'y' must be a non-addr non-offset scalar" "F - test-compare-invalid-value-to-address: error message")
9629
9630 (check-ints-equal *(edx+4) 2 "F - test-compare-invalid-value-to-address: exit status")
9631
9632 81 0/subop/add %esp 8/imm32
9633
9634 5d/pop-to-ebp
9635 c3/return
9636
9637 test-compare-address:
9638
9639 55/push-ebp
9640 89/<- %ebp 4/r32/esp
9641
9642 (clear-stream _test-input-stream)
9643 (clear-stream $_test-input-buffered-file->buffer)
9644 (clear-stream _test-output-stream)
9645 (clear-stream $_test-output-buffered-file->buffer)
9646
9647 (write _test-input-stream "fn foo {\n")
9648 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
9649 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
9650 (write _test-input-stream " compare y, x\n")
9651 (write _test-input-stream "}\n")
9652
9653 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9654 (flush _test-output-buffered-file)
9655
9656
9657 5d/pop-to-ebp
9658 c3/return
9659
9660 test-compare-deref-address:
9661
9662 55/push-ebp
9663 89/<- %ebp 4/r32/esp
9664
9665 (clear-stream _test-input-stream)
9666 (clear-stream $_test-input-buffered-file->buffer)
9667 (clear-stream _test-output-stream)
9668 (clear-stream $_test-output-buffered-file->buffer)
9669
9670 (write _test-input-stream "fn foo {\n")
9671 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
9672 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
9673 (write _test-input-stream " compare *y, x\n")
9674 (write _test-input-stream "}\n")
9675
9676 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9677 (flush _test-output-buffered-file)
9678
9679
9680 5d/pop-to-ebp
9681 c3/return
9682
9683 test-compare-two-vars-in-memory:
9684
9685 55/push-ebp
9686 89/<- %ebp 4/r32/esp
9687
9688 (clear-stream _test-input-stream)
9689 (clear-stream $_test-input-buffered-file->buffer)
9690 (clear-stream _test-output-stream)
9691 (clear-stream $_test-output-buffered-file->buffer)
9692 (clear-stream _test-error-stream)
9693 (clear-stream $_test-error-buffered-file->buffer)
9694
9695 68/push 0/imm32
9696 68/push 0/imm32
9697 89/<- %edx 4/r32/esp
9698 (tailor-exit-descriptor %edx 0x10)
9699
9700 (write _test-input-stream "fn foo {\n")
9701 (write _test-input-stream " var x: boolean\n")
9702 (write _test-input-stream " compare x, x\n")
9703 (write _test-input-stream "}\n")
9704
9705 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9706
9707
9708 89/<- %edx 4/r32/esp
9709 (flush _test-output-buffered-file)
9710 (flush _test-error-buffered-file)
9711 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9717
9718 (check-stream-equal _test-output-stream "" "F - test-compare-two-vars-in-memory: output should be empty")
9719 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-two-vars-in-memory: error message")
9720
9721 (check-ints-equal *(edx+4) 2 "F - test-compare-two-vars-in-memory: exit status")
9722
9723 81 0/subop/add %esp 8/imm32
9724
9725 5d/pop-to-ebp
9726 c3/return
9727
9728 test-compare-non-scalar:
9729
9730 55/push-ebp
9731 89/<- %ebp 4/r32/esp
9732
9733 (clear-stream _test-input-stream)
9734 (clear-stream $_test-input-buffered-file->buffer)
9735 (clear-stream _test-output-stream)
9736 (clear-stream $_test-output-buffered-file->buffer)
9737 (clear-stream _test-error-stream)
9738 (clear-stream $_test-error-buffered-file->buffer)
9739
9740 68/push 0/imm32
9741 68/push 0/imm32
9742 89/<- %edx 4/r32/esp
9743 (tailor-exit-descriptor %edx 0x10)
9744
9745 (write _test-input-stream "fn foo {\n")
9746 (write _test-input-stream " var x: (handle int)\n")
9747 (write _test-input-stream " var y: int\n")
9748 (write _test-input-stream " compare y, x\n")
9749 (write _test-input-stream "}\n")
9750
9751 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9752
9753
9754 89/<- %edx 4/r32/esp
9755 (flush _test-output-buffered-file)
9756 (flush _test-error-buffered-file)
9757 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9763
9764 (check-stream-equal _test-output-stream "" "F - test-compare-non-scalar: output should be empty")
9765
9766 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-non-scalar: error message")
9767
9768 (check-ints-equal *(edx+4) 2 "F - test-compare-non-scalar: exit status")
9769
9770 81 0/subop/add %esp 8/imm32
9771
9772 5d/pop-to-ebp
9773 c3/return
9774
9775 test-compare-with-string-literal:
9776
9777 55/push-ebp
9778 89/<- %ebp 4/r32/esp
9779
9780 (clear-stream _test-input-stream)
9781 (clear-stream $_test-input-buffered-file->buffer)
9782 (clear-stream _test-output-stream)
9783 (clear-stream $_test-output-buffered-file->buffer)
9784 (clear-stream _test-error-stream)
9785 (clear-stream $_test-error-buffered-file->buffer)
9786
9787 68/push 0/imm32
9788 68/push 0/imm32
9789 89/<- %edx 4/r32/esp
9790 (tailor-exit-descriptor %edx 0x10)
9791
9792 (write _test-input-stream "fn foo {\n")
9793 (write _test-input-stream " var x/eax: (addr array byte) <- copy 0\n")
9794 (write _test-input-stream " compare x, \"abc\"\n")
9795 (write _test-input-stream "}\n")
9796
9797 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9798
9799
9800 89/<- %edx 4/r32/esp
9801 (flush _test-output-buffered-file)
9802 (flush _test-error-buffered-file)
9803 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9809
9810 (check-stream-equal _test-output-stream "" "F - test-compare-with-string-literal: output should be empty")
9811 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: string literal \"abc\" is not supported; use the string-equal? function" "F - test-compare-with-string-literal: error message")
9812
9813 (check-ints-equal *(edx+4) 2 "F - test-compare-with-string-literal: exit status")
9814
9815 81 0/subop/add %esp 8/imm32
9816
9817 5d/pop-to-ebp
9818 c3/return
9819
9820 test-address-with-no-inout:
9821
9822 55/push-ebp
9823 89/<- %ebp 4/r32/esp
9824
9825 (clear-stream _test-input-stream)
9826 (clear-stream $_test-input-buffered-file->buffer)
9827 (clear-stream _test-output-stream)
9828 (clear-stream $_test-output-buffered-file->buffer)
9829 (clear-stream _test-error-stream)
9830 (clear-stream $_test-error-buffered-file->buffer)
9831
9832 68/push 0/imm32
9833 68/push 0/imm32
9834 89/<- %edx 4/r32/esp
9835 (tailor-exit-descriptor %edx 0x10)
9836
9837 (write _test-input-stream "fn foo {\n")
9838 (write _test-input-stream " var x/eax: boolean <- address\n")
9839 (write _test-input-stream "}\n")
9840
9841 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9842
9843
9844 89/<- %edx 4/r32/esp
9845 (flush _test-output-buffered-file)
9846 (flush _test-error-buffered-file)
9847 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9853
9854 (check-stream-equal _test-output-stream "" "F - test-address-with-no-inout: output should be empty")
9855 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an inout" "F - test-address-with-no-inout: error message")
9856
9857 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-inout: exit status")
9858
9859 81 0/subop/add %esp 8/imm32
9860
9861 5d/pop-to-ebp
9862 c3/return
9863
9864 test-address-with-multiple-inouts:
9865
9866 55/push-ebp
9867 89/<- %ebp 4/r32/esp
9868
9869 (clear-stream _test-input-stream)
9870 (clear-stream $_test-input-buffered-file->buffer)
9871 (clear-stream _test-output-stream)
9872 (clear-stream $_test-output-buffered-file->buffer)
9873 (clear-stream _test-error-stream)
9874 (clear-stream $_test-error-buffered-file->buffer)
9875
9876 68/push 0/imm32
9877 68/push 0/imm32
9878 89/<- %edx 4/r32/esp
9879 (tailor-exit-descriptor %edx 0x10)
9880
9881 (write _test-input-stream "fn foo {\n")
9882 (write _test-input-stream " var x/eax: boolean <- address 0, 0\n")
9883 (write _test-input-stream "}\n")
9884
9885 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9886
9887
9888 89/<- %edx 4/r32/esp
9889 (flush _test-output-buffered-file)
9890 (flush _test-error-buffered-file)
9891 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9897
9898 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-inouts: output should be empty")
9899 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' must have just one inout" "F - test-address-with-multiple-inouts: error message")
9900
9901 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-inouts: exit status")
9902
9903 81 0/subop/add %esp 8/imm32
9904
9905 5d/pop-to-ebp
9906 c3/return
9907
9908 test-address-with-no-output:
9909
9910 55/push-ebp
9911 89/<- %ebp 4/r32/esp
9912
9913 (clear-stream _test-input-stream)
9914 (clear-stream $_test-input-buffered-file->buffer)
9915 (clear-stream _test-output-stream)
9916 (clear-stream $_test-output-buffered-file->buffer)
9917 (clear-stream _test-error-stream)
9918 (clear-stream $_test-error-buffered-file->buffer)
9919
9920 68/push 0/imm32
9921 68/push 0/imm32
9922 89/<- %edx 4/r32/esp
9923 (tailor-exit-descriptor %edx 0x10)
9924
9925 (write _test-input-stream "fn foo {\n")
9926 (write _test-input-stream " address 0\n")
9927 (write _test-input-stream "}\n")
9928
9929 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9930
9931
9932 89/<- %edx 4/r32/esp
9933 (flush _test-output-buffered-file)
9934 (flush _test-error-buffered-file)
9935 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9941
9942 (check-stream-equal _test-output-stream "" "F - test-address-with-no-output: output should be empty")
9943 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an output" "F - test-address-with-no-output: error message")
9944
9945 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-output: exit status")
9946
9947 81 0/subop/add %esp 8/imm32
9948
9949 5d/pop-to-ebp
9950 c3/return
9951
9952 test-address-with-multiple-outputs:
9953
9954 55/push-ebp
9955 89/<- %ebp 4/r32/esp
9956
9957 (clear-stream _test-input-stream)
9958 (clear-stream $_test-input-buffered-file->buffer)
9959 (clear-stream _test-output-stream)
9960 (clear-stream $_test-output-buffered-file->buffer)
9961 (clear-stream _test-error-stream)
9962 (clear-stream $_test-error-buffered-file->buffer)
9963
9964 68/push 0/imm32
9965 68/push 0/imm32
9966 89/<- %edx 4/r32/esp
9967 (tailor-exit-descriptor %edx 0x10)
9968
9969 (write _test-input-stream "fn foo {\n")
9970 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
9971 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
9972 (write _test-input-stream " x, y <- address 0\n")
9973 (write _test-input-stream "}\n")
9974
9975 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9976
9977
9978 89/<- %edx 4/r32/esp
9979 (flush _test-output-buffered-file)
9980 (flush _test-error-buffered-file)
9981 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9987
9988 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-outputs: output should be empty")
9989 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' must have just one output" "F - test-address-with-multiple-outputs: error message")
9990
9991 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-outputs: exit status")
9992
9993 81 0/subop/add %esp 8/imm32
9994
9995 5d/pop-to-ebp
9996 c3/return
9997
9998
9999 test-address-of-deref:
10000
10001 55/push-ebp
10002 89/<- %ebp 4/r32/esp
10003
10004 (clear-stream _test-input-stream)
10005 (clear-stream $_test-input-buffered-file->buffer)
10006 (clear-stream _test-output-stream)
10007 (clear-stream $_test-output-buffered-file->buffer)
10008
10009 (write _test-input-stream "fn foo {\n")
10010 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
10011 (write _test-input-stream " var y/ecx: (addr int) <- address *x\n")
10012 (write _test-input-stream "}\n")
10013
10014 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10015 (flush _test-output-buffered-file)
10016
10017
10018 5d/pop-to-ebp
10019 c3/return
10020
10021 test-address-to-non-register:
10022
10023 55/push-ebp
10024 89/<- %ebp 4/r32/esp
10025
10026 (clear-stream _test-input-stream)
10027 (clear-stream $_test-input-buffered-file->buffer)
10028 (clear-stream _test-output-stream)
10029 (clear-stream $_test-output-buffered-file->buffer)
10030 (clear-stream _test-error-stream)
10031 (clear-stream $_test-error-buffered-file->buffer)
10032
10033 68/push 0/imm32
10034 68/push 0/imm32
10035 89/<- %edx 4/r32/esp
10036 (tailor-exit-descriptor %edx 0x10)
10037
10038 (write _test-input-stream "fn foo {\n")
10039 (write _test-input-stream " var x: (addr int)\n")
10040 (write _test-input-stream " x <- address 0\n")
10041 (write _test-input-stream "}\n")
10042
10043 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10044
10045
10046 89/<- %edx 4/r32/esp
10047 (flush _test-output-buffered-file)
10048 (flush _test-error-buffered-file)
10049 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10055
10056 (check-stream-equal _test-output-stream "" "F - test-address-to-non-register: output should be empty")
10057 (check-next-stream-line-equal _test-error-stream "fn foo: stmt address: output 'x' not in a register" "F - test-address-to-non-register: error message")
10058
10059 (check-ints-equal *(edx+4) 2 "F - test-address-to-non-register: exit status")
10060
10061 81 0/subop/add %esp 8/imm32
10062
10063 5d/pop-to-ebp
10064 c3/return
10065
10066 test-address-with-wrong-type:
10067
10068 55/push-ebp
10069 89/<- %ebp 4/r32/esp
10070
10071 (clear-stream _test-input-stream)
10072 (clear-stream $_test-input-buffered-file->buffer)
10073 (clear-stream _test-output-stream)
10074 (clear-stream $_test-output-buffered-file->buffer)
10075 (clear-stream _test-error-stream)
10076 (clear-stream $_test-error-buffered-file->buffer)
10077
10078 68/push 0/imm32
10079 68/push 0/imm32
10080 89/<- %edx 4/r32/esp
10081 (tailor-exit-descriptor %edx 0x10)
10082
10083 (write _test-input-stream "fn foo {\n")
10084 (write _test-input-stream " var x: int\n")
10085 (write _test-input-stream " var y/eax: (addr boolean) <- address x\n")
10086 (write _test-input-stream "}\n")
10087
10088 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10089
10090
10091 89/<- %edx 4/r32/esp
10092 (flush _test-output-buffered-file)
10093 (flush _test-error-buffered-file)
10094 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10100
10101 (check-stream-equal _test-output-stream "" "F - test-address-with-wrong-type: output should be empty")
10102 (check-next-stream-line-equal _test-error-stream "fn foo: stmt address: output 'y' cannot hold address of 'x'" "F - test-address-with-wrong-type: error message")
10103
10104 (check-ints-equal *(edx+4) 2 "F - test-address-with-wrong-type: exit status")
10105
10106 81 0/subop/add %esp 8/imm32
10107
10108 5d/pop-to-ebp
10109 c3/return
10110
10111 test-address-with-right-type-for-array:
10112
10113 55/push-ebp
10114 89/<- %ebp 4/r32/esp
10115
10116 (clear-stream _test-input-stream)
10117 (clear-stream $_test-input-buffered-file->buffer)
10118 (clear-stream _test-output-stream)
10119 (clear-stream $_test-output-buffered-file->buffer)
10120
10121 (write _test-input-stream "fn foo {\n")
10122 (write _test-input-stream " var x: (array int 3)\n")
10123 (write _test-input-stream " var y/eax: (addr array int) <- address x\n")
10124 (write _test-input-stream "}\n")
10125
10126 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10127 (flush _test-output-buffered-file)
10128
10129
10130 89/<- %esp 5/r32/ebp
10131 5d/pop-to-ebp
10132 c3/return
10133
10134 test-address-with-right-type-for-stream:
10135
10136 55/push-ebp
10137 89/<- %ebp 4/r32/esp
10138
10139 (clear-stream _test-input-stream)
10140 (clear-stream $_test-input-buffered-file->buffer)
10141 (clear-stream _test-output-stream)
10142 (clear-stream $_test-output-buffered-file->buffer)
10143
10144 (write _test-input-stream "fn foo {\n")
10145 (write _test-input-stream " var x: (stream int 3)\n")
10146 (write _test-input-stream " var y/eax: (addr stream int) <- address x\n")
10147 (write _test-input-stream "}\n")
10148
10149 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10150 (flush _test-output-buffered-file)
10151
10152
10153 89/<- %esp 5/r32/ebp
10154 5d/pop-to-ebp
10155 c3/return
10156
10157 test-get-with-wrong-field:
10158
10159 55/push-ebp
10160 89/<- %ebp 4/r32/esp
10161
10162 (clear-stream _test-input-stream)
10163 (clear-stream $_test-input-buffered-file->buffer)
10164 (clear-stream _test-output-stream)
10165 (clear-stream $_test-output-buffered-file->buffer)
10166 (clear-stream _test-error-stream)
10167 (clear-stream $_test-error-buffered-file->buffer)
10168
10169 68/push 0/imm32
10170 68/push 0/imm32
10171 89/<- %edx 4/r32/esp
10172 (tailor-exit-descriptor %edx 0x10)
10173
10174 (write _test-input-stream "fn foo {\n")
10175 (write _test-input-stream " var a: t\n")
10176 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10177 (write _test-input-stream "}\n")
10178 (write _test-input-stream "type t {\n")
10179 (write _test-input-stream " x: int\n")
10180 (write _test-input-stream "}\n")
10181
10182 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10183
10184
10185 89/<- %edx 4/r32/esp
10186 (flush _test-output-buffered-file)
10187 (flush _test-error-buffered-file)
10188 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10194
10195 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
10196 (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")
10197
10198 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
10199
10200 81 0/subop/add %esp 8/imm32
10201
10202 5d/pop-to-ebp
10203 c3/return
10204
10205 test-get-with-wrong-base-type:
10206
10207 55/push-ebp
10208 89/<- %ebp 4/r32/esp
10209
10210 (clear-stream _test-input-stream)
10211 (clear-stream $_test-input-buffered-file->buffer)
10212 (clear-stream _test-output-stream)
10213 (clear-stream $_test-output-buffered-file->buffer)
10214 (clear-stream _test-error-stream)
10215 (clear-stream $_test-error-buffered-file->buffer)
10216
10217 68/push 0/imm32
10218 68/push 0/imm32
10219 89/<- %edx 4/r32/esp
10220 (tailor-exit-descriptor %edx 0x10)
10221
10222 (write _test-input-stream "fn foo {\n")
10223 (write _test-input-stream " var a: int\n")
10224 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10225 (write _test-input-stream "}\n")
10226
10227 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10228
10229
10230 89/<- %edx 4/r32/esp
10231 (flush _test-output-buffered-file)
10232 (flush _test-error-buffered-file)
10233 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10239
10240 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
10241 (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")
10242
10243 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
10244
10245 81 0/subop/add %esp 8/imm32
10246
10247 5d/pop-to-ebp
10248 c3/return
10249
10250 test-get-with-wrong-base-type-2:
10251
10252 55/push-ebp
10253 89/<- %ebp 4/r32/esp
10254
10255 (clear-stream _test-input-stream)
10256 (clear-stream $_test-input-buffered-file->buffer)
10257 (clear-stream _test-output-stream)
10258 (clear-stream $_test-output-buffered-file->buffer)
10259 (clear-stream _test-error-stream)
10260 (clear-stream $_test-error-buffered-file->buffer)
10261
10262 68/push 0/imm32
10263 68/push 0/imm32
10264 89/<- %edx 4/r32/esp
10265 (tailor-exit-descriptor %edx 0x10)
10266
10267 (write _test-input-stream "fn foo {\n")
10268 (write _test-input-stream " var a: (addr t)\n")
10269 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10270 (write _test-input-stream "}\n")
10271 (write _test-input-stream "type t {\n")
10272 (write _test-input-stream " x: int\n")
10273 (write _test-input-stream "}\n")
10274
10275 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10276
10277
10278 89/<- %edx 4/r32/esp
10279 (flush _test-output-buffered-file)
10280 (flush _test-error-buffered-file)
10281 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10287
10288 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
10289 (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")
10290
10291 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
10292
10293 81 0/subop/add %esp 8/imm32
10294
10295 5d/pop-to-ebp
10296 c3/return
10297
10298 test-get-with-wrong-base-type-3:
10299
10300 55/push-ebp
10301 89/<- %ebp 4/r32/esp
10302
10303 (clear-stream _test-input-stream)
10304 (clear-stream $_test-input-buffered-file->buffer)
10305 (clear-stream _test-output-stream)
10306 (clear-stream $_test-output-buffered-file->buffer)
10307 (clear-stream _test-error-stream)
10308 (clear-stream $_test-error-buffered-file->buffer)
10309
10310 68/push 0/imm32
10311 68/push 0/imm32
10312 89/<- %edx 4/r32/esp
10313 (tailor-exit-descriptor %edx 0x10)
10314
10315 (write _test-input-stream "fn foo {\n")
10316 (write _test-input-stream " var a: (handle int)\n")
10317 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10318 (write _test-input-stream "}\n")
10319
10320 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10321
10322
10323 89/<- %edx 4/r32/esp
10324 (flush _test-output-buffered-file)
10325 (flush _test-error-buffered-file)
10326 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10332
10333 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-3: output should be empty")
10334 (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-3: error message")
10335
10336 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-3: exit status")
10337
10338 81 0/subop/add %esp 8/imm32
10339
10340 5d/pop-to-ebp
10341 c3/return
10342
10343 test-get-with-wrong-offset-type:
10344
10345 55/push-ebp
10346 89/<- %ebp 4/r32/esp
10347
10348 (clear-stream _test-input-stream)
10349 (clear-stream $_test-input-buffered-file->buffer)
10350 (clear-stream _test-output-stream)
10351 (clear-stream $_test-output-buffered-file->buffer)
10352 (clear-stream _test-error-stream)
10353 (clear-stream $_test-error-buffered-file->buffer)
10354
10355 68/push 0/imm32
10356 68/push 0/imm32
10357 89/<- %edx 4/r32/esp
10358 (tailor-exit-descriptor %edx 0x10)
10359
10360 (write _test-input-stream "fn foo {\n")
10361 (write _test-input-stream " var a: t\n")
10362 (write _test-input-stream " var b: int\n")
10363 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
10364 (write _test-input-stream "}\n")
10365 (write _test-input-stream "type t {\n")
10366 (write _test-input-stream " x: int\n")
10367 (write _test-input-stream "}\n")
10368
10369 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10370
10371
10372 89/<- %edx 4/r32/esp
10373 (flush _test-output-buffered-file)
10374 (flush _test-error-buffered-file)
10375 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10381
10382 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
10383 (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")
10384
10385 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
10386
10387 81 0/subop/add %esp 8/imm32
10388
10389 5d/pop-to-ebp
10390 c3/return
10391
10392 test-get-with-wrong-output-type:
10393
10394 55/push-ebp
10395 89/<- %ebp 4/r32/esp
10396
10397 (clear-stream _test-input-stream)
10398 (clear-stream $_test-input-buffered-file->buffer)
10399 (clear-stream _test-output-stream)
10400 (clear-stream $_test-output-buffered-file->buffer)
10401 (clear-stream _test-error-stream)
10402 (clear-stream $_test-error-buffered-file->buffer)
10403
10404 68/push 0/imm32
10405 68/push 0/imm32
10406 89/<- %edx 4/r32/esp
10407 (tailor-exit-descriptor %edx 0x10)
10408
10409 (write _test-input-stream "fn foo {\n")
10410 (write _test-input-stream " var a: t\n")
10411 (write _test-input-stream " var c: (addr int)\n")
10412 (write _test-input-stream " c <- get a, x\n")
10413 (write _test-input-stream "}\n")
10414 (write _test-input-stream "type t {\n")
10415 (write _test-input-stream " x: int\n")
10416 (write _test-input-stream "}\n")
10417
10418 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10419
10420
10421 89/<- %edx 4/r32/esp
10422 (flush _test-output-buffered-file)
10423 (flush _test-error-buffered-file)
10424 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10430
10431 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
10432 (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")
10433
10434 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
10435
10436 81 0/subop/add %esp 8/imm32
10437
10438 5d/pop-to-ebp
10439 c3/return
10440
10441 test-get-with-wrong-output-type-2:
10442
10443 55/push-ebp
10444 89/<- %ebp 4/r32/esp
10445
10446 (clear-stream _test-input-stream)
10447 (clear-stream $_test-input-buffered-file->buffer)
10448 (clear-stream _test-output-stream)
10449 (clear-stream $_test-output-buffered-file->buffer)
10450 (clear-stream _test-error-stream)
10451 (clear-stream $_test-error-buffered-file->buffer)
10452
10453 68/push 0/imm32
10454 68/push 0/imm32
10455 89/<- %edx 4/r32/esp
10456 (tailor-exit-descriptor %edx 0x10)
10457
10458 (write _test-input-stream "fn foo {\n")
10459 (write _test-input-stream " var a: t\n")
10460 (write _test-input-stream " var c/ecx: int <- get a, x\n")
10461 (write _test-input-stream "}\n")
10462 (write _test-input-stream "type t {\n")
10463 (write _test-input-stream " x: int\n")
10464 (write _test-input-stream "}\n")
10465
10466 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10467
10468
10469 89/<- %edx 4/r32/esp
10470 (flush _test-output-buffered-file)
10471 (flush _test-error-buffered-file)
10472 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10478
10479 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
10480 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an addr" "F - test-get-with-wrong-output-type-2: error message")
10481
10482 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
10483
10484 81 0/subop/add %esp 8/imm32
10485
10486 5d/pop-to-ebp
10487 c3/return
10488
10489 test-get-with-wrong-output-type-3:
10490
10491 55/push-ebp
10492 89/<- %ebp 4/r32/esp
10493
10494 (clear-stream _test-input-stream)
10495 (clear-stream $_test-input-buffered-file->buffer)
10496 (clear-stream _test-output-stream)
10497 (clear-stream $_test-output-buffered-file->buffer)
10498 (clear-stream _test-error-stream)
10499 (clear-stream $_test-error-buffered-file->buffer)
10500
10501 68/push 0/imm32
10502 68/push 0/imm32
10503 89/<- %edx 4/r32/esp
10504 (tailor-exit-descriptor %edx 0x10)
10505
10506 (write _test-input-stream "fn foo {\n")
10507 (write _test-input-stream " var a: t\n")
10508 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
10509 (write _test-input-stream "}\n")
10510 (write _test-input-stream "type t {\n")
10511 (write _test-input-stream " x: int\n")
10512 (write _test-input-stream "}\n")
10513
10514 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10515
10516
10517 89/<- %edx 4/r32/esp
10518 (flush _test-output-buffered-file)
10519 (flush _test-error-buffered-file)
10520 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10526
10527 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
10528 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: output must be an addr" "F - test-get-with-wrong-output-type-3: error message")
10529
10530 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
10531
10532 81 0/subop/add %esp 8/imm32
10533
10534 5d/pop-to-ebp
10535 c3/return
10536
10537 test-get-with-wrong-output-type-4:
10538
10539 55/push-ebp
10540 89/<- %ebp 4/r32/esp
10541
10542 (clear-stream _test-input-stream)
10543 (clear-stream $_test-input-buffered-file->buffer)
10544 (clear-stream _test-output-stream)
10545 (clear-stream $_test-output-buffered-file->buffer)
10546 (clear-stream _test-error-stream)
10547 (clear-stream $_test-error-buffered-file->buffer)
10548
10549 68/push 0/imm32
10550 68/push 0/imm32
10551 89/<- %edx 4/r32/esp
10552 (tailor-exit-descriptor %edx 0x10)
10553
10554 (write _test-input-stream "fn foo {\n")
10555 (write _test-input-stream " var a: t\n")
10556 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
10557 (write _test-input-stream "}\n")
10558 (write _test-input-stream "type t {\n")
10559 (write _test-input-stream " x: int\n")
10560 (write _test-input-stream "}\n")
10561
10562 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10563
10564
10565 89/<- %edx 4/r32/esp
10566 (flush _test-output-buffered-file)
10567 (flush _test-error-buffered-file)
10568 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10574
10575 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
10576 (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")
10577
10578 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
10579
10580 81 0/subop/add %esp 8/imm32
10581
10582 5d/pop-to-ebp
10583 c3/return
10584
10585 test-get-with-wrong-output-type-5:
10586
10587 55/push-ebp
10588 89/<- %ebp 4/r32/esp
10589
10590 (clear-stream _test-input-stream)
10591 (clear-stream $_test-input-buffered-file->buffer)
10592 (clear-stream _test-output-stream)
10593 (clear-stream $_test-output-buffered-file->buffer)
10594
10595 (write _test-input-stream "fn foo {\n")
10596 (write _test-input-stream " var a: t\n")
10597 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
10598 (write _test-input-stream "}\n")
10599 (write _test-input-stream "type t {\n")
10600 (write _test-input-stream " x: (handle int)\n")
10601 (write _test-input-stream "}\n")
10602
10603 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10604 (flush _test-output-buffered-file)
10605
10606
10607 89/<- %esp 5/r32/ebp
10608 5d/pop-to-ebp
10609 c3/return
10610
10611 test-get-with-too-few-inouts:
10612
10613 55/push-ebp
10614 89/<- %ebp 4/r32/esp
10615
10616 (clear-stream _test-input-stream)
10617 (clear-stream $_test-input-buffered-file->buffer)
10618 (clear-stream _test-output-stream)
10619 (clear-stream $_test-output-buffered-file->buffer)
10620 (clear-stream _test-error-stream)
10621 (clear-stream $_test-error-buffered-file->buffer)
10622
10623 68/push 0/imm32
10624 68/push 0/imm32
10625 89/<- %edx 4/r32/esp
10626 (tailor-exit-descriptor %edx 0x10)
10627
10628 (write _test-input-stream "fn foo {\n")
10629 (write _test-input-stream " var a: t\n")
10630 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
10631 (write _test-input-stream "}\n")
10632 (write _test-input-stream "type t {\n")
10633 (write _test-input-stream " x: int\n")
10634 (write _test-input-stream "}\n")
10635
10636 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10637
10638
10639 89/<- %edx 4/r32/esp
10640 (flush _test-output-buffered-file)
10641 (flush _test-error-buffered-file)
10642 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10648
10649 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
10650 (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")
10651
10652 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
10653
10654 81 0/subop/add %esp 8/imm32
10655
10656 5d/pop-to-ebp
10657 c3/return
10658
10659 test-get-with-too-many-inouts:
10660
10661 55/push-ebp
10662 89/<- %ebp 4/r32/esp
10663
10664 (clear-stream _test-input-stream)
10665 (clear-stream $_test-input-buffered-file->buffer)
10666 (clear-stream _test-output-stream)
10667 (clear-stream $_test-output-buffered-file->buffer)
10668 (clear-stream _test-error-stream)
10669 (clear-stream $_test-error-buffered-file->buffer)
10670
10671 68/push 0/imm32
10672 68/push 0/imm32
10673 89/<- %edx 4/r32/esp
10674 (tailor-exit-descriptor %edx 0x10)
10675
10676 (write _test-input-stream "fn foo {\n")
10677 (write _test-input-stream " var a: t\n")
10678 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
10679 (write _test-input-stream "}\n")
10680 (write _test-input-stream "type t {\n")
10681 (write _test-input-stream " x: int\n")
10682 (write _test-input-stream "}\n")
10683
10684 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10685
10686
10687 89/<- %edx 4/r32/esp
10688 (flush _test-output-buffered-file)
10689 (flush _test-error-buffered-file)
10690 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10696
10697 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
10698 (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")
10699
10700 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
10701
10702 81 0/subop/add %esp 8/imm32
10703
10704 5d/pop-to-ebp
10705 c3/return
10706
10707 test-get-with-no-output:
10708
10709 55/push-ebp
10710 89/<- %ebp 4/r32/esp
10711
10712 (clear-stream _test-input-stream)
10713 (clear-stream $_test-input-buffered-file->buffer)
10714 (clear-stream _test-output-stream)
10715 (clear-stream $_test-output-buffered-file->buffer)
10716 (clear-stream _test-error-stream)
10717 (clear-stream $_test-error-buffered-file->buffer)
10718
10719 68/push 0/imm32
10720 68/push 0/imm32
10721 89/<- %edx 4/r32/esp
10722 (tailor-exit-descriptor %edx 0x10)
10723
10724 (write _test-input-stream "fn foo {\n")
10725 (write _test-input-stream " var a: t\n")
10726 (write _test-input-stream " get a, x\n")
10727 (write _test-input-stream "}\n")
10728 (write _test-input-stream "type t {\n")
10729 (write _test-input-stream " x: int\n")
10730 (write _test-input-stream "}\n")
10731
10732 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10733
10734
10735 89/<- %edx 4/r32/esp
10736 (flush _test-output-buffered-file)
10737 (flush _test-error-buffered-file)
10738 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10744
10745 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
10746 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
10747
10748 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
10749
10750 81 0/subop/add %esp 8/imm32
10751
10752 5d/pop-to-ebp
10753 c3/return
10754
10755 test-get-with-too-many-outputs:
10756
10757 55/push-ebp
10758 89/<- %ebp 4/r32/esp
10759
10760 (clear-stream _test-input-stream)
10761 (clear-stream $_test-input-buffered-file->buffer)
10762 (clear-stream _test-output-stream)
10763 (clear-stream $_test-output-buffered-file->buffer)
10764 (clear-stream _test-error-stream)
10765 (clear-stream $_test-error-buffered-file->buffer)
10766
10767 68/push 0/imm32
10768 68/push 0/imm32
10769 89/<- %edx 4/r32/esp
10770 (tailor-exit-descriptor %edx 0x10)
10771
10772 (write _test-input-stream "fn foo {\n")
10773 (write _test-input-stream " var a: t\n")
10774 (write _test-input-stream " var b: int\n")
10775 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
10776 (write _test-input-stream " c, b <- get a, x\n")
10777 (write _test-input-stream "}\n")
10778 (write _test-input-stream "type t {\n")
10779 (write _test-input-stream " x: int\n")
10780 (write _test-input-stream "}\n")
10781
10782 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10783
10784
10785 89/<- %edx 4/r32/esp
10786 (flush _test-output-buffered-file)
10787 (flush _test-error-buffered-file)
10788 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10794
10795 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
10796 (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")
10797
10798 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
10799
10800 81 0/subop/add %esp 8/imm32
10801
10802 5d/pop-to-ebp
10803 c3/return
10804
10805 test-convert-array-of-user-defined-types:
10806
10807 55/push-ebp
10808 89/<- %ebp 4/r32/esp
10809
10810 (clear-stream _test-input-stream)
10811 (clear-stream $_test-input-buffered-file->buffer)
10812 (clear-stream _test-output-stream)
10813 (clear-stream $_test-output-buffered-file->buffer)
10814
10815 (write _test-input-stream "type t {\n")
10816 (write _test-input-stream " x: int\n")
10817 (write _test-input-stream " y: int\n")
10818 (write _test-input-stream "}\n")
10819 (write _test-input-stream "fn foo {\n")
10820 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10821 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
10822 (write _test-input-stream " var x/eax: (addr t) <- index arr, idx\n")
10823 (write _test-input-stream "}\n")
10824
10825 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10826 (flush _test-output-buffered-file)
10827 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10833
10834 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
10835 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
10836 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
10837 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
10838 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
10839 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
10840 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
10841 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
10842 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
10843 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
10844 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 0x00000008 *eax \"foo\" \"arr\")" "F - test-convert-array-of-user-defined-types/10")
10845 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %eax 0/imm32" "F - test-convert-array-of-user-defined-types/12")
10846 (check-next-stream-line-equal _test-output-stream " 0f 84/jump-if-= __mu-abort-null-index-base-address/disp32" "F - test-convert-array-of-user-defined-types/13")
10847 (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/14")
10848 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/15")
10849 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/16")
10850 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/17")
10851 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/18")
10852 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/19")
10853 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/20")
10854 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/21")
10855 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/22")
10856
10857 89/<- %esp 5/r32/ebp
10858 5d/pop-to-ebp
10859 c3/return
10860
10861 test-convert-length-of-array-of-user-defined-types-to-eax:
10862
10863 55/push-ebp
10864 89/<- %ebp 4/r32/esp
10865
10866 (clear-stream _test-input-stream)
10867 (clear-stream $_test-input-buffered-file->buffer)
10868 (clear-stream _test-output-stream)
10869 (clear-stream $_test-output-buffered-file->buffer)
10870
10871 (write _test-input-stream "type t {\n")
10872 (write _test-input-stream " x: int\n")
10873 (write _test-input-stream " y: int\n")
10874 (write _test-input-stream " z: int\n")
10875 (write _test-input-stream "}\n")
10876 (write _test-input-stream "fn foo {\n")
10877 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10878 (write _test-input-stream " var x/eax: int <- length arr\n")
10879 (write _test-input-stream "}\n")
10880
10881 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10882 (flush _test-output-buffered-file)
10883 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10889
10890 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
10891 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
10892 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
10893 (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")
10894 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
10895 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
10896
10897 (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")
10898 (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")
10899
10900 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
10901 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
10902 (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")
10903 (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")
10904 (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")
10905 (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")
10906 (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")
10907 (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")
10908
10909 (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")
10910
10911 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
10912 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
10913 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
10914 (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")
10915 (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")
10916 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
10917
10918 89/<- %esp 5/r32/ebp
10919 5d/pop-to-ebp
10920 c3/return
10921
10922 test-convert-length-of-array-of-user-defined-types-to-ecx:
10923
10924 55/push-ebp
10925 89/<- %ebp 4/r32/esp
10926
10927 (clear-stream _test-input-stream)
10928 (clear-stream $_test-input-buffered-file->buffer)
10929 (clear-stream _test-output-stream)
10930 (clear-stream $_test-output-buffered-file->buffer)
10931
10932 (write _test-input-stream "type t {\n")
10933 (write _test-input-stream " x: int\n")
10934 (write _test-input-stream " y: int\n")
10935 (write _test-input-stream " z: int\n")
10936 (write _test-input-stream "}\n")
10937 (write _test-input-stream "fn foo {\n")
10938 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10939 (write _test-input-stream " var x/ecx: int <- length arr\n")
10940 (write _test-input-stream "}\n")
10941
10942 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10943 (flush _test-output-buffered-file)
10944 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10950
10951 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
10952 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
10953 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
10954 (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")
10955 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
10956 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
10957
10958 (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")
10959 (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")
10960
10961 (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")
10962
10963 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
10964 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
10965 (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")
10966 (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")
10967 (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")
10968 (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")
10969 (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")
10970 (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")
10971 (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")
10972
10973 (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")
10974
10975 (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")
10976
10977 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
10978 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
10979 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
10980 (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")
10981 (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")
10982 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
10983
10984 89/<- %esp 5/r32/ebp
10985 5d/pop-to-ebp
10986 c3/return
10987
10988 test-convert-length-of-array-of-user-defined-types-to-edx:
10989
10990 55/push-ebp
10991 89/<- %ebp 4/r32/esp
10992
10993 (clear-stream _test-input-stream)
10994 (clear-stream $_test-input-buffered-file->buffer)
10995 (clear-stream _test-output-stream)
10996 (clear-stream $_test-output-buffered-file->buffer)
10997
10998 (write _test-input-stream "type t {\n")
10999 (write _test-input-stream " x: int\n")
11000 (write _test-input-stream " y: int\n")
11001 (write _test-input-stream " z: int\n")
11002 (write _test-input-stream "}\n")
11003 (write _test-input-stream "fn foo {\n")
11004 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
11005 (write _test-input-stream " var x/edx: int <- length arr\n")
11006 (write _test-input-stream "}\n")
11007
11008 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11009 (flush _test-output-buffered-file)
11010 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
11016
11017 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
11018 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
11019 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
11020 (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")
11021 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
11022 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
11023
11024 (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")
11025 (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")
11026
11027 (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")
11028
11029 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
11030 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
11031 (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")
11032 (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")
11033 (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")
11034 (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")
11035 (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")
11036 (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")
11037 (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")
11038
11039 (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")
11040
11041 (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")
11042
11043 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
11044 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
11045 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
11046 (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")
11047 (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")
11048 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
11049
11050 89/<- %esp 5/r32/ebp
11051 5d/pop-to-ebp
11052 c3/return
11053
11054 test-convert-length-of-array-of-user-defined-types:
11055
11056 55/push-ebp
11057 89/<- %ebp 4/r32/esp
11058
11059 (clear-stream _test-input-stream)
11060 (clear-stream $_test-input-buffered-file->buffer)
11061 (clear-stream _test-output-stream)
11062 (clear-stream $_test-output-buffered-file->buffer)
11063
11064 (write _test-input-stream "type t {\n")
11065 (write _test-input-stream " x: int\n")
11066 (write _test-input-stream " y: int\n")
11067 (write _test-input-stream " z: int\n")
11068 (write _test-input-stream "}\n")
11069 (write _test-input-stream "fn foo {\n")
11070 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
11071 (write _test-input-stream " var x/ebx: int <- length arr\n")
11072 (write _test-input-stream "}\n")
11073
11074 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
11075 (flush _test-output-buffered-file)
11076 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
11082
11083 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
11084 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
11085 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
11086 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
11087 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
11088 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
11089 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
11090 (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")
11091 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
11092 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
11093 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
11094 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
11095 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
11096 (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")
11097 (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")
11098 (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")
11099 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
11100 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
11101 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
11102 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
11103 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
11104 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
11105 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
11106 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
11107 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
11108 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
11109 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
11110 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
11111
11112 89/<- %esp 5/r32/ebp
11113 5d/pop-to-ebp
11114 c3/return
11115
11116 test-index-with-non-array-atom-base-type:
11117
11118 55/push-ebp
11119 89/<- %ebp 4/r32/esp
11120
11121 (clear-stream _test-input-stream)
11122 (clear-stream $_test-input-buffered-file->buffer)
11123 (clear-stream _test-output-stream)
11124 (clear-stream $_test-output-buffered-file->buffer)
11125 (clear-stream _test-error-stream)
11126 (clear-stream $_test-error-buffered-file->buffer)
11127
11128 68/push 0/imm32
11129 68/push 0/imm32
11130 89/<- %edx 4/r32/esp
11131 (tailor-exit-descriptor %edx 0x10)
11132
11133 (write _test-input-stream "fn foo {\n")
11134 (write _test-input-stream " var a: int\n")
11135 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11136 (write _test-input-stream "}\n")
11137
11138 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11139
11140
11141 89/<- %edx 4/r32/esp
11142 (flush _test-output-buffered-file)
11143 (flush _test-error-buffered-file)
11144 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11150
11151 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-atom-base-type: output should be empty")
11152 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-atom-base-type: error message")
11153
11154 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-atom-base-type: exit status")
11155
11156 81 0/subop/add %esp 8/imm32
11157
11158 5d/pop-to-ebp
11159 c3/return
11160
11161 test-index-with-non-array-compound-base-type:
11162
11163 55/push-ebp
11164 89/<- %ebp 4/r32/esp
11165
11166 (clear-stream _test-input-stream)
11167 (clear-stream $_test-input-buffered-file->buffer)
11168 (clear-stream _test-output-stream)
11169 (clear-stream $_test-output-buffered-file->buffer)
11170 (clear-stream _test-error-stream)
11171 (clear-stream $_test-error-buffered-file->buffer)
11172
11173 68/push 0/imm32
11174 68/push 0/imm32
11175 89/<- %edx 4/r32/esp
11176 (tailor-exit-descriptor %edx 0x10)
11177
11178 (write _test-input-stream "fn foo {\n")
11179 (write _test-input-stream " var a: (handle int)\n")
11180 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11181 (write _test-input-stream "}\n")
11182
11183 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11184
11185
11186 89/<- %edx 4/r32/esp
11187 (flush _test-output-buffered-file)
11188 (flush _test-error-buffered-file)
11189 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11195
11196 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type: output should be empty")
11197 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-compound-base-type: error message")
11198
11199 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type: exit status")
11200
11201 81 0/subop/add %esp 8/imm32
11202
11203 5d/pop-to-ebp
11204 c3/return
11205
11206 test-index-with-non-array-compound-base-type-2:
11207
11208 55/push-ebp
11209 89/<- %ebp 4/r32/esp
11210
11211 (clear-stream _test-input-stream)
11212 (clear-stream $_test-input-buffered-file->buffer)
11213 (clear-stream _test-output-stream)
11214 (clear-stream $_test-output-buffered-file->buffer)
11215 (clear-stream _test-error-stream)
11216 (clear-stream $_test-error-buffered-file->buffer)
11217
11218 68/push 0/imm32
11219 68/push 0/imm32
11220 89/<- %edx 4/r32/esp
11221 (tailor-exit-descriptor %edx 0x10)
11222
11223 (write _test-input-stream "fn foo {\n")
11224 (write _test-input-stream " var a: (addr int)\n")
11225 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11226 (write _test-input-stream "}\n")
11227
11228 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11229
11230
11231 89/<- %edx 4/r32/esp
11232 (flush _test-output-buffered-file)
11233 (flush _test-error-buffered-file)
11234 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11240
11241 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type-2: output should be empty")
11242 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is not an array" "F - test-index-with-non-array-compound-base-type-2: error message")
11243
11244 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type-2: exit status")
11245
11246 81 0/subop/add %esp 8/imm32
11247
11248 5d/pop-to-ebp
11249 c3/return
11250
11251 test-index-with-array-atom-base-type:
11252
11253 55/push-ebp
11254 89/<- %ebp 4/r32/esp
11255
11256 (clear-stream _test-input-stream)
11257 (clear-stream $_test-input-buffered-file->buffer)
11258 (clear-stream _test-output-stream)
11259 (clear-stream $_test-output-buffered-file->buffer)
11260 (clear-stream _test-error-stream)
11261 (clear-stream $_test-error-buffered-file->buffer)
11262
11263 68/push 0/imm32
11264 68/push 0/imm32
11265 89/<- %edx 4/r32/esp
11266 (tailor-exit-descriptor %edx 0x10)
11267
11268 (write _test-input-stream "fn foo {\n")
11269 (write _test-input-stream " var a: array\n")
11270 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11271 (write _test-input-stream "}\n")
11272
11273 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11274
11275
11276 89/<- %edx 4/r32/esp
11277 (flush _test-output-buffered-file)
11278 (flush _test-error-buffered-file)
11279 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11285
11286 (check-stream-equal _test-output-stream "" "F - test-index-with-array-atom-base-type: output should be empty")
11287 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: array 'a' must specify the type of its elements" "F - test-index-with-array-atom-base-type: error message")
11288
11289 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-atom-base-type: exit status")
11290
11291 81 0/subop/add %esp 8/imm32
11292
11293 5d/pop-to-ebp
11294 c3/return
11295
11296 test-index-with-addr-base-on-stack:
11297
11298 55/push-ebp
11299 89/<- %ebp 4/r32/esp
11300
11301 (clear-stream _test-input-stream)
11302 (clear-stream $_test-input-buffered-file->buffer)
11303 (clear-stream _test-output-stream)
11304 (clear-stream $_test-output-buffered-file->buffer)
11305 (clear-stream _test-error-stream)
11306 (clear-stream $_test-error-buffered-file->buffer)
11307
11308 68/push 0/imm32
11309 68/push 0/imm32
11310 89/<- %edx 4/r32/esp
11311 (tailor-exit-descriptor %edx 0x10)
11312
11313 (write _test-input-stream "fn foo {\n")
11314 (write _test-input-stream " var a: (addr array int)\n")
11315 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11316 (write _test-input-stream "}\n")
11317
11318 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11319
11320
11321 89/<- %edx 4/r32/esp
11322 (flush _test-output-buffered-file)
11323 (flush _test-error-buffered-file)
11324 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11330
11331 (check-stream-equal _test-output-stream "" "F - test-index-with-addr-base-on-stack: output should be empty")
11332 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is an addr to an array, and so must live in a register" "F - test-index-with-addr-base-on-stack: error message")
11333
11334 (check-ints-equal *(edx+4) 2 "F - test-index-with-addr-base-on-stack: exit status")
11335
11336 81 0/subop/add %esp 8/imm32
11337
11338 5d/pop-to-ebp
11339 c3/return
11340
11341 test-index-with-wrong-index-type:
11342
11343 55/push-ebp
11344 89/<- %ebp 4/r32/esp
11345
11346 (clear-stream _test-input-stream)
11347 (clear-stream $_test-input-buffered-file->buffer)
11348 (clear-stream _test-output-stream)
11349 (clear-stream $_test-output-buffered-file->buffer)
11350 (clear-stream _test-error-stream)
11351 (clear-stream $_test-error-buffered-file->buffer)
11352
11353 68/push 0/imm32
11354 68/push 0/imm32
11355 89/<- %edx 4/r32/esp
11356 (tailor-exit-descriptor %edx 0x10)
11357
11358 (write _test-input-stream "fn foo {\n")
11359 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11360 (write _test-input-stream " var b: boolean\n")
11361 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11362 (write _test-input-stream "}\n")
11363
11364 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11365
11366
11367 89/<- %edx 4/r32/esp
11368 (flush _test-output-buffered-file)
11369 (flush _test-error-buffered-file)
11370 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11376
11377 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-index-type: output should be empty")
11378 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: second argument 'b' must be an int or offset" "F - test-index-with-wrong-index-type: error message")
11379
11380 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-index-type: exit status")
11381
11382 81 0/subop/add %esp 8/imm32
11383
11384 5d/pop-to-ebp
11385 c3/return
11386
11387 test-index-with-offset-atom-index-type:
11388
11389 55/push-ebp
11390 89/<- %ebp 4/r32/esp
11391
11392 (clear-stream _test-input-stream)
11393 (clear-stream $_test-input-buffered-file->buffer)
11394 (clear-stream _test-output-stream)
11395 (clear-stream $_test-output-buffered-file->buffer)
11396 (clear-stream _test-error-stream)
11397 (clear-stream $_test-error-buffered-file->buffer)
11398
11399 68/push 0/imm32
11400 68/push 0/imm32
11401 89/<- %edx 4/r32/esp
11402 (tailor-exit-descriptor %edx 0x10)
11403
11404 (write _test-input-stream "fn foo {\n")
11405 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11406 (write _test-input-stream " var b: offset\n")
11407 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11408 (write _test-input-stream "}\n")
11409
11410 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11411
11412
11413 89/<- %edx 4/r32/esp
11414 (flush _test-output-buffered-file)
11415 (flush _test-error-buffered-file)
11416 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11422
11423 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-atom-index-type: output should be empty")
11424 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: offset 'b' must specify the type of array elements" "F - test-index-with-offset-atom-index-type: error message")
11425
11426 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-atom-index-type: exit status")
11427
11428 81 0/subop/add %esp 8/imm32
11429
11430 5d/pop-to-ebp
11431 c3/return
11432
11433 test-index-with-offset-on-stack:
11434
11435 55/push-ebp
11436 89/<- %ebp 4/r32/esp
11437
11438 (clear-stream _test-input-stream)
11439 (clear-stream $_test-input-buffered-file->buffer)
11440 (clear-stream _test-output-stream)
11441 (clear-stream $_test-output-buffered-file->buffer)
11442 (clear-stream _test-error-stream)
11443 (clear-stream $_test-error-buffered-file->buffer)
11444
11445 68/push 0/imm32
11446 68/push 0/imm32
11447 89/<- %edx 4/r32/esp
11448 (tailor-exit-descriptor %edx 0x10)
11449
11450 (write _test-input-stream "fn foo {\n")
11451 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11452 (write _test-input-stream " var b: int\n")
11453 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11454 (write _test-input-stream "}\n")
11455
11456 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11457
11458
11459 89/<- %edx 4/r32/esp
11460 (flush _test-output-buffered-file)
11461 (flush _test-error-buffered-file)
11462 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11468
11469 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-on-stack: output should be empty")
11470 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: second argument 'b' must be in a register" "F - test-index-with-offset-on-stack: error message")
11471
11472 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-on-stack: exit status")
11473
11474 81 0/subop/add %esp 8/imm32
11475
11476 5d/pop-to-ebp
11477 c3/return
11478
11479 test-index-needs-offset-type:
11480
11481 55/push-ebp
11482 89/<- %ebp 4/r32/esp
11483
11484 (clear-stream _test-input-stream)
11485 (clear-stream $_test-input-buffered-file->buffer)
11486 (clear-stream _test-output-stream)
11487 (clear-stream $_test-output-buffered-file->buffer)
11488 (clear-stream _test-error-stream)
11489 (clear-stream $_test-error-buffered-file->buffer)
11490
11491 68/push 0/imm32
11492 68/push 0/imm32
11493 89/<- %edx 4/r32/esp
11494 (tailor-exit-descriptor %edx 0x10)
11495
11496 (write _test-input-stream "fn foo {\n")
11497 (write _test-input-stream " var a/eax: (addr array t) <- copy 0\n")
11498 (write _test-input-stream " var b/ebx: int <- copy 0\n")
11499 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11500 (write _test-input-stream "}\n")
11501 (write _test-input-stream "type t {\n")
11502 (write _test-input-stream " x: int\n")
11503 (write _test-input-stream " y: int\n")
11504 (write _test-input-stream " z: int\n")
11505 (write _test-input-stream "}\n")
11506
11507 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11508
11509
11510 89/<- %edx 4/r32/esp
11511 (flush _test-output-buffered-file)
11512 (flush _test-error-buffered-file)
11513 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11519
11520 (check-stream-equal _test-output-stream "" "F - test-index-needs-offset-type: output should be empty")
11521 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: cannot take an int for array 'a'; create an offset instead. See mu.md for details." "F - test-index-needs-offset-type: error message")
11522
11523 (check-ints-equal *(edx+4) 2 "F - test-index-needs-offset-type: exit status")
11524
11525 81 0/subop/add %esp 8/imm32
11526
11527 5d/pop-to-ebp
11528 c3/return
11529
11530 test-index-with-output-not-address:
11531
11532 55/push-ebp
11533 89/<- %ebp 4/r32/esp
11534
11535 (clear-stream _test-input-stream)
11536 (clear-stream $_test-input-buffered-file->buffer)
11537 (clear-stream _test-output-stream)
11538 (clear-stream $_test-output-buffered-file->buffer)
11539 (clear-stream _test-error-stream)
11540 (clear-stream $_test-error-buffered-file->buffer)
11541
11542 68/push 0/imm32
11543 68/push 0/imm32
11544 89/<- %edx 4/r32/esp
11545 (tailor-exit-descriptor %edx 0x10)
11546
11547 (write _test-input-stream "fn foo {\n")
11548 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11549 (write _test-input-stream " var o/edi: int <- index a, 0\n")
11550 (write _test-input-stream "}\n")
11551
11552 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11553
11554
11555 89/<- %edx 4/r32/esp
11556 (flush _test-output-buffered-file)
11557 (flush _test-error-buffered-file)
11558 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11564
11565 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address: output should be empty")
11566 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' must be an addr" "F - test-index-with-output-not-address: error message")
11567
11568 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address: exit status")
11569
11570 81 0/subop/add %esp 8/imm32
11571
11572 5d/pop-to-ebp
11573 c3/return
11574
11575 test-index-with-output-not-address-2:
11576
11577 55/push-ebp
11578 89/<- %ebp 4/r32/esp
11579
11580 (clear-stream _test-input-stream)
11581 (clear-stream $_test-input-buffered-file->buffer)
11582 (clear-stream _test-output-stream)
11583 (clear-stream $_test-output-buffered-file->buffer)
11584 (clear-stream _test-error-stream)
11585 (clear-stream $_test-error-buffered-file->buffer)
11586
11587 68/push 0/imm32
11588 68/push 0/imm32
11589 89/<- %edx 4/r32/esp
11590 (tailor-exit-descriptor %edx 0x10)
11591
11592 (write _test-input-stream "fn foo {\n")
11593 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11594 (write _test-input-stream " var o/edi: (int) <- index a, 0\n")
11595 (write _test-input-stream "}\n")
11596
11597 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11598
11599
11600 89/<- %edx 4/r32/esp
11601 (flush _test-output-buffered-file)
11602 (flush _test-error-buffered-file)
11603 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11609
11610 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address-2: output should be empty")
11611 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' must be an addr" "F - test-index-with-output-not-address-2: error message")
11612
11613 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address-2: exit status")
11614
11615 81 0/subop/add %esp 8/imm32
11616
11617 5d/pop-to-ebp
11618 c3/return
11619
11620 test-index-with-wrong-output-type:
11621
11622 55/push-ebp
11623 89/<- %ebp 4/r32/esp
11624
11625 (clear-stream _test-input-stream)
11626 (clear-stream $_test-input-buffered-file->buffer)
11627 (clear-stream _test-output-stream)
11628 (clear-stream $_test-output-buffered-file->buffer)
11629 (clear-stream _test-error-stream)
11630 (clear-stream $_test-error-buffered-file->buffer)
11631
11632 68/push 0/imm32
11633 68/push 0/imm32
11634 89/<- %edx 4/r32/esp
11635 (tailor-exit-descriptor %edx 0x10)
11636
11637 (write _test-input-stream "fn foo {\n")
11638 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11639 (write _test-input-stream " var o/edi: (addr int) <- index a, 0\n")
11640 (write _test-input-stream "}\n")
11641
11642 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11643
11644
11645 89/<- %edx 4/r32/esp
11646 (flush _test-output-buffered-file)
11647 (flush _test-error-buffered-file)
11648 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11654
11655 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-type: output should be empty")
11656 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' does not have the right type" "F - test-index-with-wrong-output-type: error message")
11657
11658 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-type: exit status")
11659
11660 81 0/subop/add %esp 8/imm32
11661
11662 5d/pop-to-ebp
11663 c3/return
11664
11665 test-index-with-wrong-output-compound-type:
11666
11667 55/push-ebp
11668 89/<- %ebp 4/r32/esp
11669
11670 (clear-stream _test-input-stream)
11671 (clear-stream $_test-input-buffered-file->buffer)
11672 (clear-stream _test-output-stream)
11673 (clear-stream $_test-output-buffered-file->buffer)
11674 (clear-stream _test-error-stream)
11675 (clear-stream $_test-error-buffered-file->buffer)
11676
11677 68/push 0/imm32
11678 68/push 0/imm32
11679 89/<- %edx 4/r32/esp
11680 (tailor-exit-descriptor %edx 0x10)
11681
11682 (write _test-input-stream "fn foo {\n")
11683 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
11684 (write _test-input-stream " var o/edi: (addr handle int) <- index a, 0\n")
11685 (write _test-input-stream "}\n")
11686
11687 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11688
11689
11690 89/<- %edx 4/r32/esp
11691 (flush _test-output-buffered-file)
11692 (flush _test-error-buffered-file)
11693 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11699
11700 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-compound-type: output should be empty")
11701 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: output 'o' does not have the right type" "F - test-index-with-wrong-output-compound-type: error message")
11702
11703 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-compound-type: exit status")
11704
11705 81 0/subop/add %esp 8/imm32
11706
11707 5d/pop-to-ebp
11708 c3/return
11709
11710 test-index-with-no-inouts:
11711
11712 55/push-ebp
11713 89/<- %ebp 4/r32/esp
11714
11715 (clear-stream _test-input-stream)
11716 (clear-stream $_test-input-buffered-file->buffer)
11717 (clear-stream _test-output-stream)
11718 (clear-stream $_test-output-buffered-file->buffer)
11719 (clear-stream _test-error-stream)
11720 (clear-stream $_test-error-buffered-file->buffer)
11721
11722 68/push 0/imm32
11723 68/push 0/imm32
11724 89/<- %edx 4/r32/esp
11725 (tailor-exit-descriptor %edx 0x10)
11726
11727 (write _test-input-stream "fn foo {\n")
11728 (write _test-input-stream " var c/ecx: (addr int) <- index\n")
11729 (write _test-input-stream "}\n")
11730
11731 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11732
11733
11734 89/<- %edx 4/r32/esp
11735 (flush _test-output-buffered-file)
11736 (flush _test-error-buffered-file)
11737 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11743
11744 (check-stream-equal _test-output-stream "" "F - test-index-with-no-inouts: output should be empty")
11745 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too few inouts (2 required)" "F - test-index-with-no-inouts: error message")
11746
11747 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-inouts: exit status")
11748
11749 81 0/subop/add %esp 8/imm32
11750
11751 5d/pop-to-ebp
11752 c3/return
11753
11754 test-index-with-too-few-inouts:
11755
11756 55/push-ebp
11757 89/<- %ebp 4/r32/esp
11758
11759 (clear-stream _test-input-stream)
11760 (clear-stream $_test-input-buffered-file->buffer)
11761 (clear-stream _test-output-stream)
11762 (clear-stream $_test-output-buffered-file->buffer)
11763 (clear-stream _test-error-stream)
11764 (clear-stream $_test-error-buffered-file->buffer)
11765
11766 68/push 0/imm32
11767 68/push 0/imm32
11768 89/<- %edx 4/r32/esp
11769 (tailor-exit-descriptor %edx 0x10)
11770
11771 (write _test-input-stream "fn foo {\n")
11772 (write _test-input-stream " var a: (array int 3)\n")
11773 (write _test-input-stream " var c/ecx: (addr int) <- index a\n")
11774 (write _test-input-stream "}\n")
11775
11776 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11777
11778
11779 89/<- %edx 4/r32/esp
11780 (flush _test-output-buffered-file)
11781 (flush _test-error-buffered-file)
11782 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11788
11789 (check-stream-equal _test-output-stream "" "F - test-index-with-too-few-inouts: output should be empty")
11790 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too few inouts (2 required)" "F - test-index-with-too-few-inouts: error message")
11791
11792 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-few-inouts: exit status")
11793
11794 81 0/subop/add %esp 8/imm32
11795
11796 5d/pop-to-ebp
11797 c3/return
11798
11799 test-index-with-too-many-inouts:
11800
11801 55/push-ebp
11802 89/<- %ebp 4/r32/esp
11803
11804 (clear-stream _test-input-stream)
11805 (clear-stream $_test-input-buffered-file->buffer)
11806 (clear-stream _test-output-stream)
11807 (clear-stream $_test-output-buffered-file->buffer)
11808 (clear-stream _test-error-stream)
11809 (clear-stream $_test-error-buffered-file->buffer)
11810
11811 68/push 0/imm32
11812 68/push 0/imm32
11813 89/<- %edx 4/r32/esp
11814 (tailor-exit-descriptor %edx 0x10)
11815
11816 (write _test-input-stream "fn foo {\n")
11817 (write _test-input-stream " var a: (array int 3)\n")
11818 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0, 0\n")
11819 (write _test-input-stream "}\n")
11820
11821 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11822
11823
11824 89/<- %edx 4/r32/esp
11825 (flush _test-output-buffered-file)
11826 (flush _test-error-buffered-file)
11827 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11833
11834 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-inouts: output should be empty")
11835 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too many inouts (2 required)" "F - test-index-with-too-many-inouts: error message")
11836
11837 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-inouts: exit status")
11838
11839 81 0/subop/add %esp 8/imm32
11840
11841 5d/pop-to-ebp
11842 c3/return
11843
11844 test-index-with-no-output:
11845
11846 55/push-ebp
11847 89/<- %ebp 4/r32/esp
11848
11849 (clear-stream _test-input-stream)
11850 (clear-stream $_test-input-buffered-file->buffer)
11851 (clear-stream _test-output-stream)
11852 (clear-stream $_test-output-buffered-file->buffer)
11853 (clear-stream _test-error-stream)
11854 (clear-stream $_test-error-buffered-file->buffer)
11855
11856 68/push 0/imm32
11857 68/push 0/imm32
11858 89/<- %edx 4/r32/esp
11859 (tailor-exit-descriptor %edx 0x10)
11860
11861 (write _test-input-stream "fn foo {\n")
11862 (write _test-input-stream " var a: (array int 3)\n")
11863 (write _test-input-stream " index a, 0\n")
11864 (write _test-input-stream "}\n")
11865
11866 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11867
11868
11869 89/<- %edx 4/r32/esp
11870 (flush _test-output-buffered-file)
11871 (flush _test-error-buffered-file)
11872 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11878
11879 (check-stream-equal _test-output-stream "" "F - test-index-with-no-output: output should be empty")
11880 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: must have an output" "F - test-index-with-no-output: error message")
11881
11882 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-output: exit status")
11883
11884 81 0/subop/add %esp 8/imm32
11885
11886 5d/pop-to-ebp
11887 c3/return
11888
11889 test-index-with-too-many-outputs:
11890
11891 55/push-ebp
11892 89/<- %ebp 4/r32/esp
11893
11894 (clear-stream _test-input-stream)
11895 (clear-stream $_test-input-buffered-file->buffer)
11896 (clear-stream _test-output-stream)
11897 (clear-stream $_test-output-buffered-file->buffer)
11898 (clear-stream _test-error-stream)
11899 (clear-stream $_test-error-buffered-file->buffer)
11900
11901 68/push 0/imm32
11902 68/push 0/imm32
11903 89/<- %edx 4/r32/esp
11904 (tailor-exit-descriptor %edx 0x10)
11905
11906 (write _test-input-stream "fn foo {\n")
11907 (write _test-input-stream " var a: (array int 3)\n")
11908 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
11909 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
11910 (write _test-input-stream " b, c <- index a, 0\n")
11911 (write _test-input-stream "}\n")
11912
11913 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11914
11915
11916 89/<- %edx 4/r32/esp
11917 (flush _test-output-buffered-file)
11918 (flush _test-error-buffered-file)
11919 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11925
11926 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-outputs: output should be empty")
11927 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: too many outputs (1 required)" "F - test-index-with-too-many-outputs: error message")
11928
11929 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-outputs: exit status")
11930
11931 81 0/subop/add %esp 8/imm32
11932
11933 5d/pop-to-ebp
11934 c3/return
11935
11936 test-compute-offset-with-non-array-atom-base-type:
11937
11938 55/push-ebp
11939 89/<- %ebp 4/r32/esp
11940
11941 (clear-stream _test-input-stream)
11942 (clear-stream $_test-input-buffered-file->buffer)
11943 (clear-stream _test-output-stream)
11944 (clear-stream $_test-output-buffered-file->buffer)
11945 (clear-stream _test-error-stream)
11946 (clear-stream $_test-error-buffered-file->buffer)
11947
11948 68/push 0/imm32
11949 68/push 0/imm32
11950 89/<- %edx 4/r32/esp
11951 (tailor-exit-descriptor %edx 0x10)
11952
11953 (write _test-input-stream "fn foo {\n")
11954 (write _test-input-stream " var a: int\n")
11955 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
11956 (write _test-input-stream "}\n")
11957
11958 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11959
11960
11961 89/<- %edx 4/r32/esp
11962 (flush _test-output-buffered-file)
11963 (flush _test-error-buffered-file)
11964 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11970
11971 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-atom-base-type: output should be empty")
11972 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-atom-base-type: error message")
11973
11974 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-atom-base-type: exit status")
11975
11976 81 0/subop/add %esp 8/imm32
11977
11978 5d/pop-to-ebp
11979 c3/return
11980
11981 test-compute-offset-with-non-array-compound-base-type:
11982
11983 55/push-ebp
11984 89/<- %ebp 4/r32/esp
11985
11986 (clear-stream _test-input-stream)
11987 (clear-stream $_test-input-buffered-file->buffer)
11988 (clear-stream _test-output-stream)
11989 (clear-stream $_test-output-buffered-file->buffer)
11990 (clear-stream _test-error-stream)
11991 (clear-stream $_test-error-buffered-file->buffer)
11992
11993 68/push 0/imm32
11994 68/push 0/imm32
11995 89/<- %edx 4/r32/esp
11996 (tailor-exit-descriptor %edx 0x10)
11997
11998 (write _test-input-stream "fn foo {\n")
11999 (write _test-input-stream " var a: (handle int)\n")
12000 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
12001 (write _test-input-stream "}\n")
12002
12003 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12004
12005
12006 89/<- %edx 4/r32/esp
12007 (flush _test-output-buffered-file)
12008 (flush _test-error-buffered-file)
12009 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12015
12016 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type: output should be empty")
12017 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-compound-base-type: error message")
12018
12019 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type: exit status")
12020
12021 81 0/subop/add %esp 8/imm32
12022
12023 5d/pop-to-ebp
12024 c3/return
12025
12026 test-compute-offset-with-non-array-compound-base-type-2:
12027
12028 55/push-ebp
12029 89/<- %ebp 4/r32/esp
12030
12031 (clear-stream _test-input-stream)
12032 (clear-stream $_test-input-buffered-file->buffer)
12033 (clear-stream _test-output-stream)
12034 (clear-stream $_test-output-buffered-file->buffer)
12035 (clear-stream _test-error-stream)
12036 (clear-stream $_test-error-buffered-file->buffer)
12037
12038 68/push 0/imm32
12039 68/push 0/imm32
12040 89/<- %edx 4/r32/esp
12041 (tailor-exit-descriptor %edx 0x10)
12042
12043 (write _test-input-stream "fn foo {\n")
12044 (write _test-input-stream " var a: (addr int)\n")
12045 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
12046 (write _test-input-stream "}\n")
12047
12048 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12049
12050
12051 89/<- %edx 4/r32/esp
12052 (flush _test-output-buffered-file)
12053 (flush _test-error-buffered-file)
12054 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12060
12061 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type-2: output should be empty")
12062 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: var 'a' is not an array" "F - test-compute-offset-with-non-array-compound-base-type-2: error message")
12063
12064 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type-2: exit status")
12065
12066 81 0/subop/add %esp 8/imm32
12067
12068 5d/pop-to-ebp
12069 c3/return
12070
12071 test-compute-offset-with-array-atom-base-type:
12072
12073 55/push-ebp
12074 89/<- %ebp 4/r32/esp
12075
12076 (clear-stream _test-input-stream)
12077 (clear-stream $_test-input-buffered-file->buffer)
12078 (clear-stream _test-output-stream)
12079 (clear-stream $_test-output-buffered-file->buffer)
12080 (clear-stream _test-error-stream)
12081 (clear-stream $_test-error-buffered-file->buffer)
12082
12083 68/push 0/imm32
12084 68/push 0/imm32
12085 89/<- %edx 4/r32/esp
12086 (tailor-exit-descriptor %edx 0x10)
12087
12088 (write _test-input-stream "fn foo {\n")
12089 (write _test-input-stream " var a: array\n")
12090 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
12091 (write _test-input-stream "}\n")
12092
12093 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12094
12095
12096 89/<- %edx 4/r32/esp
12097 (flush _test-output-buffered-file)
12098 (flush _test-error-buffered-file)
12099 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12105
12106 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-array-atom-base-type: output should be empty")
12107 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: array 'a' must specify the type of its elements" "F - test-compute-offset-with-array-atom-base-type: error message")
12108
12109 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-array-atom-base-type: exit status")
12110
12111 81 0/subop/add %esp 8/imm32
12112
12113 5d/pop-to-ebp
12114 c3/return
12115
12116 test-compute-offset-with-wrong-index-type:
12117
12118 55/push-ebp
12119 89/<- %ebp 4/r32/esp
12120
12121 (clear-stream _test-input-stream)
12122 (clear-stream $_test-input-buffered-file->buffer)
12123 (clear-stream _test-output-stream)
12124 (clear-stream $_test-output-buffered-file->buffer)
12125 (clear-stream _test-error-stream)
12126 (clear-stream $_test-error-buffered-file->buffer)
12127
12128 68/push 0/imm32
12129 68/push 0/imm32
12130 89/<- %edx 4/r32/esp
12131 (tailor-exit-descriptor %edx 0x10)
12132
12133 (write _test-input-stream "fn foo {\n")
12134 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
12135 (write _test-input-stream " var b: boolean\n")
12136 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, b\n")
12137 (write _test-input-stream "}\n")
12138
12139 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12140
12141
12142 89/<- %edx 4/r32/esp
12143 (flush _test-output-buffered-file)
12144 (flush _test-error-buffered-file)
12145 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12151
12152 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-index-type: output should be empty")
12153 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: second argument 'b' must be an int" "F - test-compute-offset-with-wrong-index-type: error message")
12154
12155 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-index-type: exit status")
12156
12157 81 0/subop/add %esp 8/imm32
12158
12159 5d/pop-to-ebp
12160 c3/return
12161
12162 test-compute-offset-with-output-not-offset:
12163
12164 55/push-ebp
12165 89/<- %ebp 4/r32/esp
12166
12167 (clear-stream _test-input-stream)
12168 (clear-stream $_test-input-buffered-file->buffer)
12169 (clear-stream _test-output-stream)
12170 (clear-stream $_test-output-buffered-file->buffer)
12171 (clear-stream _test-error-stream)
12172 (clear-stream $_test-error-buffered-file->buffer)
12173
12174 68/push 0/imm32
12175 68/push 0/imm32
12176 89/<- %edx 4/r32/esp
12177 (tailor-exit-descriptor %edx 0x10)
12178
12179 (write _test-input-stream "fn foo {\n")
12180 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12181 (write _test-input-stream " var o/edi: int <- compute-offset a, 0\n")
12182 (write _test-input-stream "}\n")
12183
12184 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12185
12186
12187 89/<- %edx 4/r32/esp
12188 (flush _test-output-buffered-file)
12189 (flush _test-error-buffered-file)
12190 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12196
12197 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-offset: output should be empty")
12198 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' must be an offset" "F - test-compute-offset-with-output-not-offset: error message")
12199
12200 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-offset: exit status")
12201
12202 81 0/subop/add %esp 8/imm32
12203
12204 5d/pop-to-ebp
12205 c3/return
12206
12207 test-compute-offset-with-output-not-address-2:
12208
12209 55/push-ebp
12210 89/<- %ebp 4/r32/esp
12211
12212 (clear-stream _test-input-stream)
12213 (clear-stream $_test-input-buffered-file->buffer)
12214 (clear-stream _test-output-stream)
12215 (clear-stream $_test-output-buffered-file->buffer)
12216 (clear-stream _test-error-stream)
12217 (clear-stream $_test-error-buffered-file->buffer)
12218
12219 68/push 0/imm32
12220 68/push 0/imm32
12221 89/<- %edx 4/r32/esp
12222 (tailor-exit-descriptor %edx 0x10)
12223
12224 (write _test-input-stream "fn foo {\n")
12225 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12226 (write _test-input-stream " var o/edi: (int) <- compute-offset a, 0\n")
12227 (write _test-input-stream "}\n")
12228
12229 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12230
12231
12232 89/<- %edx 4/r32/esp
12233 (flush _test-output-buffered-file)
12234 (flush _test-error-buffered-file)
12235 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12241
12242 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-address-2: output should be empty")
12243 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' must be an offset" "F - test-compute-offset-with-output-not-address-2: error message")
12244
12245 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-address-2: exit status")
12246
12247 81 0/subop/add %esp 8/imm32
12248
12249 5d/pop-to-ebp
12250 c3/return
12251
12252 test-compute-offset-with-wrong-output-type:
12253
12254 55/push-ebp
12255 89/<- %ebp 4/r32/esp
12256
12257 (clear-stream _test-input-stream)
12258 (clear-stream $_test-input-buffered-file->buffer)
12259 (clear-stream _test-output-stream)
12260 (clear-stream $_test-output-buffered-file->buffer)
12261 (clear-stream _test-error-stream)
12262 (clear-stream $_test-error-buffered-file->buffer)
12263
12264 68/push 0/imm32
12265 68/push 0/imm32
12266 89/<- %edx 4/r32/esp
12267 (tailor-exit-descriptor %edx 0x10)
12268
12269 (write _test-input-stream "fn foo {\n")
12270 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12271 (write _test-input-stream " var o/edi: (offset int) <- compute-offset a, 0\n")
12272 (write _test-input-stream "}\n")
12273
12274 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12275
12276
12277 89/<- %edx 4/r32/esp
12278 (flush _test-output-buffered-file)
12279 (flush _test-error-buffered-file)
12280 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12286
12287 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-type: output should be empty")
12288 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' does not have the right type" "F - test-compute-offset-with-wrong-output-type: error message")
12289
12290 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-type: exit status")
12291
12292 81 0/subop/add %esp 8/imm32
12293
12294 5d/pop-to-ebp
12295 c3/return
12296
12297 test-compute-offset-with-wrong-output-compound-type:
12298
12299 55/push-ebp
12300 89/<- %ebp 4/r32/esp
12301
12302 (clear-stream _test-input-stream)
12303 (clear-stream $_test-input-buffered-file->buffer)
12304 (clear-stream _test-output-stream)
12305 (clear-stream $_test-output-buffered-file->buffer)
12306 (clear-stream _test-error-stream)
12307 (clear-stream $_test-error-buffered-file->buffer)
12308
12309 68/push 0/imm32
12310 68/push 0/imm32
12311 89/<- %edx 4/r32/esp
12312 (tailor-exit-descriptor %edx 0x10)
12313
12314 (write _test-input-stream "fn foo {\n")
12315 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
12316 (write _test-input-stream " var o/edi: (offset handle int) <- compute-offset a, 0\n")
12317 (write _test-input-stream "}\n")
12318
12319 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12320
12321
12322 89/<- %edx 4/r32/esp
12323 (flush _test-output-buffered-file)
12324 (flush _test-error-buffered-file)
12325 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12331
12332 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-compound-type: output should be empty")
12333 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: output 'o' does not have the right type" "F - test-compute-offset-with-wrong-output-compound-type: error message")
12334
12335 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-compound-type: exit status")
12336
12337 81 0/subop/add %esp 8/imm32
12338
12339 5d/pop-to-ebp
12340 c3/return
12341
12342 test-compute-offset-with-no-inouts:
12343
12344 55/push-ebp
12345 89/<- %ebp 4/r32/esp
12346
12347 (clear-stream _test-input-stream)
12348 (clear-stream $_test-input-buffered-file->buffer)
12349 (clear-stream _test-output-stream)
12350 (clear-stream $_test-output-buffered-file->buffer)
12351 (clear-stream _test-error-stream)
12352 (clear-stream $_test-error-buffered-file->buffer)
12353
12354 68/push 0/imm32
12355 68/push 0/imm32
12356 89/<- %edx 4/r32/esp
12357 (tailor-exit-descriptor %edx 0x10)
12358
12359 (write _test-input-stream "fn foo {\n")
12360 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset\n")
12361 (write _test-input-stream "}\n")
12362
12363 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12364
12365
12366 89/<- %edx 4/r32/esp
12367 (flush _test-output-buffered-file)
12368 (flush _test-error-buffered-file)
12369 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12375
12376 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-inouts: output should be empty")
12377 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too few inouts (2 required)" "F - test-compute-offset-with-no-inouts: error message")
12378
12379 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-inouts: exit status")
12380
12381 81 0/subop/add %esp 8/imm32
12382
12383 5d/pop-to-ebp
12384 c3/return
12385
12386 test-compute-offset-with-too-few-inouts:
12387
12388 55/push-ebp
12389 89/<- %ebp 4/r32/esp
12390
12391 (clear-stream _test-input-stream)
12392 (clear-stream $_test-input-buffered-file->buffer)
12393 (clear-stream _test-output-stream)
12394 (clear-stream $_test-output-buffered-file->buffer)
12395 (clear-stream _test-error-stream)
12396 (clear-stream $_test-error-buffered-file->buffer)
12397
12398 68/push 0/imm32
12399 68/push 0/imm32
12400 89/<- %edx 4/r32/esp
12401 (tailor-exit-descriptor %edx 0x10)
12402
12403 (write _test-input-stream "fn foo {\n")
12404 (write _test-input-stream " var a: (array int 3)\n")
12405 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a\n")
12406 (write _test-input-stream "}\n")
12407
12408 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12409
12410
12411 89/<- %edx 4/r32/esp
12412 (flush _test-output-buffered-file)
12413 (flush _test-error-buffered-file)
12414 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12420
12421 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-few-inouts: output should be empty")
12422 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too few inouts (2 required)" "F - test-compute-offset-with-too-few-inouts: error message")
12423
12424 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-few-inouts: exit status")
12425
12426 81 0/subop/add %esp 8/imm32
12427
12428 5d/pop-to-ebp
12429 c3/return
12430
12431 test-compute-offset-with-too-many-inouts:
12432
12433 55/push-ebp
12434 89/<- %ebp 4/r32/esp
12435
12436 (clear-stream _test-input-stream)
12437 (clear-stream $_test-input-buffered-file->buffer)
12438 (clear-stream _test-output-stream)
12439 (clear-stream $_test-output-buffered-file->buffer)
12440 (clear-stream _test-error-stream)
12441 (clear-stream $_test-error-buffered-file->buffer)
12442
12443 68/push 0/imm32
12444 68/push 0/imm32
12445 89/<- %edx 4/r32/esp
12446 (tailor-exit-descriptor %edx 0x10)
12447
12448 (write _test-input-stream "fn foo {\n")
12449 (write _test-input-stream " var a: (array int 3)\n")
12450 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0, 0\n")
12451 (write _test-input-stream "}\n")
12452
12453 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12454
12455
12456 89/<- %edx 4/r32/esp
12457 (flush _test-output-buffered-file)
12458 (flush _test-error-buffered-file)
12459 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12465
12466 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-inouts: output should be empty")
12467 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too many inouts (2 required)" "F - test-compute-offset-with-too-many-inouts: error message")
12468
12469 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-inouts: exit status")
12470
12471 81 0/subop/add %esp 8/imm32
12472
12473 5d/pop-to-ebp
12474 c3/return
12475
12476 test-compute-offset-with-no-output:
12477
12478 55/push-ebp
12479 89/<- %ebp 4/r32/esp
12480
12481 (clear-stream _test-input-stream)
12482 (clear-stream $_test-input-buffered-file->buffer)
12483 (clear-stream _test-output-stream)
12484 (clear-stream $_test-output-buffered-file->buffer)
12485 (clear-stream _test-error-stream)
12486 (clear-stream $_test-error-buffered-file->buffer)
12487
12488 68/push 0/imm32
12489 68/push 0/imm32
12490 89/<- %edx 4/r32/esp
12491 (tailor-exit-descriptor %edx 0x10)
12492
12493 (write _test-input-stream "fn foo {\n")
12494 (write _test-input-stream " var a: (array int 3)\n")
12495 (write _test-input-stream " compute-offset a, 0\n")
12496 (write _test-input-stream "}\n")
12497
12498 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12499
12500
12501 89/<- %edx 4/r32/esp
12502 (flush _test-output-buffered-file)
12503 (flush _test-error-buffered-file)
12504 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12510
12511 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-output: output should be empty")
12512 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: must have an output" "F - test-compute-offset-with-no-output: error message")
12513
12514 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-output: exit status")
12515
12516 81 0/subop/add %esp 8/imm32
12517
12518 5d/pop-to-ebp
12519 c3/return
12520
12521 test-compute-offset-with-too-many-outputs:
12522
12523 55/push-ebp
12524 89/<- %ebp 4/r32/esp
12525
12526 (clear-stream _test-input-stream)
12527 (clear-stream $_test-input-buffered-file->buffer)
12528 (clear-stream _test-output-stream)
12529 (clear-stream $_test-output-buffered-file->buffer)
12530 (clear-stream _test-error-stream)
12531 (clear-stream $_test-error-buffered-file->buffer)
12532
12533 68/push 0/imm32
12534 68/push 0/imm32
12535 89/<- %edx 4/r32/esp
12536 (tailor-exit-descriptor %edx 0x10)
12537
12538 (write _test-input-stream "fn foo {\n")
12539 (write _test-input-stream " var a: (array int 3)\n")
12540 (write _test-input-stream " var b/eax: (offset int) <- compute-offset a, 0\n")
12541 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
12542 (write _test-input-stream " b, c <- compute-offset a, 0\n")
12543 (write _test-input-stream "}\n")
12544
12545 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12546
12547
12548 89/<- %edx 4/r32/esp
12549 (flush _test-output-buffered-file)
12550 (flush _test-error-buffered-file)
12551 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12557
12558 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-outputs: output should be empty")
12559 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compute-offset: too many outputs (1 required)" "F - test-compute-offset-with-too-many-outputs: error message")
12560
12561 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-outputs: exit status")
12562
12563 81 0/subop/add %esp 8/imm32
12564
12565 5d/pop-to-ebp
12566 c3/return
12567
12568 test-convert-read-from-stream:
12569
12570 55/push-ebp
12571 89/<- %ebp 4/r32/esp
12572
12573 (clear-stream _test-input-stream)
12574 (clear-stream $_test-input-buffered-file->buffer)
12575 (clear-stream _test-output-stream)
12576 (clear-stream $_test-output-buffered-file->buffer)
12577
12578 (write _test-input-stream "fn foo {\n")
12579 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
12580 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
12581 (write _test-input-stream " read-from-stream s, o\n")
12582 (write _test-input-stream "}\n")
12583
12584 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12585
12586
12587 89/<- %edx 4/r32/esp
12588 (flush _test-output-buffered-file)
12589 (flush _test-error-buffered-file)
12590 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12596
12597 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream/0")
12598 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream/1")
12599 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream/2")
12600 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream/3")
12601 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream/4")
12602 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream/5")
12603 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream/6")
12604 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream/7")
12605 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream/8")
12606 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream/9")
12607 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000004)" "F - test-convert-read-from-stream/10")
12608 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream/11")
12609 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream/12")
12610 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream/13")
12611 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream/14")
12612 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream/15")
12613 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream/16")
12614 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream/17")
12615 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream/18")
12616
12617 89/<- %esp 5/r32/ebp
12618 5d/pop-to-ebp
12619 c3/return
12620
12621 test-convert-read-from-stream-with-correct-payload-size:
12622
12623 55/push-ebp
12624 89/<- %ebp 4/r32/esp
12625
12626 (clear-stream _test-input-stream)
12627 (clear-stream $_test-input-buffered-file->buffer)
12628 (clear-stream _test-output-stream)
12629 (clear-stream $_test-output-buffered-file->buffer)
12630
12631 (write _test-input-stream "fn foo {\n")
12632 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
12633 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
12634 (write _test-input-stream " read-from-stream s, o\n")
12635 (write _test-input-stream "}\n")
12636
12637 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12638
12639
12640 89/<- %edx 4/r32/esp
12641 (flush _test-output-buffered-file)
12642 (flush _test-error-buffered-file)
12643 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12649
12650 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream-with-correct-payload-size/0")
12651 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream-with-correct-payload-size/1")
12652 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/2")
12653 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream-with-correct-payload-size/3")
12654 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream-with-correct-payload-size/4")
12655 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream-with-correct-payload-size/5")
12656 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream-with-correct-payload-size/6")
12657 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream-with-correct-payload-size/7")
12658 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/8")
12659 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream-with-correct-payload-size/9")
12660 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000008)" "F - test-convert-read-from-stream-with-correct-payload-size/10")
12661 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/11")
12662 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream-with-correct-payload-size/12")
12663 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream-with-correct-payload-size/13")
12664 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream-with-correct-payload-size/14")
12665 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream-with-correct-payload-size/15")
12666 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream-with-correct-payload-size/16")
12667 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/17")
12668 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream-with-correct-payload-size/18")
12669
12670 89/<- %esp 5/r32/ebp
12671 5d/pop-to-ebp
12672 c3/return
12673
12674 test-read-from-stream-with-non-stream-atom-base-type:
12675
12676 55/push-ebp
12677 89/<- %ebp 4/r32/esp
12678
12679 (clear-stream _test-input-stream)
12680 (clear-stream $_test-input-buffered-file->buffer)
12681 (clear-stream _test-output-stream)
12682 (clear-stream $_test-output-buffered-file->buffer)
12683 (clear-stream _test-error-stream)
12684 (clear-stream $_test-error-buffered-file->buffer)
12685
12686 68/push 0/imm32
12687 68/push 0/imm32
12688 89/<- %edx 4/r32/esp
12689 (tailor-exit-descriptor %edx 0x10)
12690
12691 (write _test-input-stream "fn foo {\n")
12692 (write _test-input-stream " var a: int\n")
12693 (write _test-input-stream " read-from-stream a, 0\n")
12694 (write _test-input-stream "}\n")
12695
12696 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12697
12698
12699 89/<- %edx 4/r32/esp
12700 (flush _test-output-buffered-file)
12701 (flush _test-error-buffered-file)
12702 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12708
12709 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-atom-base-type: output should be empty")
12710 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-atom-base-type: error message")
12711
12712 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-atom-base-type: exit status")
12713
12714 81 0/subop/add %esp 8/imm32
12715
12716 5d/pop-to-ebp
12717 c3/return
12718
12719 test-read-from-stream-with-non-stream-compound-base-type:
12720
12721 55/push-ebp
12722 89/<- %ebp 4/r32/esp
12723
12724 (clear-stream _test-input-stream)
12725 (clear-stream $_test-input-buffered-file->buffer)
12726 (clear-stream _test-output-stream)
12727 (clear-stream $_test-output-buffered-file->buffer)
12728 (clear-stream _test-error-stream)
12729 (clear-stream $_test-error-buffered-file->buffer)
12730
12731 68/push 0/imm32
12732 68/push 0/imm32
12733 89/<- %edx 4/r32/esp
12734 (tailor-exit-descriptor %edx 0x10)
12735
12736 (write _test-input-stream "fn foo {\n")
12737 (write _test-input-stream " var a: (handle int)\n")
12738 (write _test-input-stream " read-from-stream a, 0\n")
12739 (write _test-input-stream "}\n")
12740
12741 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12742
12743
12744 89/<- %edx 4/r32/esp
12745 (flush _test-output-buffered-file)
12746 (flush _test-error-buffered-file)
12747 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12753
12754 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type: output should be empty")
12755 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-compound-base-type: error message")
12756
12757 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type: exit status")
12758
12759 81 0/subop/add %esp 8/imm32
12760
12761 5d/pop-to-ebp
12762 c3/return
12763
12764 test-read-from-stream-with-non-stream-compound-base-type-2:
12765
12766 55/push-ebp
12767 89/<- %ebp 4/r32/esp
12768
12769 (clear-stream _test-input-stream)
12770 (clear-stream $_test-input-buffered-file->buffer)
12771 (clear-stream _test-output-stream)
12772 (clear-stream $_test-output-buffered-file->buffer)
12773 (clear-stream _test-error-stream)
12774 (clear-stream $_test-error-buffered-file->buffer)
12775
12776 68/push 0/imm32
12777 68/push 0/imm32
12778 89/<- %edx 4/r32/esp
12779 (tailor-exit-descriptor %edx 0x10)
12780
12781 (write _test-input-stream "fn foo {\n")
12782 (write _test-input-stream " var a: (addr int)\n")
12783 (write _test-input-stream " read-from-stream a, 0\n")
12784 (write _test-input-stream "}\n")
12785
12786 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12787
12788
12789 89/<- %edx 4/r32/esp
12790 (flush _test-output-buffered-file)
12791 (flush _test-error-buffered-file)
12792 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12798
12799 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type-2: output should be empty")
12800 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-non-stream-compound-base-type-2: error message")
12801
12802 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type-2: exit status")
12803
12804 81 0/subop/add %esp 8/imm32
12805
12806 5d/pop-to-ebp
12807 c3/return
12808
12809 test-read-from-stream-with-stream-atom-base-type:
12810
12811 55/push-ebp
12812 89/<- %ebp 4/r32/esp
12813
12814 (clear-stream _test-input-stream)
12815 (clear-stream $_test-input-buffered-file->buffer)
12816 (clear-stream _test-output-stream)
12817 (clear-stream $_test-output-buffered-file->buffer)
12818 (clear-stream _test-error-stream)
12819 (clear-stream $_test-error-buffered-file->buffer)
12820
12821 68/push 0/imm32
12822 68/push 0/imm32
12823 89/<- %edx 4/r32/esp
12824 (tailor-exit-descriptor %edx 0x10)
12825
12826 (write _test-input-stream "fn foo {\n")
12827 (write _test-input-stream " var a: stream\n")
12828 (write _test-input-stream " read-from-stream a, 0\n")
12829 (write _test-input-stream "}\n")
12830
12831 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12832
12833
12834 89/<- %edx 4/r32/esp
12835 (flush _test-output-buffered-file)
12836 (flush _test-error-buffered-file)
12837 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12843
12844 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-stream-atom-base-type: output should be empty")
12845 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: var 'a' must be an addr to a stream" "F - test-read-from-stream-with-stream-atom-base-type: error message")
12846
12847 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-stream-atom-base-type: exit status")
12848
12849 81 0/subop/add %esp 8/imm32
12850
12851 5d/pop-to-ebp
12852 c3/return
12853
12854 test-read-from-stream-with-wrong-index-type:
12855
12856 55/push-ebp
12857 89/<- %ebp 4/r32/esp
12858
12859 (clear-stream _test-input-stream)
12860 (clear-stream $_test-input-buffered-file->buffer)
12861 (clear-stream _test-output-stream)
12862 (clear-stream $_test-output-buffered-file->buffer)
12863 (clear-stream _test-error-stream)
12864 (clear-stream $_test-error-buffered-file->buffer)
12865
12866 68/push 0/imm32
12867 68/push 0/imm32
12868 89/<- %edx 4/r32/esp
12869 (tailor-exit-descriptor %edx 0x10)
12870
12871 (write _test-input-stream "fn foo {\n")
12872 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
12873 (write _test-input-stream " var b: boolean\n")
12874 (write _test-input-stream " read-from-stream a, b\n")
12875 (write _test-input-stream "}\n")
12876
12877 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12878
12879
12880 89/<- %edx 4/r32/esp
12881 (flush _test-output-buffered-file)
12882 (flush _test-error-buffered-file)
12883 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12889
12890 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-wrong-index-type: output should be empty")
12891 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: target 'b' must be an addr" "F - test-read-from-stream-with-wrong-index-type: error message")
12892
12893 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-wrong-index-type: exit status")
12894
12895 81 0/subop/add %esp 8/imm32
12896
12897 5d/pop-to-ebp
12898 c3/return
12899
12900 test-read-from-stream-with-no-inouts:
12901
12902 55/push-ebp
12903 89/<- %ebp 4/r32/esp
12904
12905 (clear-stream _test-input-stream)
12906 (clear-stream $_test-input-buffered-file->buffer)
12907 (clear-stream _test-output-stream)
12908 (clear-stream $_test-output-buffered-file->buffer)
12909 (clear-stream _test-error-stream)
12910 (clear-stream $_test-error-buffered-file->buffer)
12911
12912 68/push 0/imm32
12913 68/push 0/imm32
12914 89/<- %edx 4/r32/esp
12915 (tailor-exit-descriptor %edx 0x10)
12916
12917 (write _test-input-stream "fn foo {\n")
12918 (write _test-input-stream " read-from-stream\n")
12919 (write _test-input-stream "}\n")
12920
12921 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12922
12923
12924 89/<- %edx 4/r32/esp
12925 (flush _test-output-buffered-file)
12926 (flush _test-error-buffered-file)
12927 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12933
12934 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-no-inouts: output should be empty")
12935 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too few inouts (2 required)" "F - test-read-from-stream-with-no-inouts: error message")
12936
12937 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-no-inouts: exit status")
12938
12939 81 0/subop/add %esp 8/imm32
12940
12941 5d/pop-to-ebp
12942 c3/return
12943
12944 test-read-from-stream-with-too-few-inouts:
12945
12946 55/push-ebp
12947 89/<- %ebp 4/r32/esp
12948
12949 (clear-stream _test-input-stream)
12950 (clear-stream $_test-input-buffered-file->buffer)
12951 (clear-stream _test-output-stream)
12952 (clear-stream $_test-output-buffered-file->buffer)
12953 (clear-stream _test-error-stream)
12954 (clear-stream $_test-error-buffered-file->buffer)
12955
12956 68/push 0/imm32
12957 68/push 0/imm32
12958 89/<- %edx 4/r32/esp
12959 (tailor-exit-descriptor %edx 0x10)
12960
12961 (write _test-input-stream "fn foo {\n")
12962 (write _test-input-stream " var a: (addr stream int)\n")
12963 (write _test-input-stream " read-from-stream a\n")
12964 (write _test-input-stream "}\n")
12965
12966 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12967
12968
12969 89/<- %edx 4/r32/esp
12970 (flush _test-output-buffered-file)
12971 (flush _test-error-buffered-file)
12972 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12978
12979 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-few-inouts: output should be empty")
12980 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too few inouts (2 required)" "F - test-read-from-stream-with-too-few-inouts: error message")
12981
12982 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-few-inouts: exit status")
12983
12984 81 0/subop/add %esp 8/imm32
12985
12986 5d/pop-to-ebp
12987 c3/return
12988
12989 test-read-from-stream-with-too-many-inouts:
12990
12991 55/push-ebp
12992 89/<- %ebp 4/r32/esp
12993
12994 (clear-stream _test-input-stream)
12995 (clear-stream $_test-input-buffered-file->buffer)
12996 (clear-stream _test-output-stream)
12997 (clear-stream $_test-output-buffered-file->buffer)
12998 (clear-stream _test-error-stream)
12999 (clear-stream $_test-error-buffered-file->buffer)
13000
13001 68/push 0/imm32
13002 68/push 0/imm32
13003 89/<- %edx 4/r32/esp
13004 (tailor-exit-descriptor %edx 0x10)
13005
13006 (write _test-input-stream "fn foo {\n")
13007 (write _test-input-stream " var a: (addr stream int)\n")
13008 (write _test-input-stream " var b: (addr int)\n")
13009 (write _test-input-stream " read-from-stream a, b, 0\n")
13010 (write _test-input-stream "}\n")
13011
13012 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13013
13014
13015 89/<- %edx 4/r32/esp
13016 (flush _test-output-buffered-file)
13017 (flush _test-error-buffered-file)
13018 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13024
13025 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-many-inouts: output should be empty")
13026 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: too many inouts (2 required)" "F - test-read-from-stream-with-too-many-inouts: error message")
13027
13028 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-many-inouts: exit status")
13029
13030 81 0/subop/add %esp 8/imm32
13031
13032 5d/pop-to-ebp
13033 c3/return
13034
13035 test-read-from-stream-with-output:
13036
13037 55/push-ebp
13038 89/<- %ebp 4/r32/esp
13039
13040 (clear-stream _test-input-stream)
13041 (clear-stream $_test-input-buffered-file->buffer)
13042 (clear-stream _test-output-stream)
13043 (clear-stream $_test-output-buffered-file->buffer)
13044 (clear-stream _test-error-stream)
13045 (clear-stream $_test-error-buffered-file->buffer)
13046
13047 68/push 0/imm32
13048 68/push 0/imm32
13049 89/<- %edx 4/r32/esp
13050 (tailor-exit-descriptor %edx 0x10)
13051
13052 (write _test-input-stream "fn foo {\n")
13053 (write _test-input-stream " var a: (addr stream int)\n")
13054 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
13055 (write _test-input-stream " b <- read-from-stream a, b\n")
13056 (write _test-input-stream "}\n")
13057
13058 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13059
13060
13061 89/<- %edx 4/r32/esp
13062 (flush _test-output-buffered-file)
13063 (flush _test-error-buffered-file)
13064 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13070
13071 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-output: output should be empty")
13072 (check-next-stream-line-equal _test-error-stream "fn foo: stmt read-from-stream: unexpected output" "F - test-read-from-stream-with-output: error message")
13073
13074 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-output: exit status")
13075
13076 81 0/subop/add %esp 8/imm32
13077
13078 5d/pop-to-ebp
13079 c3/return
13080
13081 test-convert-write-to-stream:
13082
13083 55/push-ebp
13084 89/<- %ebp 4/r32/esp
13085
13086 (clear-stream _test-input-stream)
13087 (clear-stream $_test-input-buffered-file->buffer)
13088 (clear-stream _test-output-stream)
13089 (clear-stream $_test-output-buffered-file->buffer)
13090
13091 (write _test-input-stream "fn foo {\n")
13092 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
13093 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
13094 (write _test-input-stream " write-to-stream s, o\n")
13095 (write _test-input-stream "}\n")
13096
13097 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13098
13099
13100 89/<- %edx 4/r32/esp
13101 (flush _test-output-buffered-file)
13102 (flush _test-error-buffered-file)
13103 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
13109
13110 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream/0")
13111 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream/1")
13112 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream/2")
13113 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream/3")
13114 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream/4")
13115 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream/5")
13116 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream/6")
13117 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream/7")
13118 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream/8")
13119 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream/9")
13120 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000004)" "F - test-convert-write-to-stream/10")
13121 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream/11")
13122 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream/12")
13123 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream/13")
13124 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream/14")
13125 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream/15")
13126 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream/16")
13127 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream/17")
13128 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream/18")
13129
13130 89/<- %esp 5/r32/ebp
13131 5d/pop-to-ebp
13132 c3/return
13133
13134 test-convert-write-to-stream-with-correct-payload-size:
13135
13136 55/push-ebp
13137 89/<- %ebp 4/r32/esp
13138
13139 (clear-stream _test-input-stream)
13140 (clear-stream $_test-input-buffered-file->buffer)
13141 (clear-stream _test-output-stream)
13142 (clear-stream $_test-output-buffered-file->buffer)
13143
13144 (write _test-input-stream "fn foo {\n")
13145 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
13146 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
13147 (write _test-input-stream " write-to-stream s, o\n")
13148 (write _test-input-stream "}\n")
13149
13150 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13151
13152
13153 89/<- %edx 4/r32/esp
13154 (flush _test-output-buffered-file)
13155 (flush _test-error-buffered-file)
13156 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
13162
13163 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream-with-correct-payload-size/0")
13164 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream-with-correct-payload-size/1")
13165 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/2")
13166 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream-with-correct-payload-size/3")
13167 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream-with-correct-payload-size/4")
13168 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream-with-correct-payload-size/5")
13169 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream-with-correct-payload-size/6")
13170 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream-with-correct-payload-size/7")
13171 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/8")
13172 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream-with-correct-payload-size/9")
13173 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000008)" "F - test-convert-write-to-stream-with-correct-payload-size/10")
13174 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/11")
13175 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream-with-correct-payload-size/12")
13176 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream-with-correct-payload-size/13")
13177 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream-with-correct-payload-size/14")
13178 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream-with-correct-payload-size/15")
13179 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream-with-correct-payload-size/16")
13180 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/17")
13181 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream-with-correct-payload-size/18")
13182
13183 89/<- %esp 5/r32/ebp
13184 5d/pop-to-ebp
13185 c3/return
13186
13187 test-write-to-stream-with-non-stream-atom-base-type:
13188
13189 55/push-ebp
13190 89/<- %ebp 4/r32/esp
13191
13192 (clear-stream _test-input-stream)
13193 (clear-stream $_test-input-buffered-file->buffer)
13194 (clear-stream _test-output-stream)
13195 (clear-stream $_test-output-buffered-file->buffer)
13196 (clear-stream _test-error-stream)
13197 (clear-stream $_test-error-buffered-file->buffer)
13198
13199 68/push 0/imm32
13200 68/push 0/imm32
13201 89/<- %edx 4/r32/esp
13202 (tailor-exit-descriptor %edx 0x10)
13203
13204 (write _test-input-stream "fn foo {\n")
13205 (write _test-input-stream " var a: int\n")
13206 (write _test-input-stream " write-to-stream a, 0\n")
13207 (write _test-input-stream "}\n")
13208
13209 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13210
13211
13212 89/<- %edx 4/r32/esp
13213 (flush _test-output-buffered-file)
13214 (flush _test-error-buffered-file)
13215 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13221
13222 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-atom-base-type: output should be empty")
13223 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-atom-base-type: error message")
13224
13225 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-atom-base-type: exit status")
13226
13227 81 0/subop/add %esp 8/imm32
13228
13229 5d/pop-to-ebp
13230 c3/return
13231
13232 test-write-to-stream-with-non-stream-compound-base-type:
13233
13234 55/push-ebp
13235 89/<- %ebp 4/r32/esp
13236
13237 (clear-stream _test-input-stream)
13238 (clear-stream $_test-input-buffered-file->buffer)
13239 (clear-stream _test-output-stream)
13240 (clear-stream $_test-output-buffered-file->buffer)
13241 (clear-stream _test-error-stream)
13242 (clear-stream $_test-error-buffered-file->buffer)
13243
13244 68/push 0/imm32
13245 68/push 0/imm32
13246 89/<- %edx 4/r32/esp
13247 (tailor-exit-descriptor %edx 0x10)
13248
13249 (write _test-input-stream "fn foo {\n")
13250 (write _test-input-stream " var a: (handle int)\n")
13251 (write _test-input-stream " write-to-stream a, 0\n")
13252 (write _test-input-stream "}\n")
13253
13254 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13255
13256
13257 89/<- %edx 4/r32/esp
13258 (flush _test-output-buffered-file)
13259 (flush _test-error-buffered-file)
13260 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13266
13267 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type: output should be empty")
13268 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-compound-base-type: error message")
13269
13270 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type: exit status")
13271
13272 81 0/subop/add %esp 8/imm32
13273
13274 5d/pop-to-ebp
13275 c3/return
13276
13277 test-write-to-stream-with-non-stream-compound-base-type-2:
13278
13279 55/push-ebp
13280 89/<- %ebp 4/r32/esp
13281
13282 (clear-stream _test-input-stream)
13283 (clear-stream $_test-input-buffered-file->buffer)
13284 (clear-stream _test-output-stream)
13285 (clear-stream $_test-output-buffered-file->buffer)
13286 (clear-stream _test-error-stream)
13287 (clear-stream $_test-error-buffered-file->buffer)
13288
13289 68/push 0/imm32
13290 68/push 0/imm32
13291 89/<- %edx 4/r32/esp
13292 (tailor-exit-descriptor %edx 0x10)
13293
13294 (write _test-input-stream "fn foo {\n")
13295 (write _test-input-stream " var a: (addr int)\n")
13296 (write _test-input-stream " write-to-stream a, 0\n")
13297 (write _test-input-stream "}\n")
13298
13299 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13300
13301
13302 89/<- %edx 4/r32/esp
13303 (flush _test-output-buffered-file)
13304 (flush _test-error-buffered-file)
13305 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13311
13312 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type-2: output should be empty")
13313 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-non-stream-compound-base-type-2: error message")
13314
13315 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type-2: exit status")
13316
13317 81 0/subop/add %esp 8/imm32
13318
13319 5d/pop-to-ebp
13320 c3/return
13321
13322 test-write-to-stream-with-stream-atom-base-type:
13323
13324 55/push-ebp
13325 89/<- %ebp 4/r32/esp
13326
13327 (clear-stream _test-input-stream)
13328 (clear-stream $_test-input-buffered-file->buffer)
13329 (clear-stream _test-output-stream)
13330 (clear-stream $_test-output-buffered-file->buffer)
13331 (clear-stream _test-error-stream)
13332 (clear-stream $_test-error-buffered-file->buffer)
13333
13334 68/push 0/imm32
13335 68/push 0/imm32
13336 89/<- %edx 4/r32/esp
13337 (tailor-exit-descriptor %edx 0x10)
13338
13339 (write _test-input-stream "fn foo {\n")
13340 (write _test-input-stream " var a: stream\n")
13341 (write _test-input-stream " write-to-stream a, 0\n")
13342 (write _test-input-stream "}\n")
13343
13344 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13345
13346
13347 89/<- %edx 4/r32/esp
13348 (flush _test-output-buffered-file)
13349 (flush _test-error-buffered-file)
13350 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13356
13357 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-stream-atom-base-type: output should be empty")
13358 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: var 'a' must be an addr to a stream" "F - test-write-to-stream-with-stream-atom-base-type: error message")
13359
13360 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-stream-atom-base-type: exit status")
13361
13362 81 0/subop/add %esp 8/imm32
13363
13364 5d/pop-to-ebp
13365 c3/return
13366
13367 test-write-to-stream-with-wrong-index-type:
13368
13369 55/push-ebp
13370 89/<- %ebp 4/r32/esp
13371
13372 (clear-stream _test-input-stream)
13373 (clear-stream $_test-input-buffered-file->buffer)
13374 (clear-stream _test-output-stream)
13375 (clear-stream $_test-output-buffered-file->buffer)
13376 (clear-stream _test-error-stream)
13377 (clear-stream $_test-error-buffered-file->buffer)
13378
13379 68/push 0/imm32
13380 68/push 0/imm32
13381 89/<- %edx 4/r32/esp
13382 (tailor-exit-descriptor %edx 0x10)
13383
13384 (write _test-input-stream "fn foo {\n")
13385 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
13386 (write _test-input-stream " var b: boolean\n")
13387 (write _test-input-stream " write-to-stream a, b\n")
13388 (write _test-input-stream "}\n")
13389
13390 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13391
13392
13393 89/<- %edx 4/r32/esp
13394 (flush _test-output-buffered-file)
13395 (flush _test-error-buffered-file)
13396 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13402
13403 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-wrong-index-type: output should be empty")
13404 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: target 'b' must be an addr" "F - test-write-to-stream-with-wrong-index-type: error message")
13405
13406 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-wrong-index-type: exit status")
13407
13408 81 0/subop/add %esp 8/imm32
13409
13410 5d/pop-to-ebp
13411 c3/return
13412
13413 test-write-to-stream-with-no-inouts:
13414
13415 55/push-ebp
13416 89/<- %ebp 4/r32/esp
13417
13418 (clear-stream _test-input-stream)
13419 (clear-stream $_test-input-buffered-file->buffer)
13420 (clear-stream _test-output-stream)
13421 (clear-stream $_test-output-buffered-file->buffer)
13422 (clear-stream _test-error-stream)
13423 (clear-stream $_test-error-buffered-file->buffer)
13424
13425 68/push 0/imm32
13426 68/push 0/imm32
13427 89/<- %edx 4/r32/esp
13428 (tailor-exit-descriptor %edx 0x10)
13429
13430 (write _test-input-stream "fn foo {\n")
13431 (write _test-input-stream " write-to-stream\n")
13432 (write _test-input-stream "}\n")
13433
13434 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13435
13436
13437 89/<- %edx 4/r32/esp
13438 (flush _test-output-buffered-file)
13439 (flush _test-error-buffered-file)
13440 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13446
13447 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-no-inouts: output should be empty")
13448 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too few inouts (2 required)" "F - test-write-to-stream-with-no-inouts: error message")
13449
13450 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-no-inouts: exit status")
13451
13452 81 0/subop/add %esp 8/imm32
13453
13454 5d/pop-to-ebp
13455 c3/return
13456
13457 test-write-to-stream-with-too-few-inouts:
13458
13459 55/push-ebp
13460 89/<- %ebp 4/r32/esp
13461
13462 (clear-stream _test-input-stream)
13463 (clear-stream $_test-input-buffered-file->buffer)
13464 (clear-stream _test-output-stream)
13465 (clear-stream $_test-output-buffered-file->buffer)
13466 (clear-stream _test-error-stream)
13467 (clear-stream $_test-error-buffered-file->buffer)
13468
13469 68/push 0/imm32
13470 68/push 0/imm32
13471 89/<- %edx 4/r32/esp
13472 (tailor-exit-descriptor %edx 0x10)
13473
13474 (write _test-input-stream "fn foo {\n")
13475 (write _test-input-stream " var a: (addr stream int)\n")
13476 (write _test-input-stream " write-to-stream a\n")
13477 (write _test-input-stream "}\n")
13478
13479 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13480
13481
13482 89/<- %edx 4/r32/esp
13483 (flush _test-output-buffered-file)
13484 (flush _test-error-buffered-file)
13485 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13491
13492 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-few-inouts: output should be empty")
13493 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too few inouts (2 required)" "F - test-write-to-stream-with-too-few-inouts: error message")
13494
13495 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-few-inouts: exit status")
13496
13497 81 0/subop/add %esp 8/imm32
13498
13499 5d/pop-to-ebp
13500 c3/return
13501
13502 test-write-to-stream-with-too-many-inouts:
13503
13504 55/push-ebp
13505 89/<- %ebp 4/r32/esp
13506
13507 (clear-stream _test-input-stream)
13508 (clear-stream $_test-input-buffered-file->buffer)
13509 (clear-stream _test-output-stream)
13510 (clear-stream $_test-output-buffered-file->buffer)
13511 (clear-stream _test-error-stream)
13512 (clear-stream $_test-error-buffered-file->buffer)
13513
13514 68/push 0/imm32
13515 68/push 0/imm32
13516 89/<- %edx 4/r32/esp
13517 (tailor-exit-descriptor %edx 0x10)
13518
13519 (write _test-input-stream "fn foo {\n")
13520 (write _test-input-stream " var a: (addr stream int)\n")
13521 (write _test-input-stream " var b: (addr int)\n")
13522 (write _test-input-stream " write-to-stream a, b, 0\n")
13523 (write _test-input-stream "}\n")
13524
13525 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13526
13527
13528 89/<- %edx 4/r32/esp
13529 (flush _test-output-buffered-file)
13530 (flush _test-error-buffered-file)
13531 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13537
13538 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-many-inouts: output should be empty")
13539 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: too many inouts (2 required)" "F - test-write-to-stream-with-too-many-inouts: error message")
13540
13541 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-many-inouts: exit status")
13542
13543 81 0/subop/add %esp 8/imm32
13544
13545 5d/pop-to-ebp
13546 c3/return
13547
13548 test-write-to-stream-with-output:
13549
13550 55/push-ebp
13551 89/<- %ebp 4/r32/esp
13552
13553 (clear-stream _test-input-stream)
13554 (clear-stream $_test-input-buffered-file->buffer)
13555 (clear-stream _test-output-stream)
13556 (clear-stream $_test-output-buffered-file->buffer)
13557 (clear-stream _test-error-stream)
13558 (clear-stream $_test-error-buffered-file->buffer)
13559
13560 68/push 0/imm32
13561 68/push 0/imm32
13562 89/<- %edx 4/r32/esp
13563 (tailor-exit-descriptor %edx 0x10)
13564
13565 (write _test-input-stream "fn foo {\n")
13566 (write _test-input-stream " var a: (addr stream int)\n")
13567 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
13568 (write _test-input-stream " b <- write-to-stream a, b\n")
13569 (write _test-input-stream "}\n")
13570
13571 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13572
13573
13574 89/<- %edx 4/r32/esp
13575 (flush _test-output-buffered-file)
13576 (flush _test-error-buffered-file)
13577 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13583
13584 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-output: output should be empty")
13585 (check-next-stream-line-equal _test-error-stream "fn foo: stmt write-to-stream: unexpected output" "F - test-write-to-stream-with-output: error message")
13586
13587 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-output: exit status")
13588
13589 81 0/subop/add %esp 8/imm32
13590
13591 5d/pop-to-ebp
13592 c3/return
13593
13594 test-length-with-non-array-atom-base-type:
13595
13596 55/push-ebp
13597 89/<- %ebp 4/r32/esp
13598
13599 (clear-stream _test-input-stream)
13600 (clear-stream $_test-input-buffered-file->buffer)
13601 (clear-stream _test-output-stream)
13602 (clear-stream $_test-output-buffered-file->buffer)
13603 (clear-stream _test-error-stream)
13604 (clear-stream $_test-error-buffered-file->buffer)
13605
13606 68/push 0/imm32
13607 68/push 0/imm32
13608 89/<- %edx 4/r32/esp
13609 (tailor-exit-descriptor %edx 0x10)
13610
13611 (write _test-input-stream "fn foo {\n")
13612 (write _test-input-stream " var a: int\n")
13613 (write _test-input-stream " var c/ecx: int <- length a\n")
13614 (write _test-input-stream "}\n")
13615
13616 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13617
13618
13619 89/<- %edx 4/r32/esp
13620 (flush _test-output-buffered-file)
13621 (flush _test-error-buffered-file)
13622 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13628
13629 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-atom-base-type: output should be empty")
13630 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-atom-base-type: error message")
13631
13632 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-atom-base-type: exit status")
13633
13634 81 0/subop/add %esp 8/imm32
13635
13636 5d/pop-to-ebp
13637 c3/return
13638
13639 test-length-with-non-array-compound-base-type:
13640
13641 55/push-ebp
13642 89/<- %ebp 4/r32/esp
13643
13644 (clear-stream _test-input-stream)
13645 (clear-stream $_test-input-buffered-file->buffer)
13646 (clear-stream _test-output-stream)
13647 (clear-stream $_test-output-buffered-file->buffer)
13648 (clear-stream _test-error-stream)
13649 (clear-stream $_test-error-buffered-file->buffer)
13650
13651 68/push 0/imm32
13652 68/push 0/imm32
13653 89/<- %edx 4/r32/esp
13654 (tailor-exit-descriptor %edx 0x10)
13655
13656 (write _test-input-stream "fn foo {\n")
13657 (write _test-input-stream " var a: (handle int)\n")
13658 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
13659 (write _test-input-stream "}\n")
13660
13661 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13662
13663
13664 89/<- %edx 4/r32/esp
13665 (flush _test-output-buffered-file)
13666 (flush _test-error-buffered-file)
13667 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13673
13674 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type: output should be empty")
13675 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-compound-base-type: error message")
13676
13677 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type: exit status")
13678
13679 81 0/subop/add %esp 8/imm32
13680
13681 5d/pop-to-ebp
13682 c3/return
13683
13684 test-length-with-non-array-compound-base-type-2:
13685
13686 55/push-ebp
13687 89/<- %ebp 4/r32/esp
13688
13689 (clear-stream _test-input-stream)
13690 (clear-stream $_test-input-buffered-file->buffer)
13691 (clear-stream _test-output-stream)
13692 (clear-stream $_test-output-buffered-file->buffer)
13693 (clear-stream _test-error-stream)
13694 (clear-stream $_test-error-buffered-file->buffer)
13695
13696 68/push 0/imm32
13697 68/push 0/imm32
13698 89/<- %edx 4/r32/esp
13699 (tailor-exit-descriptor %edx 0x10)
13700
13701 (write _test-input-stream "fn foo {\n")
13702 (write _test-input-stream " var a: (addr int)\n")
13703 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
13704 (write _test-input-stream "}\n")
13705
13706 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13707
13708
13709 89/<- %edx 4/r32/esp
13710 (flush _test-output-buffered-file)
13711 (flush _test-error-buffered-file)
13712 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13718
13719 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type-2: output should be empty")
13720 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is not an array" "F - test-length-with-non-array-compound-base-type-2: error message")
13721
13722 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type-2: exit status")
13723
13724 81 0/subop/add %esp 8/imm32
13725
13726 5d/pop-to-ebp
13727 c3/return
13728
13729 test-length-with-array-atom-base-type:
13730
13731 55/push-ebp
13732 89/<- %ebp 4/r32/esp
13733
13734 (clear-stream _test-input-stream)
13735 (clear-stream $_test-input-buffered-file->buffer)
13736 (clear-stream _test-output-stream)
13737 (clear-stream $_test-output-buffered-file->buffer)
13738 (clear-stream _test-error-stream)
13739 (clear-stream $_test-error-buffered-file->buffer)
13740
13741 68/push 0/imm32
13742 68/push 0/imm32
13743 89/<- %edx 4/r32/esp
13744 (tailor-exit-descriptor %edx 0x10)
13745
13746 (write _test-input-stream "fn foo {\n")
13747 (write _test-input-stream " var a: array\n")
13748 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
13749 (write _test-input-stream "}\n")
13750
13751 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13752
13753
13754 89/<- %edx 4/r32/esp
13755 (flush _test-output-buffered-file)
13756 (flush _test-error-buffered-file)
13757 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13763
13764 (check-stream-equal _test-output-stream "" "F - test-length-with-array-atom-base-type: output should be empty")
13765 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: array 'a' must specify the type of its elements" "F - test-length-with-array-atom-base-type: error message")
13766
13767 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-atom-base-type: exit status")
13768
13769 81 0/subop/add %esp 8/imm32
13770
13771 5d/pop-to-ebp
13772 c3/return
13773
13774 test-length-with-addr-base-on-stack:
13775
13776 55/push-ebp
13777 89/<- %ebp 4/r32/esp
13778
13779 (clear-stream _test-input-stream)
13780 (clear-stream $_test-input-buffered-file->buffer)
13781 (clear-stream _test-output-stream)
13782 (clear-stream $_test-output-buffered-file->buffer)
13783 (clear-stream _test-error-stream)
13784 (clear-stream $_test-error-buffered-file->buffer)
13785
13786 68/push 0/imm32
13787 68/push 0/imm32
13788 89/<- %edx 4/r32/esp
13789 (tailor-exit-descriptor %edx 0x10)
13790
13791 (write _test-input-stream "fn foo {\n")
13792 (write _test-input-stream " var a: (addr array int)\n")
13793 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
13794 (write _test-input-stream "}\n")
13795
13796 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13797
13798
13799 89/<- %edx 4/r32/esp
13800 (flush _test-output-buffered-file)
13801 (flush _test-error-buffered-file)
13802 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13808
13809 (check-stream-equal _test-output-stream "" "F - test-length-with-addr-base-on-stack: output should be empty")
13810 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is an addr to an array, and so must live in a register" "F - test-length-with-addr-base-on-stack: error message")
13811
13812 (check-ints-equal *(edx+4) 2 "F - test-length-with-addr-base-on-stack: exit status")
13813
13814 81 0/subop/add %esp 8/imm32
13815
13816 5d/pop-to-ebp
13817 c3/return
13818
13819 test-length-with-wrong-output-type:
13820
13821 55/push-ebp
13822 89/<- %ebp 4/r32/esp
13823
13824 (clear-stream _test-input-stream)
13825 (clear-stream $_test-input-buffered-file->buffer)
13826 (clear-stream _test-output-stream)
13827 (clear-stream $_test-output-buffered-file->buffer)
13828 (clear-stream _test-error-stream)
13829 (clear-stream $_test-error-buffered-file->buffer)
13830
13831 68/push 0/imm32
13832 68/push 0/imm32
13833 89/<- %edx 4/r32/esp
13834 (tailor-exit-descriptor %edx 0x10)
13835
13836 (write _test-input-stream "fn foo {\n")
13837 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
13838 (write _test-input-stream " var o/edi: (addr int) <- length a\n")
13839 (write _test-input-stream "}\n")
13840
13841 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13842
13843
13844 89/<- %edx 4/r32/esp
13845 (flush _test-output-buffered-file)
13846 (flush _test-error-buffered-file)
13847 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13853
13854 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-type: output should be empty")
13855 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: output 'o' does not have the right type" "F - test-length-with-wrong-output-type: error message")
13856
13857 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-type: exit status")
13858
13859 81 0/subop/add %esp 8/imm32
13860
13861 5d/pop-to-ebp
13862 c3/return
13863
13864 test-length-with-wrong-output-compound-type:
13865
13866 55/push-ebp
13867 89/<- %ebp 4/r32/esp
13868
13869 (clear-stream _test-input-stream)
13870 (clear-stream $_test-input-buffered-file->buffer)
13871 (clear-stream _test-output-stream)
13872 (clear-stream $_test-output-buffered-file->buffer)
13873 (clear-stream _test-error-stream)
13874 (clear-stream $_test-error-buffered-file->buffer)
13875
13876 68/push 0/imm32
13877 68/push 0/imm32
13878 89/<- %edx 4/r32/esp
13879 (tailor-exit-descriptor %edx 0x10)
13880
13881 (write _test-input-stream "fn foo {\n")
13882 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
13883 (write _test-input-stream " var o/edi: (addr handle int) <- length a\n")
13884 (write _test-input-stream "}\n")
13885
13886 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13887
13888
13889 89/<- %edx 4/r32/esp
13890 (flush _test-output-buffered-file)
13891 (flush _test-error-buffered-file)
13892 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13898
13899 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-compound-type: output should be empty")
13900 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: output 'o' does not have the right type" "F - test-length-with-wrong-output-compound-type: error message")
13901
13902 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-compound-type: exit status")
13903
13904 81 0/subop/add %esp 8/imm32
13905
13906 5d/pop-to-ebp
13907 c3/return
13908
13909 test-length-with-no-inouts:
13910
13911 55/push-ebp
13912 89/<- %ebp 4/r32/esp
13913
13914 (clear-stream _test-input-stream)
13915 (clear-stream $_test-input-buffered-file->buffer)
13916 (clear-stream _test-output-stream)
13917 (clear-stream $_test-output-buffered-file->buffer)
13918 (clear-stream _test-error-stream)
13919 (clear-stream $_test-error-buffered-file->buffer)
13920
13921 68/push 0/imm32
13922 68/push 0/imm32
13923 89/<- %edx 4/r32/esp
13924 (tailor-exit-descriptor %edx 0x10)
13925
13926 (write _test-input-stream "fn foo {\n")
13927 (write _test-input-stream " var c/ecx: int <- length\n")
13928 (write _test-input-stream "}\n")
13929
13930 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13931
13932
13933 89/<- %edx 4/r32/esp
13934 (flush _test-output-buffered-file)
13935 (flush _test-error-buffered-file)
13936 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13942
13943 (check-stream-equal _test-output-stream "" "F - test-length-with-no-inouts: output should be empty")
13944 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too few inouts (1 required)" "F - test-length-with-no-inouts: error message")
13945
13946 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-inouts: exit status")
13947
13948 81 0/subop/add %esp 8/imm32
13949
13950 5d/pop-to-ebp
13951 c3/return
13952
13953 test-length-with-too-many-inouts:
13954
13955 55/push-ebp
13956 89/<- %ebp 4/r32/esp
13957
13958 (clear-stream _test-input-stream)
13959 (clear-stream $_test-input-buffered-file->buffer)
13960 (clear-stream _test-output-stream)
13961 (clear-stream $_test-output-buffered-file->buffer)
13962 (clear-stream _test-error-stream)
13963 (clear-stream $_test-error-buffered-file->buffer)
13964
13965 68/push 0/imm32
13966 68/push 0/imm32
13967 89/<- %edx 4/r32/esp
13968 (tailor-exit-descriptor %edx 0x10)
13969
13970 (write _test-input-stream "fn foo {\n")
13971 (write _test-input-stream " var a: (array int 3)\n")
13972 (write _test-input-stream " var c/ecx: int <- length a, 0, 0\n")
13973 (write _test-input-stream "}\n")
13974
13975 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13976
13977
13978 89/<- %edx 4/r32/esp
13979 (flush _test-output-buffered-file)
13980 (flush _test-error-buffered-file)
13981 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13987
13988 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-inouts: output should be empty")
13989 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too many inouts (1 required)" "F - test-length-with-too-many-inouts: error message")
13990
13991 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-inouts: exit status")
13992
13993 81 0/subop/add %esp 8/imm32
13994
13995 5d/pop-to-ebp
13996 c3/return
13997
13998 test-length-with-no-output:
13999
14000 55/push-ebp
14001 89/<- %ebp 4/r32/esp
14002
14003 (clear-stream _test-input-stream)
14004 (clear-stream $_test-input-buffered-file->buffer)
14005 (clear-stream _test-output-stream)
14006 (clear-stream $_test-output-buffered-file->buffer)
14007 (clear-stream _test-error-stream)
14008 (clear-stream $_test-error-buffered-file->buffer)
14009
14010 68/push 0/imm32
14011 68/push 0/imm32
14012 89/<- %edx 4/r32/esp
14013 (tailor-exit-descriptor %edx 0x10)
14014
14015 (write _test-input-stream "fn foo {\n")
14016 (write _test-input-stream " var a: (array int 3)\n")
14017 (write _test-input-stream " length a\n")
14018 (write _test-input-stream "}\n")
14019
14020 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14021
14022
14023 89/<- %edx 4/r32/esp
14024 (flush _test-output-buffered-file)
14025 (flush _test-error-buffered-file)
14026 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14032
14033 (check-stream-equal _test-output-stream "" "F - test-length-with-no-output: output should be empty")
14034 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: must have an output" "F - test-length-with-no-output: error message")
14035
14036 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-output: exit status")
14037
14038 81 0/subop/add %esp 8/imm32
14039
14040 5d/pop-to-ebp
14041 c3/return
14042
14043 test-length-with-too-many-outputs:
14044
14045 55/push-ebp
14046 89/<- %ebp 4/r32/esp
14047
14048 (clear-stream _test-input-stream)
14049 (clear-stream $_test-input-buffered-file->buffer)
14050 (clear-stream _test-output-stream)
14051 (clear-stream $_test-output-buffered-file->buffer)
14052 (clear-stream _test-error-stream)
14053 (clear-stream $_test-error-buffered-file->buffer)
14054
14055 68/push 0/imm32
14056 68/push 0/imm32
14057 89/<- %edx 4/r32/esp
14058 (tailor-exit-descriptor %edx 0x10)
14059
14060 (write _test-input-stream "fn foo {\n")
14061 (write _test-input-stream " var a: (array int 3)\n")
14062 (write _test-input-stream " var b/eax: int <- copy 0\n")
14063 (write _test-input-stream " var c/ecx: int <- copy 0\n")
14064 (write _test-input-stream " b, c <- length a\n")
14065 (write _test-input-stream "}\n")
14066
14067 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14068
14069
14070 89/<- %edx 4/r32/esp
14071 (flush _test-output-buffered-file)
14072 (flush _test-error-buffered-file)
14073 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14079
14080 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-outputs: output should be empty")
14081 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: too many outputs (1 required)" "F - test-length-with-too-many-outputs: error message")
14082
14083 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-outputs: exit status")
14084
14085 81 0/subop/add %esp 8/imm32
14086
14087 5d/pop-to-ebp
14088 c3/return
14089
14090 test-convert-function-with-return-register-and-local:
14091
14092 55/push-ebp
14093 89/<- %ebp 4/r32/esp
14094
14095 (clear-stream _test-input-stream)
14096 (clear-stream $_test-input-buffered-file->buffer)
14097 (clear-stream _test-output-stream)
14098 (clear-stream $_test-output-buffered-file->buffer)
14099
14100 (write _test-input-stream "fn foo -> _/eax: int {\n")
14101 (write _test-input-stream " var y/eax: int <- copy 3\n")
14102 (write _test-input-stream " var z/ecx: int <- copy 4\n")
14103 (write _test-input-stream " return y\n")
14104 (write _test-input-stream "}\n")
14105
14106 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14107 (flush _test-output-buffered-file)
14108 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14114
14115 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local/0")
14116 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local/1")
14117 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local/2")
14118 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local/3")
14119 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local/4")
14120 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local/5")
14121 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local/6")
14122 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local/7")
14123 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local/8")
14124 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local/9")
14125 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register-and-local/10")
14126 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local/11")
14127 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register-and-local/12")
14128 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local/13")
14129 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local/14")
14130 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local/15")
14131 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local/16")
14132 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local/17")
14133 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local/18")
14134 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local/19")
14135
14136 89/<- %esp 5/r32/ebp
14137 5d/pop-to-ebp
14138 c3/return
14139
14140 test-convert-function-with-return-register-and-local-2:
14141
14142 55/push-ebp
14143 89/<- %ebp 4/r32/esp
14144
14145 (clear-stream _test-input-stream)
14146 (clear-stream $_test-input-buffered-file->buffer)
14147 (clear-stream _test-output-stream)
14148 (clear-stream $_test-output-buffered-file->buffer)
14149
14150 (write _test-input-stream "fn foo -> _/eax: int {\n")
14151 (write _test-input-stream " var y/eax: int <- copy 3\n")
14152 (write _test-input-stream " var z/ecx: int <- copy 4\n")
14153 (write _test-input-stream " return z\n")
14154 (write _test-input-stream "}\n")
14155
14156 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14157 (flush _test-output-buffered-file)
14158 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14164
14165 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local-2/0")
14166 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local-2/1")
14167 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local-2/2")
14168 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local-2/3")
14169 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local-2/4")
14170 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local-2/5")
14171 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local-2/6")
14172 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local-2/7")
14173 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local-2/8")
14174 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local-2/9")
14175 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-function-with-return-register-and-local-2/10")
14176 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local-2/11")
14177 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register-and-local-2/12")
14178 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local-2/13")
14179 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local-2/14")
14180 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local-2/15")
14181 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local-2/16")
14182 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local-2/17")
14183 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local-2/18")
14184 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local-2/19")
14185
14186 89/<- %esp 5/r32/ebp
14187 5d/pop-to-ebp
14188 c3/return
14189
14190 test-convert-function-with-return-float-register-and-local:
14191
14192 55/push-ebp
14193 89/<- %ebp 4/r32/esp
14194
14195 (clear-stream _test-input-stream)
14196 (clear-stream $_test-input-buffered-file->buffer)
14197 (clear-stream _test-output-stream)
14198 (clear-stream $_test-output-buffered-file->buffer)
14199
14200 (write _test-input-stream "fn foo -> _/xmm1: float {\n")
14201 (write _test-input-stream " var y/eax: int <- copy 3\n")
14202 (write _test-input-stream " var g/xmm0: float <- convert y\n")
14203 (write _test-input-stream " var h/xmm1: float <- convert y\n")
14204 (write _test-input-stream " return g\n")
14205 (write _test-input-stream "}\n")
14206
14207 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14208 (flush _test-output-buffered-file)
14209 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14215
14216 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-float-register-and-local/0")
14217 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-float-register-and-local/1")
14218 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-float-register-and-local/2")
14219 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-float-register-and-local/3")
14220 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-float-register-and-local/4")
14221 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-float-register-and-local/5")
14222 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-float-register-and-local/6")
14223 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-float-register-and-local/7")
14224 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-function-with-return-float-register-and-local/8")
14225 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 0/x32" "F - test-convert-function-with-return-float-register-and-local/9")
14226 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000000/x32" "F - test-convert-function-with-return-float-register-and-local/10")
14227 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-function-with-return-float-register-and-local/11")
14228 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-function-with-return-float-register-and-local/12")
14229 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-function-with-return-float-register-and-local/13")
14230 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> %xmm0 0x00000001/x32" "F - test-convert-function-with-return-float-register-and-local/14")
14231 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
14232 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 0/x32" "F - test-convert-floating-point-dereferenced/16")
14233 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/17")
14234 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-return-float-register-and-local/18")
14235 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-float-register-and-local/19")
14236 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-float-register-and-local/20")
14237 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-float-register-and-local/21")
14238 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-float-register-and-local/22")
14239 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-float-register-and-local/23")
14240 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-float-register-and-local/24")
14241 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-float-register-and-local/25")
14242
14243 89/<- %esp 5/r32/ebp
14244 5d/pop-to-ebp
14245 c3/return
14246
14247 test-convert-function-with-return-and-local-vars:
14248
14249 55/push-ebp
14250 89/<- %ebp 4/r32/esp
14251
14252 (clear-stream _test-input-stream)
14253 (clear-stream $_test-input-buffered-file->buffer)
14254 (clear-stream _test-output-stream)
14255 (clear-stream $_test-output-buffered-file->buffer)
14256
14257 (write _test-input-stream "fn foo -> _/eax: int {\n")
14258 (write _test-input-stream " {\n")
14259 (write _test-input-stream " var x: int\n")
14260 (write _test-input-stream " {\n")
14261 (write _test-input-stream " var y: int\n")
14262 (write _test-input-stream " return y\n")
14263 (write _test-input-stream " increment x\n")
14264 (write _test-input-stream " }\n")
14265 (write _test-input-stream " }\n")
14266 (write _test-input-stream " return 0\n")
14267 (write _test-input-stream "}\n")
14268
14269 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14270 (flush _test-output-buffered-file)
14271 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14277
14278 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-and-local-vars/0")
14279 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-and-local-vars/1")
14280 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-and-local-vars/2")
14281 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-and-local-vars/3")
14282 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/4")
14283 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-and-local-vars/5")
14284 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/6")
14285 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-return-and-local-vars/7")
14286 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/8")
14287 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/9")
14288 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-return-and-local-vars/10")
14289 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/11")
14290 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-return-and-local-vars/12")
14291 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/13")
14292 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/14")
14293 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/15")
14294 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/16")
14295 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-return-and-local-vars/17")
14296 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return-and-local-vars/18")
14297 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/19")
14298 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-return-and-local-vars/20")
14299 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-and-local-vars/21")
14300 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/21")
14301 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/21")
14302 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-and-local-vars/22")
14303 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-and-local-vars/23")
14304 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-and-local-vars/24")
14305 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-and-local-vars/25")
14306 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-and-local-vars/26")
14307
14308 89/<- %esp 5/r32/ebp
14309 5d/pop-to-ebp
14310 c3/return
14311
14312 test-copy-object-with-no-inout:
14313
14314 55/push-ebp
14315 89/<- %ebp 4/r32/esp
14316
14317 (clear-stream _test-input-stream)
14318 (clear-stream $_test-input-buffered-file->buffer)
14319 (clear-stream _test-output-stream)
14320 (clear-stream $_test-output-buffered-file->buffer)
14321 (clear-stream _test-error-stream)
14322 (clear-stream $_test-error-buffered-file->buffer)
14323
14324 68/push 0/imm32
14325 68/push 0/imm32
14326 89/<- %edx 4/r32/esp
14327 (tailor-exit-descriptor %edx 0x10)
14328
14329 (write _test-input-stream "fn foo {\n")
14330 (write _test-input-stream " copy-object\n")
14331 (write _test-input-stream "}\n")
14332
14333 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14334
14335
14336 89/<- %edx 4/r32/esp
14337 (flush _test-output-buffered-file)
14338 (flush _test-error-buffered-file)
14339 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14345
14346 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-inout: output should be empty")
14347 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-no-inout: error message")
14348
14349 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-inout: exit status")
14350
14351 81 0/subop/add %esp 8/imm32
14352
14353 5d/pop-to-ebp
14354 c3/return
14355
14356 test-copy-object-with-no-source:
14357
14358 55/push-ebp
14359 89/<- %ebp 4/r32/esp
14360
14361 (clear-stream _test-input-stream)
14362 (clear-stream $_test-input-buffered-file->buffer)
14363 (clear-stream _test-output-stream)
14364 (clear-stream $_test-output-buffered-file->buffer)
14365 (clear-stream _test-error-stream)
14366 (clear-stream $_test-error-buffered-file->buffer)
14367
14368 68/push 0/imm32
14369 68/push 0/imm32
14370 89/<- %edx 4/r32/esp
14371 (tailor-exit-descriptor %edx 0x10)
14372
14373 (write _test-input-stream "fn foo {\n")
14374 (write _test-input-stream " var x: (addr int)\n")
14375 (write _test-input-stream " copy-object x\n")
14376 (write _test-input-stream "}\n")
14377
14378 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14379
14380
14381 89/<- %edx 4/r32/esp
14382 (flush _test-output-buffered-file)
14383 (flush _test-error-buffered-file)
14384 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14390
14391 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-source: output should be empty")
14392 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-no-source: error message")
14393
14394 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-source: exit status")
14395
14396 81 0/subop/add %esp 8/imm32
14397
14398 5d/pop-to-ebp
14399 c3/return
14400
14401 test-copy-object-with-too-many-inouts:
14402
14403 55/push-ebp
14404 89/<- %ebp 4/r32/esp
14405
14406 (clear-stream _test-input-stream)
14407 (clear-stream $_test-input-buffered-file->buffer)
14408 (clear-stream _test-output-stream)
14409 (clear-stream $_test-output-buffered-file->buffer)
14410 (clear-stream _test-error-stream)
14411 (clear-stream $_test-error-buffered-file->buffer)
14412
14413 68/push 0/imm32
14414 68/push 0/imm32
14415 89/<- %edx 4/r32/esp
14416 (tailor-exit-descriptor %edx 0x10)
14417
14418 (write _test-input-stream "fn foo {\n")
14419 (write _test-input-stream " var x: (addr boolean)\n")
14420 (write _test-input-stream " copy-object x, x, x\n")
14421 (write _test-input-stream "}\n")
14422
14423 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14424
14425
14426 89/<- %edx 4/r32/esp
14427 (flush _test-output-buffered-file)
14428 (flush _test-error-buffered-file)
14429 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14435
14436 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-too-many-inouts: output should be empty")
14437 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must have two inouts" "F - test-copy-object-with-too-many-inouts: error message")
14438
14439 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-too-many-inouts: exit status")
14440
14441 81 0/subop/add %esp 8/imm32
14442
14443 5d/pop-to-ebp
14444 c3/return
14445
14446 test-copy-object-with-output:
14447
14448 55/push-ebp
14449 89/<- %ebp 4/r32/esp
14450
14451 (clear-stream _test-input-stream)
14452 (clear-stream $_test-input-buffered-file->buffer)
14453 (clear-stream _test-output-stream)
14454 (clear-stream $_test-output-buffered-file->buffer)
14455 (clear-stream _test-error-stream)
14456 (clear-stream $_test-error-buffered-file->buffer)
14457
14458 68/push 0/imm32
14459 68/push 0/imm32
14460 89/<- %edx 4/r32/esp
14461 (tailor-exit-descriptor %edx 0x10)
14462
14463 (write _test-input-stream "fn foo {\n")
14464 (write _test-input-stream " var x/eax: (addr boolean) <- copy 0\n")
14465 (write _test-input-stream " var y/ecx: (addr boolean) <- copy 0\n")
14466 (write _test-input-stream " x <- copy-object x, y\n")
14467 (write _test-input-stream "}\n")
14468
14469 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14470
14471
14472 89/<- %edx 4/r32/esp
14473 (flush _test-output-buffered-file)
14474 (flush _test-error-buffered-file)
14475 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14481
14482 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-output: output should be empty")
14483 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy-object' must not have any outputs" "F - test-copy-object-with-output: error message")
14484
14485 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-output: exit status")
14486
14487 81 0/subop/add %esp 8/imm32
14488
14489 5d/pop-to-ebp
14490 c3/return
14491
14492 test-copy-object-deref-address:
14493
14494 55/push-ebp
14495 89/<- %ebp 4/r32/esp
14496
14497 (clear-stream _test-input-stream)
14498 (clear-stream $_test-input-buffered-file->buffer)
14499 (clear-stream _test-output-stream)
14500 (clear-stream $_test-output-buffered-file->buffer)
14501
14502 (write _test-input-stream "fn foo {\n")
14503 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
14504 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
14505 (write _test-input-stream " copy-object *y, x\n")
14506 (write _test-input-stream "}\n")
14507
14508 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14509 (flush _test-output-buffered-file)
14510
14511
14512 5d/pop-to-ebp
14513 c3/return
14514
14515 test-copy-object-non-addr:
14516
14517 55/push-ebp
14518 89/<- %ebp 4/r32/esp
14519
14520 (clear-stream _test-input-stream)
14521 (clear-stream $_test-input-buffered-file->buffer)
14522 (clear-stream _test-output-stream)
14523 (clear-stream $_test-output-buffered-file->buffer)
14524 (clear-stream _test-error-stream)
14525 (clear-stream $_test-error-buffered-file->buffer)
14526
14527 68/push 0/imm32
14528 68/push 0/imm32
14529 89/<- %edx 4/r32/esp
14530 (tailor-exit-descriptor %edx 0x10)
14531
14532 (write _test-input-stream "fn foo {\n")
14533 (write _test-input-stream " var x: int\n")
14534 (write _test-input-stream " var y: int\n")
14535 (write _test-input-stream " copy-object y, x\n")
14536 (write _test-input-stream "}\n")
14537
14538 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14539
14540
14541 89/<- %edx 4/r32/esp
14542 (flush _test-output-buffered-file)
14543 (flush _test-error-buffered-file)
14544 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14550
14551 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-addr: output should be empty")
14552 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-object: two inouts with identical addr types expected" "F - test-copy-object-non-addr: error message")
14553
14554 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-addr: exit status")
14555
14556 81 0/subop/add %esp 8/imm32
14557
14558 5d/pop-to-ebp
14559 c3/return
14560
14561 test-copy-object-non-equal:
14562
14563 55/push-ebp
14564 89/<- %ebp 4/r32/esp
14565
14566 (clear-stream _test-input-stream)
14567 (clear-stream $_test-input-buffered-file->buffer)
14568 (clear-stream _test-output-stream)
14569 (clear-stream $_test-output-buffered-file->buffer)
14570 (clear-stream _test-error-stream)
14571 (clear-stream $_test-error-buffered-file->buffer)
14572
14573 68/push 0/imm32
14574 68/push 0/imm32
14575 89/<- %edx 4/r32/esp
14576 (tailor-exit-descriptor %edx 0x10)
14577
14578 (write _test-input-stream "fn foo {\n")
14579 (write _test-input-stream " var x: (addr int)\n")
14580 (write _test-input-stream " var y: (addr boolean)\n")
14581 (write _test-input-stream " copy-object y, x\n")
14582 (write _test-input-stream "}\n")
14583
14584 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14585
14586
14587 89/<- %edx 4/r32/esp
14588 (flush _test-output-buffered-file)
14589 (flush _test-error-buffered-file)
14590 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14596
14597 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-equal: output should be empty")
14598 (check-next-stream-line-equal _test-error-stream "fn foo: stmt copy-object: two inouts with identical addr types expected" "F - test-copy-object-non-equal: error message")
14599
14600 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-equal: exit status")
14601
14602 81 0/subop/add %esp 8/imm32
14603
14604 5d/pop-to-ebp
14605 c3/return
14606
14607 test-allocate-with-no-inout:
14608
14609 55/push-ebp
14610 89/<- %ebp 4/r32/esp
14611
14612 (clear-stream _test-input-stream)
14613 (clear-stream $_test-input-buffered-file->buffer)
14614 (clear-stream _test-output-stream)
14615 (clear-stream $_test-output-buffered-file->buffer)
14616 (clear-stream _test-error-stream)
14617 (clear-stream $_test-error-buffered-file->buffer)
14618
14619 68/push 0/imm32
14620 68/push 0/imm32
14621 89/<- %edx 4/r32/esp
14622 (tailor-exit-descriptor %edx 0x10)
14623
14624 (write _test-input-stream "fn foo {\n")
14625 (write _test-input-stream " allocate\n")
14626 (write _test-input-stream "}\n")
14627
14628 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14629
14630
14631 89/<- %edx 4/r32/esp
14632 (flush _test-output-buffered-file)
14633 (flush _test-error-buffered-file)
14634 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14640
14641 (check-stream-equal _test-output-stream "" "F - test-allocate-with-no-inout: output should be empty")
14642 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must have a single inout" "F - test-allocate-with-no-inout: error message")
14643
14644 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-no-inout: exit status")
14645
14646 81 0/subop/add %esp 8/imm32
14647
14648 5d/pop-to-ebp
14649 c3/return
14650
14651 test-allocate-with-too-many-inouts:
14652
14653 55/push-ebp
14654 89/<- %ebp 4/r32/esp
14655
14656 (clear-stream _test-input-stream)
14657 (clear-stream $_test-input-buffered-file->buffer)
14658 (clear-stream _test-output-stream)
14659 (clear-stream $_test-output-buffered-file->buffer)
14660 (clear-stream _test-error-stream)
14661 (clear-stream $_test-error-buffered-file->buffer)
14662
14663 68/push 0/imm32
14664 68/push 0/imm32
14665 89/<- %edx 4/r32/esp
14666 (tailor-exit-descriptor %edx 0x10)
14667
14668 (write _test-input-stream "fn foo {\n")
14669 (write _test-input-stream " var x: (addr handle int)\n")
14670 (write _test-input-stream " allocate x, 0\n")
14671 (write _test-input-stream "}\n")
14672
14673 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14674
14675
14676 89/<- %edx 4/r32/esp
14677 (flush _test-output-buffered-file)
14678 (flush _test-error-buffered-file)
14679 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14685
14686 (check-stream-equal _test-output-stream "" "F - test-allocate-with-too-many-inouts: output should be empty")
14687 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must have a single inout" "F - test-allocate-with-too-many-inouts: error message")
14688
14689 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-too-many-inouts: exit status")
14690
14691 81 0/subop/add %esp 8/imm32
14692
14693 5d/pop-to-ebp
14694 c3/return
14695
14696 test-allocate-with-output:
14697
14698 55/push-ebp
14699 89/<- %ebp 4/r32/esp
14700
14701 (clear-stream _test-input-stream)
14702 (clear-stream $_test-input-buffered-file->buffer)
14703 (clear-stream _test-output-stream)
14704 (clear-stream $_test-output-buffered-file->buffer)
14705 (clear-stream _test-error-stream)
14706 (clear-stream $_test-error-buffered-file->buffer)
14707
14708 68/push 0/imm32
14709 68/push 0/imm32
14710 89/<- %edx 4/r32/esp
14711 (tailor-exit-descriptor %edx 0x10)
14712
14713 (write _test-input-stream "fn foo {\n")
14714 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
14715 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14716 (write _test-input-stream " x <- allocate y\n")
14717 (write _test-input-stream "}\n")
14718
14719 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14720
14721
14722 89/<- %edx 4/r32/esp
14723 (flush _test-output-buffered-file)
14724 (flush _test-error-buffered-file)
14725 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14731
14732 (check-stream-equal _test-output-stream "" "F - test-allocate-with-output: output should be empty")
14733 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must not have any outputs" "F - test-allocate-with-output: error message")
14734
14735 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-output: exit status")
14736
14737 81 0/subop/add %esp 8/imm32
14738
14739 5d/pop-to-ebp
14740 c3/return
14741
14742 test-allocate-non-addr:
14743
14744 55/push-ebp
14745 89/<- %ebp 4/r32/esp
14746
14747 (clear-stream _test-input-stream)
14748 (clear-stream $_test-input-buffered-file->buffer)
14749 (clear-stream _test-output-stream)
14750 (clear-stream $_test-output-buffered-file->buffer)
14751 (clear-stream _test-error-stream)
14752 (clear-stream $_test-error-buffered-file->buffer)
14753
14754 68/push 0/imm32
14755 68/push 0/imm32
14756 89/<- %edx 4/r32/esp
14757 (tailor-exit-descriptor %edx 0x10)
14758
14759 (write _test-input-stream "fn foo {\n")
14760 (write _test-input-stream " var y: (handle int)\n")
14761 (write _test-input-stream " allocate y\n")
14762 (write _test-input-stream "}\n")
14763
14764 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14765
14766
14767 89/<- %edx 4/r32/esp
14768 (flush _test-output-buffered-file)
14769 (flush _test-error-buffered-file)
14770 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14776
14777 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr: output must be empty")
14778 (check-next-stream-line-equal _test-error-stream "fn foo: stmt allocate: inout 'y' must have type (addr handle ...)" "F - test-allocate-non-addr: error message")
14779
14780 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr: exit status")
14781
14782 81 0/subop/add %esp 8/imm32
14783
14784 5d/pop-to-ebp
14785 c3/return
14786
14787 test-allocate-non-addr-handle:
14788
14789 55/push-ebp
14790 89/<- %ebp 4/r32/esp
14791
14792 (clear-stream _test-input-stream)
14793 (clear-stream $_test-input-buffered-file->buffer)
14794 (clear-stream _test-output-stream)
14795 (clear-stream $_test-output-buffered-file->buffer)
14796 (clear-stream _test-error-stream)
14797 (clear-stream $_test-error-buffered-file->buffer)
14798
14799 68/push 0/imm32
14800 68/push 0/imm32
14801 89/<- %edx 4/r32/esp
14802 (tailor-exit-descriptor %edx 0x10)
14803
14804 (write _test-input-stream "fn foo {\n")
14805 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
14806 (write _test-input-stream " allocate y\n")
14807 (write _test-input-stream "}\n")
14808
14809 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14810
14811
14812 89/<- %edx 4/r32/esp
14813 (flush _test-output-buffered-file)
14814 (flush _test-error-buffered-file)
14815 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14821
14822 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr-handle: output should be empty")
14823 (check-next-stream-line-equal _test-error-stream "fn foo: stmt allocate: inout 'y' must have type (addr handle ...)" "F - test-allocate-non-addr-handle: error message")
14824
14825 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr-handle: exit status")
14826
14827 81 0/subop/add %esp 8/imm32
14828
14829 5d/pop-to-ebp
14830 c3/return
14831
14832 test-allocate-deref-address:
14833
14834 55/push-ebp
14835 89/<- %ebp 4/r32/esp
14836
14837 (clear-stream _test-input-stream)
14838 (clear-stream $_test-input-buffered-file->buffer)
14839 (clear-stream _test-output-stream)
14840 (clear-stream $_test-output-buffered-file->buffer)
14841
14842 (write _test-input-stream "fn foo {\n")
14843 (write _test-input-stream " var y/ecx: (addr addr handle int) <- copy 0\n")
14844 (write _test-input-stream " allocate *y\n")
14845 (write _test-input-stream "}\n")
14846
14847 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14848 (flush _test-output-buffered-file)
14849
14850
14851 5d/pop-to-ebp
14852 c3/return
14853
14854 test-populate-with-no-inout:
14855
14856 55/push-ebp
14857 89/<- %ebp 4/r32/esp
14858
14859 (clear-stream _test-input-stream)
14860 (clear-stream $_test-input-buffered-file->buffer)
14861 (clear-stream _test-output-stream)
14862 (clear-stream $_test-output-buffered-file->buffer)
14863 (clear-stream _test-error-stream)
14864 (clear-stream $_test-error-buffered-file->buffer)
14865
14866 68/push 0/imm32
14867 68/push 0/imm32
14868 89/<- %edx 4/r32/esp
14869 (tailor-exit-descriptor %edx 0x10)
14870
14871 (write _test-input-stream "fn foo {\n")
14872 (write _test-input-stream " populate\n")
14873 (write _test-input-stream "}\n")
14874
14875 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14876
14877
14878 89/<- %edx 4/r32/esp
14879 (flush _test-output-buffered-file)
14880 (flush _test-error-buffered-file)
14881 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14887
14888 (check-stream-equal _test-output-stream "" "F - test-populate-with-no-inout: output should be empty")
14889 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-no-inout: error message")
14890
14891 (check-ints-equal *(edx+4) 2 "F - test-populate-with-no-inout: exit status")
14892
14893 81 0/subop/add %esp 8/imm32
14894
14895 5d/pop-to-ebp
14896 c3/return
14897
14898 test-populate-with-too-many-inouts:
14899
14900 55/push-ebp
14901 89/<- %ebp 4/r32/esp
14902
14903 (clear-stream _test-input-stream)
14904 (clear-stream $_test-input-buffered-file->buffer)
14905 (clear-stream _test-output-stream)
14906 (clear-stream $_test-output-buffered-file->buffer)
14907 (clear-stream _test-error-stream)
14908 (clear-stream $_test-error-buffered-file->buffer)
14909
14910 68/push 0/imm32
14911 68/push 0/imm32
14912 89/<- %edx 4/r32/esp
14913 (tailor-exit-descriptor %edx 0x10)
14914
14915 (write _test-input-stream "fn foo {\n")
14916 (write _test-input-stream " var x: (addr handle int)\n")
14917 (write _test-input-stream " populate x, 3, 0\n")
14918 (write _test-input-stream "}\n")
14919
14920 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14921
14922
14923 89/<- %edx 4/r32/esp
14924 (flush _test-output-buffered-file)
14925 (flush _test-error-buffered-file)
14926 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14932
14933 (check-stream-equal _test-output-stream "" "F - test-populate-with-too-many-inouts: output should be empty")
14934 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-too-many-inouts: error message")
14935
14936 (check-ints-equal *(edx+4) 2 "F - test-populate-with-too-many-inouts: exit status")
14937
14938 81 0/subop/add %esp 8/imm32
14939
14940 5d/pop-to-ebp
14941 c3/return
14942
14943 test-populate-with-output:
14944
14945 55/push-ebp
14946 89/<- %ebp 4/r32/esp
14947
14948 (clear-stream _test-input-stream)
14949 (clear-stream $_test-input-buffered-file->buffer)
14950 (clear-stream _test-output-stream)
14951 (clear-stream $_test-output-buffered-file->buffer)
14952 (clear-stream _test-error-stream)
14953 (clear-stream $_test-error-buffered-file->buffer)
14954
14955 68/push 0/imm32
14956 68/push 0/imm32
14957 89/<- %edx 4/r32/esp
14958 (tailor-exit-descriptor %edx 0x10)
14959
14960 (write _test-input-stream "fn foo {\n")
14961 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
14962 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14963 (write _test-input-stream " x <- populate y\n")
14964 (write _test-input-stream "}\n")
14965
14966 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14967
14968
14969 89/<- %edx 4/r32/esp
14970 (flush _test-output-buffered-file)
14971 (flush _test-error-buffered-file)
14972 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14978
14979 (check-stream-equal _test-output-stream "" "F - test-populate-with-output: output should be empty")
14980 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must not have any outputs" "F - test-populate-with-output: error message")
14981
14982 (check-ints-equal *(edx+4) 2 "F - test-populate-with-output: exit status")
14983
14984 81 0/subop/add %esp 8/imm32
14985
14986 5d/pop-to-ebp
14987 c3/return
14988
14989 test-populate-non-addr:
14990
14991 55/push-ebp
14992 89/<- %ebp 4/r32/esp
14993
14994 (clear-stream _test-input-stream)
14995 (clear-stream $_test-input-buffered-file->buffer)
14996 (clear-stream _test-output-stream)
14997 (clear-stream $_test-output-buffered-file->buffer)
14998 (clear-stream _test-error-stream)
14999 (clear-stream $_test-error-buffered-file->buffer)
15000
15001 68/push 0/imm32
15002 68/push 0/imm32
15003 89/<- %edx 4/r32/esp
15004 (tailor-exit-descriptor %edx 0x10)
15005
15006 (write _test-input-stream "fn foo {\n")
15007 (write _test-input-stream " var y: (handle int)\n")
15008 (write _test-input-stream " populate y, 3\n")
15009 (write _test-input-stream "}\n")
15010
15011 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15012
15013
15014 89/<- %edx 4/r32/esp
15015 (flush _test-output-buffered-file)
15016 (flush _test-error-buffered-file)
15017 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15023
15024 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr: output must be empty")
15025 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr: error message")
15026
15027 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr: exit status")
15028
15029 81 0/subop/add %esp 8/imm32
15030
15031 5d/pop-to-ebp
15032 c3/return
15033
15034 test-populate-non-addr-handle:
15035
15036 55/push-ebp
15037 89/<- %ebp 4/r32/esp
15038
15039 (clear-stream _test-input-stream)
15040 (clear-stream $_test-input-buffered-file->buffer)
15041 (clear-stream _test-output-stream)
15042 (clear-stream $_test-output-buffered-file->buffer)
15043 (clear-stream _test-error-stream)
15044 (clear-stream $_test-error-buffered-file->buffer)
15045
15046 68/push 0/imm32
15047 68/push 0/imm32
15048 89/<- %edx 4/r32/esp
15049 (tailor-exit-descriptor %edx 0x10)
15050
15051 (write _test-input-stream "fn foo {\n")
15052 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
15053 (write _test-input-stream " populate y, 3\n")
15054 (write _test-input-stream "}\n")
15055
15056 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15057
15058
15059 89/<- %edx 4/r32/esp
15060 (flush _test-output-buffered-file)
15061 (flush _test-error-buffered-file)
15062 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15068
15069 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle: output should be empty")
15070 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr-handle: error message")
15071
15072 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle: exit status")
15073
15074 81 0/subop/add %esp 8/imm32
15075
15076 5d/pop-to-ebp
15077 c3/return
15078
15079 test-populate-non-addr-handle-array:
15080
15081 55/push-ebp
15082 89/<- %ebp 4/r32/esp
15083
15084 (clear-stream _test-input-stream)
15085 (clear-stream $_test-input-buffered-file->buffer)
15086 (clear-stream _test-output-stream)
15087 (clear-stream $_test-output-buffered-file->buffer)
15088 (clear-stream _test-error-stream)
15089 (clear-stream $_test-error-buffered-file->buffer)
15090
15091 68/push 0/imm32
15092 68/push 0/imm32
15093 89/<- %edx 4/r32/esp
15094 (tailor-exit-descriptor %edx 0x10)
15095
15096 (write _test-input-stream "fn foo {\n")
15097 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
15098 (write _test-input-stream " populate y, 3\n")
15099 (write _test-input-stream "}\n")
15100
15101 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15102
15103
15104 89/<- %edx 4/r32/esp
15105 (flush _test-output-buffered-file)
15106 (flush _test-error-buffered-file)
15107 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15113
15114 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle-array: output should be empty")
15115 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate: first inout 'y' must have type (addr handle array ...)" "F - test-populate-non-addr-handle-array: error message")
15116
15117 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle-array: exit status")
15118
15119 81 0/subop/add %esp 8/imm32
15120
15121 5d/pop-to-ebp
15122 c3/return
15123
15124 test-populate-deref-address:
15125
15126 55/push-ebp
15127 89/<- %ebp 4/r32/esp
15128
15129 (clear-stream _test-input-stream)
15130 (clear-stream $_test-input-buffered-file->buffer)
15131 (clear-stream _test-output-stream)
15132 (clear-stream $_test-output-buffered-file->buffer)
15133
15134 (write _test-input-stream "fn foo {\n")
15135 (write _test-input-stream " var y/ecx: (addr addr handle array int) <- copy 0\n")
15136 (write _test-input-stream " populate *y, 3\n")
15137 (write _test-input-stream "}\n")
15138
15139 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
15140 (flush _test-output-buffered-file)
15141
15142
15143 5d/pop-to-ebp
15144 c3/return
15145
15146 test-populate-stream-with-no-inout:
15147
15148 55/push-ebp
15149 89/<- %ebp 4/r32/esp
15150
15151 (clear-stream _test-input-stream)
15152 (clear-stream $_test-input-buffered-file->buffer)
15153 (clear-stream _test-output-stream)
15154 (clear-stream $_test-output-buffered-file->buffer)
15155 (clear-stream _test-error-stream)
15156 (clear-stream $_test-error-buffered-file->buffer)
15157
15158 68/push 0/imm32
15159 68/push 0/imm32
15160 89/<- %edx 4/r32/esp
15161 (tailor-exit-descriptor %edx 0x10)
15162
15163 (write _test-input-stream "fn foo {\n")
15164 (write _test-input-stream " populate-stream\n")
15165 (write _test-input-stream "}\n")
15166
15167 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15168
15169
15170 89/<- %edx 4/r32/esp
15171 (flush _test-output-buffered-file)
15172 (flush _test-error-buffered-file)
15173 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15179
15180 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-no-inout: output should be empty")
15181 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must have two inouts" "F - test-populate-stream-with-no-inout: error message")
15182
15183 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-no-inout: exit status")
15184
15185 81 0/subop/add %esp 8/imm32
15186
15187 5d/pop-to-ebp
15188 c3/return
15189
15190 test-populate-stream-with-too-many-inouts:
15191
15192 55/push-ebp
15193 89/<- %ebp 4/r32/esp
15194
15195 (clear-stream _test-input-stream)
15196 (clear-stream $_test-input-buffered-file->buffer)
15197 (clear-stream _test-output-stream)
15198 (clear-stream $_test-output-buffered-file->buffer)
15199 (clear-stream _test-error-stream)
15200 (clear-stream $_test-error-buffered-file->buffer)
15201
15202 68/push 0/imm32
15203 68/push 0/imm32
15204 89/<- %edx 4/r32/esp
15205 (tailor-exit-descriptor %edx 0x10)
15206
15207 (write _test-input-stream "fn foo {\n")
15208 (write _test-input-stream " var x: (addr handle int)\n")
15209 (write _test-input-stream " populate-stream x, 3, 0\n")
15210 (write _test-input-stream "}\n")
15211
15212 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15213
15214
15215 89/<- %edx 4/r32/esp
15216 (flush _test-output-buffered-file)
15217 (flush _test-error-buffered-file)
15218 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15224
15225 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-too-many-inouts: output should be empty")
15226 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must have two inouts" "F - test-populate-stream-with-too-many-inouts: error message")
15227
15228 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-too-many-inouts: exit status")
15229
15230 81 0/subop/add %esp 8/imm32
15231
15232 5d/pop-to-ebp
15233 c3/return
15234
15235 test-populate-stream-with-output:
15236
15237 55/push-ebp
15238 89/<- %ebp 4/r32/esp
15239
15240 (clear-stream _test-input-stream)
15241 (clear-stream $_test-input-buffered-file->buffer)
15242 (clear-stream _test-output-stream)
15243 (clear-stream $_test-output-buffered-file->buffer)
15244 (clear-stream _test-error-stream)
15245 (clear-stream $_test-error-buffered-file->buffer)
15246
15247 68/push 0/imm32
15248 68/push 0/imm32
15249 89/<- %edx 4/r32/esp
15250 (tailor-exit-descriptor %edx 0x10)
15251
15252 (write _test-input-stream "fn foo {\n")
15253 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
15254 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
15255 (write _test-input-stream " x <- populate-stream y\n")
15256 (write _test-input-stream "}\n")
15257
15258 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15259
15260
15261 89/<- %edx 4/r32/esp
15262 (flush _test-output-buffered-file)
15263 (flush _test-error-buffered-file)
15264 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15270
15271 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-output: output should be empty")
15272 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate-stream' must not have any outputs" "F - test-populate-stream-with-output: error message")
15273
15274 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-output: exit status")
15275
15276 81 0/subop/add %esp 8/imm32
15277
15278 5d/pop-to-ebp
15279 c3/return
15280
15281 test-populate-stream-non-addr:
15282
15283 55/push-ebp
15284 89/<- %ebp 4/r32/esp
15285
15286 (clear-stream _test-input-stream)
15287 (clear-stream $_test-input-buffered-file->buffer)
15288 (clear-stream _test-output-stream)
15289 (clear-stream $_test-output-buffered-file->buffer)
15290 (clear-stream _test-error-stream)
15291 (clear-stream $_test-error-buffered-file->buffer)
15292
15293 68/push 0/imm32
15294 68/push 0/imm32
15295 89/<- %edx 4/r32/esp
15296 (tailor-exit-descriptor %edx 0x10)
15297
15298 (write _test-input-stream "fn foo {\n")
15299 (write _test-input-stream " var y: (handle int)\n")
15300 (write _test-input-stream " populate-stream y, 3\n")
15301 (write _test-input-stream "}\n")
15302
15303 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15304
15305
15306 89/<- %edx 4/r32/esp
15307 (flush _test-output-buffered-file)
15308 (flush _test-error-buffered-file)
15309 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15315
15316 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr: output must be empty")
15317 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr: error message")
15318
15319 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr: exit status")
15320
15321 81 0/subop/add %esp 8/imm32
15322
15323 5d/pop-to-ebp
15324 c3/return
15325
15326 test-populate-stream-non-addr-handle:
15327
15328 55/push-ebp
15329 89/<- %ebp 4/r32/esp
15330
15331 (clear-stream _test-input-stream)
15332 (clear-stream $_test-input-buffered-file->buffer)
15333 (clear-stream _test-output-stream)
15334 (clear-stream $_test-output-buffered-file->buffer)
15335 (clear-stream _test-error-stream)
15336 (clear-stream $_test-error-buffered-file->buffer)
15337
15338 68/push 0/imm32
15339 68/push 0/imm32
15340 89/<- %edx 4/r32/esp
15341 (tailor-exit-descriptor %edx 0x10)
15342
15343 (write _test-input-stream "fn foo {\n")
15344 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
15345 (write _test-input-stream " populate-stream y, 3\n")
15346 (write _test-input-stream "}\n")
15347
15348 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15349
15350
15351 89/<- %edx 4/r32/esp
15352 (flush _test-output-buffered-file)
15353 (flush _test-error-buffered-file)
15354 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15360
15361 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle: output should be empty")
15362 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr-handle: error message")
15363
15364 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle: exit status")
15365
15366 81 0/subop/add %esp 8/imm32
15367
15368 5d/pop-to-ebp
15369 c3/return
15370
15371 test-populate-stream-non-addr-handle-stream:
15372
15373 55/push-ebp
15374 89/<- %ebp 4/r32/esp
15375
15376 (clear-stream _test-input-stream)
15377 (clear-stream $_test-input-buffered-file->buffer)
15378 (clear-stream _test-output-stream)
15379 (clear-stream $_test-output-buffered-file->buffer)
15380 (clear-stream _test-error-stream)
15381 (clear-stream $_test-error-buffered-file->buffer)
15382
15383 68/push 0/imm32
15384 68/push 0/imm32
15385 89/<- %edx 4/r32/esp
15386 (tailor-exit-descriptor %edx 0x10)
15387
15388 (write _test-input-stream "fn foo {\n")
15389 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
15390 (write _test-input-stream " populate-stream y, 3\n")
15391 (write _test-input-stream "}\n")
15392
15393 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15394
15395
15396 89/<- %edx 4/r32/esp
15397 (flush _test-output-buffered-file)
15398 (flush _test-error-buffered-file)
15399 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15405
15406 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle-stream: output should be empty")
15407 (check-next-stream-line-equal _test-error-stream "fn foo: stmt populate-stream: first inout 'y' must have type (addr handle stream ...)" "F - test-populate-stream-non-addr-handle-stream: error message")
15408
15409 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle-stream: exit status")
15410
15411 81 0/subop/add %esp 8/imm32
15412
15413 5d/pop-to-ebp
15414 c3/return
15415
15416 test-populate-stream-deref-address:
15417
15418 55/push-ebp
15419 89/<- %ebp 4/r32/esp
15420
15421 (clear-stream _test-input-stream)
15422 (clear-stream $_test-input-buffered-file->buffer)
15423 (clear-stream _test-output-stream)
15424 (clear-stream $_test-output-buffered-file->buffer)
15425
15426 (write _test-input-stream "fn foo {\n")
15427 (write _test-input-stream " var y/ecx: (addr addr handle stream int) <- copy 0\n")
15428 (write _test-input-stream " populate-stream *y, 3\n")
15429 (write _test-input-stream "}\n")
15430
15431 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
15432 (flush _test-output-buffered-file)
15433
15434
15435 5d/pop-to-ebp
15436 c3/return
15437
15438 test-convert-with-no-inout:
15439
15440 55/push-ebp
15441 89/<- %ebp 4/r32/esp
15442
15443 (clear-stream _test-input-stream)
15444 (clear-stream $_test-input-buffered-file->buffer)
15445 (clear-stream _test-output-stream)
15446 (clear-stream $_test-output-buffered-file->buffer)
15447 (clear-stream _test-error-stream)
15448 (clear-stream $_test-error-buffered-file->buffer)
15449
15450 68/push 0/imm32
15451 68/push 0/imm32
15452 89/<- %edx 4/r32/esp
15453 (tailor-exit-descriptor %edx 0x10)
15454
15455 (write _test-input-stream "fn foo {\n")
15456 (write _test-input-stream " var x/eax: int <- convert\n")
15457 (write _test-input-stream "}\n")
15458
15459 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15460
15461
15462 89/<- %edx 4/r32/esp
15463 (flush _test-output-buffered-file)
15464 (flush _test-error-buffered-file)
15465 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15471
15472 (check-stream-equal _test-output-stream "" "F - test-convert-with-no-inout: output should be empty")
15473 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' expects an inout" "F - test-convert-with-no-inout: error message")
15474
15475 (check-ints-equal *(edx+4) 2 "F - test-convert-with-no-inout: exit status")
15476
15477 81 0/subop/add %esp 8/imm32
15478
15479 5d/pop-to-ebp
15480 c3/return
15481
15482 test-convert-with-multiple-inouts:
15483
15484 55/push-ebp
15485 89/<- %ebp 4/r32/esp
15486
15487 (clear-stream _test-input-stream)
15488 (clear-stream $_test-input-buffered-file->buffer)
15489 (clear-stream _test-output-stream)
15490 (clear-stream $_test-output-buffered-file->buffer)
15491 (clear-stream _test-error-stream)
15492 (clear-stream $_test-error-buffered-file->buffer)
15493
15494 68/push 0/imm32
15495 68/push 0/imm32
15496 89/<- %edx 4/r32/esp
15497 (tailor-exit-descriptor %edx 0x10)
15498
15499 (write _test-input-stream "fn foo {\n")
15500 (write _test-input-stream " var x/eax: int <- convert 0, 0\n")
15501 (write _test-input-stream "}\n")
15502
15503 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15504
15505
15506 89/<- %edx 4/r32/esp
15507 (flush _test-output-buffered-file)
15508 (flush _test-error-buffered-file)
15509 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15515
15516 (check-stream-equal _test-output-stream "" "F - test-convert-with-multiple-inouts: output should be empty")
15517 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' must have just one inout" "F - test-convert-with-multiple-inouts: error message")
15518
15519 (check-ints-equal *(edx+4) 2 "F - test-convert-with-multiple-inouts: exit status")
15520
15521 81 0/subop/add %esp 8/imm32
15522
15523 5d/pop-to-ebp
15524 c3/return
15525
15526 test-convert-with-no-output:
15527
15528 55/push-ebp
15529 89/<- %ebp 4/r32/esp
15530
15531 (clear-stream _test-input-stream)
15532 (clear-stream $_test-input-buffered-file->buffer)
15533 (clear-stream _test-output-stream)
15534 (clear-stream $_test-output-buffered-file->buffer)
15535 (clear-stream _test-error-stream)
15536 (clear-stream $_test-error-buffered-file->buffer)
15537
15538 68/push 0/imm32
15539 68/push 0/imm32
15540 89/<- %edx 4/r32/esp
15541 (tailor-exit-descriptor %edx 0x10)
15542
15543 (write _test-input-stream "fn foo {\n")
15544 (write _test-input-stream " convert 0\n")
15545 (write _test-input-stream "}\n")
15546
15547 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15548
15549
15550 89/<- %edx 4/r32/esp
15551 (flush _test-output-buffered-file)
15552 (flush _test-error-buffered-file)
15553 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15559
15560 (check-stream-equal _test-output-stream "" "F - test-convert-with-no-output: output should be empty")
15561 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' expects an output" "F - test-convert-with-no-output: error message")
15562
15563 (check-ints-equal *(edx+4) 2 "F - test-convert-with-no-output: exit status")
15564
15565 81 0/subop/add %esp 8/imm32
15566
15567 5d/pop-to-ebp
15568 c3/return
15569
15570 test-convert-with-multiple-outputs:
15571
15572 55/push-ebp
15573 89/<- %ebp 4/r32/esp
15574
15575 (clear-stream _test-input-stream)
15576 (clear-stream $_test-input-buffered-file->buffer)
15577 (clear-stream _test-output-stream)
15578 (clear-stream $_test-output-buffered-file->buffer)
15579 (clear-stream _test-error-stream)
15580 (clear-stream $_test-error-buffered-file->buffer)
15581
15582 68/push 0/imm32
15583 68/push 0/imm32
15584 89/<- %edx 4/r32/esp
15585 (tailor-exit-descriptor %edx 0x10)
15586
15587 (write _test-input-stream "fn foo {\n")
15588 (write _test-input-stream " var x/eax: int <- copy 0\n")
15589 (write _test-input-stream " var y/ecx: int <- copy 0\n")
15590 (write _test-input-stream " x, y <- convert 0\n")
15591 (write _test-input-stream "}\n")
15592
15593 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15594
15595
15596 89/<- %edx 4/r32/esp
15597 (flush _test-output-buffered-file)
15598 (flush _test-error-buffered-file)
15599 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15605
15606 (check-stream-equal _test-output-stream "" "F - test-convert-with-multiple-outputs: output should be empty")
15607 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' must have just one output" "F - test-convert-with-multiple-outputs: error message")
15608
15609 (check-ints-equal *(edx+4) 2 "F - test-convert-with-multiple-outputs: exit status")
15610
15611 81 0/subop/add %esp 8/imm32
15612
15613 5d/pop-to-ebp
15614 c3/return
15615
15616 test-convert-deref-address:
15617
15618 55/push-ebp
15619 89/<- %ebp 4/r32/esp
15620
15621 (clear-stream _test-input-stream)
15622 (clear-stream $_test-input-buffered-file->buffer)
15623 (clear-stream _test-output-stream)
15624 (clear-stream $_test-output-buffered-file->buffer)
15625
15626 (write _test-input-stream "fn foo {\n")
15627 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
15628 (write _test-input-stream " var y/xmm4: float <- convert *x\n")
15629 (write _test-input-stream "}\n")
15630
15631 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
15632 (flush _test-output-buffered-file)
15633
15634
15635 5d/pop-to-ebp
15636 c3/return
15637
15638 test-convert-to-non-register:
15639
15640 55/push-ebp
15641 89/<- %ebp 4/r32/esp
15642
15643 (clear-stream _test-input-stream)
15644 (clear-stream $_test-input-buffered-file->buffer)
15645 (clear-stream _test-output-stream)
15646 (clear-stream $_test-output-buffered-file->buffer)
15647 (clear-stream _test-error-stream)
15648 (clear-stream $_test-error-buffered-file->buffer)
15649
15650 68/push 0/imm32
15651 68/push 0/imm32
15652 89/<- %edx 4/r32/esp
15653 (tailor-exit-descriptor %edx 0x10)
15654
15655 (write _test-input-stream "fn foo {\n")
15656 (write _test-input-stream " var x: float\n")
15657 (write _test-input-stream " var y: int\n")
15658 (write _test-input-stream " x <- convert y\n")
15659 (write _test-input-stream "}\n")
15660
15661 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15662
15663
15664 89/<- %edx 4/r32/esp
15665 (flush _test-output-buffered-file)
15666 (flush _test-error-buffered-file)
15667 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15673
15674 (check-stream-equal _test-output-stream "" "F - test-convert-to-non-register: output should be empty")
15675 (check-next-stream-line-equal _test-error-stream "fn foo: stmt convert: output 'x' not in a register" "F - test-convert-to-non-register: error message")
15676
15677 (check-ints-equal *(edx+4) 2 "F - test-convert-to-non-register: exit status")
15678
15679 81 0/subop/add %esp 8/imm32
15680
15681 5d/pop-to-ebp
15682 c3/return
15683
15684 test-convert-invalid-inout-type:
15685
15686 55/push-ebp
15687 89/<- %ebp 4/r32/esp
15688
15689 (clear-stream _test-input-stream)
15690 (clear-stream $_test-input-buffered-file->buffer)
15691 (clear-stream _test-output-stream)
15692 (clear-stream $_test-output-buffered-file->buffer)
15693 (clear-stream _test-error-stream)
15694 (clear-stream $_test-error-buffered-file->buffer)
15695
15696 68/push 0/imm32
15697 68/push 0/imm32
15698 89/<- %edx 4/r32/esp
15699 (tailor-exit-descriptor %edx 0x10)
15700
15701 (write _test-input-stream "fn foo {\n")
15702 (write _test-input-stream " var x: boolean\n")
15703 (write _test-input-stream " var y/xmm1: float <- convert x\n")
15704 (write _test-input-stream "}\n")
15705
15706 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15707
15708
15709 89/<- %edx 4/r32/esp
15710 (flush _test-output-buffered-file)
15711 (flush _test-error-buffered-file)
15712 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15718
15719 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-inout-type: output should be empty")
15720 (check-next-stream-line-equal _test-error-stream "fn foo: stmt convert: inout 'x' must be an int or float" "F - test-convert-invalid-inout-type: error message")
15721
15722 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-inout-type: exit status")
15723
15724 81 0/subop/add %esp 8/imm32
15725
15726 5d/pop-to-ebp
15727 c3/return
15728
15729 test-convert-invalid-output-type:
15730
15731 55/push-ebp
15732 89/<- %ebp 4/r32/esp
15733
15734 (clear-stream _test-input-stream)
15735 (clear-stream $_test-input-buffered-file->buffer)
15736 (clear-stream _test-output-stream)
15737 (clear-stream $_test-output-buffered-file->buffer)
15738 (clear-stream _test-error-stream)
15739 (clear-stream $_test-error-buffered-file->buffer)
15740
15741 68/push 0/imm32
15742 68/push 0/imm32
15743 89/<- %edx 4/r32/esp
15744 (tailor-exit-descriptor %edx 0x10)
15745
15746 (write _test-input-stream "fn foo {\n")
15747 (write _test-input-stream " var x: float\n")
15748 (write _test-input-stream " var y/eax: boolean <- convert x\n")
15749 (write _test-input-stream "}\n")
15750
15751 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15752
15753
15754 89/<- %edx 4/r32/esp
15755 (flush _test-output-buffered-file)
15756 (flush _test-error-buffered-file)
15757 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15763
15764 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-output-type: output should be empty")
15765 (check-next-stream-line-equal _test-error-stream "fn foo: stmt convert: output 'y' must be an int or float" "F - test-convert-invalid-output-type: error message")
15766
15767 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-output-type: exit status")
15768
15769 81 0/subop/add %esp 8/imm32
15770
15771 5d/pop-to-ebp
15772 c3/return
15773
15774 test-convert-int-to-int:
15775
15776 55/push-ebp
15777 89/<- %ebp 4/r32/esp
15778
15779 (clear-stream _test-input-stream)
15780 (clear-stream $_test-input-buffered-file->buffer)
15781 (clear-stream _test-output-stream)
15782 (clear-stream $_test-output-buffered-file->buffer)
15783 (clear-stream _test-error-stream)
15784 (clear-stream $_test-error-buffered-file->buffer)
15785
15786 68/push 0/imm32
15787 68/push 0/imm32
15788 89/<- %edx 4/r32/esp
15789 (tailor-exit-descriptor %edx 0x10)
15790
15791 (write _test-input-stream "fn foo {\n")
15792 (write _test-input-stream " var x: int\n")
15793 (write _test-input-stream " var y/eax: int <- convert x\n")
15794 (write _test-input-stream "}\n")
15795
15796 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15797
15798
15799 89/<- %edx 4/r32/esp
15800 (flush _test-output-buffered-file)
15801 (flush _test-error-buffered-file)
15802 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15808
15809 (check-stream-equal _test-output-stream "" "F - test-convert-int-to-int: output should be empty")
15810 (check-next-stream-line-equal _test-error-stream "fn foo: stmt convert: no need to convert int to int" "F - test-convert-int-to-int: error message")
15811
15812 (check-ints-equal *(edx+4) 2 "F - test-convert-int-to-int: exit status")
15813
15814 81 0/subop/add %esp 8/imm32
15815
15816 5d/pop-to-ebp
15817 c3/return
15818
15819 test-convert-float-to-float:
15820
15821 55/push-ebp
15822 89/<- %ebp 4/r32/esp
15823
15824 (clear-stream _test-input-stream)
15825 (clear-stream $_test-input-buffered-file->buffer)
15826 (clear-stream _test-output-stream)
15827 (clear-stream $_test-output-buffered-file->buffer)
15828 (clear-stream _test-error-stream)
15829 (clear-stream $_test-error-buffered-file->buffer)
15830
15831 68/push 0/imm32
15832 68/push 0/imm32
15833 89/<- %edx 4/r32/esp
15834 (tailor-exit-descriptor %edx 0x10)
15835
15836 (write _test-input-stream "fn foo {\n")
15837 (write _test-input-stream " var x: float\n")
15838 (write _test-input-stream " var y/xmm6: float <- convert x\n")
15839 (write _test-input-stream "}\n")
15840
15841 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15842
15843
15844 89/<- %edx 4/r32/esp
15845 (flush _test-output-buffered-file)
15846 (flush _test-error-buffered-file)
15847 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15853
15854 (check-stream-equal _test-output-stream "" "F - test-convert-float-to-float: output should be empty")
15855 (check-next-stream-line-equal _test-error-stream "fn foo: stmt convert: no need to convert float to float" "F - test-convert-float-to-float: error message")
15856
15857 (check-ints-equal *(edx+4) 2 "F - test-convert-float-to-float: exit status")
15858
15859 81 0/subop/add %esp 8/imm32
15860
15861 5d/pop-to-ebp
15862 c3/return
15863
15864
15865
15866
15867
15868 == data
15869
15870
15871 Next-block-index:
15872 1/imm32
15873
15874 Curr-block-depth:
15875 1/imm32
15876
15877 == code
15878
15879 parse-mu:
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918 55/push-ebp
15919 89/<- %ebp 4/r32/esp
15920
15921 68/push _Program-signatures/imm32
15922
15923 50/push-eax
15924 51/push-ecx
15925 52/push-edx
15926 53/push-ebx
15927 56/push-esi
15928 57/push-edi
15929
15930 81 5/subop/subtract %esp 0x200/imm32
15931 68/push 0x200/imm32/size
15932 68/push 0/imm32/read
15933 68/push 0/imm32/write
15934 89/<- %ecx 4/r32/esp
15935
15936 68/push 0/imm32/end
15937 68/push 0/imm32/start
15938 89/<- %edx 4/r32/esp
15939
15940 bf/copy-to-edi _Program-functions/imm32
15941
15942 81 5/subop/subtract %esp 0xc00/imm32
15943 68/push 0xc00/imm32/size
15944 68/push 0/imm32/top
15945 89/<- %ebx 4/r32/esp
15946 {
15947 $parse-mu:line-loop:
15948 (clear-stream %ecx)
15949 (read-line-buffered *(ebp+8) %ecx)
15950
15951 81 7/subop/compare *ecx 0/imm32
15952 0f 84/jump-if-= break/disp32
15953 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
15959 (next-mu-token %ecx %edx)
15960
15961 (slice-empty? %edx)
15962 3d/compare-eax-and 0/imm32/false
15963 0f 85/jump-if-!= loop/disp32
15964
15965
15966 8b/-> *edx 0/r32/eax
15967 8a/copy-byte *eax 0/r32/AL
15968 25/and-eax-with 0xff/imm32
15969
15970 3d/compare-eax-and 0x23/imm32/hash
15971 0f 84/jump-if-= loop/disp32
15972
15973 {
15974 $parse-mu:fn:
15975 (slice-equal? %edx "fn")
15976 3d/compare-eax-and 0/imm32/false
15977 0f 84/jump-if-= break/disp32
15978
15979 68/push 0/imm32
15980 68/push 0/imm32
15981 89/<- %esi 4/r32/esp
15982
15983 (allocate Heap *Function-size %esi)
15984
15985 (lookup *esi *(esi+4))
15986
15987 (clear-stack %ebx)
15988
15989 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
15990 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
15991
15992 8b/-> *esi 0/r32/eax
15993 89/<- *edi 0/r32/eax
15994 8b/-> *(esi+4) 0/r32/eax
15995 89/<- *(edi+4) 0/r32/eax
15996
15997
15998 (lookup *esi *(esi+4))
15999
16000 8d/copy-address *(eax+0x20) 7/r32/edi
16001
16002 81 0/subop/add %esp 8/imm32
16003
16004 e9/jump $parse-mu:line-loop/disp32
16005 }
16006
16007
16008 {
16009 $parse-mu:sig:
16010 (slice-equal? %edx "sig")
16011 3d/compare-eax-and 0/imm32/false
16012 0f 84/jump-if-= break/disp32
16013
16014 57/push-edi
16015 8b/-> *(ebp-4) 7/r32/edi
16016
16017 68/push 0/imm32
16018 68/push 0/imm32
16019 89/<- %esi 4/r32/esp
16020
16021 (allocate Heap *Function-size %esi)
16022
16023 (lookup *esi *(esi+4))
16024
16025 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
16026
16027 8b/-> *esi 0/r32/eax
16028 89/<- *edi 0/r32/eax
16029 8b/-> *(esi+4) 0/r32/eax
16030 89/<- *(edi+4) 0/r32/eax
16031
16032
16033 (lookup *esi *(esi+4))
16034
16035 8d/copy-address *(eax+0x20) 7/r32/edi
16036
16037 81 0/subop/add %esp 8/imm32
16038
16039 89/<- *(ebp-4) 7/r32/edi
16040
16041 5f/pop-to-edi
16042
16043 e9/jump $parse-mu:line-loop/disp32
16044 }
16045
16046 {
16047 $parse-mu:type:
16048 (slice-equal? %edx "type")
16049 3d/compare-eax-and 0/imm32
16050 0f 84/jump-if-= break/disp32
16051 (next-mu-token %ecx %edx)
16052
16053 (pos-or-insert-slice Type-id %edx)
16054
16055 51/push-ecx
16056
16057 68/push 0/imm32
16058 68/push 0/imm32
16059 89/<- %ecx 4/r32/esp
16060 (find-or-create-typeinfo %eax %ecx)
16061
16062 (lookup *ecx *(ecx+4))
16063
16064
16065 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
16066
16067
16068 81 0/subop/add %esp 8/imm32
16069
16070 59/pop-to-ecx
16071 e9/jump $parse-mu:line-loop/disp32
16072 }
16073
16074 e9/jump $parse-mu:error1/disp32
16075 }
16076 $parse-mu:end:
16077
16078 81 0/subop/add %esp 0x20c/imm32
16079 81 0/subop/add %esp 0xc08/imm32
16080 81 0/subop/add %esp 8/imm32
16081
16082 5f/pop-to-edi
16083 5e/pop-to-esi
16084 5b/pop-to-ebx
16085 5a/pop-to-edx
16086 59/pop-to-ecx
16087 58/pop-to-eax
16088
16089 81 0/subop/add %esp 4/imm32
16090
16091 89/<- %esp 5/r32/ebp
16092 5d/pop-to-ebp
16093 c3/return
16094
16095 $parse-mu:error1:
16096
16097 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
16098 (write-slice-buffered *(ebp+0xc) %edx)
16099 (write-buffered *(ebp+0xc) "\n")
16100 (flush *(ebp+0xc))
16101 (stop *(ebp+0x10) 1)
16102
16103
16104 $parse-mu:error2:
16105
16106 (write-int32-hex-buffered *(ebp+0xc) *ebx)
16107 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
16108 (write-slice-buffered *(ebp+0xc) *eax)
16109 (write-buffered *(ebp+0xc) "'\n")
16110 (flush *(ebp+0xc))
16111 (stop *(ebp+0x10) 1)
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128 populate-mu-function-header:
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160 55/push-ebp
16161 89/<- %ebp 4/r32/esp
16162
16163 50/push-eax
16164 51/push-ecx
16165 52/push-edx
16166 53/push-ebx
16167 57/push-edi
16168
16169 8b/-> *(ebp+0xc) 7/r32/edi
16170
16171 68/push 0/imm32/end
16172 68/push 0/imm32/start
16173 89/<- %ecx 4/r32/esp
16174
16175 68/push 0/imm32
16176 68/push 0/imm32
16177 89/<- %ebx 4/r32/esp
16178
16179 (next-mu-token *(ebp+8) %ecx)
16180
16181
16182 (slice-empty? %ecx)
16183 3d/compare-eax-and 0/imm32/false
16184 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16185
16186 (slice-equal? %ecx "{")
16187 3d/compare-eax-and 0/imm32/false
16188 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16189
16190 (slice-equal? %ecx "->")
16191 3d/compare-eax-and 0/imm32/false
16192 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16193
16194 (slice-equal? %ecx "}")
16195 3d/compare-eax-and 0/imm32/false
16196 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16197
16198 (function-exists? %ecx)
16199 3d/compare-eax-and 0/imm32/false
16200 0f 85/jump-if-!= $populate-mu-function-header:error-duplicate/disp32
16201
16202 (slice-starts-with? %ecx "break")
16203 3d/compare-eax-and 0/imm32/false
16204 0f 85/jump-if-!= $populate-mu-function-header:error-break/disp32
16205 (slice-starts-with? %ecx "loop")
16206 3d/compare-eax-and 0/imm32/false
16207 0f 85/jump-if-!= $populate-mu-function-header:error-loop/disp32
16208 (slice-equal? %ecx "lookup")
16209 3d/compare-eax-and 0/imm32/false
16210 0f 85/jump-if-!= $populate-mu-function-header:error-lookup/disp32
16211
16212 (slice-to-string Heap %ecx %edi)
16213
16214 {
16215 $populate-mu-function-header:check-for-inout:
16216 (next-mu-token *(ebp+8) %ecx)
16217
16218 (slice-empty? %ecx)
16219 3d/compare-eax-and 0/imm32/false
16220 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16221
16222 (slice-equal? %ecx "{")
16223 3d/compare-eax-and 0/imm32/false
16224 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
16225
16226 (slice-equal? %ecx "->")
16227 3d/compare-eax-and 0/imm32/false
16228 0f 85/jump-if-!= break/disp32
16229
16230 (slice-equal? %ecx "}")
16231 3d/compare-eax-and 0/imm32/false
16232 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16233
16234 (lookup *edi *(edi+4))
16235 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
16236
16237
16238 (lookup *ebx *(ebx+4))
16239 81 7/subop/compare *(eax+0x18) 0/imm32
16240 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
16241
16242
16243 {
16244 (lookup *edi *(edi+4))
16245 (string-equal? %eax "main")
16246 3d/compare-eax-and 0/imm32/false
16247 75/jump-if-!= break/disp8
16248 (lookup *ebx *(ebx+4))
16249 (addr-payload-contains-addr? %eax)
16250 3d/compare-eax-and 0/imm32/false
16251 0f 85/jump-if-!= $populate-mu-function-header:error-nested-addr-inout/disp32
16252 }
16253
16254
16255
16256 8d/copy-address *(edi+8) 0/r32/eax
16257 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
16258
16259 (push *(ebp+0x10) *ebx)
16260 (push *(ebp+0x10) *(ebx+4))
16261 (push *(ebp+0x10) 0)
16262
16263 e9/jump loop/disp32
16264 }
16265
16266 {
16267 $populate-mu-function-header:check-for-out:
16268 (next-mu-token *(ebp+8) %ecx)
16269
16270 (slice-empty? %ecx)
16271 3d/compare-eax-and 0/imm32/false
16272 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16273
16274 (slice-equal? %ecx "{")
16275 3d/compare-eax-and 0/imm32/false
16276 0f 85/jump-if-!= break/disp32
16277
16278 (slice-equal? %ecx "->")
16279 3d/compare-eax-and 0/imm32/false
16280 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16281
16282 (slice-equal? %ecx "}")
16283 3d/compare-eax-and 0/imm32/false
16284 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16285
16286 (lookup *edi *(edi+4))
16287 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
16288
16289
16290 (lookup *ebx *(ebx+4))
16291 81 7/subop/compare *(eax+0x18) 0/imm32
16292 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
16293
16294 (lookup *eax *(eax+4))
16295 (string-equal? %eax "_")
16296 3d/compare-eax-and 0/imm32/false
16297 0f 84/jump-if-= $populate-mu-function-header:error4/disp32
16298
16299 (lookup *ebx *(ebx+4))
16300 (lookup *(eax+8) *(eax+0xc))
16301 (mu-addr-type? %eax)
16302 3d/compare-eax-and 0/imm32/false
16303 0f 85/jump-if-!= $populate-mu-function-header:error-addr-output/disp32
16304
16305 8d/copy-address *(edi+0x10) 0/r32/eax
16306 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
16307
16308 e9/jump loop/disp32
16309 }
16310 $populate-mu-function-header:done:
16311 (check-no-tokens-left *(ebp+8))
16312 $populate-mu-function-header:end:
16313
16314 81 0/subop/add %esp 0x10/imm32
16315
16316 5f/pop-to-edi
16317 5b/pop-to-ebx
16318 5a/pop-to-edx
16319 59/pop-to-ecx
16320 58/pop-to-eax
16321
16322 89/<- %esp 5/r32/ebp
16323 5d/pop-to-ebp
16324 c3/return
16325
16326 $populate-mu-function-header:error1:
16327
16328 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
16329 (flush *(ebp+0x14))
16330 (rewind-stream *(ebp+8))
16331 (write-stream-data *(ebp+0x14) *(ebp+8))
16332 (write-buffered *(ebp+0x14) "'\n")
16333 (flush *(ebp+0x14))
16334 (stop *(ebp+0x18) 1)
16335
16336
16337 $populate-mu-function-header:error2:
16338
16339 (write-buffered *(ebp+0x14) "fn ")
16340 50/push-eax
16341 (lookup *edi *(edi+4))
16342 (write-buffered *(ebp+0x14) %eax)
16343 58/pop-to-eax
16344 (write-buffered *(ebp+0x14) ": function inout '")
16345 (lookup *eax *(eax+4))
16346 (write-buffered *(ebp+0x14) %eax)
16347 (write-buffered *(ebp+0x14) "' cannot be in a register")
16348 (flush *(ebp+0x14))
16349 (stop *(ebp+0x18) 1)
16350
16351
16352 $populate-mu-function-header:error3:
16353
16354 (write-buffered *(ebp+0x14) "fn ")
16355 50/push-eax
16356 (lookup *edi *(edi+4))
16357 (write-buffered *(ebp+0x14) %eax)
16358 58/pop-to-eax
16359 (write-buffered *(ebp+0x14) ": function output '")
16360 (lookup *ebx *(ebx+4))
16361 (lookup *eax *(eax+4))
16362 (write-buffered *(ebp+0x14) %eax)
16363 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
16364 (rewind-stream *(ebp+8))
16365 (write-stream-data *(ebp+0x14) *(ebp+8))
16366 (write-buffered *(ebp+0x14) "'\n")
16367 (flush *(ebp+0x14))
16368 (stop *(ebp+0x18) 1)
16369
16370
16371 $populate-mu-function-header:error4:
16372
16373 (write-buffered *(ebp+0x14) "fn ")
16374 50/push-eax
16375 (lookup *edi *(edi+4))
16376 (write-buffered *(ebp+0x14) %eax)
16377 58/pop-to-eax
16378 (write-buffered *(ebp+0x14) ": function outputs cannot be named; rename '")
16379 (lookup *ebx *(ebx+4))
16380 (lookup *eax *(eax+4))
16381 (write-buffered *(ebp+0x14) %eax)
16382 (write-buffered *(ebp+0x14) "' in the header to '_'\n")
16383 (flush *(ebp+0x14))
16384 (stop *(ebp+0x18) 1)
16385
16386
16387 $populate-mu-function-header:error-duplicate:
16388 (write-buffered *(ebp+0x14) "fn ")
16389 (write-slice-buffered *(ebp+0x14) %ecx)
16390 (write-buffered *(ebp+0x14) " defined more than once\n")
16391 (flush *(ebp+0x14))
16392 (stop *(ebp+0x18) 1)
16393
16394
16395 $populate-mu-function-header:error-break:
16396 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
16397 (flush *(ebp+0x14))
16398 (stop *(ebp+0x18) 1)
16399
16400
16401 $populate-mu-function-header:error-loop:
16402 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
16403 (flush *(ebp+0x14))
16404 (stop *(ebp+0x18) 1)
16405
16406
16407 $populate-mu-function-header:error-lookup:
16408 (write-buffered *(ebp+0x14) "cannot define a function called 'lookup'\n")
16409 (flush *(ebp+0x14))
16410 (stop *(ebp+0x18) 1)
16411
16412
16413 $populate-mu-function-header:error-addr-output:
16414
16415 (write-buffered *(ebp+0x14) "fn ")
16416 50/push-eax
16417 (lookup *edi *(edi+4))
16418 (write-buffered *(ebp+0x14) %eax)
16419 58/pop-to-eax
16420 (write-buffered *(ebp+0x14) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
16421 (flush *(ebp+0x14))
16422 (stop *(ebp+0x18) 1)
16423
16424
16425 $populate-mu-function-header:error-nested-addr-inout:
16426
16427 (write-buffered *(ebp+0x14) "fn ")
16428 (lookup *edi *(edi+4))
16429 (write-buffered *(ebp+0x14) %eax)
16430 (write-buffered *(ebp+0x14) ": inout '")
16431 (lookup *ebx *(ebx+4))
16432 (lookup *eax *(eax+4))
16433 (write-buffered *(ebp+0x14) %eax)
16434 (write-buffered *(ebp+0x14) "' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function\n")
16435 (flush *(ebp+0x14))
16436 (stop *(ebp+0x18) 1)
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448 populate-mu-function-signature:
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474 55/push-ebp
16475 89/<- %ebp 4/r32/esp
16476
16477 50/push-eax
16478 51/push-ecx
16479 52/push-edx
16480 53/push-ebx
16481 57/push-edi
16482
16483 8b/-> *(ebp+0xc) 7/r32/edi
16484
16485 68/push 0/imm32/end
16486 68/push 0/imm32/start
16487 89/<- %ecx 4/r32/esp
16488
16489 68/push 0/imm32
16490 68/push 0/imm32
16491 89/<- %ebx 4/r32/esp
16492
16493 (next-mu-token *(ebp+8) %ecx)
16494
16495
16496 (slice-equal? %ecx "{")
16497 3d/compare-eax-and 0/imm32/false
16498 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16499
16500 (slice-equal? %ecx "->")
16501 3d/compare-eax-and 0/imm32/false
16502 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16503
16504 (slice-equal? %ecx "}")
16505 3d/compare-eax-and 0/imm32/false
16506 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16507
16508 (function-exists? %ecx)
16509 3d/compare-eax-and 0/imm32/false
16510 0f 85/jump-if-!= $populate-mu-function-signature:error-duplicate/disp32
16511
16512 (slice-starts-with? %ecx "break")
16513 3d/compare-eax-and 0/imm32/false
16514 0f 85/jump-if-!= $populate-mu-function-signature:error-break/disp32
16515 (slice-starts-with? %ecx "loop")
16516 3d/compare-eax-and 0/imm32/false
16517 0f 85/jump-if-!= $populate-mu-function-signature:error-loop/disp32
16518
16519 (slice-to-string Heap %ecx %edi)
16520
16521 {
16522 $populate-mu-function-signature:check-for-inout:
16523 (next-mu-token *(ebp+8) %ecx)
16524 (slice-empty? %ecx)
16525 3d/compare-eax-and 0/imm32/false
16526 0f 85/jump-if-!= break/disp32
16527
16528 (slice-equal? %ecx "->")
16529 3d/compare-eax-and 0/imm32/false
16530 0f 85/jump-if-!= break/disp32
16531
16532 (slice-equal? %ecx "{")
16533 3d/compare-eax-and 0/imm32/false
16534 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16535
16536 (slice-equal? %ecx "}")
16537 3d/compare-eax-and 0/imm32/false
16538 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16539
16540 (lookup *edi *(edi+4))
16541 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
16542
16543
16544 (lookup *ebx *(ebx+4))
16545 81 7/subop/compare *(eax+0x18) 0/imm32
16546 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
16547
16548
16549 {
16550 (lookup *edi *(edi+4))
16551 (string-equal? %eax "main")
16552 3d/compare-eax-and 0/imm32/false
16553 75/jump-if-!= break/disp8
16554 (lookup *ebx *(ebx+4))
16555 (addr-payload-contains-addr? %eax)
16556 3d/compare-eax-and 0/imm32/false
16557 0f 85/jump-if-!= $populate-mu-function-signature:error-nested-addr-inout/disp32
16558 }
16559
16560
16561 (lookup *ebx *(ebx+4))
16562 81 7/subop/compare *(eax+0x18) 0/imm32
16563 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
16564
16565
16566
16567 8d/copy-address *(edi+8) 0/r32/eax
16568 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
16569
16570 e9/jump loop/disp32
16571 }
16572
16573 {
16574 $populate-mu-function-signature:check-for-out:
16575 (next-mu-token *(ebp+8) %ecx)
16576 (slice-empty? %ecx)
16577 3d/compare-eax-and 0/imm32/false
16578 0f 85/jump-if-!= break/disp32
16579
16580 (slice-equal? %ecx "{")
16581 3d/compare-eax-and 0/imm32/false
16582 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16583
16584 (slice-equal? %ecx "->")
16585 3d/compare-eax-and 0/imm32/false
16586 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16587
16588 (slice-equal? %ecx "}")
16589 3d/compare-eax-and 0/imm32/false
16590 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16591
16592 (lookup *edi *(edi+4))
16593 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
16594
16595
16596 (lookup *ebx *(ebx+4))
16597 81 7/subop/compare *(eax+0x18) 0/imm32
16598 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
16599
16600 (lookup *eax *(eax+4))
16601 (string-equal? %eax "_")
16602 3d/compare-eax-and 0/imm32/false
16603 0f 84/jump-if-= $populate-mu-function-signature:error4/disp32
16604
16605
16606 {
16607 (lookup *edi *(edi+4))
16608 (string-equal? %eax "lookup")
16609 3d/compare-eax-and 0/imm32/false
16610 75/jump-if-!= break/disp8
16611 (lookup *ebx *(ebx+4))
16612 (lookup *(eax+8) *(eax+0xc))
16613 (mu-addr-type? %eax)
16614 3d/compare-eax-and 0/imm32/false
16615 0f 85/jump-if-!= $populate-mu-function-signature:error-addr-output/disp32
16616 }
16617
16618 8d/copy-address *(edi+0x10) 0/r32/eax
16619 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
16620
16621 e9/jump loop/disp32
16622 }
16623 $populate-mu-function-signature:done:
16624 (check-no-tokens-left *(ebp+8))
16625 $populate-mu-function-signature:end:
16626
16627 81 0/subop/add %esp 0x10/imm32
16628
16629 5f/pop-to-edi
16630 5b/pop-to-ebx
16631 5a/pop-to-edx
16632 59/pop-to-ecx
16633 58/pop-to-eax
16634
16635 89/<- %esp 5/r32/ebp
16636 5d/pop-to-ebp
16637 c3/return
16638
16639 $populate-mu-function-signature:error1:
16640
16641 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
16642 (flush *(ebp+0x10))
16643 (rewind-stream *(ebp+8))
16644 (write-stream-data *(ebp+0x10) *(ebp+8))
16645 (write-buffered *(ebp+0x10) "'\n")
16646 (flush *(ebp+0x10))
16647 (stop *(ebp+0x14) 1)
16648
16649
16650 $populate-mu-function-signature:error2:
16651
16652 (write-buffered *(ebp+0x10) "fn ")
16653 50/push-eax
16654 (lookup *edi *(edi+4))
16655 (write-buffered *(ebp+0x10) %eax)
16656 58/pop-to-eax
16657 (write-buffered *(ebp+0x10) ": function inout '")
16658 (lookup *eax *(eax+4))
16659 (write-buffered *(ebp+0x10) %eax)
16660 (write-buffered *(ebp+0x10) "' cannot be in a register")
16661 (flush *(ebp+0x10))
16662 (stop *(ebp+0x14) 1)
16663
16664
16665 $populate-mu-function-signature:error3:
16666
16667 (write-buffered *(ebp+0x10) "fn ")
16668 50/push-eax
16669 (lookup *edi *(edi+4))
16670 (write-buffered *(ebp+0x10) %eax)
16671 58/pop-to-eax
16672 (write-buffered *(ebp+0x10) ": function output '")
16673 (lookup *ebx *(ebx+4))
16674 (lookup *eax *(eax+4))
16675 (write-buffered *(ebp+0x10) %eax)
16676 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
16677 (rewind-stream *(ebp+8))
16678 (write-stream-data *(ebp+0x10) *(ebp+8))
16679 (write-buffered *(ebp+0x10) "'\n")
16680 (flush *(ebp+0x10))
16681 (stop *(ebp+0x14) 1)
16682
16683
16684 $populate-mu-function-signature:error4:
16685
16686 (write-buffered *(ebp+0x10) "fn ")
16687 50/push-eax
16688 (lookup *edi *(edi+4))
16689 (write-buffered *(ebp+0x10) %eax)
16690 58/pop-to-eax
16691 (write-buffered *(ebp+0x10) ": function outputs cannot be named; rename '")
16692 (lookup *ebx *(ebx+4))
16693 (lookup *eax *(eax+4))
16694 (write-buffered *(ebp+0x10) %eax)
16695 (write-buffered *(ebp+0x10) "' in the header to '_'\n")
16696 (flush *(ebp+0x10))
16697 (stop *(ebp+0x14) 1)
16698
16699
16700 $populate-mu-function-signature:error-duplicate:
16701 (write-buffered *(ebp+0x10) "fn ")
16702 (write-slice-buffered *(ebp+0x10) %ecx)
16703 (write-buffered *(ebp+0x10) " defined more than once\n")
16704 (flush *(ebp+0x10))
16705 (stop *(ebp+0x14) 1)
16706
16707
16708 $populate-mu-function-signature:error-break:
16709 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
16710 (flush *(ebp+0x10))
16711 (stop *(ebp+0x14) 1)
16712
16713
16714 $populate-mu-function-signature:error-loop:
16715 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
16716 (flush *(ebp+0x10))
16717 (stop *(ebp+0x14) 1)
16718
16719
16720 $populate-mu-function-signature:error-addr-output:
16721
16722 (write-buffered *(ebp+0x10) "fn ")
16723 50/push-eax
16724 (lookup *edi *(edi+4))
16725 (write-buffered *(ebp+0x10) %eax)
16726 58/pop-to-eax
16727 (write-buffered *(ebp+0x10) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
16728 (flush *(ebp+0x10))
16729 (stop *(ebp+0x14) 1)
16730
16731
16732 $populate-mu-function-signature:error-nested-addr-inout:
16733
16734 (write-buffered *(ebp+0x10) "fn ")
16735 (lookup *edi *(edi+4))
16736 (write-buffered *(ebp+0x10) %eax)
16737 (write-buffered *(ebp+0x10) ": inout '")
16738 (lookup *ebx *(ebx+4))
16739 (lookup *eax *(eax+4))
16740 (write-buffered *(ebp+0x10) %eax)
16741 (write-buffered *(ebp+0x10) "' cannot contain 'addr' anywhere in the type except the first word; that could allow unsafe addresses to escape the function\n")
16742 (flush *(ebp+0x10))
16743 (stop *(ebp+0x14) 1)
16744
16745
16746 addr-payload-contains-addr?:
16747
16748 55/push-ebp
16749 89/<- %ebp 4/r32/esp
16750
16751 8b/-> *(ebp+8) 0/r32/eax
16752 (lookup *(eax+8) *(eax+0xc))
16753
16754 (lookup *(eax+0xc) *(eax+0x10))
16755 (type-tree-contains? %eax 2)
16756
16757 $addr-payload-contains-addr?:end:
16758
16759 89/<- %esp 5/r32/ebp
16760 5d/pop-to-ebp
16761 c3/return
16762
16763 type-tree-contains?:
16764
16765 55/push-ebp
16766 89/<- %ebp 4/r32/esp
16767
16768 51/push-ecx
16769
16770 8b/-> *(ebp+8) 0/r32/eax
16771 3d/compare-eax-and 0/imm32
16772 0f 84/jump-if-= $type-tree-contains?:end/disp32
16773
16774 81 7/subop/compare *eax 0/imm32/false
16775 {
16776 74/jump-if-= break/disp8
16777 8b/-> *(ebp+0xc) 1/r32/ecx
16778 39/compare *(eax+4) 1/r32/ecx
16779 0f 94/set-if-= %al
16780 25/and-eax-with 0xff/imm32
16781 eb/jump $type-tree-contains?:end/disp8
16782 }
16783
16784 (lookup *(eax+4) *(eax+8))
16785 (type-tree-contains? %eax *(ebp+0xc))
16786 3d/compare-eax-and 0/imm32/false
16787 75/jump-if-!= $type-tree-contains?:end/disp8
16788
16789 8b/-> *(ebp+8) 0/r32/eax
16790 (lookup *(eax+0xc) *(eax+0x10))
16791 (type-tree-contains? %eax *(ebp+0xc))
16792 $type-tree-contains?:end:
16793
16794 59/pop-to-ecx
16795
16796 89/<- %esp 5/r32/ebp
16797 5d/pop-to-ebp
16798 c3/return
16799
16800 function-exists?:
16801
16802 55/push-ebp
16803 89/<- %ebp 4/r32/esp
16804
16805 51/push-ecx
16806
16807 (lookup *_Program-functions *_Program-functions->payload)
16808 89/<- %ecx 0/r32/eax
16809 {
16810
16811 81 7/subop/compare %ecx 0/imm32
16812 74/jump-if-= break/disp8
16813
16814 {
16815 (lookup *ecx *(ecx+4))
16816 (slice-equal? *(ebp+8) %eax)
16817 3d/compare-eax-and 0/imm32/false
16818 74/jump-if-= break/disp8
16819 b8/copy-to-eax 1/imm32/true
16820 e9/jump $function-exists?:end/disp32
16821 }
16822
16823 (lookup *(ecx+0x20) *(ecx+0x24))
16824 89/<- %ecx 0/r32/eax
16825
16826 eb/jump loop/disp8
16827 }
16828
16829 (lookup *_Program-signatures *_Program-signatures->payload)
16830 89/<- %ecx 0/r32/eax
16831 {
16832
16833 81 7/subop/compare %ecx 0/imm32
16834 74/jump-if-= break/disp8
16835
16836 {
16837 (lookup *ecx *(ecx+4))
16838 (slice-equal? *(ebp+8) %eax)
16839 3d/compare-eax-and 0/imm32/false
16840 74/jump-if-= break/disp8
16841 b8/copy-to-eax 1/imm32/true
16842 eb/jump $function-exists?:end/disp8
16843 }
16844
16845 (lookup *(ecx+0x20) *(ecx+0x24))
16846 89/<- %ecx 0/r32/eax
16847
16848 eb/jump loop/disp8
16849 }
16850
16851 b8/copy-to-eax 0/imm32/false
16852 $function-exists?:end:
16853
16854 59/pop-to-ecx
16855
16856 89/<- %esp 5/r32/ebp
16857 5d/pop-to-ebp
16858 c3/return
16859
16860 test-function-header-with-arg:
16861
16862 55/push-ebp
16863 89/<- %ebp 4/r32/esp
16864
16865 8b/-> *Primitive-type-ids 0/r32/eax
16866 89/<- *Type-id 0/r32/eax
16867 c7 0/subop/copy *_Program-functions 0/imm32
16868 c7 0/subop/copy *_Program-functions->payload 0/imm32
16869 c7 0/subop/copy *_Program-types 0/imm32
16870 c7 0/subop/copy *_Program-types->payload 0/imm32
16871 c7 0/subop/copy *_Program-signatures 0/imm32
16872 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16873 (clear-stream _test-input-stream)
16874 (write _test-input-stream "foo n: int {\n")
16875
16876 2b/subtract *Function-size 4/r32/esp
16877 89/<- %ecx 4/r32/esp
16878 (zero-out %ecx *Function-size)
16879
16880 81 5/subop/subtract %esp 0xc0/imm32
16881 68/push 0xc0/imm32/size
16882 68/push 0/imm32/top
16883 89/<- %ebx 4/r32/esp
16884
16885 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
16886
16887 (lookup *ecx *(ecx+4))
16888 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
16889
16890 (lookup *(ecx+8) *(ecx+0xc))
16891 (lookup *eax *(eax+4))
16892 89/<- %edx 0/r32/eax
16893
16894 (lookup *edx *(edx+4))
16895 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
16896
16897 (lookup *(edx+8) *(edx+0xc))
16898 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
16899 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
16900 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
16901
16902 89/<- %esp 5/r32/ebp
16903 5d/pop-to-ebp
16904 c3/return
16905
16906 test-function-header-with-multiple-args:
16907
16908 55/push-ebp
16909 89/<- %ebp 4/r32/esp
16910
16911 8b/-> *Primitive-type-ids 0/r32/eax
16912 89/<- *Type-id 0/r32/eax
16913 c7 0/subop/copy *_Program-functions 0/imm32
16914 c7 0/subop/copy *_Program-functions->payload 0/imm32
16915 c7 0/subop/copy *_Program-types 0/imm32
16916 c7 0/subop/copy *_Program-types->payload 0/imm32
16917 c7 0/subop/copy *_Program-signatures 0/imm32
16918 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16919 (clear-stream _test-input-stream)
16920 (write _test-input-stream "foo a: int, b: int c: int {\n")
16921
16922 2b/subtract *Function-size 4/r32/esp
16923 89/<- %ecx 4/r32/esp
16924 (zero-out %ecx *Function-size)
16925
16926 81 5/subop/subtract %esp 0xc0/imm32
16927 68/push 0xc0/imm32/size
16928 68/push 0/imm32/top
16929 89/<- %ebx 4/r32/esp
16930
16931 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
16932
16933 (lookup *ecx *(ecx+4))
16934 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
16935
16936 (lookup *(ecx+8) *(ecx+0xc))
16937 89/<- %edx 0/r32/eax
16938 $test-function-header-with-multiple-args:inout0:
16939
16940 (lookup *edx *(edx+4))
16941 89/<- %ebx 0/r32/eax
16942
16943 (lookup *ebx *(ebx+4))
16944 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
16945
16946 (lookup *(ebx+8) *(ebx+0xc))
16947 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
16948 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
16949 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
16950 $test-function-header-with-multiple-args:inout1:
16951
16952 (lookup *(edx+8) *(edx+0xc))
16953 89/<- %edx 0/r32/eax
16954
16955 (lookup *edx *(edx+4))
16956 89/<- %ebx 0/r32/eax
16957
16958 (lookup *ebx *(ebx+4))
16959 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
16960
16961 (lookup *(ebx+8) *(ebx+0xc))
16962 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
16963 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
16964 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
16965 $test-function-header-with-multiple-args:inout2:
16966
16967 (lookup *(edx+8) *(edx+0xc))
16968 89/<- %edx 0/r32/eax
16969
16970 (lookup *edx *(edx+4))
16971 89/<- %ebx 0/r32/eax
16972
16973 (lookup *ebx *(ebx+4))
16974 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
16975
16976 (lookup *(ebx+8) *(ebx+0xc))
16977 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
16978 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
16979 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
16980
16981 89/<- %esp 5/r32/ebp
16982 5d/pop-to-ebp
16983 c3/return
16984
16985 test-function-header-with-multiple-args-and-outputs:
16986
16987 55/push-ebp
16988 89/<- %ebp 4/r32/esp
16989
16990 8b/-> *Primitive-type-ids 0/r32/eax
16991 89/<- *Type-id 0/r32/eax
16992 c7 0/subop/copy *_Program-functions 0/imm32
16993 c7 0/subop/copy *_Program-functions->payload 0/imm32
16994 c7 0/subop/copy *_Program-types 0/imm32
16995 c7 0/subop/copy *_Program-types->payload 0/imm32
16996 c7 0/subop/copy *_Program-signatures 0/imm32
16997 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16998 (clear-stream _test-input-stream)
16999 (write _test-input-stream "foo a: int, b: int, c: int -> _/ecx: int _/edx: int {\n")
17000
17001 2b/subtract *Function-size 4/r32/esp
17002 89/<- %ecx 4/r32/esp
17003 (zero-out %ecx *Function-size)
17004
17005 81 5/subop/subtract %esp 0xc0/imm32
17006 68/push 0xc0/imm32/size
17007 68/push 0/imm32/top
17008 89/<- %ebx 4/r32/esp
17009
17010 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
17011
17012 (lookup *ecx *(ecx+4))
17013 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
17014
17015 (lookup *(ecx+8) *(ecx+0xc))
17016 89/<- %edx 0/r32/eax
17017 $test-function-header-with-multiple-args-and-outputs:inout0:
17018
17019 (lookup *edx *(edx+4))
17020 89/<- %ebx 0/r32/eax
17021
17022 (lookup *ebx *(ebx+4))
17023 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
17024
17025 (lookup *(ebx+8) *(ebx+0xc))
17026 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
17027 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
17028 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
17029 $test-function-header-with-multiple-args-and-outputs:inout1:
17030
17031 (lookup *(edx+8) *(edx+0xc))
17032 89/<- %edx 0/r32/eax
17033
17034 (lookup *edx *(edx+4))
17035 89/<- %ebx 0/r32/eax
17036
17037 (lookup *ebx *(ebx+4))
17038 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
17039
17040 (lookup *(ebx+8) *(ebx+0xc))
17041 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
17042 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
17043 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
17044 $test-function-header-with-multiple-args-and-outputs:inout2:
17045
17046 (lookup *(edx+8) *(edx+0xc))
17047 89/<- %edx 0/r32/eax
17048
17049 (lookup *edx *(edx+4))
17050 89/<- %ebx 0/r32/eax
17051
17052 (lookup *ebx *(ebx+4))
17053 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
17054
17055 (lookup *(ebx+8) *(ebx+0xc))
17056 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
17057 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
17058 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
17059 $test-function-header-with-multiple-args-and-outputs:out0:
17060
17061 (lookup *(ecx+0x10) *(ecx+0x14))
17062 89/<- %edx 0/r32/eax
17063
17064 (lookup *edx *(edx+4))
17065 89/<- %ebx 0/r32/eax
17066
17067 (lookup *ebx *(ebx+4))
17068 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:0")
17069
17070 (lookup *(ebx+0x18) *(ebx+0x1c))
17071 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
17072
17073 (lookup *(ebx+8) *(ebx+0xc))
17074 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
17075 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
17076 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
17077 $test-function-header-with-multiple-args-and-outputs:out1:
17078
17079 (lookup *(edx+8) *(edx+0xc))
17080 89/<- %edx 0/r32/eax
17081
17082 (lookup *edx *(edx+4))
17083 89/<- %ebx 0/r32/eax
17084
17085 (lookup *ebx *(ebx+4))
17086 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:1")
17087
17088 (lookup *(ebx+0x18) *(ebx+0x1c))
17089 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
17090
17091 (lookup *(ebx+8) *(ebx+0xc))
17092 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
17093 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
17094 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
17095
17096 89/<- %esp 5/r32/ebp
17097 5d/pop-to-ebp
17098 c3/return
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108 parse-var-with-type:
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125 55/push-ebp
17126 89/<- %ebp 4/r32/esp
17127
17128 50/push-eax
17129 51/push-ecx
17130 52/push-edx
17131 53/push-ebx
17132 56/push-esi
17133 57/push-edi
17134
17135 8b/-> *(ebp+8) 6/r32/esi
17136
17137 8b/-> *(esi+4) 1/r32/ecx
17138 49/decrement-ecx
17139 8a/copy-byte *ecx 1/r32/CL
17140 81 4/subop/and %ecx 0xff/imm32
17141 81 7/subop/compare %ecx 0x3a/imm32/colon
17142 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
17143
17144 ff 1/subop/decrement *(esi+4)
17145
17146 68/push 0/imm32/end
17147 68/push 0/imm32/start
17148 89/<- %ecx 4/r32/esp
17149 $parse-var-with-type:parse-name:
17150 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
17151 $parse-var-with-type:create-var:
17152
17153 (new-var-from-slice Heap %ecx *(ebp+0x10))
17154
17155 $parse-var-with-type:save-register:
17156
17157 8b/-> *(ebp+0x10) 7/r32/edi
17158 (lookup *edi *(edi+4))
17159 89/<- %edi 0/r32/eax
17160
17161 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
17162
17163 {
17164 $parse-var-with-type:write-register:
17165 (slice-empty? %ecx)
17166 3d/compare-eax-and 0/imm32/false
17167 75/jump-if-!= break/disp8
17168
17169 8d/copy-address *(edi+0x18) 0/r32/eax
17170 (slice-to-string Heap %ecx %eax)
17171 }
17172 $parse-var-with-type:save-type:
17173 8d/copy-address *(edi+8) 0/r32/eax
17174 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x18) *(ebp+0x1c))
17175 $parse-var-with-type:check-register:
17176 (lookup *(edi+0x18) *(edi+0x1c))
17177 3d/compare-eax-and 0/imm32
17178 74/jump-if-= $parse-var-with-type:end/disp8
17179 (float-register? %eax)
17180 {
17181 3d/compare-eax-and 0/imm32/false
17182 74/jump-if-= break/disp8
17183
17184 (lookup *(edi+8) *(edi+0xc))
17185 (simple-mu-type? %eax 0xf)
17186 3d/compare-eax-and 0/imm32/false
17187 0f 84/jump-if-= $parse-var-with-type:error-non-float-in-floating-point-register/disp32
17188 eb/jump $parse-var-with-type:end/disp8
17189 }
17190
17191 (lookup *(edi+8) *(edi+0xc))
17192 (simple-mu-type? %eax 0xf)
17193 3d/compare-eax-and 0/imm32/false
17194 0f 85/jump-if-!= $parse-var-with-type:error-float-in-integer-register/disp32
17195 $parse-var-with-type:end:
17196
17197 81 0/subop/add %esp 8/imm32
17198
17199 5f/pop-to-edi
17200 5e/pop-to-esi
17201 5b/pop-to-ebx
17202 5a/pop-to-edx
17203 59/pop-to-ecx
17204 58/pop-to-eax
17205
17206 89/<- %esp 5/r32/ebp
17207 5d/pop-to-ebp
17208 c3/return
17209
17210 $parse-var-with-type:abort:
17211
17212 (write-buffered *(ebp+0x18) "fn ")
17213 (write-buffered *(ebp+0x18) *(ebp+0x14))
17214 (write-buffered *(ebp+0x18) ": var should have form 'name: type' in '")
17215 (flush *(ebp+0x18))
17216 (rewind-stream *(ebp+0xc))
17217 (write-stream-data *(ebp+0x18) *(ebp+0xc))
17218 (write-buffered *(ebp+0x18) "'\n")
17219 (flush *(ebp+0x18))
17220 (stop *(ebp+0x1c) 1)
17221
17222
17223 $parse-var-with-type:error-float-in-integer-register:
17224
17225 (write-buffered *(ebp+0x18) "fn ")
17226 (write-buffered *(ebp+0x18) *(ebp+0x14))
17227 (write-buffered *(ebp+0x18) ": float var '")
17228 (lookup *edi *(edi+4))
17229 (write-buffered *(ebp+0x18) %eax)
17230 (write-buffered *(ebp+0x18) "' should be in a floating-point register\n")
17231 (flush *(ebp+0x18))
17232 (stop *(ebp+0x1c) 1)
17233
17234
17235 $parse-var-with-type:error-non-float-in-floating-point-register:
17236
17237 (write-buffered *(ebp+0x18) "fn ")
17238 (write-buffered *(ebp+0x18) *(ebp+0x14))
17239 (write-buffered *(ebp+0x18) ": non-float var '")
17240 (lookup *edi *(edi+4))
17241 (write-buffered *(ebp+0x18) %eax)
17242 (write-buffered *(ebp+0x18) "' should be in an integer register\n")
17243 (flush *(ebp+0x18))
17244 (stop *(ebp+0x1c) 1)
17245
17246
17247 float-register?:
17248
17249 55/push-ebp
17250 89/<- %ebp 4/r32/esp
17251
17252 (get Mu-registers-unique *(ebp+8) 0xc "Mu-registers-unique")
17253 81 7/subop/compare *eax 8/imm32/start-of-floating-point-registers
17254 0f 9d/set-if->= %al
17255 25/and-eax-with 0xff/imm32
17256 $float-register?:end:
17257
17258 89/<- %esp 5/r32/ebp
17259 5d/pop-to-ebp
17260 c3/return
17261
17262 parse-type:
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285 55/push-ebp
17286 89/<- %ebp 4/r32/esp
17287
17288 50/push-eax
17289 51/push-ecx
17290 52/push-edx
17291
17292 (zero-out *(ebp+0x10) *Handle-size)
17293
17294 68/push 0/imm32
17295 68/push 0/imm32
17296 89/<- %ecx 4/r32/esp
17297
17298 (next-mu-token *(ebp+0xc) %ecx)
17299
17300
17301
17302
17303
17304 (slice-equal? %ecx "")
17305 3d/compare-eax-and 0/imm32/false
17306 0f 85/jump-if-!= $parse-type:abort/disp32
17307
17308 (slice-equal? %ecx "{")
17309 3d/compare-eax-and 0/imm32/false
17310 0f 85/jump-if-!= $parse-type:abort/disp32
17311
17312 (slice-equal? %ecx "}")
17313 3d/compare-eax-and 0/imm32/false
17314 0f 85/jump-if-!= $parse-type:abort/disp32
17315
17316 (slice-equal? %ecx "->")
17317 3d/compare-eax-and 0/imm32/false
17318 0f 85/jump-if-!= $parse-type:abort/disp32
17319
17320 (slice-equal? %ecx ")")
17321 3d/compare-eax-and 0/imm32/false
17322 0f 85/jump-if-!= $parse-type:end/disp32
17323
17324 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
17325
17326 8b/-> *(ebp+0x10) 2/r32/edx
17327 (lookup *edx *(edx+4))
17328 89/<- %edx 0/r32/eax
17329 {
17330
17331 (slice-equal? %ecx "(")
17332 3d/compare-eax-and 0/imm32/false
17333 0f 85/jump-if-!= break/disp32
17334
17335 {
17336 $parse-type:check-for-int:
17337
17338 8b/-> *ecx 0/r32/eax
17339 8a/copy-byte *eax 0/r32/AL
17340 25/and-eax-with 0xff/imm32
17341
17342 (decimal-digit? %eax)
17343 3d/compare-eax-and 0/imm32/false
17344 74/jump-if-= break/disp8
17345 $parse-type:int:
17346
17347 (next-token-from-slice *ecx *(ecx+4) 0x2f %ecx)
17348
17349 (check-mu-hex-int %ecx *(ebp+0x14) *(ebp+0x18))
17350 (parse-hex-int-from-slice %ecx)
17351 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
17352 89/<- *(edx+8) 0/r32/eax
17353 e9/jump $parse-type:end/disp32
17354 }
17355 $parse-type:atom:
17356
17357 c7 0/subop/copy *edx 1/imm32/true
17358 {
17359 $parse-type:check-for-type-parameter:
17360
17361 8b/-> *ecx 0/r32/eax
17362 8a/copy-byte *eax 0/r32/AL
17363 25/and-eax-with 0xff/imm32
17364
17365 3d/compare-eax-and 0x5f/imm32/_
17366 75/jump-if-!= break/disp8
17367 $parse-type:type-parameter:
17368
17369 c7 0/subop/copy *(edx+4) 0xa/imm32/type-parameter
17370
17371 8d/copy-address *(edx+8) 0/r32/eax
17372 (slice-to-string *(ebp+8) %ecx %eax)
17373 e9/jump $parse-type:end/disp32
17374 }
17375 $parse-type:non-type-parameter:
17376
17377 (pos-or-insert-slice Type-id %ecx)
17378 89/<- *(edx+4) 0/r32/eax
17379 e9/jump $parse-type:end/disp32
17380 }
17381 $parse-type:non-atom:
17382
17383
17384 8d/copy-address *(edx+4) 0/r32/eax
17385 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17386
17387 8d/copy-address *(edx+0xc) 0/r32/eax
17388 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17389 $parse-type:end:
17390
17391 81 0/subop/add %esp 8/imm32
17392
17393 5a/pop-to-edx
17394 59/pop-to-ecx
17395 58/pop-to-eax
17396
17397 89/<- %esp 5/r32/ebp
17398 5d/pop-to-ebp
17399 c3/return
17400
17401 $parse-type:abort:
17402
17403 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
17404 (write-slice-buffered *(ebp+0x14) %ecx)
17405 (write-buffered *(ebp+0x14) "'\n")
17406 (flush *(ebp+0x14))
17407 (stop *(ebp+0x18) 1)
17408
17409
17410 parse-type-tree:
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420 55/push-ebp
17421 89/<- %ebp 4/r32/esp
17422
17423 50/push-eax
17424 51/push-ecx
17425 52/push-edx
17426
17427 (zero-out *(ebp+0x10) *Handle-size)
17428
17429 68/push 0/imm32
17430 68/push 0/imm32
17431 89/<- %ecx 4/r32/esp
17432
17433 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
17434
17435 81 7/subop/compare *ecx 0/imm32
17436 74/jump-if-= $parse-type-tree:end/disp8
17437
17438 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
17439
17440 8b/-> *(ebp+0x10) 2/r32/edx
17441 (lookup *edx *(edx+4))
17442 89/<- %edx 0/r32/eax
17443
17444 8b/-> *ecx 0/r32/eax
17445 89/<- *(edx+4) 0/r32/eax
17446 8b/-> *(ecx+4) 0/r32/eax
17447 89/<- *(edx+8) 0/r32/eax
17448
17449 8d/copy-address *(edx+0xc) 0/r32/eax
17450 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17451 $parse-type-tree:end:
17452
17453 81 0/subop/add %esp 8/imm32
17454
17455 5a/pop-to-edx
17456 59/pop-to-ecx
17457 58/pop-to-eax
17458
17459 89/<- %esp 5/r32/ebp
17460 5d/pop-to-ebp
17461 c3/return
17462
17463 next-mu-token:
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508 55/push-ebp
17509 89/<- %ebp 4/r32/esp
17510
17511 50/push-eax
17512 51/push-ecx
17513 56/push-esi
17514 57/push-edi
17515
17516 8b/-> *(ebp+8) 6/r32/esi
17517
17518 8b/-> *(ebp+0xc) 7/r32/edi
17519 $next-mu-token:start:
17520 (skip-chars-matching-whitespace %esi)
17521 $next-mu-token:check0:
17522
17523
17524 8b/-> *(esi+4) 1/r32/ecx
17525
17526 3b/compare<- *esi 1/r32/ecx
17527 c7 0/subop/copy *edi 0/imm32
17528 c7 0/subop/copy *(edi+4) 0/imm32
17529 0f 8d/jump-if->= $next-mu-token:end/disp32
17530
17531 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
17532 89/<- *edi 0/r32/eax
17533
17534 31/xor-with %eax 0/r32/eax
17535 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
17536 {
17537 $next-mu-token:check-for-comma:
17538
17539 3d/compare-eax-and 0x2c/imm32/comma
17540 75/jump-if-!= break/disp8
17541
17542 ff 0/subop/increment *(esi+4)
17543
17544 e9/jump $next-mu-token:start/disp32
17545 }
17546 {
17547 $next-mu-token:check-for-comment:
17548
17549 3d/compare-eax-and 0x23/imm32/pound
17550 75/jump-if-!= break/disp8
17551
17552 e9/jump $next-mu-token:done/disp32
17553 }
17554 {
17555 $next-mu-token:check-for-string-literal:
17556
17557 3d/compare-eax-and 0x22/imm32/dquote
17558 75/jump-if-!= break/disp8
17559 (skip-string %esi)
17560
17561 e9/jump $next-mu-token:done/disp32
17562 }
17563 {
17564 $next-mu-token:check-for-open-paren:
17565
17566 3d/compare-eax-and 0x28/imm32/open-paren
17567 75/jump-if-!= break/disp8
17568
17569 ff 0/subop/increment *(esi+4)
17570
17571 e9/jump $next-mu-token:done/disp32
17572 }
17573 {
17574 $next-mu-token:check-for-close-paren:
17575
17576 3d/compare-eax-and 0x29/imm32/close-paren
17577 75/jump-if-!= break/disp8
17578
17579 ff 0/subop/increment *(esi+4)
17580
17581 e9/jump $next-mu-token:done/disp32
17582 }
17583 {
17584 $next-mu-token:regular-word-without-metadata:
17585
17586
17587 8b/-> *(esi+4) 1/r32/ecx
17588
17589 3b/compare<- *esi 1/r32/ecx
17590 7d/jump-if->= break/disp8
17591
17592 31/xor-with %eax 0/r32/eax
17593 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
17594
17595 3d/compare-eax-and 0x20/imm32/space
17596 74/jump-if-= break/disp8
17597
17598 3d/compare-eax-and 0xd/imm32/carriage-return
17599 74/jump-if-= break/disp8
17600
17601 3d/compare-eax-and 0xa/imm32/newline
17602 74/jump-if-= break/disp8
17603
17604 3d/compare-eax-and 0x28/imm32/open-paren
17605 0f 84/jump-if-= break/disp32
17606
17607 3d/compare-eax-and 0x29/imm32/close-paren
17608 0f 84/jump-if-= break/disp32
17609
17610 3d/compare-eax-and 0x2c/imm32/comma
17611 0f 84/jump-if-= break/disp32
17612
17613 ff 0/subop/increment *(esi+4)
17614
17615 e9/jump loop/disp32
17616 }
17617 $next-mu-token:done:
17618
17619 8b/-> *(esi+4) 1/r32/ecx
17620 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
17621 89/<- *(edi+4) 0/r32/eax
17622 $next-mu-token:end:
17623
17624 5f/pop-to-edi
17625 5e/pop-to-esi
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 pos-or-insert-slice:
17634
17635 55/push-ebp
17636 89/<- %ebp 4/r32/esp
17637
17638 (pos-slice *(ebp+8) *(ebp+0xc))
17639 3d/compare-eax-and -1/imm32
17640 75/jump-if-!= $pos-or-insert-slice:end/disp8
17641 $pos-or-insert-slice:insert:
17642
17643 68/push 0/imm32
17644 68/push 0/imm32
17645 89/<- %eax 4/r32/esp
17646 (slice-to-string Heap *(ebp+0xc) %eax)
17647
17648 (lookup *eax *(eax+4))
17649 (write-int *(ebp+8) %eax)
17650 (pos-slice *(ebp+8) *(ebp+0xc))
17651 $pos-or-insert-slice:end:
17652
17653 81 0/subop/add %esp 8/imm32
17654
17655 89/<- %esp 5/r32/ebp
17656 5d/pop-to-ebp
17657 c3/return
17658
17659
17660
17661 pos-slice:
17662
17663 55/push-ebp
17664 89/<- %ebp 4/r32/esp
17665
17666 51/push-ecx
17667 52/push-edx
17668 53/push-ebx
17669 56/push-esi
17670
17671
17672
17673
17674
17675 8b/-> *(ebp+8) 6/r32/esi
17676
17677 b9/copy-to-ecx 0/imm32
17678
17679 8d/copy-address *(esi+0xc) 2/r32/edx
17680
17681 8b/-> *esi 3/r32/ebx
17682 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
17683 {
17684
17685
17686
17687
17688
17689 39/compare %edx 3/r32/ebx
17690 b8/copy-to-eax -1/imm32
17691 73/jump-if-addr>= $pos-slice:end/disp8
17692
17693 (slice-equal? *(ebp+0xc) *edx)
17694 3d/compare-eax-and 0/imm32/false
17695 75/jump-if-!= break/disp8
17696
17697 41/increment-ecx
17698
17699 81 0/subop/add %edx 4/imm32
17700
17701 eb/jump loop/disp8
17702 }
17703
17704 89/<- %eax 1/r32/ecx
17705 $pos-slice:end:
17706
17707
17708
17709
17710 5e/pop-to-esi
17711 5b/pop-to-ebx
17712 5a/pop-to-edx
17713 59/pop-to-ecx
17714
17715 89/<- %esp 5/r32/ebp
17716 5d/pop-to-ebp
17717 c3/return
17718
17719 test-parse-var-with-type:
17720
17721 55/push-ebp
17722 89/<- %ebp 4/r32/esp
17723
17724 8b/-> *Primitive-type-ids 0/r32/eax
17725 89/<- *Type-id 0/r32/eax
17726
17727 b8/copy-to-eax "x:"/imm32
17728 8b/-> *eax 1/r32/ecx
17729 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17730 05/add-to-eax 4/imm32
17731
17732 51/push-ecx
17733 50/push-eax
17734 89/<- %ecx 4/r32/esp
17735
17736 (clear-stream _test-input-stream)
17737 (write _test-input-stream "int")
17738
17739 68/push 0/imm32
17740 68/push 0/imm32
17741 89/<- %edx 4/r32/esp
17742
17743 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17744
17745 (lookup *edx *(edx+4))
17746 89/<- %edx 0/r32/eax
17747
17748 (lookup *edx *(edx+4))
17749 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
17750
17751 (lookup *(edx+8) *(edx+0xc))
17752 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
17753 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
17754 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
17755
17756 89/<- %esp 5/r32/ebp
17757 5d/pop-to-ebp
17758 c3/return
17759
17760 test-parse-var-with-type-and-register:
17761
17762 55/push-ebp
17763 89/<- %ebp 4/r32/esp
17764
17765 8b/-> *Primitive-type-ids 0/r32/eax
17766 89/<- *Type-id 0/r32/eax
17767
17768 b8/copy-to-eax "x/eax:"/imm32
17769 8b/-> *eax 1/r32/ecx
17770 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17771 05/add-to-eax 4/imm32
17772
17773 51/push-ecx
17774 50/push-eax
17775 89/<- %ecx 4/r32/esp
17776
17777 (clear-stream _test-input-stream)
17778 (write _test-input-stream "int")
17779
17780 68/push 0/imm32
17781 68/push 0/imm32
17782 89/<- %edx 4/r32/esp
17783
17784 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17785
17786 (lookup *edx *(edx+4))
17787 89/<- %edx 0/r32/eax
17788
17789 (lookup *edx *(edx+4))
17790 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
17791
17792 (lookup *(edx+0x18) *(edx+0x1c))
17793 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
17794
17795 (lookup *(edx+8) *(edx+0xc))
17796 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
17797 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
17798 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
17799
17800 89/<- %esp 5/r32/ebp
17801 5d/pop-to-ebp
17802 c3/return
17803
17804 test-parse-var-with-trailing-characters:
17805
17806 55/push-ebp
17807 89/<- %ebp 4/r32/esp
17808
17809 8b/-> *Primitive-type-ids 0/r32/eax
17810 89/<- *Type-id 0/r32/eax
17811
17812 b8/copy-to-eax "x:"/imm32
17813 8b/-> *eax 1/r32/ecx
17814 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17815 05/add-to-eax 4/imm32
17816
17817 51/push-ecx
17818 50/push-eax
17819 89/<- %ecx 4/r32/esp
17820
17821 (clear-stream _test-input-stream)
17822 (write _test-input-stream "int,")
17823
17824 68/push 0/imm32
17825 68/push 0/imm32
17826 89/<- %edx 4/r32/esp
17827
17828 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17829
17830 (lookup *edx *(edx+4))
17831 89/<- %edx 0/r32/eax
17832
17833 (lookup *edx *(edx+4))
17834 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
17835
17836 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
17837
17838 (lookup *(edx+8) *(edx+0xc))
17839 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
17840 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
17841 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
17842
17843 89/<- %esp 5/r32/ebp
17844 5d/pop-to-ebp
17845 c3/return
17846
17847 test-parse-var-with-register-and-trailing-characters:
17848
17849 55/push-ebp
17850 89/<- %ebp 4/r32/esp
17851
17852 8b/-> *Primitive-type-ids 0/r32/eax
17853 89/<- *Type-id 0/r32/eax
17854
17855 b8/copy-to-eax "x/eax:"/imm32
17856 8b/-> *eax 1/r32/ecx
17857 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17858 05/add-to-eax 4/imm32
17859
17860 51/push-ecx
17861 50/push-eax
17862 89/<- %ecx 4/r32/esp
17863
17864 (clear-stream _test-input-stream)
17865 (write _test-input-stream "int,")
17866
17867 68/push 0/imm32
17868 68/push 0/imm32
17869 89/<- %edx 4/r32/esp
17870
17871 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17872
17873 (lookup *edx *(edx+4))
17874 89/<- %edx 0/r32/eax
17875
17876 (lookup *edx *(edx+4))
17877 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
17878
17879 (lookup *(edx+0x18) *(edx+0x1c))
17880 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
17881
17882 (lookup *(edx+8) *(edx+0xc))
17883 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
17884 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
17885 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
17886
17887 89/<- %esp 5/r32/ebp
17888 5d/pop-to-ebp
17889 c3/return
17890
17891 test-parse-var-with-compound-type:
17892
17893 55/push-ebp
17894 89/<- %ebp 4/r32/esp
17895
17896 8b/-> *Primitive-type-ids 0/r32/eax
17897 89/<- *Type-id 0/r32/eax
17898
17899 b8/copy-to-eax "x:"/imm32
17900 8b/-> *eax 1/r32/ecx
17901 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17902 05/add-to-eax 4/imm32
17903
17904 51/push-ecx
17905 50/push-eax
17906 89/<- %ecx 4/r32/esp
17907
17908 (clear-stream _test-input-stream)
17909 (write _test-input-stream "(addr int)")
17910
17911 68/push 0/imm32
17912 68/push 0/imm32
17913 89/<- %edx 4/r32/esp
17914
17915 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17916
17917 (lookup *edx *(edx+4))
17918 89/<- %edx 0/r32/eax
17919
17920 (lookup *edx *(edx+4))
17921 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
17922
17923 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
17924
17925
17926 (lookup *(edx+8) *(edx+0xc))
17927 89/<- %edx 0/r32/eax
17928
17929 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
17930
17931 (lookup *(edx+4) *(edx+8))
17932 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
17933 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
17934
17935 (lookup *(edx+0xc) *(edx+0x10))
17936 (lookup *(eax+4) *(eax+8))
17937 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
17938 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
17939
17940 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
17941
17942 89/<- %esp 5/r32/ebp
17943 5d/pop-to-ebp
17944 c3/return
17945
17946
17947
17948
17949 identifier?:
17950
17951 55/push-ebp
17952 89/<- %ebp 4/r32/esp
17953
17954 (slice-empty? *(ebp+8))
17955 3d/compare-eax-and 0/imm32/false
17956 75/jump-if-!= $identifier?:false/disp8
17957
17958 8b/-> *(ebp+8) 0/r32/eax
17959 8b/-> *eax 0/r32/eax
17960 8a/copy-byte *eax 0/r32/AL
17961 25/and-eax-with 0xff/imm32
17962
17963 3d/compare-eax-and 0x24/imm32/$
17964 74/jump-if-= $identifier?:true/disp8
17965
17966 3d/compare-eax-and 0x5f/imm32/_
17967 74/jump-if-= $identifier?:true/disp8
17968
17969 25/and-eax-with 0x5f/imm32
17970
17971 3d/compare-eax-and 0x41/imm32/A
17972 7c/jump-if-< $identifier?:false/disp8
17973
17974 3d/compare-eax-and 0x5a/imm32/Z
17975 7f/jump-if-> $identifier?:false/disp8
17976
17977 $identifier?:true:
17978 b8/copy-to-eax 1/imm32/true
17979 eb/jump $identifier?:end/disp8
17980 $identifier?:false:
17981 b8/copy-to-eax 0/imm32/false
17982 $identifier?:end:
17983
17984 89/<- %esp 5/r32/ebp
17985 5d/pop-to-ebp
17986 c3/return
17987
17988 test-is-identifier-dollar:
17989
17990 55/push-ebp
17991 89/<- %ebp 4/r32/esp
17992
17993 b8/copy-to-eax "$a"/imm32
17994 8b/-> *eax 1/r32/ecx
17995 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17996 05/add-to-eax 4/imm32
17997
17998 51/push-ecx
17999 50/push-eax
18000 89/<- %ecx 4/r32/esp
18001
18002 (identifier? %ecx)
18003 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
18004
18005 89/<- %esp 5/r32/ebp
18006 5d/pop-to-ebp
18007 c3/return
18008
18009 test-is-identifier-underscore:
18010
18011 55/push-ebp
18012 89/<- %ebp 4/r32/esp
18013
18014 b8/copy-to-eax "_a"/imm32
18015 8b/-> *eax 1/r32/ecx
18016 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18017 05/add-to-eax 4/imm32
18018
18019 51/push-ecx
18020 50/push-eax
18021 89/<- %ecx 4/r32/esp
18022
18023 (identifier? %ecx)
18024 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
18025
18026 89/<- %esp 5/r32/ebp
18027 5d/pop-to-ebp
18028 c3/return
18029
18030 test-is-identifier-a:
18031
18032 55/push-ebp
18033 89/<- %ebp 4/r32/esp
18034
18035 b8/copy-to-eax "a$"/imm32
18036 8b/-> *eax 1/r32/ecx
18037 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18038 05/add-to-eax 4/imm32
18039
18040 51/push-ecx
18041 50/push-eax
18042 89/<- %ecx 4/r32/esp
18043
18044 (identifier? %ecx)
18045 (check-ints-equal %eax 1 "F - test-is-identifier-a")
18046
18047 89/<- %esp 5/r32/ebp
18048 5d/pop-to-ebp
18049 c3/return
18050
18051 test-is-identifier-z:
18052
18053 55/push-ebp
18054 89/<- %ebp 4/r32/esp
18055
18056 b8/copy-to-eax "z$"/imm32
18057 8b/-> *eax 1/r32/ecx
18058 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18059 05/add-to-eax 4/imm32
18060
18061 51/push-ecx
18062 50/push-eax
18063 89/<- %ecx 4/r32/esp
18064
18065 (identifier? %ecx)
18066 (check-ints-equal %eax 1 "F - test-is-identifier-z")
18067
18068 89/<- %esp 5/r32/ebp
18069 5d/pop-to-ebp
18070 c3/return
18071
18072 test-is-identifier-A:
18073
18074 55/push-ebp
18075 89/<- %ebp 4/r32/esp
18076
18077 b8/copy-to-eax "A$"/imm32
18078 8b/-> *eax 1/r32/ecx
18079 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18080 05/add-to-eax 4/imm32
18081
18082 51/push-ecx
18083 50/push-eax
18084 89/<- %ecx 4/r32/esp
18085
18086 (identifier? %ecx)
18087 (check-ints-equal %eax 1 "F - test-is-identifier-A")
18088
18089 89/<- %esp 5/r32/ebp
18090 5d/pop-to-ebp
18091 c3/return
18092
18093 test-is-identifier-Z:
18094
18095 55/push-ebp
18096 89/<- %ebp 4/r32/esp
18097
18098 b8/copy-to-eax "Z$"/imm32
18099 8b/-> *eax 1/r32/ecx
18100 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18101 05/add-to-eax 4/imm32
18102
18103 51/push-ecx
18104 50/push-eax
18105 89/<- %ecx 4/r32/esp
18106
18107 (identifier? %ecx)
18108 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
18109
18110 89/<- %esp 5/r32/ebp
18111 5d/pop-to-ebp
18112 c3/return
18113
18114 test-is-identifier-at:
18115
18116
18117 55/push-ebp
18118 89/<- %ebp 4/r32/esp
18119
18120 b8/copy-to-eax "@a"/imm32
18121 8b/-> *eax 1/r32/ecx
18122 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18123 05/add-to-eax 4/imm32
18124
18125 51/push-ecx
18126 50/push-eax
18127 89/<- %ecx 4/r32/esp
18128
18129 (identifier? %ecx)
18130 (check-ints-equal %eax 0 "F - test-is-identifier-@")
18131
18132 89/<- %esp 5/r32/ebp
18133 5d/pop-to-ebp
18134 c3/return
18135
18136 test-is-identifier-square-bracket:
18137
18138
18139 55/push-ebp
18140 89/<- %ebp 4/r32/esp
18141
18142 b8/copy-to-eax "[a"/imm32
18143 8b/-> *eax 1/r32/ecx
18144 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18145 05/add-to-eax 4/imm32
18146
18147 51/push-ecx
18148 50/push-eax
18149 89/<- %ecx 4/r32/esp
18150
18151 (identifier? %ecx)
18152 (check-ints-equal %eax 0 "F - test-is-identifier-@")
18153
18154 89/<- %esp 5/r32/ebp
18155 5d/pop-to-ebp
18156 c3/return
18157
18158 test-is-identifier-backtick:
18159
18160
18161 55/push-ebp
18162 89/<- %ebp 4/r32/esp
18163
18164 b8/copy-to-eax "`a"/imm32
18165 8b/-> *eax 1/r32/ecx
18166 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18167 05/add-to-eax 4/imm32
18168
18169 51/push-ecx
18170 50/push-eax
18171 89/<- %ecx 4/r32/esp
18172
18173 (identifier? %ecx)
18174 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
18175
18176 89/<- %esp 5/r32/ebp
18177 5d/pop-to-ebp
18178 c3/return
18179
18180 test-is-identifier-curly-brace-open:
18181
18182
18183 55/push-ebp
18184 89/<- %ebp 4/r32/esp
18185
18186 b8/copy-to-eax "{a"/imm32
18187 8b/-> *eax 1/r32/ecx
18188 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18189 05/add-to-eax 4/imm32
18190
18191 51/push-ecx
18192 50/push-eax
18193 89/<- %ecx 4/r32/esp
18194
18195 (identifier? %ecx)
18196 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
18197
18198 89/<- %esp 5/r32/ebp
18199 5d/pop-to-ebp
18200 c3/return
18201
18202 test-is-identifier-curly-brace-close:
18203
18204 55/push-ebp
18205 89/<- %ebp 4/r32/esp
18206
18207 b8/copy-to-eax "}a"/imm32
18208 8b/-> *eax 1/r32/ecx
18209 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18210 05/add-to-eax 4/imm32
18211
18212 51/push-ecx
18213 50/push-eax
18214 89/<- %ecx 4/r32/esp
18215
18216 (identifier? %ecx)
18217 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
18218
18219 89/<- %esp 5/r32/ebp
18220 5d/pop-to-ebp
18221 c3/return
18222
18223 test-is-identifier-hyphen:
18224
18225
18226 55/push-ebp
18227 89/<- %ebp 4/r32/esp
18228
18229 b8/copy-to-eax "-a"/imm32
18230 8b/-> *eax 1/r32/ecx
18231 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18232 05/add-to-eax 4/imm32
18233
18234 51/push-ecx
18235 50/push-eax
18236 89/<- %ecx 4/r32/esp
18237
18238 (identifier? %ecx)
18239 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
18240
18241 89/<- %esp 5/r32/ebp
18242 5d/pop-to-ebp
18243 c3/return
18244
18245 populate-mu-function-body:
18246
18247 55/push-ebp
18248 89/<- %ebp 4/r32/esp
18249
18250 50/push-eax
18251 56/push-esi
18252 57/push-edi
18253
18254 8b/-> *(ebp+8) 6/r32/esi
18255
18256 8b/-> *(ebp+0xc) 7/r32/edi
18257
18258 c7 0/subop/copy *Curr-block-depth 1/imm32
18259
18260 8d/copy-address *(edi+0x18) 0/r32/eax
18261 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
18262 $populate-mu-function-body:end:
18263
18264 5f/pop-to-edi
18265 5e/pop-to-esi
18266 58/pop-to-eax
18267
18268 89/<- %esp 5/r32/ebp
18269 5d/pop-to-ebp
18270 c3/return
18271
18272
18273 parse-mu-block:
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312 55/push-ebp
18313 89/<- %ebp 4/r32/esp
18314
18315 50/push-eax
18316 51/push-ecx
18317 52/push-edx
18318 53/push-ebx
18319 57/push-edi
18320
18321 81 5/subop/subtract %esp 0x200/imm32
18322 68/push 0x200/imm32/size
18323 68/push 0/imm32/read
18324 68/push 0/imm32/write
18325 89/<- %ecx 4/r32/esp
18326
18327 68/push 0/imm32/end
18328 68/push 0/imm32/start
18329 89/<- %edx 4/r32/esp
18330
18331 (allocate Heap *Stmt-size *(ebp+0x14))
18332
18333 8b/-> *(ebp+0x14) 7/r32/edi
18334 (lookup *edi *(edi+4))
18335 89/<- %edi 0/r32/eax
18336
18337
18338 8d/copy-address *(edi+0xc) 0/r32/eax
18339 (new-block-name *(ebp+0x10) %eax)
18340
18341 (push *(ebp+0xc) *(edi+0xc))
18342 (push *(ebp+0xc) *(edi+0x10))
18343 (push *(ebp+0xc) 0)
18344
18345 ff 0/subop/increment *Curr-block-depth
18346 {
18347 $parse-mu-block:line-loop:
18348
18349 (clear-stream %ecx)
18350 (read-line-buffered *(ebp+8) %ecx)
18351
18352
18353
18354
18355
18356
18357 81 7/subop/compare *ecx 0/imm32
18358 0f 84/jump-if-= break/disp32
18359
18360
18361
18362 (next-mu-token %ecx %edx)
18363
18364
18365
18366
18367
18368 (slice-empty? %edx)
18369 3d/compare-eax-and 0/imm32/false
18370 0f 85/jump-if-!= loop/disp32
18371
18372
18373 8b/-> *edx 0/r32/eax
18374 8a/copy-byte *eax 0/r32/AL
18375 25/and-eax-with 0xff/imm32
18376
18377 3d/compare-eax-and 0x23/imm32/hash
18378 0f 84/jump-if-= loop/disp32
18379
18380 {
18381 $parse-mu-block:check-for-block:
18382 (slice-equal? %edx "{")
18383 3d/compare-eax-and 0/imm32/false
18384 74/jump-if-= break/disp8
18385 (check-no-tokens-left %ecx)
18386
18387
18388 68/push 0/imm32
18389 68/push 0/imm32
18390 89/<- %eax 4/r32/esp
18391
18392 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18393 (append-to-block Heap %edi *eax *(eax+4))
18394
18395 81 0/subop/add %esp 8/imm32
18396
18397 e9/jump $parse-mu-block:line-loop/disp32
18398 }
18399
18400 $parse-mu-block:check-for-end:
18401 (slice-equal? %edx "}")
18402 3d/compare-eax-and 0/imm32/false
18403 0f 85/jump-if-!= break/disp32
18404
18405 {
18406 $parse-mu-block:check-for-named-block:
18407
18408 8b/-> *(edx+4) 0/r32/eax
18409 48/decrement-eax
18410 8a/copy-byte *eax 0/r32/AL
18411 25/and-eax-with 0xff/imm32
18412
18413 3d/compare-eax-and 0x3a/imm32/colon
18414 0f 85/jump-if-!= break/disp32
18415
18416 (check-next-token-is-open-curly %ecx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
18417
18418 ff 1/subop/decrement *(edx+4)
18419
18420 68/push 0/imm32
18421 68/push 0/imm32
18422 89/<- %eax 4/r32/esp
18423
18424 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18425 (append-to-block Heap %edi *eax *(eax+4))
18426
18427 81 0/subop/add %esp 8/imm32
18428
18429 e9/jump $parse-mu-block:line-loop/disp32
18430 }
18431
18432 {
18433 $parse-mu-block:check-for-var:
18434 (slice-equal? %edx "var")
18435 3d/compare-eax-and 0/imm32/false
18436 74/jump-if-= break/disp8
18437
18438 68/push 0/imm32
18439 68/push 0/imm32
18440 89/<- %eax 4/r32/esp
18441
18442 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
18443 (append-to-block Heap %edi *eax *(eax+4))
18444
18445 81 0/subop/add %esp 8/imm32
18446
18447 e9/jump $parse-mu-block:line-loop/disp32
18448 }
18449 $parse-mu-block:regular-stmt:
18450
18451
18452 68/push 0/imm32
18453 68/push 0/imm32
18454 89/<- %eax 4/r32/esp
18455
18456 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18457 (append-to-block Heap %edi *eax *(eax+4))
18458
18459 81 0/subop/add %esp 8/imm32
18460
18461 e9/jump loop/disp32
18462 }
18463 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
18464
18465 ff 1/subop/decrement *Curr-block-depth
18466
18467 (pop *(ebp+0xc))
18468 (pop *(ebp+0xc))
18469 (pop *(ebp+0xc))
18470 $parse-mu-block:end:
18471
18472 81 0/subop/add %esp 0x214/imm32
18473
18474 5f/pop-to-edi
18475 5b/pop-to-ebx
18476 5a/pop-to-edx
18477 59/pop-to-ecx
18478 58/pop-to-eax
18479
18480 89/<- %esp 5/r32/ebp
18481 5d/pop-to-ebp
18482 c3/return
18483
18484 $parse-mu-block:abort:
18485
18486 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
18487 (rewind-stream %ecx)
18488 (write-stream-data *(ebp+0x18) %ecx)
18489 (write-buffered *(ebp+0x18) "'\n")
18490 (flush *(ebp+0x18))
18491 (stop *(ebp+0x1c) 1)
18492
18493
18494 check-next-token-is-open-curly:
18495
18496 55/push-ebp
18497 89/<- %ebp 4/r32/esp
18498
18499 50/push-eax
18500 52/push-edx
18501
18502 68/push 0/imm32/end
18503 68/push 0/imm32/start
18504 89/<- %edx 4/r32/esp
18505
18506 (next-mu-token *(ebp+8) %edx)
18507
18508 (slice-equal? %edx "{")
18509 3d/compare-eax-and 0/imm32/false
18510 0f 84/jump-if-= $check-next-token-is-open-curly:abort/disp32
18511 $check-next-token-is-open-curly:end:
18512
18513 81 0/subop/add %esp 8/imm32
18514
18515 5a/pop-to-edx
18516 58/pop-to-eax
18517
18518 89/<- %esp 5/r32/ebp
18519 5d/pop-to-ebp
18520 c3/return
18521
18522 $check-next-token-is-open-curly:abort:
18523
18524 (write-buffered *(ebp+0x10) "fn ")
18525 8b/-> *(ebp+0xc) 0/r32/eax
18526 (lookup *eax *(eax+4))
18527 (write-buffered *(ebp+0x10) %eax)
18528 (write-buffered *(ebp+0x10) ": unexpected ':'; did you forget a 'var'?\n")
18529 (flush *(ebp+0x10))
18530 (stop *(ebp+0x14) 1)
18531
18532
18533 new-block-name:
18534
18535 55/push-ebp
18536 89/<- %ebp 4/r32/esp
18537
18538 50/push-eax
18539 51/push-ecx
18540 52/push-edx
18541
18542 8b/-> *(ebp+8) 0/r32/eax
18543 (lookup *eax *(eax+4))
18544 8b/-> *eax 0/r32/eax
18545 05/add-to-eax 0xd/imm32
18546 89/<- %ecx 0/r32/eax
18547
18548 29/subtract-from %esp 1/r32/ecx
18549 ff 6/subop/push %ecx
18550 68/push 0/imm32/read
18551 68/push 0/imm32/write
18552 89/<- %edx 4/r32/esp
18553 (clear-stream %edx)
18554
18555 8b/-> *(ebp+8) 0/r32/eax
18556 (lookup *eax *(eax+4))
18557
18558 (write %edx "$")
18559 (write %edx %eax)
18560 (write %edx ":")
18561 (write-int32-hex %edx *Next-block-index)
18562 ff 0/subop/increment *Next-block-index
18563
18564
18565 8b/-> *edx 0/r32/eax
18566
18567 8d/copy-address *(edx+0xc) 2/r32/edx
18568
18569 01/add-to %eax 2/r32/edx
18570
18571 ff 6/subop/push %eax
18572 ff 6/subop/push %edx
18573 89/<- %eax 4/r32/esp
18574
18575 (new-literal Heap %eax *(ebp+0xc))
18576
18577
18578
18579
18580
18581
18582
18583 $new-block-name:end:
18584
18585 81 0/subop/add %ecx 0xc/imm32
18586 81 0/subop/add %ecx 8/imm32
18587 01/add-to %esp 1/r32/ecx
18588
18589 5a/pop-to-edx
18590 59/pop-to-ecx
18591 58/pop-to-eax
18592
18593 89/<- %esp 5/r32/ebp
18594 5d/pop-to-ebp
18595 c3/return
18596
18597 check-no-tokens-left:
18598
18599 55/push-ebp
18600 89/<- %ebp 4/r32/esp
18601
18602 50/push-eax
18603 51/push-ecx
18604
18605 68/push 0/imm32/end
18606 68/push 0/imm32/start
18607 89/<- %ecx 4/r32/esp
18608
18609 (next-mu-token *(ebp+8) %ecx)
18610
18611 (slice-empty? %ecx)
18612 3d/compare-eax-and 0/imm32/false
18613 75/jump-if-!= $check-no-tokens-left:end/disp8
18614
18615
18616 8b/-> *edx 0/r32/eax
18617 8a/copy-byte *eax 0/r32/AL
18618 25/and-eax-with 0xff/imm32
18619
18620 3d/compare-eax-and 0x23/imm32/hash
18621 74/jump-if-= $check-no-tokens-left:end/disp8
18622
18623 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
18624 (rewind-stream %ecx)
18625 (write-stream 2 %ecx)
18626 (write-buffered Stderr "'\n")
18627 (flush Stderr)
18628
18629 bb/copy-to-ebx 1/imm32
18630 e8/call syscall_exit/disp32
18631
18632 $check-no-tokens-left:end:
18633
18634 81 0/subop/add %esp 8/imm32
18635
18636 59/pop-to-ecx
18637 58/pop-to-eax
18638
18639 89/<- %esp 5/r32/ebp
18640 5d/pop-to-ebp
18641 c3/return
18642
18643 parse-mu-named-block:
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654 55/push-ebp
18655 89/<- %ebp 4/r32/esp
18656
18657 50/push-eax
18658 51/push-ecx
18659 57/push-edi
18660
18661 68/push 0/imm32
18662 68/push 0/imm32
18663 89/<- %ecx 4/r32/esp
18664
18665 (new-literal Heap *(ebp+8) %ecx)
18666
18667 (push *(ebp+0x10) *ecx)
18668 (push *(ebp+0x10) *(ecx+4))
18669 (push *(ebp+0x10) 0)
18670
18671 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
18672
18673 (pop *(ebp+0x10))
18674 (pop *(ebp+0x10))
18675 (pop *(ebp+0x10))
18676
18677 8b/-> *(ebp+0x18) 7/r32/edi
18678 (lookup *edi *(edi+4))
18679 89/<- %edi 0/r32/eax
18680
18681 c7 0/subop/copy *edi 0/imm32/block
18682
18683 8b/-> *ecx 0/r32/eax
18684 89/<- *(edi+0xc) 0/r32/eax
18685 8b/-> *(ecx+4) 0/r32/eax
18686 89/<- *(edi+0x10) 0/r32/eax
18687 $parse-mu-named-block:end:
18688
18689 81 0/subop/add %esp 8/imm32
18690
18691 5f/pop-to-edi
18692 59/pop-to-ecx
18693 58/pop-to-eax
18694
18695 89/<- %esp 5/r32/ebp
18696 5d/pop-to-ebp
18697 c3/return
18698
18699 parse-mu-var-def:
18700
18701 55/push-ebp
18702 89/<- %ebp 4/r32/esp
18703
18704 50/push-eax
18705 51/push-ecx
18706 52/push-edx
18707 56/push-esi
18708 57/push-edi
18709
18710 8b/-> *(ebp+0x10) 7/r32/edi
18711
18712 68/push 0/imm32/end
18713 68/push 0/imm32/start
18714 89/<- %ecx 4/r32/esp
18715
18716 68/push 0/imm32
18717 68/push 0/imm32
18718 89/<- %edx 4/r32/esp
18719
18720 (next-mu-token *(ebp+8) %ecx)
18721 {
18722
18723 8b/-> *(ebp+0x14) 0/r32/eax
18724 3d/compare-eax-and 0/imm32
18725 74/jump-if-= break/disp8
18726 (lookup *eax *(eax+4))
18727 }
18728 (parse-var-with-type %ecx *(ebp+8) %edx %eax *(ebp+0x18) *(ebp+0x1c))
18729
18730 (lookup *edx *(edx+4))
18731 89/<- %esi 0/r32/eax
18732
18733 8b/-> *Curr-block-depth 0/r32/eax
18734 89/<- *(esi+0x10) 0/r32/eax
18735
18736 81 7/subop/compare *(esi+0x18) 0/imm32
18737 {
18738 75/jump-if-!= break/disp8
18739
18740 (lookup *(esi+8) *(esi+0xc))
18741 (simple-mu-type? %eax 8)
18742 3d/compare-eax-and 0/imm32/false
18743 0f 85/jump-if-!= $parse-mu-var-def:error-byte-on-stack/disp32
18744
18745 (next-mu-token *(ebp+8) %ecx)
18746 (slice-empty? %ecx)
18747 3d/compare-eax-and 0/imm32/false
18748 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
18749
18750 (new-var-def Heap *edx *(edx+4) %edi)
18751 e9/jump $parse-mu-var-def:update-vars/disp32
18752 }
18753
18754 {
18755 0f 84/jump-if-= break/disp32
18756
18757 {
18758 (lookup *(esi+8) *(esi+0xc))
18759 (simple-mu-type? %eax 8)
18760 3d/compare-eax-and 0/imm32/false
18761 74/jump-if-= break/disp8
18762 (lookup *(esi+0x18) *(esi+0x1c))
18763 (string-equal? %eax "esi")
18764 3d/compare-eax-and 0/imm32/false
18765 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
18766 (lookup *(esi+0x18) *(esi+0x1c))
18767 (string-equal? %eax "edi")
18768 3d/compare-eax-and 0/imm32/false
18769 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
18770 }
18771
18772
18773 (next-mu-token *(ebp+8) %ecx)
18774 (slice-equal? %ecx "<-")
18775 3d/compare-eax-and 0/imm32/false
18776 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
18777
18778 (new-reg-var-def Heap *edx *(edx+4) %edi)
18779 (lookup *edi *(edi+4))
18780 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
18781 }
18782 $parse-mu-var-def:update-vars:
18783
18784 (push *(ebp+0xc) *edx)
18785 (push *(ebp+0xc) *(edx+4))
18786 (push *(ebp+0xc) 0)
18787 $parse-mu-var-def:end:
18788
18789 81 0/subop/add %esp 0x10/imm32
18790
18791 5f/pop-to-edi
18792 5e/pop-to-esi
18793 5a/pop-to-edx
18794 59/pop-to-ecx
18795 58/pop-to-eax
18796
18797 89/<- %esp 5/r32/ebp
18798 5d/pop-to-ebp
18799 c3/return
18800
18801 $parse-mu-var-def:error1:
18802 (rewind-stream *(ebp+8))
18803
18804 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
18805 (flush *(ebp+0x18))
18806 (write-stream-data *(ebp+0x18) *(ebp+8))
18807 (write-buffered *(ebp+0x18) "'\n")
18808 (flush *(ebp+0x18))
18809 (stop *(ebp+0x1c) 1)
18810
18811
18812 $parse-mu-var-def:error2:
18813
18814 (write-buffered *(ebp+0x18) "fn ")
18815 8b/-> *(ebp+0x14) 0/r32/eax
18816 (lookup *eax *(eax+4))
18817 (write-buffered *(ebp+0x18) %eax)
18818 (write-buffered *(ebp+0x18) ": var ")
18819
18820 (lookup *edx *(edx+4))
18821 (lookup *eax *(eax+4))
18822 (write-buffered *(ebp+0x18) %eax)
18823 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
18824 (flush *(ebp+0x18))
18825 (stop *(ebp+0x1c) 1)
18826
18827
18828 $parse-mu-var-def:error-byte-on-stack:
18829
18830 (write-buffered *(ebp+0x18) "fn ")
18831 8b/-> *(ebp+0x14) 0/r32/eax
18832 (lookup *eax *(eax+4))
18833 (write-buffered *(ebp+0x18) %eax)
18834 (write-buffered *(ebp+0x18) ": var '")
18835
18836 (lookup *edx *(edx+4))
18837 (lookup *eax *(eax+4))
18838 (write-buffered *(ebp+0x18) %eax)
18839 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be on the stack\n")
18840 (flush *(ebp+0x18))
18841 (stop *(ebp+0x1c) 1)
18842
18843
18844 $parse-mu-var-def:error-byte-registers:
18845
18846 (write-buffered *(ebp+0x18) "fn ")
18847 8b/-> *(ebp+0x14) 0/r32/eax
18848 (lookup *eax *(eax+4))
18849 (write-buffered *(ebp+0x18) %eax)
18850 (write-buffered *(ebp+0x18) ": var '")
18851
18852 (lookup *edx *(edx+4))
18853 (lookup *eax *(eax+4))
18854 (write-buffered *(ebp+0x18) %eax)
18855 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be in esi or edi\n")
18856 (flush *(ebp+0x18))
18857 (stop *(ebp+0x1c) 1)
18858
18859
18860 test-parse-mu-var-def:
18861
18862
18863 55/push-ebp
18864 89/<- %ebp 4/r32/esp
18865
18866 8b/-> *Primitive-type-ids 0/r32/eax
18867 89/<- *Type-id 0/r32/eax
18868 (clear-stream _test-input-stream)
18869 (write _test-input-stream "n: int\n")
18870 c7 0/subop/copy *Curr-block-depth 1/imm32
18871
18872 68/push 0/imm32
18873 68/push 0/imm32
18874 89/<- %esi 4/r32/esp
18875
18876 81 5/subop/subtract %esp 0xc0/imm32
18877 68/push 0xc0/imm32/size
18878 68/push 0/imm32/top
18879 89/<- %ecx 4/r32/esp
18880 (clear-stack %ecx)
18881
18882 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
18883
18884 (lookup *esi *(esi+4))
18885 89/<- %esi 0/r32/eax
18886
18887 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
18888
18889 (lookup *(esi+4) *(esi+8))
18890 89/<- %ecx 0/r32/eax
18891
18892 (lookup *ecx *(ecx+4))
18893 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
18894
18895 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
18896
18897 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
18898
18899 (lookup *(ecx+8) *(ecx+0xc))
18900 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
18901 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
18902 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
18903
18904 89/<- %esp 5/r32/ebp
18905 5d/pop-to-ebp
18906 c3/return
18907
18908 test-parse-mu-reg-var-def:
18909
18910
18911 55/push-ebp
18912 89/<- %ebp 4/r32/esp
18913
18914 8b/-> *Primitive-type-ids 0/r32/eax
18915 89/<- *Type-id 0/r32/eax
18916 (clear-stream _test-input-stream)
18917 (write _test-input-stream "n/eax: int <- copy 0\n")
18918 c7 0/subop/copy *Curr-block-depth 1/imm32
18919
18920 68/push 0/imm32
18921 68/push 0/imm32
18922 89/<- %esi 4/r32/esp
18923
18924 81 5/subop/subtract %esp 0xc0/imm32
18925 68/push 0xc0/imm32/size
18926 68/push 0/imm32/top
18927 89/<- %ecx 4/r32/esp
18928 (clear-stack %ecx)
18929
18930 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
18931
18932 (lookup *esi *(esi+4))
18933 89/<- %esi 0/r32/eax
18934
18935 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
18936
18937
18938 (lookup *(esi+0x14) *(esi+0x18))
18939
18940 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
18941
18942 (lookup *eax *(eax+4))
18943
18944 89/<- %ecx 0/r32/eax
18945
18946 (lookup *ecx *(ecx+4))
18947 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
18948
18949 (lookup *(ecx+0x18) *(ecx+0x1c))
18950 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
18951
18952 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
18953
18954 (lookup *(ecx+8) *(ecx+0xc))
18955 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
18956 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
18957 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
18958
18959 89/<- %esp 5/r32/ebp
18960 5d/pop-to-ebp
18961 c3/return
18962
18963 parse-mu-stmt:
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979 55/push-ebp
18980 89/<- %ebp 4/r32/esp
18981
18982 50/push-eax
18983 51/push-ecx
18984 52/push-edx
18985 53/push-ebx
18986 57/push-edi
18987
18988 68/push 0/imm32/end
18989 68/push 0/imm32/start
18990 89/<- %ecx 4/r32/esp
18991
18992 ba/copy-to-edx 0/imm32/false
18993
18994 68/push 0/imm32
18995 68/push 0/imm32
18996 89/<- %ebx 4/r32/esp
18997
18998 (allocate Heap *Stmt-size *(ebp+0x14))
18999
19000 8b/-> *(ebp+0x14) 7/r32/edi
19001 (lookup *edi *(edi+4))
19002 89/<- %edi 0/r32/eax
19003
19004 c7 0/subop/copy *edi 1/imm32/stmt1
19005 {
19006 (stmt-has-outputs? *(ebp+8))
19007 3d/compare-eax-and 0/imm32/false
19008 0f 84/jump-if-= break/disp32
19009 {
19010 $parse-mu-stmt:read-outputs:
19011
19012 (next-mu-token *(ebp+8) %ecx)
19013
19014 (slice-empty? %ecx)
19015 3d/compare-eax-and 0/imm32/false
19016 0f 85/jump-if-!= break/disp32
19017
19018 (slice-equal? %ecx "<-")
19019 3d/compare-eax-and 0/imm32/false
19020 0f 85/jump-if-!= break/disp32
19021
19022 8b/-> *ecx 0/r32/eax
19023 8a/copy-byte *eax 0/r32/AL
19024 25/and-eax-with 0xff/imm32
19025 3d/compare-eax-and 0x2a/imm32/asterisk
19026 0f 84/jump-if-= $parse-mu-stmt:error-output-dereferenced/disp32
19027
19028 (identifier? %ecx)
19029 3d/compare-eax-and 0/imm32/false
19030 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
19031
19032 (lookup-var %ecx *(ebp+0xc) %ebx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
19033 8d/copy-address *(edi+0x14) 0/r32/eax
19034 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) 0 %eax)
19035
19036 e9/jump loop/disp32
19037 }
19038 }
19039 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
19040 $parse-mu-stmt:end:
19041
19042 81 0/subop/add %esp 0x10/imm32
19043
19044 5f/pop-to-edi
19045 5b/pop-to-ebx
19046 5a/pop-to-edx
19047 59/pop-to-ecx
19048 58/pop-to-eax
19049
19050 89/<- %esp 5/r32/ebp
19051 5d/pop-to-ebp
19052 c3/return
19053
19054 $parse-mu-stmt:abort:
19055
19056 (write-buffered *(ebp+0x18) "fn ")
19057 8b/-> *(ebp+0x10) 0/r32/eax
19058 (lookup *eax *(eax+4))
19059 (write-buffered *(ebp+0x18) %eax)
19060 (write-buffered *(ebp+0x18) ": invalid identifier '")
19061 (write-slice-buffered *(ebp+0x18) %ecx)
19062 (write-buffered *(ebp+0x18) "'\n")
19063 (flush *(ebp+0x18))
19064 (stop *(ebp+0x1c) 1)
19065
19066
19067 $parse-mu-stmt:error-output-dereferenced:
19068
19069 (write-buffered *(ebp+0x18) "fn ")
19070 8b/-> *(ebp+0x10) 0/r32/eax
19071 (lookup *eax *(eax+4))
19072 (write-buffered *(ebp+0x18) %eax)
19073 (write-buffered *(ebp+0x18) ": output '")
19074 (write-slice-buffered *(ebp+0x18) %ecx)
19075 (write-buffered *(ebp+0x18) "' should write to a register, and therefore cannot be dereferenced\n")
19076 (flush *(ebp+0x18))
19077 (stop *(ebp+0x1c) 1)
19078
19079
19080 add-operation-and-inputs-to-stmt:
19081
19082
19083
19084
19085
19086
19087
19088
19089 55/push-ebp
19090 89/<- %ebp 4/r32/esp
19091
19092 50/push-eax
19093 51/push-ecx
19094 52/push-edx
19095 53/push-ebx
19096 56/push-esi
19097 57/push-edi
19098
19099 8b/-> *(ebp+8) 7/r32/edi
19100
19101 68/push 0/imm32/end
19102 68/push 0/imm32/start
19103 89/<- %ecx 4/r32/esp
19104
19105 ba/copy-to-edx 0/imm32/false
19106
19107 68/push 0/imm32
19108 68/push 0/imm32
19109 89/<- %esi 4/r32/esp
19110 $add-operation-and-inputs-to-stmt:read-operation:
19111 (next-mu-token *(ebp+0xc) %ecx)
19112 8d/copy-address *(edi+4) 0/r32/eax
19113 (slice-to-string Heap %ecx %eax)
19114
19115 (slice-equal? %ecx "get")
19116 89/<- %ebx 0/r32/eax
19117 {
19118 $add-operation-and-inputs-to-stmt:read-inouts:
19119
19120 (next-mu-token *(ebp+0xc) %ecx)
19121
19122 (slice-empty? %ecx)
19123 3d/compare-eax-and 0/imm32/false
19124 0f 85/jump-if-!= break/disp32
19125
19126 (slice-equal? %ecx "<-")
19127 3d/compare-eax-and 0/imm32/false
19128 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
19129
19130 {
19131 81 7/subop/compare %ebx 0/imm32/false
19132 74/jump-if-= break/disp8
19133 (lookup *(edi+0xc) *(edi+0x10))
19134 3d/compare-eax-and 0/imm32
19135 74/jump-if-= break/disp8
19136 (lookup-or-create-constant %eax %ecx %esi)
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
19148 }
19149
19150 ba/copy-to-edx 0/imm32/false
19151
19152 8b/-> *ecx 0/r32/eax
19153 8a/copy-byte *eax 0/r32/AL
19154 25/and-eax-with 0xff/imm32
19155 3d/compare-eax-and 0x2a/imm32/asterisk
19156 {
19157 75/jump-if-!= break/disp8
19158 $add-operation-and-inputs-to-stmt:inout-is-deref:
19159 ff 0/subop/increment *ecx
19160 ba/copy-to-edx 1/imm32/true
19161 }
19162 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19163
19164 81 7/subop/compare %edx 0/imm32/false
19165 {
19166 74/jump-if-= break/disp8
19167
19168 (lookup *esi *(esi+4))
19169 81 7/subop/compare *(eax+0x18) 0/imm32
19170 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-on-stack/disp32
19171
19172 (lookup *(eax+8) *(eax+0xc))
19173 (mu-addr-type? %eax)
19174 3d/compare-eax-and 0/imm32/false
19175 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-non-addr/disp32
19176 }
19177 $add-operation-and-inputs-to-stmt:save-var:
19178 8d/copy-address *(edi+0xc) 0/r32/eax
19179 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
19180
19181 e9/jump loop/disp32
19182 }
19183 $add-operation-and-inputs-to-stmt:end:
19184
19185 81 0/subop/add %esp 0x10/imm32
19186
19187 5f/pop-to-edi
19188 5e/pop-to-esi
19189 5b/pop-to-ebx
19190 5a/pop-to-edx
19191 59/pop-to-ecx
19192 58/pop-to-eax
19193
19194 89/<- %esp 5/r32/ebp
19195 5d/pop-to-ebp
19196 c3/return
19197
19198 $add-operation-and-inputs-to-stmt:abort:
19199
19200 (write-buffered *(ebp+0x18) "fn ")
19201 8b/-> *(ebp+0x14) 0/r32/eax
19202 (lookup *eax *(eax+4))
19203 (write-buffered *(ebp+0x18) %eax)
19204 (rewind-stream *(ebp+0xc))
19205 (write-buffered *(ebp+0x18) ": invalid identifier in '")
19206 (write-stream-data *(ebp+0x18) *(ebp+0xc))
19207 (write-buffered *(ebp+0x18) "'\n")
19208 (flush *(ebp+0x18))
19209 (stop *(ebp+0x1c) 1)
19210
19211
19212 $add-operation-and-inputs-to-stmt:error-deref-on-stack:
19213
19214 (write-buffered *(ebp+0x18) "fn ")
19215 8b/-> *(ebp+0x14) 0/r32/eax
19216 (lookup *eax *(eax+4))
19217 (write-buffered *(ebp+0x18) %eax)
19218 (rewind-stream *(ebp+0xc))
19219 (write-buffered *(ebp+0x18) ": cannot dereference var '")
19220 (lookup *esi *(esi+4))
19221 (lookup *eax *(eax+4))
19222 (write-buffered *(ebp+0x18) %eax)
19223 (write-buffered *(ebp+0x18) "' on stack\n")
19224 (flush *(ebp+0x18))
19225 (stop *(ebp+0x1c) 1)
19226
19227
19228 $add-operation-and-inputs-to-stmt:error-deref-non-addr:
19229
19230 (write-buffered *(ebp+0x18) "fn ")
19231 8b/-> *(ebp+0x14) 0/r32/eax
19232 (lookup *eax *(eax+4))
19233 (write-buffered *(ebp+0x18) %eax)
19234 (rewind-stream *(ebp+0xc))
19235 (write-buffered *(ebp+0x18) ": cannot dereference non-addr var '")
19236 (lookup *esi *(esi+4))
19237 (lookup *eax *(eax+4))
19238 (write-buffered *(ebp+0x18) %eax)
19239 (write-buffered *(ebp+0x18) "'\n")
19240 (flush *(ebp+0x18))
19241 (stop *(ebp+0x1c) 1)
19242
19243
19244 stmt-has-outputs?:
19245
19246 55/push-ebp
19247 89/<- %ebp 4/r32/esp
19248
19249 51/push-ecx
19250
19251 68/push 0/imm32/end
19252 68/push 0/imm32/start
19253 89/<- %ecx 4/r32/esp
19254
19255 b8/copy-to-eax 0/imm32/false
19256 (rewind-stream *(ebp+8))
19257 {
19258 (next-mu-token *(ebp+8) %ecx)
19259
19260 (slice-empty? %ecx)
19261 3d/compare-eax-and 0/imm32/false
19262 b8/copy-to-eax 0/imm32/false/result
19263 0f 85/jump-if-!= break/disp32
19264
19265
19266 8b/-> *ecx 0/r32/eax
19267 8a/copy-byte *eax 0/r32/AL
19268 25/and-eax-with 0xff/imm32
19269
19270 3d/compare-eax-and 0x23/imm32/hash
19271 b8/copy-to-eax 0/imm32/false/result
19272 0f 84/jump-if-= break/disp32
19273
19274 (slice-equal? %ecx "<-")
19275 3d/compare-eax-and 0/imm32/false
19276 74/jump-if-= loop/disp8
19277 b8/copy-to-eax 1/imm32/true
19278 }
19279 $stmt-has-outputs:end:
19280 (rewind-stream *(ebp+8))
19281
19282 81 0/subop/add %esp 8/imm32
19283
19284 59/pop-to-ecx
19285
19286 89/<- %esp 5/r32/ebp
19287 5d/pop-to-ebp
19288 c3/return
19289
19290
19291
19292 lookup-var-or-literal:
19293
19294 55/push-ebp
19295 89/<- %ebp 4/r32/esp
19296
19297 50/push-eax
19298 51/push-ecx
19299 56/push-esi
19300
19301 8b/-> *(ebp+8) 6/r32/esi
19302
19303 (slice-empty? %esi)
19304 3d/compare-eax-and 0/imm32/false
19305 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
19306
19307 8b/-> *esi 1/r32/ecx
19308 8a/copy-byte *ecx 1/r32/CL
19309 81 4/subop/and %ecx 0xff/imm32
19310
19311 {
19312 81 7/subop/compare %ecx 0x2d/imm32/dash
19313 74/jump-if-= $lookup-var-or-literal:literal/disp8
19314 (decimal-digit? %ecx)
19315 3d/compare-eax-and 0/imm32/false
19316 74/jump-if-= break/disp8
19317 $lookup-var-or-literal:literal:
19318 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19319 eb/jump $lookup-var-or-literal:end/disp8
19320 }
19321
19322 {
19323 81 7/subop/compare %ecx 0x22/imm32/dquote
19324 75/jump-if-!= break/disp8
19325 $lookup-var-or-literal:literal-string:
19326 (new-literal-string Heap %esi *(ebp+0x10))
19327 eb/jump $lookup-var-or-literal:end/disp8
19328 }
19329
19330 {
19331 $lookup-var-or-literal:var:
19332 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19333 }
19334 $lookup-var-or-literal:end:
19335
19336 5e/pop-to-esi
19337 59/pop-to-ecx
19338 58/pop-to-eax
19339
19340 89/<- %esp 5/r32/ebp
19341 5d/pop-to-ebp
19342 c3/return
19343
19344 $lookup-var-or-literal:abort:
19345 (write-buffered *(ebp+0x18) "fn ")
19346 8b/-> *(ebp+0x14) 0/r32/eax
19347 (lookup *eax *(eax+4))
19348 (write-buffered *(ebp+0x18) %eax)
19349 (write-buffered *(ebp+0x18) ": empty variable!")
19350 (flush *(ebp+0x18))
19351 (stop *(ebp+0x1c) 1)
19352
19353
19354
19355 lookup-var:
19356
19357 55/push-ebp
19358 89/<- %ebp 4/r32/esp
19359
19360 50/push-eax
19361
19362 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19363
19364 8b/-> *(ebp+0x10) 0/r32/eax
19365 81 7/subop/compare *eax 0/imm32
19366 74/jump-if-= $lookup-var:abort/disp8
19367 $lookup-var:end:
19368
19369 58/pop-to-eax
19370
19371 89/<- %esp 5/r32/ebp
19372 5d/pop-to-ebp
19373 c3/return
19374
19375 $lookup-var:abort:
19376 (write-buffered *(ebp+0x18) "fn ")
19377 8b/-> *(ebp+0x14) 0/r32/eax
19378 (lookup *eax *(eax+4))
19379 (write-buffered *(ebp+0x18) %eax)
19380 (write-buffered *(ebp+0x18) ": unknown variable '")
19381 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19382 (write-buffered *(ebp+0x18) "'\n")
19383 (flush *(ebp+0x18))
19384 (stop *(ebp+0x1c) 1)
19385
19386
19387
19388
19389 lookup-var-helper:
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400 55/push-ebp
19401 89/<- %ebp 4/r32/esp
19402
19403 50/push-eax
19404 51/push-ecx
19405 52/push-edx
19406 53/push-ebx
19407 56/push-esi
19408 57/push-edi
19409
19410 (zero-out *(ebp+0x10) *Handle-size)
19411
19412 8b/-> *(ebp+0xc) 6/r32/esi
19413
19414 8b/-> *esi 3/r32/ebx
19415
19416 3b/compare<- *(esi+4) 0/r32/eax
19417 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
19418
19419 8d/copy-address *(esi+8) 2/r32/edx
19420
19421 8d/copy-address *(esi+ebx-4) 3/r32/ebx
19422
19423 68/push 0/imm32
19424 68/push 0/imm32
19425 68/push 0/imm32
19426 68/push 0/imm32
19427 68/push 0/imm32
19428 68/push 0/imm32
19429 68/push 0/imm32
19430 68/push 0/imm32
19431 68/push 0/imm32
19432 68/push 0/imm32
19433 68/push 0/imm32
19434 68/push 0/imm32
19435 68/push 0/imm32
19436 68/push 0/imm32
19437 68/push 0/imm32
19438 68/push 0/imm32
19439 89/<- %edi 4/r32/esp
19440 {
19441 $lookup-var-helper:loop:
19442
19443 39/compare %ebx 2/r32/edx
19444 0f 82/jump-if-addr< break/disp32
19445
19446 (lookup *ebx *(ebx+4))
19447 89/<- %ecx 0/r32/eax
19448
19449 (lookup *ecx *(ecx+4))
19450
19451 (slice-equal? *(ebp+8) %eax)
19452 3d/compare-eax-and 0/imm32/false
19453 {
19454 74/jump-if-= break/disp8
19455 $lookup-var-helper:found:
19456
19457 (lookup *(ecx+0x18) *(ecx+0x1c))
19458 3d/compare-eax-and 0/imm32
19459 {
19460 74/jump-if-= break/disp8
19461 $lookup-var-helper:found-register:
19462
19463 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
19464 8b/-> *eax 0/r32/eax
19465
19466 8b/-> *(edi+eax<<2) 0/r32/eax
19467 3d/compare-eax-and 0/imm32
19468 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
19469 }
19470 $lookup-var-helper:return:
19471
19472 8b/-> *(ebp+0x10) 6/r32/esi
19473
19474 8b/-> *ebx 0/r32/eax
19475 89/<- *esi 0/r32/eax
19476 8b/-> *(ebx+4) 0/r32/eax
19477 89/<- *(esi+4) 0/r32/eax
19478
19479 eb/jump $lookup-var-helper:end/disp8
19480 }
19481
19482
19483 (lookup *(ecx+0x18) *(ecx+0x1c))
19484
19485 3d/compare-eax-and 0/imm32
19486 74/jump-if-= $lookup-var-helper:continue/disp8
19487
19488 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
19489 8b/-> *eax 0/r32/eax
19490
19491 89/<- *(edi+eax<<2) 1/r32/ecx
19492 $lookup-var-helper:continue:
19493
19494 81 5/subop/subtract %ebx 0xc/imm32
19495 e9/jump loop/disp32
19496 }
19497 $lookup-var-helper:end:
19498
19499 81 0/subop/add %esp 0x40/imm32
19500
19501 5f/pop-to-edi
19502 5e/pop-to-esi
19503 5b/pop-to-ebx
19504 5a/pop-to-edx
19505 59/pop-to-ecx
19506 58/pop-to-eax
19507
19508 89/<- %esp 5/r32/ebp
19509 5d/pop-to-ebp
19510 c3/return
19511
19512 $lookup-var-helper:error1:
19513 (write-buffered *(ebp+0x18) "fn ")
19514 8b/-> *(ebp+0x14) 0/r32/eax
19515 (lookup *eax *(eax+4))
19516 (write-buffered *(ebp+0x18) %eax)
19517 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
19518 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19519 (write-buffered *(ebp+0x18) "'\n")
19520 (flush *(ebp+0x18))
19521 (stop *(ebp+0x1c) 1)
19522
19523
19524 $lookup-var-helper:error2:
19525
19526 (write-buffered *(ebp+0x18) "fn ")
19527 50/push-eax
19528 8b/-> *(ebp+0x14) 0/r32/eax
19529 (lookup *eax *(eax+4))
19530 (write-buffered *(ebp+0x18) %eax)
19531 58/pop-eax
19532 (write-buffered *(ebp+0x18) ": register ")
19533 50/push-eax
19534 (lookup *(eax+0x18) *(eax+0x1c))
19535 (write-buffered *(ebp+0x18) %eax)
19536 58/pop-to-eax
19537 (write-buffered *(ebp+0x18) " reads var '")
19538 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19539 (write-buffered *(ebp+0x18) "' after writing var '")
19540 (lookup *eax *(eax+4))
19541 (write-buffered *(ebp+0x18) %eax)
19542 (write-buffered *(ebp+0x18) "'\n")
19543 (flush *(ebp+0x18))
19544 (stop *(ebp+0x1c) 1)
19545
19546
19547 dump-vars:
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557 55/push-ebp
19558 89/<- %ebp 4/r32/esp
19559
19560 52/push-edx
19561 53/push-ebx
19562 56/push-esi
19563
19564 8b/-> *(ebp+8) 6/r32/esi
19565
19566 8b/-> *esi 3/r32/ebx
19567
19568 8d/copy-address *(esi+8) 2/r32/edx
19569
19570 8d/copy-address *(esi+ebx-4) 3/r32/ebx
19571 {
19572 $dump-vars:loop:
19573
19574 39/compare %ebx 2/r32/edx
19575 0f 82/jump-if-addr< break/disp32
19576
19577 (write-buffered Stderr " var@")
19578 (dump-var 2 %ebx)
19579
19580 81 5/subop/subtract %ebx 0xc/imm32
19581 e9/jump loop/disp32
19582 }
19583 $dump-vars:end:
19584
19585 5e/pop-to-esi
19586 5b/pop-to-ebx
19587 5a/pop-to-edx
19588
19589 89/<- %esp 5/r32/ebp
19590 5d/pop-to-ebp
19591 c3/return
19592
19593 == data
19594
19595 Mu-registers:
19596
19597 0xa8/imm32/write
19598 0/imm32/read
19599 0xa8/imm32/length
19600
19601
19602
19603 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
19604 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
19605 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
19606 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
19607 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
19608 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
19609
19610 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 0/imm32
19611 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 1/imm32
19612 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 2/imm32
19613 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 3/imm32
19614 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 4/imm32
19615 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 5/imm32
19616 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 6/imm32
19617 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 7/imm32
19618
19619
19620
19621
19622 Mu-registers-unique:
19623
19624 0xa8/imm32/write
19625 0/imm32/read
19626 0xa8/imm32/length
19627
19628
19629 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
19630 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
19631 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
19632 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
19633 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
19634 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
19635
19636 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 8/imm32
19637 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 9/imm32
19638 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 0xa/imm32
19639 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 0xb/imm32
19640 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 0xc/imm32
19641 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 0xd/imm32
19642 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 0xe/imm32
19643 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 0xf/imm32
19644
19645 $Mu-register-eax:
19646 0x11/imm32/alloc-id
19647 3/imm32/size
19648 0x65/e 0x61/a 0x78/x
19649
19650 $Mu-register-ecx:
19651 0x11/imm32/alloc-id
19652 3/imm32/size
19653 0x65/e 0x63/c 0x78/x
19654
19655 $Mu-register-edx:
19656 0x11/imm32/alloc-id
19657 3/imm32/size
19658 0x65/e 0x64/d 0x78/x
19659
19660 $Mu-register-ebx:
19661 0x11/imm32/alloc-id
19662 3/imm32/size
19663 0x65/e 0x62/b 0x78/x
19664
19665 $Mu-register-esi:
19666 0x11/imm32/alloc-id
19667 3/imm32/size
19668 0x65/e 0x73/s 0x69/i
19669
19670 $Mu-register-edi:
19671 0x11/imm32/alloc-id
19672 3/imm32/size
19673 0x65/e 0x64/d 0x69/i
19674
19675 $Mu-register-xmm0:
19676 0x11/imm32/alloc-id:fake:payload
19677
19678 0x4/imm32/size
19679 0x78/x 0x6d/m 0x6d/m 0x30/0
19680
19681 $Mu-register-xmm1:
19682 0x11/imm32/alloc-id:fake:payload
19683
19684 0x4/imm32/size
19685 0x78/x 0x6d/m 0x6d/m 0x31/1
19686
19687 $Mu-register-xmm2:
19688 0x11/imm32/alloc-id:fake:payload
19689
19690 0x4/imm32/size
19691 0x78/x 0x6d/m 0x6d/m 0x32/2
19692
19693 $Mu-register-xmm3:
19694 0x11/imm32/alloc-id:fake:payload
19695
19696 0x4/imm32/size
19697 0x78/x 0x6d/m 0x6d/m 0x33/3
19698
19699 $Mu-register-xmm4:
19700 0x11/imm32/alloc-id:fake:payload
19701
19702 0x4/imm32/size
19703 0x78/x 0x6d/m 0x6d/m 0x34/4
19704
19705 $Mu-register-xmm5:
19706 0x11/imm32/alloc-id:fake:payload
19707
19708 0x4/imm32/size
19709 0x78/x 0x6d/m 0x6d/m 0x35/5
19710
19711 $Mu-register-xmm6:
19712 0x11/imm32/alloc-id:fake:payload
19713
19714 0x4/imm32/size
19715 0x78/x 0x6d/m 0x6d/m 0x36/6
19716
19717 $Mu-register-xmm7:
19718 0x11/imm32/alloc-id:fake:payload
19719
19720 0x4/imm32/size
19721 0x78/x 0x6d/m 0x6d/m 0x37/7
19722
19723 == code
19724
19725
19726 maybe-define-var:
19727
19728 55/push-ebp
19729 89/<- %ebp 4/r32/esp
19730
19731 50/push-eax
19732
19733 (lookup *(ebp+8) *(ebp+0xc))
19734
19735 (binding-exists? %eax *(ebp+0x10))
19736 3d/compare-eax-and 0/imm32/false
19737 75/jump-if-!= $maybe-define-var:end/disp8
19738
19739 (push *(ebp+0x10) *(ebp+8))
19740 (push *(ebp+0x10) *(ebp+0xc))
19741 (push *(ebp+0x10) 0)
19742 $maybe-define-var:end:
19743
19744 58/pop-to-eax
19745
19746 89/<- %esp 5/r32/ebp
19747 5d/pop-to-ebp
19748 c3/return
19749
19750
19751 binding-exists?:
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763 55/push-ebp
19764 89/<- %ebp 4/r32/esp
19765
19766 51/push-ecx
19767 52/push-edx
19768 56/push-esi
19769
19770 8b/-> *(ebp+8) 0/r32/eax
19771 (lookup *eax *(eax+4))
19772 89/<- %ecx 0/r32/eax
19773
19774 8b/-> *(ebp+0xc) 6/r32/esi
19775
19776 8b/-> *esi 0/r32/eax
19777
19778 8d/copy-address *(esi+8) 2/r32/edx
19779
19780 8d/copy-address *(esi+eax-4) 6/r32/esi
19781 {
19782 $binding-exists?:loop:
19783
19784 39/compare %esi 2/r32/edx
19785 0f 82/jump-if-addr< break/disp32
19786
19787 (lookup *esi *(esi+4))
19788
19789 (lookup *eax *(eax+4))
19790
19791 (string-equal? %ecx %eax)
19792 3d/compare-eax-and 0/imm32/false
19793 75/jump-if-!= $binding-exists?:end/disp8
19794
19795 81 5/subop/subtract %esi 0xc/imm32
19796 e9/jump loop/disp32
19797 }
19798 b8/copy-to-eax 0/imm32/false
19799 $binding-exists?:end:
19800
19801 5e/pop-to-esi
19802 5a/pop-to-edx
19803 59/pop-to-ecx
19804
19805 89/<- %esp 5/r32/ebp
19806 5d/pop-to-ebp
19807 c3/return
19808
19809 test-parse-mu-stmt:
19810
19811 55/push-ebp
19812 89/<- %ebp 4/r32/esp
19813
19814 8b/-> *Primitive-type-ids 0/r32/eax
19815 89/<- *Type-id 0/r32/eax
19816 (clear-stream _test-input-stream)
19817 (write _test-input-stream "increment n\n")
19818
19819 81 5/subop/subtract %esp 0xc0/imm32
19820 68/push 0xc0/imm32/size
19821 68/push 0/imm32/top
19822 89/<- %ecx 4/r32/esp
19823 (clear-stack %ecx)
19824
19825 68/push 0/imm32
19826 68/push 0/imm32
19827 89/<- %edx 4/r32/esp
19828
19829 68/push 0/imm32
19830 68/push 0/imm32
19831 89/<- %eax 4/r32/esp
19832
19833 (copy-array Heap "n" %eax)
19834 (new-var Heap *eax *(eax+4) %edx)
19835
19836 (push %ecx *edx)
19837 (push %ecx *(edx+4))
19838 (push %ecx 0)
19839
19840 68/push 0/imm32
19841 68/push 0/imm32
19842 89/<- %eax 4/r32/esp
19843
19844 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
19845
19846 (lookup *eax *(eax+4))
19847 89/<- %edx 0/r32/eax
19848
19849 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
19850
19851 (lookup *(edx+4) *(edx+8))
19852 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
19853
19854
19855 (lookup *(edx+0xc) *(edx+0x10))
19856
19857 (lookup *eax *(eax+4))
19858
19859 (lookup *eax *(eax+4))
19860
19861 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
19862
19863 89/<- %esp 5/r32/ebp
19864 5d/pop-to-ebp
19865 c3/return
19866
19867 test-parse-mu-stmt-with-comma:
19868
19869 55/push-ebp
19870 89/<- %ebp 4/r32/esp
19871
19872 8b/-> *Primitive-type-ids 0/r32/eax
19873 89/<- *Type-id 0/r32/eax
19874 (clear-stream _test-input-stream)
19875 (write _test-input-stream "copy-to n, 3\n")
19876
19877 81 5/subop/subtract %esp 0xc0/imm32
19878 68/push 0xc0/imm32/size
19879 68/push 0/imm32/top
19880 89/<- %ecx 4/r32/esp
19881 (clear-stack %ecx)
19882
19883 68/push 0/imm32
19884 68/push 0/imm32
19885 89/<- %edx 4/r32/esp
19886
19887 68/push 0/imm32
19888 68/push 0/imm32
19889 89/<- %eax 4/r32/esp
19890
19891 (copy-array Heap "n" %eax)
19892 (new-var Heap *eax *(eax+4) %edx)
19893
19894 (push %ecx *edx)
19895 (push %ecx *(edx+4))
19896 (push %ecx 0)
19897
19898 68/push 0/imm32
19899 68/push 0/imm32
19900 89/<- %eax 4/r32/esp
19901
19902 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
19903
19904 (lookup *eax *(eax+4))
19905 89/<- %edx 0/r32/eax
19906
19907 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
19908
19909 (lookup *(edx+4) *(edx+8))
19910 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
19911
19912
19913 (lookup *(edx+0xc) *(edx+0x10))
19914
19915 (lookup *eax *(eax+4))
19916
19917 (lookup *eax *(eax+4))
19918
19919 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
19920
19921 89/<- %esp 5/r32/ebp
19922 5d/pop-to-ebp
19923 c3/return
19924
19925 new-var:
19926
19927 55/push-ebp
19928 89/<- %ebp 4/r32/esp
19929
19930 50/push-eax
19931 51/push-ecx
19932
19933 8b/-> *(ebp+0x14) 1/r32/ecx
19934
19935 (allocate *(ebp+8) *Var-size %ecx)
19936
19937 (lookup *ecx *(ecx+4))
19938
19939 8b/-> *(ebp+0xc) 1/r32/ecx
19940 89/<- *eax 1/r32/ecx
19941 8b/-> *(ebp+0x10) 1/r32/ecx
19942 89/<- *(eax+4) 1/r32/ecx
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952 $new-var:end:
19953
19954 59/pop-to-ecx
19955 58/pop-to-eax
19956
19957 89/<- %esp 5/r32/ebp
19958 5d/pop-to-ebp
19959 c3/return
19960
19961
19962 new-literal-integer:
19963
19964 55/push-ebp
19965 89/<- %ebp 4/r32/esp
19966
19967 50/push-eax
19968 51/push-ecx
19969
19970 8b/-> *(ebp+0xc) 1/r32/ecx
19971 (next-token-from-slice *ecx *(ecx+4) 0x2f *(ebp+0xc))
19972
19973 (hex-int? *(ebp+0xc))
19974 3d/compare-eax-and 0/imm32/false
19975 0f 84/jump-if-= $new-literal-integer:abort/disp32
19976
19977 (check-mu-hex-int *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
19978
19979 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
19980
19981 8b/-> *(ebp+0x10) 0/r32/eax
19982 (lookup *eax *(eax+4))
19983 89/<- %ecx 0/r32/eax
19984
19985 8b/-> *Curr-block-depth 0/r32/eax
19986 89/<- *(ecx+0x10) 0/r32/eax
19987
19988 8d/copy-address *(ecx+8) 0/r32/eax
19989 (allocate *(ebp+8) *Type-tree-size %eax)
19990 (lookup *(ecx+8) *(ecx+0xc))
19991 c7 0/subop/copy *eax 1/imm32/true
19992
19993 $new-literal-integer:end:
19994
19995 81 0/subop/add %esp 8/imm32
19996
19997 59/pop-to-ecx
19998 58/pop-to-eax
19999
20000 89/<- %esp 5/r32/ebp
20001 5d/pop-to-ebp
20002 c3/return
20003
20004 $new-literal-integer:abort:
20005 (write-buffered *(ebp+0x18) "fn ")
20006 8b/-> *(ebp+0x14) 0/r32/eax
20007 (lookup *eax *(eax+4))
20008 (write-buffered *(ebp+0x18) %eax)
20009 (write-buffered *(ebp+0x18) ": variable '")
20010 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
20011 (write-buffered *(ebp+0x18) "' cannot begin with a digit (or do you have a typo in a number?)\n")
20012 (flush *(ebp+0x18))
20013 (stop *(ebp+0x1c) 1)
20014
20015
20016
20017 check-mu-hex-int:
20018
20019 55/push-ebp
20020 89/<- %ebp 4/r32/esp
20021
20022 50/push-eax
20023 51/push-ecx
20024 52/push-edx
20025
20026 8b/-> *(ebp+8) 1/r32/ecx
20027
20028 8b/-> *ecx 2/r32/edx
20029
20030 b8/copy-to-eax 0/imm32
20031 8a/copy-byte *edx 0/r32/AL
20032 3d/compare-eax-and 0x2d/imm32/dash
20033 {
20034 75/jump-if-!= break/disp8
20035 42/increment-edx
20036 }
20037
20038 8b/-> *(ecx+4) 1/r32/ecx
20039
20040 89/<- %eax 1/r32/ecx
20041 29/subtract-from %eax 2/r32/edx
20042
20043 3d/compare-eax-with 1/imm32
20044 0f 8e/jump-if-<= $check-mu-hex-int:end/disp32
20045 $check-mu-hex-int:length->-1:
20046
20047
20048 51/push-ecx
20049 52/push-edx
20050 89/<- %eax 4/r32/esp
20051
20052 (slice-starts-with? %eax "0x")
20053
20054 81 0/subop/add %esp 8/imm32
20055
20056 3d/compare-eax-with 0/imm32/false
20057 75/jump-if-!= $check-mu-hex-int:end/disp8
20058 $check-mu-hex-int:abort:
20059
20060 (write-buffered *(ebp+0xc) "literal integers are always hex in Mu; start '")
20061 (write-slice-buffered *(ebp+0xc) *(ebp+8))
20062 (write-buffered *(ebp+0xc) "' with a '0x' to be unambiguous, converting it to hexadecimal as necessary.\n")
20063 (flush *(ebp+0xc))
20064 (stop *(ebp+0x10) 1)
20065 $check-mu-hex-int:end:
20066
20067 5a/pop-to-edx
20068 59/pop-to-ecx
20069 58/pop-to-eax
20070
20071 89/<- %esp 5/r32/ebp
20072 5d/pop-to-ebp
20073 c3/return
20074
20075 new-literal:
20076
20077 55/push-ebp
20078 89/<- %ebp 4/r32/esp
20079
20080 50/push-eax
20081 51/push-ecx
20082
20083 68/push 0/imm32
20084 68/push 0/imm32
20085 89/<- %ecx 4/r32/esp
20086
20087 (slice-to-string Heap *(ebp+0xc) %ecx)
20088
20089 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
20090
20091 8b/-> *(ebp+0x10) 1/r32/ecx
20092 (lookup *ecx *(ecx+4))
20093 89/<- %ecx 0/r32/eax
20094
20095 8b/-> *Curr-block-depth 0/r32/eax
20096 89/<- *(ecx+0x10) 0/r32/eax
20097
20098 8d/copy-address *(ecx+8) 0/r32/eax
20099 (allocate *(ebp+8) *Type-tree-size %eax)
20100 (lookup *(ecx+8) *(ecx+0xc))
20101
20102 c7 0/subop/copy *eax 1/imm32/true
20103 $new-literal:end:
20104
20105 81 0/subop/add %esp 8/imm32
20106
20107 59/pop-to-ecx
20108 58/pop-to-eax
20109
20110 89/<- %esp 5/r32/ebp
20111 5d/pop-to-ebp
20112 c3/return
20113
20114 new-literal-string:
20115
20116 55/push-ebp
20117 89/<- %ebp 4/r32/esp
20118
20119 50/push-eax
20120 51/push-ecx
20121
20122 68/push 0/imm32
20123 68/push 0/imm32
20124 89/<- %ecx 4/r32/esp
20125
20126 (slice-to-string Heap *(ebp+0xc) %ecx)
20127
20128 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
20129
20130 8b/-> *(ebp+0x10) 1/r32/ecx
20131 (lookup *ecx *(ecx+4))
20132 89/<- %ecx 0/r32/eax
20133
20134 8b/-> *Curr-block-depth 0/r32/eax
20135 89/<- *(ecx+0x10) 0/r32/eax
20136
20137 8d/copy-address *(ecx+8) 0/r32/eax
20138 (allocate *(ebp+8) *Type-tree-size %eax)
20139 (lookup *(ecx+8) *(ecx+0xc))
20140
20141 c7 0/subop/copy *(eax+4) 0x10/imm32/type-id-string-literal
20142
20143 c7 0/subop/copy *eax 1/imm32/true
20144 $new-literal-string:end:
20145
20146 81 0/subop/add %esp 8/imm32
20147
20148 59/pop-to-ecx
20149 58/pop-to-eax
20150
20151 89/<- %esp 5/r32/ebp
20152 5d/pop-to-ebp
20153 c3/return
20154
20155 new-var-from-slice:
20156
20157 55/push-ebp
20158 89/<- %ebp 4/r32/esp
20159
20160 51/push-ecx
20161
20162 68/push 0/imm32
20163 68/push 0/imm32
20164 89/<- %ecx 4/r32/esp
20165
20166 (slice-to-string Heap *(ebp+0xc) %ecx)
20167
20168 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
20169 $new-var-from-slice:end:
20170
20171 81 0/subop/add %esp 8/imm32
20172
20173 59/pop-to-ecx
20174
20175 89/<- %esp 5/r32/ebp
20176 5d/pop-to-ebp
20177 c3/return
20178
20179 new-var-def:
20180
20181 55/push-ebp
20182 89/<- %ebp 4/r32/esp
20183
20184 50/push-eax
20185 51/push-ecx
20186
20187 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
20188
20189 8b/-> *(ebp+0x14) 0/r32/eax
20190 (lookup *eax *(eax+4))
20191
20192 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
20193
20194 8b/-> *(ebp+0xc) 1/r32/ecx
20195 89/<- *(eax+4) 1/r32/ecx
20196 8b/-> *(ebp+0x10) 1/r32/ecx
20197 89/<- *(eax+8) 1/r32/ecx
20198 $new-var-def:end:
20199
20200 59/pop-to-ecx
20201 58/pop-to-eax
20202
20203 89/<- %esp 5/r32/ebp
20204 5d/pop-to-ebp
20205 c3/return
20206
20207 new-reg-var-def:
20208
20209 55/push-ebp
20210 89/<- %ebp 4/r32/esp
20211
20212 50/push-eax
20213
20214 8b/-> *(ebp+0x14) 0/r32/eax
20215
20216 (allocate *(ebp+8) *Stmt-size %eax)
20217
20218 (lookup *eax *(eax+4))
20219
20220 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
20221
20222 8d/copy-address *(eax+0x14) 0/r32/eax
20223 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
20224 $new-reg-var-def:end:
20225
20226 58/pop-to-eax
20227
20228 89/<- %esp 5/r32/ebp
20229 5d/pop-to-ebp
20230 c3/return
20231
20232 append-list:
20233
20234 55/push-ebp
20235 89/<- %ebp 4/r32/esp
20236
20237 50/push-eax
20238 51/push-ecx
20239 57/push-edi
20240
20241 8b/-> *(ebp+0x1c) 7/r32/edi
20242
20243 (allocate *(ebp+8) *List-size %edi)
20244
20245 (lookup *edi *(edi+4))
20246 89/<- %edi 0/r32/eax
20247
20248 8b/-> *(ebp+0xc) 0/r32/eax
20249 89/<- *edi 0/r32/eax
20250 8b/-> *(ebp+0x10) 0/r32/eax
20251 89/<- *(edi+4) 0/r32/eax
20252
20253 81 7/subop/compare *(ebp+0x14) 0/imm32
20254 74/jump-if-= $append-list:end/disp8
20255
20256 $append-list:non-empty-list:
20257
20258 (lookup *(ebp+0x14) *(ebp+0x18))
20259
20260 {
20261 81 7/subop/compare *(eax+8) 0/imm32
20262 74/jump-if-= break/disp8
20263
20264 (lookup *(eax+8) *(eax+0xc))
20265
20266 eb/jump loop/disp8
20267 }
20268
20269 8b/-> *(ebp+0x1c) 7/r32/edi
20270
20271 8b/-> *edi 1/r32/ecx
20272 89/<- *(eax+8) 1/r32/ecx
20273 8b/-> *(edi+4) 1/r32/ecx
20274 89/<- *(eax+0xc) 1/r32/ecx
20275
20276 8b/-> *(ebp+0x14) 1/r32/ecx
20277 89/<- *edi 1/r32/ecx
20278 8b/-> *(ebp+0x18) 1/r32/ecx
20279 89/<- *(edi+4) 1/r32/ecx
20280 $append-list:end:
20281
20282 5f/pop-to-edi
20283 59/pop-to-ecx
20284 58/pop-to-eax
20285
20286 89/<- %esp 5/r32/ebp
20287 5d/pop-to-ebp
20288 c3/return
20289
20290 append-stmt-var:
20291
20292 55/push-ebp
20293 89/<- %ebp 4/r32/esp
20294
20295 50/push-eax
20296 51/push-ecx
20297 57/push-edi
20298
20299 8b/-> *(ebp+0x20) 7/r32/edi
20300
20301 (allocate *(ebp+8) *Stmt-var-size %edi)
20302
20303 (lookup *edi *(edi+4))
20304 89/<- %ecx 0/r32/eax
20305
20306 8b/-> *(ebp+0xc) 0/r32/eax
20307 89/<- *ecx 0/r32/eax
20308 8b/-> *(ebp+0x10) 0/r32/eax
20309 89/<- *(ecx+4) 0/r32/eax
20310
20311 8b/-> *(ebp+0x1c) 0/r32/eax
20312 89/<- *(ecx+0x10) 0/r32/eax
20313
20314 81 7/subop/compare *(ebp+0x14) 0/imm32/null
20315 74/jump-if-= $append-stmt-var:end/disp8
20316
20317
20318 (lookup *(ebp+0x14) *(ebp+0x18))
20319
20320 {
20321 81 7/subop/compare *(eax+8) 0/imm32
20322 74/jump-if-= break/disp8
20323
20324 (lookup *(eax+8) *(eax+0xc))
20325
20326 eb/jump loop/disp8
20327 }
20328
20329 8b/-> *edi 1/r32/ecx
20330 89/<- *(eax+8) 1/r32/ecx
20331 8b/-> *(edi+4) 1/r32/ecx
20332 89/<- *(eax+0xc) 1/r32/ecx
20333
20334 8b/-> *(ebp+0x14) 1/r32/ecx
20335 89/<- *edi 1/r32/ecx
20336 8b/-> *(ebp+0x18) 1/r32/ecx
20337 89/<- *(edi+4) 1/r32/ecx
20338 $append-stmt-var:end:
20339
20340 5f/pop-to-edi
20341 59/pop-to-ecx
20342 58/pop-to-eax
20343
20344 89/<- %esp 5/r32/ebp
20345 5d/pop-to-ebp
20346 c3/return
20347
20348 append-to-block:
20349
20350 55/push-ebp
20351 89/<- %ebp 4/r32/esp
20352
20353 50/push-eax
20354 56/push-esi
20355
20356 8b/-> *(ebp+0xc) 6/r32/esi
20357
20358 8d/copy-address *(esi+4) 0/r32/eax
20359 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
20360 $append-to-block:end:
20361
20362 5e/pop-to-esi
20363 58/pop-to-eax
20364
20365 89/<- %esp 5/r32/ebp
20366 5d/pop-to-ebp
20367 c3/return
20368
20369
20370
20371
20372
20373
20374
20375 lookup-or-create-constant:
20376
20377 55/push-ebp
20378 89/<- %ebp 4/r32/esp
20379
20380 50/push-eax
20381 56/push-esi
20382
20383 (container-type *(ebp+8))
20384 89/<- %esi 0/r32/eax
20385
20386 68/push 0/imm32
20387 68/push 0/imm32
20388 89/<- %eax 4/r32/esp
20389 (find-or-create-typeinfo %esi %eax)
20390
20391 (lookup *eax *(eax+4))
20392
20393
20394
20395
20396
20397 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411 $lookup-or-create-constant:end:
20412
20413 81 0/subop/add %esp 8/imm32
20414
20415 5e/pop-to-esi
20416 58/pop-to-eax
20417
20418 89/<- %esp 5/r32/ebp
20419 5d/pop-to-ebp
20420 c3/return
20421
20422
20423
20424
20425
20426 container-type:
20427
20428 55/push-ebp
20429 89/<- %ebp 4/r32/esp
20430
20431 8b/-> *(ebp+8) 0/r32/eax
20432 (lookup *eax *(eax+4))
20433 (lookup *(eax+8) *(eax+0xc))
20434 {
20435 81 7/subop/compare *(eax+8) 0/imm32
20436 74/jump-if-= break/disp8
20437 (lookup *(eax+0xc) *(eax+0x10))
20438 (lookup *(eax+4) *(eax+8))
20439 }
20440 8b/-> *(eax+4) 0/r32/eax
20441 $container-type:end:
20442
20443 89/<- %esp 5/r32/ebp
20444 5d/pop-to-ebp
20445 c3/return
20446
20447 container?:
20448
20449 55/push-ebp
20450 89/<- %ebp 4/r32/esp
20451
20452 8b/-> *(ebp+8) 0/r32/eax
20453 c1/shift 4/subop/left %eax 2/imm8
20454 3b/compare 0/r32/eax *Primitive-type-ids
20455 0f 9d/set-if->= %al
20456 25/and-eax-with 0xff/imm32
20457 $container?:end:
20458
20459 89/<- %esp 5/r32/ebp
20460 5d/pop-to-ebp
20461 c3/return
20462
20463 find-or-create-typeinfo:
20464
20465 55/push-ebp
20466 89/<- %ebp 4/r32/esp
20467
20468 50/push-eax
20469 51/push-ecx
20470 52/push-edx
20471 57/push-edi
20472
20473 8b/-> *(ebp+0xc) 7/r32/edi
20474
20475 68/push 0/imm32
20476 68/push 0/imm32
20477 89/<- %ecx 4/r32/esp
20478
20479 (find-typeinfo *(ebp+8) %edi)
20480 {
20481
20482 81 7/subop/compare *edi 0/imm32
20483 0f 85/jump-if-!= break/disp32
20484 $find-or-create-typeinfo:create:
20485
20486 (allocate Heap *Typeinfo-size %edi)
20487
20488 (lookup *edi *(edi+4))
20489
20490
20491
20492
20493
20494
20495
20496 8b/-> *(ebp+8) 2/r32/edx
20497 89/<- *eax 2/r32/edx
20498
20499
20500 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
20501
20502 8b/-> *ecx 2/r32/edx
20503 89/<- *(eax+4) 2/r32/edx
20504 8b/-> *(ecx+4) 2/r32/edx
20505 89/<- *(eax+8) 2/r32/edx
20506
20507 8b/-> *_Program-types 1/r32/ecx
20508 89/<- *(eax+0x10) 1/r32/ecx
20509 8b/-> *_Program-types->payload 1/r32/ecx
20510 89/<- *(eax+0x14) 1/r32/ecx
20511
20512 8b/-> *edi 1/r32/ecx
20513 89/<- *_Program-types 1/r32/ecx
20514 8b/-> *(edi+4) 1/r32/ecx
20515 89/<- *_Program-types->payload 1/r32/ecx
20516 }
20517 $find-or-create-typeinfo:end:
20518
20519 81 0/subop/add %esp 8/imm32
20520
20521 5f/pop-to-edi
20522 5a/pop-to-edx
20523 59/pop-to-ecx
20524 58/pop-to-eax
20525
20526 89/<- %esp 5/r32/ebp
20527 5d/pop-to-ebp
20528 c3/return
20529
20530 find-typeinfo:
20531
20532 55/push-ebp
20533 89/<- %ebp 4/r32/esp
20534
20535 50/push-eax
20536 51/push-ecx
20537 52/push-edx
20538 57/push-edi
20539
20540 8b/-> *(ebp+8) 1/r32/ecx
20541
20542 8b/-> *(ebp+0xc) 7/r32/edi
20543
20544 8b/-> *_Program-types 0/r32/eax
20545 89/<- *edi 0/r32/eax
20546 8b/-> *_Program-types->payload 0/r32/eax
20547 89/<- *(edi+4) 0/r32/eax
20548 {
20549 $find-typeinfo:loop:
20550
20551 81 7/subop/compare *edi 0/imm32
20552 74/jump-if-= break/disp8
20553 $find-typeinfo:check:
20554
20555 (lookup *edi *(edi+4))
20556
20557 39/compare *eax 1/r32/ecx
20558 74/jump-if-= break/disp8
20559 $find-typeinfo:continue:
20560
20561 8b/-> *(eax+0x10) 2/r32/edx
20562 89/<- *edi 2/r32/edx
20563 8b/-> *(eax+0x14) 2/r32/edx
20564 89/<- *(edi+4) 2/r32/edx
20565
20566 eb/jump loop/disp8
20567 }
20568 $find-typeinfo:end:
20569
20570 5f/pop-to-edi
20571 5a/pop-to-edx
20572 59/pop-to-ecx
20573 58/pop-to-eax
20574
20575 89/<- %esp 5/r32/ebp
20576 5d/pop-to-ebp
20577 c3/return
20578
20579 find-or-create-typeinfo-output-var:
20580
20581 55/push-ebp
20582 89/<- %ebp 4/r32/esp
20583
20584 50/push-eax
20585 52/push-edx
20586 57/push-edi
20587
20588 68/push 0/imm32
20589 68/push 0/imm32
20590 89/<- %edi 4/r32/esp
20591
20592 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
20593
20594 (lookup *edi *(edi+4))
20595 89/<- %edi 0/r32/eax
20596
20597 {
20598 81 7/subop/compare *(edi+0xc) 0/imm32
20599 0f 85/jump-if-!= break/disp32
20600
20601
20602 68/push 0/imm32
20603 68/push 0/imm32
20604 89/<- %eax 4/r32/esp
20605 (slice-to-string Heap *(ebp+0xc) %eax)
20606
20607 8d/copy-address *(edi+0xc) 2/r32/edx
20608 (new-var Heap *eax *(eax+4) %edx)
20609
20610 81 0/subop/add %esp 8/imm32
20611
20612 (lookup *(edi+0xc) *(edi+0x10))
20613 89/<- %edx 0/r32/eax
20614
20615 8d/copy-address *(edx+8) 0/r32/eax
20616 (allocate Heap *Type-tree-size %eax)
20617 (lookup *(edx+8) *(edx+0xc))
20618 c7 0/subop/copy *eax 1/imm32/true
20619 c7 0/subop/copy *(eax+4) 6/imm32/constant
20620 c7 0/subop/copy *(eax+8) 0/imm32
20621 c7 0/subop/copy *(eax+0xc) 0/imm32
20622 c7 0/subop/copy *(eax+0x10) 0/imm32
20623
20624 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
20625 }
20626
20627 8b/-> *(ebp+0x10) 2/r32/edx
20628 8b/-> *(edi+0xc) 0/r32/eax
20629 89/<- *edx 0/r32/eax
20630 8b/-> *(edi+0x10) 0/r32/eax
20631 89/<- *(edx+4) 0/r32/eax
20632 $find-or-create-typeinfo-output-var:end:
20633
20634 81 0/subop/add %esp 8/imm32
20635
20636 5f/pop-to-edi
20637 5a/pop-to-edx
20638 58/pop-to-eax
20639
20640 89/<- %esp 5/r32/ebp
20641 5d/pop-to-ebp
20642 c3/return
20643
20644 find-or-create-typeinfo-fields:
20645
20646 55/push-ebp
20647 89/<- %ebp 4/r32/esp
20648
20649 50/push-eax
20650 56/push-esi
20651 57/push-edi
20652
20653 8b/-> *(ebp+8) 0/r32/eax
20654 (lookup *(eax+4) *(eax+8))
20655
20656 8b/-> *(ebp+0x10) 7/r32/edi
20657
20658 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
20659 89/<- %esi 0/r32/eax
20660
20661 {
20662 81 7/subop/compare *esi 0/imm32
20663 75/jump-if-!= break/disp8
20664 (allocate Heap *Typeinfo-entry-size %esi)
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680 }
20681
20682
20683 8b/-> *esi 0/r32/eax
20684 89/<- *edi 0/r32/eax
20685 8b/-> *(esi+4) 0/r32/eax
20686 89/<- *(edi+4) 0/r32/eax
20687 $find-or-create-typeinfo-fields:end:
20688
20689 5f/pop-to-edi
20690 5e/pop-to-esi
20691 58/pop-to-eax
20692
20693 89/<- %esp 5/r32/ebp
20694 5d/pop-to-ebp
20695 c3/return
20696
20697 populate-mu-type:
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723 55/push-ebp
20724 89/<- %ebp 4/r32/esp
20725
20726 68/push 0/imm32
20727
20728 50/push-eax
20729 51/push-ecx
20730 52/push-edx
20731 53/push-ebx
20732 56/push-esi
20733 57/push-edi
20734
20735 8b/-> *(ebp+0xc) 7/r32/edi
20736
20737 81 5/subop/subtract %esp 0x200/imm32
20738 68/push 0x200/imm32/size
20739 68/push 0/imm32/read
20740 68/push 0/imm32/write
20741 89/<- %ecx 4/r32/esp
20742
20743 68/push 0/imm32/end
20744 68/push 0/imm32/start
20745 89/<- %edx 4/r32/esp
20746
20747 68/push 0/imm32
20748 68/push 0/imm32
20749 89/<- %esi 4/r32/esp
20750
20751 68/push 0/imm32
20752 68/push 0/imm32
20753 89/<- %ebx 4/r32/esp
20754 {
20755 $populate-mu-type:line-loop:
20756 (clear-stream %ecx)
20757 (read-line-buffered *(ebp+8) %ecx)
20758
20759 81 7/subop/compare *ecx 0/imm32
20760 0f 84/jump-if-= $populate-mu-type:error1/disp32
20761 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
20767 (next-mu-token %ecx %edx)
20768
20769 (slice-empty? %edx)
20770 3d/compare-eax-and 0/imm32
20771 0f 85/jump-if-!= loop/disp32
20772
20773 (slice-equal? %edx "}")
20774 3d/compare-eax-and 0/imm32
20775 0f 85/jump-if-!= break/disp32
20776 $populate-mu-type:parse-element:
20777
20778
20779
20780
20781 (type-name *edi)
20782 (parse-var-with-type %edx %ecx %esi %eax *(ebp+0x10) *(ebp+0x14))
20783
20784 (lookup *esi *(esi+4))
20785 (lookup *(eax+8) *(eax+0xc))
20786 (mu-addr-type? %eax)
20787 3d/compare-eax-and 0/imm32/false
20788 0f 85/jump-if-!= $populate-mu-type:error2/disp32
20789
20790 (lookup *esi *(esi+4))
20791 (lookup *(eax+8) *(eax+0xc))
20792 (mu-array-type? %eax)
20793 3d/compare-eax-and 0/imm32/false
20794 0f 85/jump-if-!= $populate-mu-type:error3/disp32
20795
20796 (lookup *esi *(esi+4))
20797 (lookup *(eax+8) *(eax+0xc))
20798 (simple-mu-type? %eax 8)
20799 3d/compare-eax-and 0/imm32/false
20800 0f 85/jump-if-!= $populate-mu-type:error4/disp32
20801
20802 (lookup *esi *(esi+4))
20803 (lookup *(eax+8) *(eax+0xc))
20804 (simple-mu-type? %eax 0xc)
20805 3d/compare-eax-and 0/imm32/false
20806 0f 85/jump-if-!= $populate-mu-type:error5/disp32
20807
20808 (lookup *esi *(esi+4))
20809 (lookup *(eax+8) *(eax+0xc))
20810 (mu-stream-type? %eax)
20811 3d/compare-eax-and 0/imm32/false
20812 0f 85/jump-if-!= $populate-mu-type:error6/disp32
20813
20814 51/push-ecx
20815 $populate-mu-type:create-typeinfo-fields:
20816
20817 (find-or-create-typeinfo-fields %edi %edx %ebx)
20818
20819 (lookup *ebx *(ebx+4))
20820 8b/-> *(ebp-4) 1/r32/ecx
20821
20822
20823
20824
20825
20826
20827 89/<- *(eax+8) 1/r32/ecx
20828
20829 ff 0/subop/increment *(ebp-4)
20830 $populate-mu-type:set-input-type:
20831
20832 8b/-> *esi 1/r32/ecx
20833 89/<- *eax 1/r32/ecx
20834 8b/-> *(esi+4) 1/r32/ecx
20835 89/<- *(eax+4) 1/r32/ecx
20836
20837 59/pop-to-ecx
20838 {
20839 $populate-mu-type:create-output-type:
20840
20841 81 7/subop/compare *(eax+0xc) 0/imm32
20842 75/jump-if-!= break/disp8
20843 8d/copy-address *(eax+0xc) 0/r32/eax
20844 (new-literal Heap %edx %eax)
20845 }
20846 e9/jump loop/disp32
20847 }
20848 $populate-mu-type:invalidate-total-size-in-bytes:
20849
20850
20851
20852 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
20853 $populate-mu-type:end:
20854
20855 81 0/subop/add %esp 0x224/imm32
20856
20857 5f/pop-to-edi
20858 5e/pop-to-esi
20859 5b/pop-to-ebx
20860 5a/pop-to-edx
20861 59/pop-to-ecx
20862 58/pop-to-eax
20863
20864 81 0/subop/add %esp 4/imm32
20865
20866 89/<- %esp 5/r32/ebp
20867 5d/pop-to-ebp
20868 c3/return
20869
20870 $populate-mu-type:error1:
20871
20872 (write-buffered *(ebp+0x10) "incomplete type definition '")
20873 (type-name *edi)
20874 (write-buffered *(ebp+0x10) %eax)
20875 (write-buffered *(ebp+0x10) "\n")
20876 (flush *(ebp+0x10))
20877 (stop *(ebp+0x14) 1)
20878
20879
20880 $populate-mu-type:error2:
20881 (write-buffered *(ebp+0x10) "type ")
20882 (type-name *edi)
20883 (write-buffered *(ebp+0x10) %eax)
20884 (write-buffered *(ebp+0x10) ": 'addr' elements not allowed\n")
20885 (flush *(ebp+0x10))
20886 (stop *(ebp+0x14) 1)
20887
20888
20889 $populate-mu-type:error3:
20890 (write-buffered *(ebp+0x10) "type ")
20891 (type-name *edi)
20892 (write-buffered *(ebp+0x10) %eax)
20893 (write-buffered *(ebp+0x10) ": 'array' elements not allowed for now\n")
20894 (flush *(ebp+0x10))
20895 (stop *(ebp+0x14) 1)
20896
20897
20898 $populate-mu-type:error4:
20899 (write-buffered *(ebp+0x10) "type ")
20900 (type-name *edi)
20901 (write-buffered *(ebp+0x10) %eax)
20902 (write-buffered *(ebp+0x10) ": 'byte' elements not allowed\n")
20903 (flush *(ebp+0x10))
20904 (stop *(ebp+0x14) 1)
20905
20906
20907 $populate-mu-type:error5:
20908 (write-buffered *(ebp+0x10) "type ")
20909 (type-name *edi)
20910 (write-buffered *(ebp+0x10) %eax)
20911 (write-buffered *(ebp+0x10) ": 'slice' elements not allowed\n")
20912 (flush *(ebp+0x10))
20913 (stop *(ebp+0x14) 1)
20914
20915
20916 $populate-mu-type:error6:
20917 (write-buffered *(ebp+0x10) "type ")
20918 (type-name *edi)
20919 (write-buffered *(ebp+0x10) %eax)
20920 (write-buffered *(ebp+0x10) ": 'stream' elements not allowed for now\n")
20921 (flush *(ebp+0x10))
20922 (stop *(ebp+0x14) 1)
20923
20924
20925 type-name:
20926
20927 55/push-ebp
20928 89/<- %ebp 4/r32/esp
20929
20930 (index Type-id *(ebp+8))
20931 $type-name:end:
20932
20933 89/<- %esp 5/r32/ebp
20934 5d/pop-to-ebp
20935 c3/return
20936
20937 index:
20938
20939 55/push-ebp
20940 89/<- %ebp 4/r32/esp
20941
20942 56/push-esi
20943
20944
20945 8b/-> *(ebp+8) 6/r32/esi
20946
20947 8b/-> *(ebp+0xc) 0/r32/eax
20948
20949 8b/-> *(esi+eax<<2+0xc) 0/r32/eax
20950 $index:end:
20951
20952 5e/pop-to-esi
20953
20954 89/<- %esp 5/r32/ebp
20955 5d/pop-to-ebp
20956 c3/return
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967 populate-mu-type-sizes:
20968
20969 55/push-ebp
20970 89/<- %ebp 4/r32/esp
20971 $populate-mu-type-sizes:total-sizes:
20972
20973 (lookup *_Program-types *_Program-types->payload)
20974 {
20975
20976 3d/compare-eax-and 0/imm32/null
20977 74/jump-if-= break/disp8
20978 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
20979
20980 (lookup *(eax+0x10) *(eax+0x14))
20981 eb/jump loop/disp8
20982 }
20983 $populate-mu-type-sizes:offsets:
20984
20985 (lookup *_Program-types *_Program-types->payload)
20986 {
20987
20988 3d/compare-eax-and 0/imm32/null
20989 74/jump-if-= break/disp8
20990 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
20991
20992 (lookup *(eax+0x10) *(eax+0x14))
20993 eb/jump loop/disp8
20994 }
20995 $populate-mu-type-sizes:end:
20996
20997 89/<- %esp 5/r32/ebp
20998 5d/pop-to-ebp
20999 c3/return
21000
21001
21002
21003
21004 populate-mu-type-sizes-in-type:
21005
21006 55/push-ebp
21007 89/<- %ebp 4/r32/esp
21008
21009 50/push-eax
21010 51/push-ecx
21011 52/push-edx
21012 56/push-esi
21013 57/push-edi
21014
21015 8b/-> *(ebp+8) 6/r32/esi
21016
21017 81 7/subop/compare *(esi+0xc) 0/imm32
21018 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
21019
21020 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
21021 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
21022
21023 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
21024
21025 bf/copy-to-edi 0/imm32
21026
21027
21028 (lookup *(esi+4) *(esi+8))
21029 89/<- %ecx 0/r32/eax
21030
21031 8b/-> *ecx 2/r32/edx
21032
21033 8d/copy-address *(ecx+0xc) 1/r32/ecx
21034
21035 8d/copy-address *(ecx+edx) 2/r32/edx
21036 {
21037 $populate-mu-type-sizes-in-type:loop:
21038
21039 39/compare %ecx 2/r32/edx
21040 73/jump-if-addr>= break/disp8
21041
21042 (lookup *(ecx+8) *(ecx+0xc))
21043
21044 81 7/subop/compare *eax 0/imm32
21045 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
21046
21047 (lookup *eax *(eax+4))
21048 (compute-size-of-var %eax *(ebp+0xc) *(ebp+0x10))
21049
21050 01/add-to %edi 0/r32/eax
21051
21052 81 0/subop/add %ecx 0x10/imm32
21053
21054 eb/jump loop/disp8
21055 }
21056
21057 89/<- *(esi+0xc) 7/r32/edi
21058 $populate-mu-type-sizes-in-type:end:
21059
21060 5f/pop-to-edi
21061 5e/pop-to-esi
21062 5a/pop-to-edx
21063 59/pop-to-ecx
21064 58/pop-to-eax
21065
21066 89/<- %esp 5/r32/ebp
21067 5d/pop-to-ebp
21068 c3/return
21069
21070 $populate-mu-type-sizes-in-type:abort:
21071 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
21072 (flush *(ebp+0xc))
21073 (stop *(ebp+0x10) 1)
21074
21075
21076
21077
21078 compute-size-of-var:
21079
21080 55/push-ebp
21081 89/<- %ebp 4/r32/esp
21082
21083 51/push-ecx
21084
21085 8b/-> *(ebp+8) 1/r32/ecx
21086 (lookup *(ecx+8) *(ecx+0xc))
21087 89/<- %ecx 0/r32/eax
21088
21089 {
21090 81 7/subop/compare *ecx 0/imm32/false
21091 75/jump-if-!= break/disp8
21092 (lookup *(ecx+4) *(ecx+8))
21093 89/<- %ecx 0/r32/eax
21094 }
21095
21096 (compute-size-of-type-id *(ecx+4) *(ebp+0xc) *(ebp+0x10))
21097 $compute-size-of-var:end:
21098
21099 59/pop-to-ecx
21100
21101 89/<- %esp 5/r32/ebp
21102 5d/pop-to-ebp
21103 c3/return
21104
21105 compute-size-of-type-id:
21106
21107 55/push-ebp
21108 89/<- %ebp 4/r32/esp
21109
21110 51/push-ecx
21111
21112 68/push 0/imm32
21113 68/push 0/imm32
21114 89/<- %ecx 4/r32/esp
21115
21116 8b/-> *(ebp+8) 0/r32/eax
21117
21118 3d/compare-eax-and 0/imm32/literal
21119 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
21120
21121 3d/compare-eax-and 8/imm32/byte
21122 {
21123 75/jump-if-!= break/disp8
21124 b8/copy-to-eax 4/imm32
21125 eb/jump $compute-size-of-type-id:end/disp8
21126 }
21127
21128 3d/compare-eax-and 4/imm32/handle
21129 {
21130 75/jump-if-!= break/disp8
21131 b8/copy-to-eax 8/imm32
21132 eb/jump $compute-size-of-type-id:end/disp8
21133 }
21134
21135 3d/compare-eax-and 0xc/imm32/slice
21136 {
21137 75/jump-if-!= break/disp8
21138 b8/copy-to-eax 8/imm32
21139 eb/jump $compute-size-of-type-id:end/disp8
21140 }
21141
21142
21143 (find-typeinfo %eax %ecx)
21144 {
21145 81 7/subop/compare *ecx 0/imm32
21146 74/jump-if-= break/disp8
21147 $compute-size-of-type-id:user-defined:
21148 (lookup *ecx *(ecx+4))
21149 (populate-mu-type-sizes-in-type %eax *(ebp+0xc) *(ebp+0x10))
21150 8b/-> *(eax+0xc) 0/r32/eax
21151 eb/jump $compute-size-of-type-id:end/disp8
21152 }
21153
21154 b8/copy-to-eax 4/imm32
21155 $compute-size-of-type-id:end:
21156
21157 81 0/subop/add %esp 8/imm32
21158
21159 59/pop-to-ecx
21160
21161 89/<- %esp 5/r32/ebp
21162 5d/pop-to-ebp
21163 c3/return
21164
21165
21166
21167
21168 populate-mu-type-offsets:
21169
21170 55/push-ebp
21171 89/<- %ebp 4/r32/esp
21172
21173 50/push-eax
21174 51/push-ecx
21175 52/push-edx
21176 53/push-ebx
21177 56/push-esi
21178 57/push-edi
21179
21180
21181 bf/copy-to-edi 0/imm32
21182
21183 8b/-> *(ebp+8) 1/r32/ecx
21184 (lookup *(ecx+4) *(ecx+8))
21185 89/<- %ecx 0/r32/eax
21186
21187 8b/-> *ecx 2/r32/edx
21188 c1 5/subop/shift-right-logical %edx 4/imm8
21189
21190 bb/copy-to-ebx 0/imm32
21191 {
21192 $populate-mu-type-offsets:loop:
21193 39/compare %ebx 2/r32/edx
21194 0f 8d/jump-if->= break/disp32
21195
21196
21197
21198
21199
21200
21201
21202 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
21203 89/<- %esi 0/r32/eax
21204
21205 81 7/subop/compare %esi 0/imm32
21206 74/jump-if-= $populate-mu-type-offsets:end/disp8
21207
21208 81 7/subop/compare *esi 0/imm32
21209 74/jump-if-= $populate-mu-type-offsets:end/disp8
21210
21211
21212 (lookup *(esi+0xc) *(esi+0x10))
21213 89/<- *(eax+0x14) 7/r32/edi
21214
21215 (lookup *esi *(esi+4))
21216 (size-of %eax)
21217 01/add-to %edi 0/r32/eax
21218
21219 43/increment-ebx
21220 e9/jump loop/disp32
21221 }
21222 $populate-mu-type-offsets:end:
21223
21224 5f/pop-to-edi
21225 5e/pop-to-esi
21226 5b/pop-to-ebx
21227 5a/pop-to-edx
21228 59/pop-to-ecx
21229 58/pop-to-eax
21230
21231 89/<- %esp 5/r32/ebp
21232 5d/pop-to-ebp
21233 c3/return
21234
21235 locate-typeinfo-entry-with-index:
21236
21237 55/push-ebp
21238 89/<- %ebp 4/r32/esp
21239
21240 51/push-ecx
21241 52/push-edx
21242 53/push-ebx
21243 56/push-esi
21244 57/push-edi
21245
21246 8b/-> *(ebp+8) 6/r32/esi
21247
21248 8d/copy-address *(esi+0xc) 1/r32/ecx
21249
21250 8b/-> *esi 2/r32/edx
21251 8d/copy-address *(ecx+edx) 2/r32/edx
21252 {
21253 $locate-typeinfo-entry-with-index:loop:
21254 39/compare %ecx 2/r32/edx
21255 73/jump-if-addr>= break/disp8
21256
21257 (lookup *(ecx+8) *(ecx+0xc))
21258
21259 8b/-> *(eax+8) 3/r32/ebx
21260
21261
21262
21263
21264
21265
21266 39/compare *(ebp+0xc) 3/r32/ebx
21267 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
21268
21269 81 0/subop/add %ecx 0x10/imm32
21270
21271 eb/jump loop/disp8
21272 }
21273
21274 b8/copy-to-eax 0/imm32
21275 $locate-typeinfo-entry-with-index:end:
21276
21277
21278
21279
21280
21281 5f/pop-to-edi
21282 5e/pop-to-esi
21283 5b/pop-to-ebx
21284 5a/pop-to-edx
21285 59/pop-to-ecx
21286
21287 89/<- %esp 5/r32/ebp
21288 5d/pop-to-ebp
21289 c3/return
21290
21291 dump-typeinfos:
21292
21293 55/push-ebp
21294 89/<- %ebp 4/r32/esp
21295
21296 50/push-eax
21297
21298 (write-buffered Stderr *(ebp+8))
21299 (flush Stderr)
21300
21301 (lookup *_Program-types *_Program-types->payload)
21302 {
21303
21304 3d/compare-eax-and 0/imm32
21305 74/jump-if-= break/disp8
21306 (write-buffered Stderr "---\n")
21307 (flush Stderr)
21308 (dump-typeinfo %eax)
21309
21310 (lookup *(eax+0x10) *(eax+0x14))
21311 eb/jump loop/disp8
21312 }
21313 $dump-typeinfos:end:
21314
21315 58/pop-to-eax
21316
21317 89/<- %esp 5/r32/ebp
21318 5d/pop-to-ebp
21319 c3/return
21320
21321 dump-typeinfo:
21322
21323 55/push-ebp
21324 89/<- %ebp 4/r32/esp
21325
21326 50/push-eax
21327 51/push-ecx
21328 52/push-edx
21329 53/push-ebx
21330 56/push-esi
21331 57/push-edi
21332
21333 8b/-> *(ebp+8) 6/r32/esi
21334
21335 (lookup *(esi+4) *(esi+8))
21336 89/<- %ecx 0/r32/eax
21337 (write-buffered Stderr "id:")
21338 (write-int32-hex-buffered Stderr *esi)
21339 (write-buffered Stderr "\n")
21340 (write-buffered Stderr "fields @ ")
21341 (write-int32-hex-buffered Stderr %ecx)
21342 (write-buffered Stderr Newline)
21343 (flush Stderr)
21344 (write-buffered Stderr " write: ")
21345 (write-int32-hex-buffered Stderr *ecx)
21346 (write-buffered Stderr Newline)
21347 (flush Stderr)
21348 (write-buffered Stderr " read: ")
21349 (write-int32-hex-buffered Stderr *(ecx+4))
21350 (write-buffered Stderr Newline)
21351 (flush Stderr)
21352 (write-buffered Stderr " size: ")
21353 (write-int32-hex-buffered Stderr *(ecx+8))
21354 (write-buffered Stderr Newline)
21355 (flush Stderr)
21356
21357 8b/-> *ecx 2/r32/edx
21358
21359 8d/copy-address *(ecx+0xc) 1/r32/ecx
21360
21361 8d/copy-address *(ecx+edx) 2/r32/edx
21362 {
21363 $dump-typeinfo:loop:
21364
21365 39/compare %ecx 2/r32/edx
21366 0f 83/jump-if-addr>= break/disp32
21367 (write-buffered Stderr " row:\n")
21368 (write-buffered Stderr " key: ")
21369 (write-int32-hex-buffered Stderr *ecx)
21370 (write-buffered Stderr ",")
21371 (write-int32-hex-buffered Stderr *(ecx+4))
21372 (write-buffered Stderr " = '")
21373 (lookup *ecx *(ecx+4))
21374 (write-buffered Stderr %eax)
21375 (write-buffered Stderr "' @ ")
21376 (write-int32-hex-buffered Stderr %eax)
21377 (write-buffered Stderr Newline)
21378 (flush Stderr)
21379 (write-buffered Stderr " value: ")
21380 (write-int32-hex-buffered Stderr *(ecx+8))
21381 (write-buffered Stderr ",")
21382 (write-int32-hex-buffered Stderr *(ecx+0xc))
21383 (write-buffered Stderr " = typeinfo-entry@")
21384 (lookup *(ecx+8) *(ecx+0xc))
21385 (write-int32-hex-buffered Stderr %eax)
21386 (write-buffered Stderr Newline)
21387 (flush Stderr)
21388 (write-buffered Stderr " input var@")
21389 (dump-var 5 %eax)
21390 (lookup *(ecx+8) *(ecx+0xc))
21391 (write-buffered Stderr " index: ")
21392 (write-int32-hex-buffered Stderr *(eax+8))
21393 (write-buffered Stderr Newline)
21394 (flush Stderr)
21395 (write-buffered Stderr " output var@")
21396 8d/copy-address *(eax+0xc) 0/r32/eax
21397 (dump-var 5 %eax)
21398 (flush Stderr)
21399
21400 81 0/subop/add %ecx 0x10/imm32
21401
21402 e9/jump loop/disp32
21403 }
21404 $dump-typeinfo:end:
21405
21406 5f/pop-to-edi
21407 5e/pop-to-esi
21408 5b/pop-to-ebx
21409 5a/pop-to-edx
21410 59/pop-to-ecx
21411 58/pop-to-eax
21412
21413 89/<- %esp 5/r32/ebp
21414 5d/pop-to-ebp
21415 c3/return
21416
21417 dump-var:
21418
21419 55/push-ebp
21420 89/<- %ebp 4/r32/esp
21421
21422 50/push-eax
21423 53/push-ebx
21424
21425 8b/-> *(ebp+0xc) 0/r32/eax
21426
21427 (write-int32-hex-buffered Stderr *eax)
21428 (write-buffered Stderr ",")
21429 (write-int32-hex-buffered Stderr *(eax+4))
21430 (write-buffered Stderr "->")
21431 (lookup *eax *(eax+4))
21432 (write-int32-hex-buffered Stderr %eax)
21433 (write-buffered Stderr Newline)
21434 (flush Stderr)
21435 {
21436 3d/compare-eax-and 0/imm32
21437 0f 84/jump-if-= break/disp32
21438 (emit-indent Stderr *(ebp+8))
21439 (write-buffered Stderr "name: ")
21440 89/<- %ebx 0/r32/eax
21441 (write-int32-hex-buffered Stderr *ebx)
21442 (write-buffered Stderr ",")
21443 (write-int32-hex-buffered Stderr *(ebx+4))
21444 (write-buffered Stderr "->")
21445 (lookup *ebx *(ebx+4))
21446 (write-int32-hex-buffered Stderr %eax)
21447 {
21448 3d/compare-eax-and 0/imm32
21449 74/jump-if-= break/disp8
21450 (write-buffered Stderr Space)
21451 (write-buffered Stderr %eax)
21452 }
21453 (write-buffered Stderr Newline)
21454 (flush Stderr)
21455 (emit-indent Stderr *(ebp+8))
21456 (write-buffered Stderr "block depth: ")
21457 (write-int32-hex-buffered Stderr *(ebx+0x10))
21458 (write-buffered Stderr Newline)
21459 (flush Stderr)
21460 (emit-indent Stderr *(ebp+8))
21461 (write-buffered Stderr "stack offset: ")
21462 (write-int32-hex-buffered Stderr *(ebx+0x14))
21463 (write-buffered Stderr Newline)
21464 (flush Stderr)
21465 (emit-indent Stderr *(ebp+8))
21466 (write-buffered Stderr "reg: ")
21467 (write-int32-hex-buffered Stderr *(ebx+0x18))
21468 (write-buffered Stderr ",")
21469 (write-int32-hex-buffered Stderr *(ebx+0x1c))
21470 (write-buffered Stderr "->")
21471 (flush Stderr)
21472 (lookup *(ebx+0x18) *(ebx+0x1c))
21473 (write-int32-hex-buffered Stderr %eax)
21474 {
21475 3d/compare-eax-and 0/imm32
21476 74/jump-if-= break/disp8
21477 (write-buffered Stderr Space)
21478 (write-buffered Stderr %eax)
21479 }
21480 (write-buffered Stderr Newline)
21481 (flush Stderr)
21482 }
21483 $dump-var:end:
21484
21485 5b/pop-to-ebx
21486 58/pop-to-eax
21487
21488 89/<- %esp 5/r32/ebp
21489 5d/pop-to-ebp
21490 c3/return
21491
21492
21493
21494
21495
21496 check-mu-types:
21497
21498 55/push-ebp
21499 89/<- %ebp 4/r32/esp
21500
21501 50/push-eax
21502
21503 (lookup *_Program-functions *_Program-functions->payload)
21504 {
21505 $check-mu-types:loop:
21506
21507 3d/compare-eax-and 0/imm32
21508 0f 84/jump-if-= break/disp32
21509 +-- 8 lines: #? # dump curr->name ------------------------------------------------------------------------------------------------------------------------------------------------
21517 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
21518
21519 (lookup *(eax+0x20) *(eax+0x24))
21520 e9/jump loop/disp32
21521 }
21522 $check-mu-types:end:
21523
21524 58/pop-to-eax
21525
21526 89/<- %esp 5/r32/ebp
21527 5d/pop-to-ebp
21528 c3/return
21529
21530 check-mu-function:
21531
21532 55/push-ebp
21533 89/<- %ebp 4/r32/esp
21534
21535 50/push-eax
21536 56/push-esi
21537
21538 8b/-> *(ebp+8) 6/r32/esi
21539
21540 (lookup *(esi+0x10) *(esi+0x14))
21541 (check-all-unique-registers %eax %esi *(ebp+0xc) *(ebp+0x10))
21542
21543 (lookup *(esi+0x18) *(esi+0x1c))
21544 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
21545
21546 81 7/subop/compare *(esi+0x10) 0/imm32
21547 74/jump-if-= $check-mu-function:end/disp8
21548
21549 (check-final-stmt-is-return %eax %esi *(ebp+0xc) *(ebp+0x10))
21550 (check-no-breaks %eax %esi *(ebp+0xc) *(ebp+0x10))
21551 $check-mu-function:end:
21552
21553 5e/pop-to-esi
21554 58/pop-to-eax
21555
21556 89/<- %esp 5/r32/ebp
21557 5d/pop-to-ebp
21558 c3/return
21559
21560 check-mu-block:
21561
21562 55/push-ebp
21563 89/<- %ebp 4/r32/esp
21564
21565 50/push-eax
21566
21567 8b/-> *(ebp+8) 0/r32/eax
21568
21569 (lookup *(eax+4) *(eax+8))
21570
21571 {
21572 $check-mu-block:check-empty:
21573 3d/compare-eax-and 0/imm32
21574 0f 84/jump-if-= break/disp32
21575
21576 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21577 }
21578 $check-mu-block:end:
21579
21580 58/pop-to-eax
21581
21582 89/<- %esp 5/r32/ebp
21583 5d/pop-to-ebp
21584 c3/return
21585
21586 check-mu-stmt-list:
21587
21588 55/push-ebp
21589 89/<- %ebp 4/r32/esp
21590
21591 50/push-eax
21592 56/push-esi
21593
21594 8b/-> *(ebp+8) 6/r32/esi
21595 {
21596 $check-mu-stmt-list:loop:
21597 81 7/subop/compare %esi 0/imm32
21598 0f 84/jump-if-= break/disp32
21599
21600 (lookup *esi *(esi+4))
21601 {
21602 $check-mu-stmt-list:check-for-block:
21603 81 7/subop/compare *eax 0/imm32/block
21604 75/jump-if-!= break/disp8
21605 $check-mu-stmt-list:block:
21606 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21607 eb/jump $check-mu-stmt-list:continue/disp8
21608 }
21609 {
21610 $check-mu-stmt-list:check-for-stmt1:
21611 81 7/subop/compare *eax 1/imm32/stmt1
21612 0f 85/jump-if-!= break/disp32
21613 $check-mu-stmt-list:stmt1:
21614 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21615 eb/jump $check-mu-stmt-list:continue/disp8
21616 }
21617 {
21618 $check-mu-stmt-list:check-for-reg-var-def:
21619 81 7/subop/compare *eax 3/imm32/reg-var-def
21620 0f 85/jump-if-!= break/disp32
21621 $check-mu-stmt-list:reg-var-def:
21622 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21623 eb/jump $check-mu-stmt-list:continue/disp8
21624 }
21625 $check-mu-stmt-list:continue:
21626
21627 (lookup *(esi+8) *(esi+0xc))
21628 89/<- %esi 0/r32/eax
21629 e9/jump loop/disp32
21630 }
21631 $check-mu-stmt-list:end:
21632
21633 5e/pop-to-esi
21634 58/pop-to-eax
21635
21636 89/<- %esp 5/r32/ebp
21637 5d/pop-to-ebp
21638 c3/return
21639
21640 check-mu-stmt:
21641
21642 55/push-ebp
21643 89/<- %ebp 4/r32/esp
21644
21645 50/push-eax
21646
21647 (has-primitive-name? *(ebp+8))
21648 3d/compare-eax-and 0/imm32/false
21649 {
21650 74/jump-if-= break/disp8
21651 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21652 e9/jump $check-mu-stmt:end/disp32
21653 }
21654
21655
21656 (lookup *_Program-functions *_Program-functions->payload)
21657 (find-matching-function %eax *(ebp+8))
21658 3d/compare-eax-and 0/imm32
21659 {
21660 74/jump-if-= break/disp8
21661 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21662 eb/jump $check-mu-stmt:end/disp8
21663 }
21664
21665 (lookup *_Program-signatures *_Program-signatures->payload)
21666 (find-matching-function %eax *(ebp+8))
21667 3d/compare-eax-and 0/imm32
21668 {
21669 74/jump-if-= break/disp8
21670 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21671 eb/jump $check-mu-stmt:end/disp8
21672 }
21673
21674 e9/jump $check-mu-stmt:unknown-call/disp32
21675 $check-mu-stmt:end:
21676
21677 58/pop-to-eax
21678
21679 89/<- %esp 5/r32/ebp
21680 5d/pop-to-ebp
21681 c3/return
21682
21683 $check-mu-stmt:unknown-call:
21684 (write-buffered *(ebp+0x10) "unknown function '")
21685 8b/-> *(ebp+8) 0/r32/eax
21686 (lookup *(eax+4) *(eax+8))
21687 (write-buffered *(ebp+0x10) %eax)
21688 (write-buffered *(ebp+0x10) "'\n")
21689 (flush *(ebp+0x10))
21690 (stop *(ebp+0x14) 1)
21691
21692
21693 has-primitive-name?:
21694
21695 55/push-ebp
21696 89/<- %ebp 4/r32/esp
21697
21698 51/push-ecx
21699 56/push-esi
21700
21701 8b/-> *(ebp+8) 6/r32/esi
21702 (lookup *(esi+4) *(esi+8))
21703 89/<- %esi 0/r32/eax
21704
21705 (string-equal? %esi "return")
21706 3d/compare-eax-and 0/imm32/false
21707 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21708
21709 (string-equal? %esi "get")
21710 3d/compare-eax-and 0/imm32/false
21711 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21712
21713 (string-equal? %esi "index")
21714 3d/compare-eax-and 0/imm32/false
21715 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21716
21717 (string-equal? %esi "length")
21718 3d/compare-eax-and 0/imm32/false
21719 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21720
21721 (string-equal? %esi "compute-offset")
21722 3d/compare-eax-and 0/imm32/false
21723 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21724
21725 (string-equal? %esi "copy-object")
21726 3d/compare-eax-and 0/imm32/false
21727 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21728
21729 (string-equal? %esi "clear-object")
21730 3d/compare-eax-and 0/imm32/false
21731 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21732
21733 (string-equal? %esi "allocate")
21734 3d/compare-eax-and 0/imm32/false
21735 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21736
21737 (string-equal? %esi "populate")
21738 3d/compare-eax-and 0/imm32/false
21739 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21740
21741 (string-equal? %esi "populate-stream")
21742 3d/compare-eax-and 0/imm32/false
21743 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21744
21745 (string-equal? %esi "read-from-stream")
21746 3d/compare-eax-and 0/imm32/false
21747 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21748
21749 (string-equal? %esi "write-to-stream")
21750 3d/compare-eax-and 0/imm32/false
21751 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21752
21753 b9/copy-to-ecx Primitives/imm32
21754 {
21755 $has-primitive-name?:loop:
21756
21757 81 7/subop/compare %ecx 0/imm32
21758 74/jump-if-= break/disp8
21759
21760 (lookup *ecx *(ecx+4))
21761
21762
21763
21764 (string-equal? %esi %eax)
21765 3d/compare-eax-and 0/imm32/false
21766 75/jump-if-!= $has-primitive-name?:end/disp8
21767 $has-primitive-name?:next-primitive:
21768
21769 (lookup *(ecx+0x3c) *(ecx+0x40))
21770 89/<- %ecx 0/r32/eax
21771
21772 e9/jump loop/disp32
21773 }
21774
21775 b8/copy-to-eax 0/imm32
21776 $has-primitive-name?:end:
21777
21778 5e/pop-to-esi
21779 59/pop-to-ecx
21780
21781 89/<- %esp 5/r32/ebp
21782 5d/pop-to-ebp
21783 c3/return
21784
21785 check-mu-primitive:
21786
21787 55/push-ebp
21788 89/<- %ebp 4/r32/esp
21789
21790 50/push-eax
21791 51/push-ecx
21792
21793 8b/-> *(ebp+8) 0/r32/eax
21794 (lookup *(eax+4) *(eax+8))
21795 89/<- %ecx 0/r32/eax
21796
21797 {
21798 (string-equal? %ecx "copy")
21799 3d/compare-eax-and 0/imm32/false
21800 74/jump-if-= break/disp8
21801 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21802 e9/jump $check-mu-primitive:end/disp32
21803 }
21804
21805 {
21806 (string-equal? %ecx "copy-to")
21807 3d/compare-eax-and 0/imm32/false
21808 74/jump-if-= break/disp8
21809 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21810 e9/jump $check-mu-primitive:end/disp32
21811 }
21812
21813 {
21814 (string-equal? %ecx "copy-byte")
21815 3d/compare-eax-and 0/imm32/false
21816 74/jump-if-= break/disp8
21817 (check-mu-copy-byte-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21818 e9/jump $check-mu-primitive:end/disp32
21819 }
21820
21821 {
21822 (string-equal? %ecx "copy-byte-to")
21823 3d/compare-eax-and 0/imm32/false
21824 74/jump-if-= break/disp8
21825 (check-mu-copy-byte-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21826 e9/jump $check-mu-primitive:end/disp32
21827 }
21828
21829 {
21830 (string-equal? %ecx "compare")
21831 3d/compare-eax-and 0/imm32/false
21832 74/jump-if-= break/disp8
21833 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21834 e9/jump $check-mu-primitive:end/disp32
21835 }
21836
21837 {
21838 (string-equal? %ecx "address")
21839 3d/compare-eax-and 0/imm32/false
21840 74/jump-if-= break/disp8
21841 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21842 e9/jump $check-mu-primitive:end/disp32
21843 }
21844
21845 {
21846 (string-equal? %ecx "return")
21847 3d/compare-eax-and 0/imm32/false
21848 74/jump-if-= break/disp8
21849 (check-mu-return-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21850 e9/jump $check-mu-primitive:end/disp32
21851 }
21852
21853 {
21854 (string-equal? %ecx "get")
21855 3d/compare-eax-and 0/imm32/false
21856 74/jump-if-= break/disp8
21857 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21858 e9/jump $check-mu-primitive:end/disp32
21859 }
21860
21861 {
21862 (string-equal? %ecx "index")
21863 3d/compare-eax-and 0/imm32/false
21864 74/jump-if-= break/disp8
21865 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21866 e9/jump $check-mu-primitive:end/disp32
21867 }
21868
21869 {
21870 (string-equal? %ecx "length")
21871 3d/compare-eax-and 0/imm32/false
21872 74/jump-if-= break/disp8
21873 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21874 e9/jump $check-mu-primitive:end/disp32
21875 }
21876
21877 {
21878 (string-equal? %ecx "compute-offset")
21879 3d/compare-eax-and 0/imm32/false
21880 74/jump-if-= break/disp8
21881 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21882 e9/jump $check-mu-primitive:end/disp32
21883 }
21884
21885 {
21886 (string-equal? %ecx "copy-object")
21887 3d/compare-eax-and 0/imm32/false
21888 74/jump-if-= break/disp8
21889 (check-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21890 e9/jump $check-mu-primitive:end/disp32
21891 }
21892
21893 {
21894 (string-equal? %ecx "clear-object")
21895 3d/compare-eax-and 0/imm32/false
21896 74/jump-if-= break/disp8
21897 (check-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21898 e9/jump $check-mu-primitive:end/disp32
21899 }
21900
21901 {
21902 (string-equal? %ecx "allocate")
21903 3d/compare-eax-and 0/imm32/false
21904 74/jump-if-= break/disp8
21905 (check-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21906 e9/jump $check-mu-primitive:end/disp32
21907 }
21908
21909 {
21910 (string-equal? %ecx "populate")
21911 3d/compare-eax-and 0/imm32/false
21912 74/jump-if-= break/disp8
21913 (check-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21914 e9/jump $check-mu-primitive:end/disp32
21915 }
21916
21917 {
21918 (string-equal? %ecx "populate-stream")
21919 3d/compare-eax-and 0/imm32/false
21920 74/jump-if-= break/disp8
21921 (check-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21922 e9/jump $check-mu-primitive:end/disp32
21923 }
21924
21925 {
21926 (string-equal? %ecx "read-from-stream")
21927 3d/compare-eax-and 0/imm32/false
21928 74/jump-if-= break/disp8
21929 (check-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21930 e9/jump $check-mu-primitive:end/disp32
21931 }
21932
21933 {
21934 (string-equal? %ecx "write-to-stream")
21935 3d/compare-eax-and 0/imm32/false
21936 74/jump-if-= break/disp8
21937 (check-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21938 e9/jump $check-mu-primitive:end/disp32
21939 }
21940
21941 {
21942 (string-equal? %ecx "convert")
21943 3d/compare-eax-and 0/imm32/false
21944 74/jump-if-= break/disp8
21945 (check-mu-convert-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21946 e9/jump $check-mu-primitive:end/disp32
21947 }
21948
21949 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21950 $check-mu-primitive:end:
21951
21952 59/pop-to-ecx
21953 58/pop-to-eax
21954
21955 89/<- %esp 5/r32/ebp
21956 5d/pop-to-ebp
21957 c3/return
21958
21959
21960 check-mu-numberlike-primitive:
21961
21962 55/push-ebp
21963 89/<- %ebp 4/r32/esp
21964
21965 50/push-eax
21966 51/push-ecx
21967 56/push-esi
21968
21969 8b/-> *(ebp+8) 6/r32/esi
21970
21971 b9/copy-to-ecx 2/imm32
21972
21973
21974 (lookup *(esi+0x14) *(esi+0x18))
21975 {
21976 3d/compare-eax-and 0/imm32
21977 74/jump-if-= break/disp8
21978 $check-mu-numberlike-primitive:output:
21979 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21980 (lookup *(eax+8) *(eax+0xc))
21981 3d/compare-eax-and 0/imm32
21982 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
21983
21984
21985 49/decrement-ecx
21986 }
21987
21988 (lookup *(esi+0xc) *(esi+0x10))
21989 {
21990 3d/compare-eax-and 0/imm32
21991 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
21992 $check-mu-numberlike-primitive:first-inout:
21993 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21994
21995 49/decrement-ecx
21996 }
21997
21998 (lookup *(eax+8) *(eax+0xc))
21999 {
22000 3d/compare-eax-and 0/imm32
22001 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
22002 $check-mu-numberlike-primitive:second-inout:
22003
22004 81 7/subop/compare %ecx 0/imm32
22005 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
22006 $check-mu-numberlike-primitive:second-inout-permitted:
22007 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22008 }
22009 $check-mu-numberlike-primitive:third-inout:
22010
22011 81 7/subop/compare *(eax+8) 0/imm32
22012 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
22013 $check-mu-numberlike-primitive:end:
22014
22015 5e/pop-to-esi
22016 59/pop-to-ecx
22017 58/pop-to-eax
22018
22019 89/<- %esp 5/r32/ebp
22020 5d/pop-to-ebp
22021 c3/return
22022
22023 $check-mu-numberlike-primitive:error-too-many-inouts:
22024 (write-buffered *(ebp+0x10) "fn ")
22025 8b/-> *(ebp+0xc) 0/r32/eax
22026 (lookup *eax *(eax+4))
22027 (write-buffered *(ebp+0x10) %eax)
22028 (write-buffered *(ebp+0x10) ": stmt ")
22029 (lookup *(esi+4) *(esi+8))
22030 (write-buffered *(ebp+0x10) %eax)
22031 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
22032 (flush *(ebp+0x10))
22033 (stop *(ebp+0x14) 1)
22034
22035
22036 $check-mu-numberlike-primitive:error-too-many-outputs:
22037 (write-buffered *(ebp+0x10) "fn ")
22038 8b/-> *(ebp+0xc) 0/r32/eax
22039 (lookup *eax *(eax+4))
22040 (write-buffered *(ebp+0x10) %eax)
22041 (write-buffered *(ebp+0x10) ": stmt ")
22042 (lookup *(esi+4) *(esi+8))
22043 (write-buffered *(ebp+0x10) %eax)
22044 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
22045 (flush *(ebp+0x10))
22046 (stop *(ebp+0x14) 1)
22047
22048
22049 check-mu-numberlike-arg:
22050
22051 55/push-ebp
22052 89/<- %ebp 4/r32/esp
22053
22054 50/push-eax
22055 56/push-esi
22056
22057 8b/-> *(ebp+8) 0/r32/eax
22058 (lookup *eax *(eax+4))
22059 (lookup *(eax+8) *(eax+0xc))
22060 89/<- %esi 0/r32/eax
22061 $check-mu-numberlike-arg:check-literal:
22062
22063 (simple-mu-type? %esi 0)
22064 3d/compare-eax-and 0/imm32/false
22065 0f 85/jump-if-!= $check-mu-numberlike-arg:end/disp32
22066 $check-mu-numberlike-arg:check-addr:
22067
22068 {
22069 (mu-addr-type? %esi)
22070 3d/compare-eax-and 0/imm32/false
22071 74/jump-if-= break/disp8
22072 8b/-> *(ebp+8) 0/r32/eax
22073 8b/-> *(eax+0x10) 0/r32/eax
22074 3d/compare-eax-and 0/imm32/false
22075 {
22076 74/jump-if-= break/disp8
22077 (lookup *(esi+0xc) *(esi+0x10))
22078
22079 81 7/subop/compare *(eax+0xc) 0/imm32
22080 {
22081 75/jump-if-!= break/disp8
22082 (lookup *(eax+4) *(eax+8))
22083 }
22084 (mu-addr-type? %eax)
22085 3d/compare-eax-and 0/imm32/false
22086 74/jump-if-= $check-mu-numberlike-arg:end/disp8
22087 }
22088 }
22089 $check-mu-numberlike-arg:output-checks:
22090 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
22091 $check-mu-numberlike-arg:end:
22092
22093 5e/pop-to-esi
22094 58/pop-to-eax
22095
22096 89/<- %esp 5/r32/ebp
22097 5d/pop-to-ebp
22098 c3/return
22099
22100 check-mu-numberlike-output:
22101
22102 55/push-ebp
22103 89/<- %ebp 4/r32/esp
22104
22105 50/push-eax
22106
22107 (mu-numberlike-output-var? *(ebp+8))
22108 3d/compare-eax-and 0/imm32/false
22109 0f 84/jump-if-= $check-mu-numberlike-output:fail/disp32
22110 $check-mu-numberlike-output:end:
22111
22112 58/pop-to-eax
22113
22114 89/<- %esp 5/r32/ebp
22115 5d/pop-to-ebp
22116 c3/return
22117
22118 $check-mu-numberlike-output:fail:
22119
22120 (write-buffered *(ebp+0x14) "fn ")
22121 8b/-> *(ebp+0x10) 0/r32/eax
22122 (lookup *eax *(eax+4))
22123 (write-buffered *(ebp+0x14) %eax)
22124 (write-buffered *(ebp+0x14) ": stmt ")
22125 8b/-> *(ebp+0xc) 0/r32/eax
22126 (lookup *(eax+4) *(eax+8))
22127 (write-buffered *(ebp+0x14) %eax)
22128 (write-buffered *(ebp+0x14) ": '")
22129 8b/-> *(ebp+8) 0/r32/eax
22130 (lookup *eax *(eax+4))
22131 (lookup *eax *(eax+4))
22132 (write-buffered *(ebp+0x14) %eax)
22133 (write-buffered *(ebp+0x14) "' must be a non-addr non-offset scalar\n")
22134 (flush *(ebp+0x14))
22135 (stop *(ebp+0x18) 1)
22136
22137
22138 mu-numberlike-output-var?:
22139
22140 55/push-ebp
22141 89/<- %ebp 4/r32/esp
22142
22143 8b/-> *(ebp+8) 0/r32/eax
22144 (lookup *eax *(eax+4))
22145 (lookup *(eax+8) *(eax+0xc))
22146 (mu-numberlike-output? %eax)
22147 $mu-numberlike-output-var?:end:
22148
22149 89/<- %esp 5/r32/ebp
22150 5d/pop-to-ebp
22151 c3/return
22152
22153 mu-numberlike-output?:
22154
22155 55/push-ebp
22156 89/<- %ebp 4/r32/esp
22157
22158 56/push-esi
22159
22160 8b/-> *(ebp+8) 6/r32/esi
22161 $mu-numberlike-output?:check-int:
22162
22163 (simple-mu-type? %esi 1)
22164 3d/compare-eax-and 0/imm32/false
22165 0f 85/jump-if-!= $mu-numberlike-output?:return-true/disp32
22166 $mu-numberlike-output?:check-float:
22167
22168 (simple-mu-type? %esi 0xf)
22169 3d/compare-eax-and 0/imm32/false
22170 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
22171 $mu-numberlike-output?:check-boolean:
22172
22173 (simple-mu-type? %esi 5)
22174 3d/compare-eax-and 0/imm32/false
22175 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
22176 $mu-numberlike-output?:check-byte:
22177
22178 (simple-mu-type? %esi 8)
22179 3d/compare-eax-and 0/imm32/false
22180 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
22181 $mu-numberlike-output?:check-code-point:
22182
22183 (simple-mu-type? %esi 0xd)
22184 3d/compare-eax-and 0/imm32/false
22185 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
22186 $mu-numberlike-output?:check-code-point-utf8:
22187
22188 (simple-mu-type? %esi 0xe)
22189 3d/compare-eax-and 0/imm32/false
22190 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
22191 $mu-numberlike-output?:return-false:
22192 b8/copy-to-eax 0/imm32/false
22193 eb/jump $mu-numberlike-output?:end/disp8
22194 $mu-numberlike-output?:return-true:
22195 b8/copy-to-eax 1/imm32/true
22196 $mu-numberlike-output?:end:
22197
22198 5e/pop-to-esi
22199
22200 89/<- %esp 5/r32/ebp
22201 5d/pop-to-ebp
22202 c3/return
22203
22204 check-mu-copy-stmt:
22205
22206 55/push-ebp
22207 89/<- %ebp 4/r32/esp
22208
22209 50/push-eax
22210 51/push-ecx
22211 52/push-edx
22212 56/push-esi
22213 57/push-edi
22214
22215 81 5/subop/subtract %esp 0x60/imm32
22216 68/push 0x60/imm32/size
22217 68/push 0/imm32/read
22218 68/push 0/imm32/write
22219 89/<- %edx 4/r32/esp
22220 $check-mu-copy-stmt:get-output:
22221
22222 8b/-> *(ebp+8) 6/r32/esi
22223
22224 (lookup *(esi+0x14) *(esi+0x18))
22225 89/<- %edi 0/r32/eax
22226
22227 3d/compare-eax-and 0/imm32
22228 0f 84/jump-if-= $check-mu-copy-stmt:error-no-output/disp32
22229
22230 (lookup *(edi+8) *(edi+0xc))
22231 3d/compare-eax-and 0/imm32
22232 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-outputs/disp32
22233 $check-mu-copy-stmt:get-inout:
22234
22235 (lookup *(esi+0xc) *(esi+0x10))
22236 89/<- %esi 0/r32/eax
22237
22238 3d/compare-eax-and 0/imm32
22239 0f 84/jump-if-= $check-mu-copy-stmt:error-no-inout/disp32
22240
22241 (lookup *(esi+8) *(esi+0xc))
22242 3d/compare-eax-and 0/imm32
22243 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-inouts/disp32
22244 $check-mu-copy-stmt:types:
22245
22246 (lookup *esi *(esi+4))
22247 (size-of %eax)
22248 3d/compare-eax-and 4/imm32
22249 0f 8f/jump-if-> $check-mu-copy-stmt:error-inout-too-large/disp32
22250
22251 (lookup *esi *(esi+4))
22252 (lookup *(eax+8) *(eax+0xc))
22253 89/<- %ecx 0/r32/eax
22254
22255 8b/-> *(esi+0x10) 0/r32/eax
22256 3d/compare-eax-and 0/imm32/false
22257 {
22258 74/jump-if-= break/disp8
22259 (lookup *(ecx+0xc) *(ecx+0x10))
22260
22261 81 7/subop/compare *(eax+0xc) 0/imm32
22262 {
22263 75/jump-if-!= break/disp8
22264 (lookup *(eax+4) *(eax+8))
22265 }
22266 89/<- %ecx 0/r32/eax
22267 }
22268
22269 (lookup *edi *(edi+4))
22270 (lookup *(eax+0x18) *(eax+0x1c))
22271 3d/compare-eax-and 0/imm32
22272 0f 84/jump-if-= $check-mu-copy-stmt:error-output-not-in-register/disp32
22273
22274 (lookup *edi *(edi+4))
22275 (lookup *(eax+8) *(eax+0xc))
22276
22277 (type-match? %eax %ecx %edx)
22278 3d/compare-eax-and 0/imm32
22279 0f 85/jump-if-!= $check-mu-copy-stmt:end/disp32
22280
22281 {
22282 (lookup *edi *(edi+4))
22283 (lookup *(eax+8) *(eax+0xc))
22284 (mu-addr-type? %eax)
22285 3d/compare-eax-and 0/imm32/false
22286 74/jump-if-= break/disp8
22287 (lookup *esi *(esi+4))
22288 (lookup *eax *(eax+4))
22289 (string-equal? %eax "0")
22290 3d/compare-eax-and 0/imm32/false
22291 74/jump-if-= break/disp8
22292 e9/jump $check-mu-copy-stmt:end/disp32
22293 }
22294
22295 {
22296 (lookup *edi *(edi+4))
22297 (lookup *(eax+8) *(eax+0xc))
22298 81 7/subop/compare *eax 0/imm32/false
22299 75/jump-if-!= break/disp8
22300 (lookup *(eax+4) *(eax+8))
22301 (simple-mu-type? %eax 7)
22302 3d/compare-eax-and 0/imm32/false
22303 74/jump-if-= break/disp8
22304 (lookup *esi *(esi+4))
22305 (lookup *eax *(eax+4))
22306 (string-equal? %eax "0")
22307 3d/compare-eax-and 0/imm32/false
22308 74/jump-if-= break/disp8
22309 e9/jump $check-mu-copy-stmt:end/disp32
22310 }
22311
22312 {
22313 (lookup *edi *(edi+4))
22314 (lookup *(eax+8) *(eax+0xc))
22315 (simple-mu-type? %eax 8)
22316 3d/compare-eax-and 0/imm32/false
22317 74/jump-if-= break/disp8
22318 (lookup *esi *(esi+4))
22319 (lookup *(eax+8) *(eax+0xc))
22320 (simple-mu-type? %eax 0)
22321 3d/compare-eax-and 0/imm32/false
22322 0f 84/jump-if-= $check-mu-copy-stmt:error-non-literal-to-byte/disp32
22323 eb/jump $check-mu-copy-stmt:end/disp8
22324 }
22325
22326 (check-mu-numberlike-output %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22327 $check-mu-copy-stmt:end:
22328
22329 81 0/subop/add %esp 0x6c/imm32
22330
22331 5f/pop-to-edi
22332 5e/pop-to-esi
22333 5a/pop-to-edx
22334 59/pop-to-ecx
22335 58/pop-to-eax
22336
22337 89/<- %esp 5/r32/ebp
22338 5d/pop-to-ebp
22339 c3/return
22340
22341 $check-mu-copy-stmt:error-no-inout:
22342 (write-buffered *(ebp+0x10) "fn ")
22343 8b/-> *(ebp+0xc) 0/r32/eax
22344 (lookup *eax *(eax+4))
22345 (write-buffered *(ebp+0x10) %eax)
22346 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an inout\n")
22347 (flush *(ebp+0x10))
22348 (stop *(ebp+0x14) 1)
22349
22350
22351 $check-mu-copy-stmt:error-too-many-inouts:
22352 (write-buffered *(ebp+0x10) "fn ")
22353 8b/-> *(ebp+0xc) 0/r32/eax
22354 (lookup *eax *(eax+4))
22355 (write-buffered *(ebp+0x10) %eax)
22356 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one inout\n")
22357 (flush *(ebp+0x10))
22358 (stop *(ebp+0x14) 1)
22359
22360
22361 $check-mu-copy-stmt:error-no-output:
22362 (write-buffered *(ebp+0x10) "fn ")
22363 8b/-> *(ebp+0xc) 0/r32/eax
22364 (lookup *eax *(eax+4))
22365 (write-buffered *(ebp+0x10) %eax)
22366 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an output\n")
22367 (flush *(ebp+0x10))
22368 (stop *(ebp+0x14) 1)
22369
22370
22371 $check-mu-copy-stmt:error-output-not-in-register:
22372 (write-buffered *(ebp+0x10) "fn ")
22373 8b/-> *(ebp+0xc) 0/r32/eax
22374 (lookup *eax *(eax+4))
22375 (write-buffered *(ebp+0x10) %eax)
22376 (write-buffered *(ebp+0x10) ": stmt copy: output '")
22377 (lookup *edi *(edi+4))
22378 (lookup *eax *(eax+4))
22379 (write-buffered *(ebp+0x10) %eax)
22380 (write-buffered *(ebp+0x10) "' not in a register\n")
22381 (flush *(ebp+0x10))
22382 (stop *(ebp+0x14) 1)
22383
22384
22385 $check-mu-copy-stmt:error-too-many-outputs:
22386 (write-buffered *(ebp+0x10) "fn ")
22387 8b/-> *(ebp+0xc) 0/r32/eax
22388 (lookup *eax *(eax+4))
22389 (write-buffered *(ebp+0x10) %eax)
22390 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one output\n")
22391 (flush *(ebp+0x10))
22392 (stop *(ebp+0x14) 1)
22393
22394
22395 $check-mu-copy-stmt:error-inout-too-large:
22396 (write-buffered *(ebp+0x10) "fn ")
22397 8b/-> *(ebp+0xc) 0/r32/eax
22398 (lookup *eax *(eax+4))
22399 (write-buffered *(ebp+0x10) %eax)
22400 (write-buffered *(ebp+0x10) ": stmt copy: '")
22401 (lookup *esi *(esi+4))
22402 (lookup *eax *(eax+4))
22403 (write-buffered *(ebp+0x10) %eax)
22404 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
22405 (flush *(ebp+0x10))
22406 (stop *(ebp+0x14) 1)
22407
22408
22409 $check-mu-copy-stmt:error-non-literal-to-byte:
22410 (write-buffered *(ebp+0x10) "fn ")
22411 8b/-> *(ebp+0xc) 0/r32/eax
22412 (lookup *eax *(eax+4))
22413 (write-buffered *(ebp+0x10) %eax)
22414 (write-buffered *(ebp+0x10) ": stmt copy: cannot copy non-literal to '")
22415 (lookup *edi *(edi+4))
22416 (lookup *eax *(eax+4))
22417 (write-buffered *(ebp+0x10) %eax)
22418 (write-buffered *(ebp+0x10) "' of type byte; use copy-byte\n")
22419 (flush *(ebp+0x10))
22420 (stop *(ebp+0x14) 1)
22421
22422
22423 check-mu-copy-to-stmt:
22424
22425 55/push-ebp
22426 89/<- %ebp 4/r32/esp
22427
22428 50/push-eax
22429 51/push-ecx
22430 52/push-edx
22431 53/push-ebx
22432 56/push-esi
22433 57/push-edi
22434
22435 81 5/subop/subtract %esp 0x60/imm32
22436 68/push 0x60/imm32/size
22437 68/push 0/imm32/read
22438 68/push 0/imm32/write
22439 89/<- %edx 4/r32/esp
22440
22441 8b/-> *(ebp+8) 6/r32/esi
22442 $check-mu-copy-to-stmt:check-for-output:
22443
22444 (lookup *(esi+0x14) *(esi+0x18))
22445 3d/compare-eax-and 0/imm32
22446 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-too-many-outputs/disp32
22447 $check-mu-copy-to-stmt:get-dest:
22448
22449 (lookup *(esi+0xc) *(esi+0x10))
22450 89/<- %edi 0/r32/eax
22451
22452 3d/compare-eax-and 0/imm32
22453 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22454 $check-mu-copy-to-stmt:get-src:
22455
22456 (lookup *(edi+8) *(edi+0xc))
22457 89/<- %esi 0/r32/eax
22458
22459 3d/compare-eax-and 0/imm32
22460 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22461
22462 (lookup *(esi+8) *(esi+0xc))
22463 3d/compare-eax-and 0/imm32
22464 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22465 $check-mu-copy-to-stmt:types:
22466
22467 (lookup *esi *(esi+4))
22468 (size-of %eax)
22469 3d/compare-eax-and 4/imm32
22470 0f 8f/jump-if-> $check-mu-copy-to-stmt:error-src-too-large/disp32
22471
22472 (lookup *esi *(esi+4))
22473 (lookup *(eax+8) *(eax+0xc))
22474 89/<- %ecx 0/r32/eax
22475
22476
22477 {
22478 (lookup *esi *(esi+4))
22479 (lookup *(eax+0x8) *(eax+0xc))
22480 (simple-mu-type? %eax 0)
22481 3d/compare-eax-and 0/imm32
22482 75/jump-if-!= break/disp8
22483 (lookup *esi *(esi+4))
22484 (lookup *(eax+0x18) *(eax+0x1c))
22485 3d/compare-eax-and 0/imm32
22486 75/jump-if-!= break/disp8
22487 e9/jump $check-mu-copy-to-stmt:error-src-not-literal-or-in-register/disp32
22488 }
22489
22490 (lookup *edi *(edi+4))
22491 (lookup *(eax+8) *(eax+0xc))
22492 89/<- %ebx 0/r32/eax
22493
22494 $check-mu-copy-to-stmt:check-dest-deref:
22495 8b/-> *(edi+0x10) 0/r32/eax
22496 3d/compare-eax-and 0/imm32/false
22497 {
22498 74/jump-if-= break/disp8
22499 (lookup *(ebx+0xc) *(ebx+0x10))
22500 $check-mu-copy-to-stmt:dest-is-deref:
22501
22502 81 7/subop/compare *(eax+0xc) 0/imm32
22503 {
22504 75/jump-if-!= break/disp8
22505 $check-mu-copy-to-stmt:dest-is-deref2:
22506 (lookup *(eax+4) *(eax+8))
22507 }
22508 89/<- %ebx 0/r32/eax
22509 }
22510
22511 {
22512 $check-mu-copy-to-stmt:final-check-byte:
22513 (simple-mu-type? %ebx 8)
22514 3d/compare-eax-and 0/imm32/false
22515 74/jump-if-= break/disp8
22516 (simple-mu-type? %ecx 0)
22517 3d/compare-eax-and 0/imm32/false
22518 0f 84/jump-if-= $check-mu-copy-to-stmt:error-non-literal-to-byte/disp32
22519 }
22520
22521 (type-match? %ebx %ecx %edx)
22522 3d/compare-eax-and 0/imm32
22523 0f 85/jump-if-!= $check-mu-copy-to-stmt:end/disp32
22524
22525 {
22526 $check-mu-copy-to-stmt:final-check-addr:
22527 (mu-addr-type? %ebx)
22528 3d/compare-eax-and 0/imm32/false
22529 74/jump-if-= break/disp8
22530 (lookup *esi *(esi+4))
22531 (lookup *eax *(eax+4))
22532 (string-equal? %eax "0")
22533 3d/compare-eax-and 0/imm32/false
22534 74/jump-if-= break/disp8
22535 e9/jump $check-mu-copy-to-stmt:end/disp32
22536 }
22537
22538 {
22539 $check-mu-copy-to-stmt:final-check-offset:
22540 81 7/subop/compare *ebx 0/imm32/false
22541 75/jump-if-!= break/disp8
22542 (lookup *(ebx+4) *(ebx+8))
22543 (simple-mu-type? %eax 7)
22544 3d/compare-eax-and 0/imm32/false
22545 74/jump-if-= break/disp8
22546 (lookup *esi *(esi+4))
22547 (lookup *eax *(eax+4))
22548 (string-equal? %eax "0")
22549 3d/compare-eax-and 0/imm32/false
22550 74/jump-if-= break/disp8
22551 e9/jump $check-mu-copy-to-stmt:end/disp32
22552 }
22553
22554 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22555 $check-mu-copy-to-stmt:end:
22556
22557 81 0/subop/add %esp 0x6c/imm32
22558
22559 5f/pop-to-edi
22560 5e/pop-to-esi
22561 5b/pop-to-ebx
22562 5a/pop-to-edx
22563 59/pop-to-ecx
22564 58/pop-to-eax
22565
22566 89/<- %esp 5/r32/ebp
22567 5d/pop-to-ebp
22568 c3/return
22569
22570 $check-mu-copy-to-stmt:error-incorrect-inouts:
22571 (write-buffered *(ebp+0x10) "fn ")
22572 8b/-> *(ebp+0xc) 0/r32/eax
22573 (lookup *eax *(eax+4))
22574 (write-buffered *(ebp+0x10) %eax)
22575 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must have two inouts\n")
22576 (flush *(ebp+0x10))
22577 (stop *(ebp+0x14) 1)
22578
22579
22580 $check-mu-copy-to-stmt:error-too-many-outputs:
22581 (write-buffered *(ebp+0x10) "fn ")
22582 8b/-> *(ebp+0xc) 0/r32/eax
22583 (lookup *eax *(eax+4))
22584 (write-buffered *(ebp+0x10) %eax)
22585 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must not have any outputs\n")
22586 (flush *(ebp+0x10))
22587 (stop *(ebp+0x14) 1)
22588
22589
22590 $check-mu-copy-to-stmt:error-src-not-literal-or-in-register:
22591 (write-buffered *(ebp+0x10) "fn ")
22592 8b/-> *(ebp+0xc) 0/r32/eax
22593 (lookup *eax *(eax+4))
22594 (write-buffered *(ebp+0x10) %eax)
22595 (write-buffered *(ebp+0x10) ": stmt copy-to: source (second inout) is in memory\n")
22596 (flush *(ebp+0x10))
22597 (stop *(ebp+0x14) 1)
22598
22599
22600 $check-mu-copy-to-stmt:error-src-too-large:
22601 (write-buffered *(ebp+0x10) "fn ")
22602 8b/-> *(ebp+0xc) 0/r32/eax
22603 (lookup *eax *(eax+4))
22604 (write-buffered *(ebp+0x10) %eax)
22605 (write-buffered *(ebp+0x10) ": stmt copy-to: '")
22606 (lookup *esi *(esi+4))
22607 (lookup *eax *(eax+4))
22608 (write-buffered *(ebp+0x10) %eax)
22609 (write-buffered *(ebp+0x10) "' is too large to copy\n")
22610 (flush *(ebp+0x10))
22611 (stop *(ebp+0x14) 1)
22612
22613
22614 $check-mu-copy-to-stmt:error-non-literal-to-byte:
22615 (write-buffered *(ebp+0x10) "fn ")
22616 8b/-> *(ebp+0xc) 0/r32/eax
22617 (lookup *eax *(eax+4))
22618 (write-buffered *(ebp+0x10) %eax)
22619 (write-buffered *(ebp+0x10) ": stmt copy-to: cannot copy non-literal to type byte; use copy-byte-to\n")
22620 (flush *(ebp+0x10))
22621 (stop *(ebp+0x14) 1)
22622
22623
22624 check-mu-copy-byte-stmt:
22625
22626 55/push-ebp
22627 89/<- %ebp 4/r32/esp
22628
22629 50/push-eax
22630 51/push-ecx
22631 52/push-edx
22632 56/push-esi
22633 57/push-edi
22634
22635 81 5/subop/subtract %esp 0x60/imm32
22636 68/push 0x60/imm32/size
22637 68/push 0/imm32/read
22638 68/push 0/imm32/write
22639 89/<- %edx 4/r32/esp
22640 $check-mu-copy-byte-stmt:get-output:
22641
22642 8b/-> *(ebp+8) 6/r32/esi
22643
22644 (lookup *(esi+0x14) *(esi+0x18))
22645 89/<- %edi 0/r32/eax
22646
22647 3d/compare-eax-and 0/imm32
22648 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-no-output/disp32
22649
22650 (lookup *(edi+8) *(edi+0xc))
22651 3d/compare-eax-and 0/imm32
22652 0f 85/jump-if-!= $check-mu-copy-byte-stmt:error-too-many-outputs/disp32
22653 $check-mu-copy-byte-stmt:get-inout:
22654
22655 (lookup *(esi+0xc) *(esi+0x10))
22656 89/<- %esi 0/r32/eax
22657
22658 3d/compare-eax-and 0/imm32
22659 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-no-inout/disp32
22660
22661 (lookup *(esi+8) *(esi+0xc))
22662 3d/compare-eax-and 0/imm32
22663 0f 85/jump-if-!= $check-mu-copy-byte-stmt:error-too-many-inouts/disp32
22664 $check-mu-copy-byte-stmt:types:
22665
22666 (lookup *esi *(esi+4))
22667 (size-of %eax)
22668 3d/compare-eax-and 4/imm32
22669 0f 8f/jump-if-> $check-mu-copy-byte-stmt:error-inout-too-large/disp32
22670
22671 (lookup *esi *(esi+4))
22672 (lookup *(eax+8) *(eax+0xc))
22673 89/<- %ecx 0/r32/eax
22674 $check-mu-copy-byte-stmt:check-inout-deref:
22675
22676 8b/-> *(esi+0x10) 0/r32/eax
22677 3d/compare-eax-and 0/imm32/false
22678 {
22679 74/jump-if-= break/disp8
22680 $check-mu-copy-byte-stmt:inout-is-deref:
22681 (lookup *(ecx+0xc) *(ecx+0x10))
22682
22683 81 7/subop/compare *(eax+0xc) 0/imm32
22684 {
22685 75/jump-if-!= break/disp8
22686 $check-mu-copy-byte-stmt:inout-is-deref2:
22687 (lookup *(eax+4) *(eax+8))
22688 }
22689 89/<- %ecx 0/r32/eax
22690 }
22691
22692 (lookup *edi *(edi+4))
22693 (lookup *(eax+0x18) *(eax+0x1c))
22694 3d/compare-eax-and 0/imm32
22695 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-output-not-in-register/disp32
22696
22697 (lookup *edi *(edi+4))
22698 (lookup *(eax+8) *(eax+0xc))
22699
22700 (simple-mu-type? %eax 8)
22701 3d/compare-eax-and 0/imm32
22702 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-invalid-output-type/disp32
22703 $check-mu-copy-byte-stmt:end:
22704
22705 81 0/subop/add %esp 0x6c/imm32
22706
22707 5f/pop-to-edi
22708 5e/pop-to-esi
22709 5a/pop-to-edx
22710 59/pop-to-ecx
22711 58/pop-to-eax
22712
22713 89/<- %esp 5/r32/ebp
22714 5d/pop-to-ebp
22715 c3/return
22716
22717 $check-mu-copy-byte-stmt:error-no-inout:
22718 (write-buffered *(ebp+0x10) "fn ")
22719 8b/-> *(ebp+0xc) 0/r32/eax
22720 (lookup *eax *(eax+4))
22721 (write-buffered *(ebp+0x10) %eax)
22722 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' expects an inout\n")
22723 (flush *(ebp+0x10))
22724 (stop *(ebp+0x14) 1)
22725
22726
22727 $check-mu-copy-byte-stmt:error-too-many-inouts:
22728 (write-buffered *(ebp+0x10) "fn ")
22729 8b/-> *(ebp+0xc) 0/r32/eax
22730 (lookup *eax *(eax+4))
22731 (write-buffered *(ebp+0x10) %eax)
22732 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must have just one inout\n")
22733 (flush *(ebp+0x10))
22734 (stop *(ebp+0x14) 1)
22735
22736
22737 $check-mu-copy-byte-stmt:error-no-output:
22738 (write-buffered *(ebp+0x10) "fn ")
22739 8b/-> *(ebp+0xc) 0/r32/eax
22740 (lookup *eax *(eax+4))
22741 (write-buffered *(ebp+0x10) %eax)
22742 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' expects an output\n")
22743 (flush *(ebp+0x10))
22744 (stop *(ebp+0x14) 1)
22745
22746
22747 $check-mu-copy-byte-stmt:error-output-not-in-register:
22748 (write-buffered *(ebp+0x10) "fn ")
22749 8b/-> *(ebp+0xc) 0/r32/eax
22750 (lookup *eax *(eax+4))
22751 (write-buffered *(ebp+0x10) %eax)
22752 (write-buffered *(ebp+0x10) ": stmt copy-byte: output '")
22753 (lookup *edi *(edi+4))
22754 (lookup *eax *(eax+4))
22755 (write-buffered *(ebp+0x10) %eax)
22756 (write-buffered *(ebp+0x10) "' not in a register\n")
22757 (flush *(ebp+0x10))
22758 (stop *(ebp+0x14) 1)
22759
22760
22761 $check-mu-copy-byte-stmt:error-too-many-outputs:
22762 (write-buffered *(ebp+0x10) "fn ")
22763 8b/-> *(ebp+0xc) 0/r32/eax
22764 (lookup *eax *(eax+4))
22765 (write-buffered *(ebp+0x10) %eax)
22766 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must have just one output\n")
22767 (flush *(ebp+0x10))
22768 (stop *(ebp+0x14) 1)
22769
22770
22771 $check-mu-copy-byte-stmt:error-invalid-output-type:
22772 (write-buffered *(ebp+0x10) "fn ")
22773 8b/-> *(ebp+0xc) 0/r32/eax
22774 (lookup *eax *(eax+4))
22775 (write-buffered *(ebp+0x10) %eax)
22776 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must write to output of type byte\n")
22777 (flush *(ebp+0x10))
22778 (stop *(ebp+0x14) 1)
22779
22780
22781 $check-mu-copy-byte-stmt:error-inout-too-large:
22782 (write-buffered *(ebp+0x10) "fn ")
22783 8b/-> *(ebp+0xc) 0/r32/eax
22784 (lookup *eax *(eax+4))
22785 (write-buffered *(ebp+0x10) %eax)
22786 (write-buffered *(ebp+0x10) ": stmt copy-byte: '")
22787 (lookup *esi *(esi+4))
22788 (lookup *eax *(eax+4))
22789 (write-buffered *(ebp+0x10) %eax)
22790 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
22791 (flush *(ebp+0x10))
22792 (stop *(ebp+0x14) 1)
22793
22794
22795 check-mu-copy-byte-to-stmt:
22796
22797 55/push-ebp
22798 89/<- %ebp 4/r32/esp
22799
22800 50/push-eax
22801 52/push-edx
22802 53/push-ebx
22803 56/push-esi
22804 57/push-edi
22805
22806 81 5/subop/subtract %esp 0x60/imm32
22807 68/push 0x60/imm32/size
22808 68/push 0/imm32/read
22809 68/push 0/imm32/write
22810 89/<- %edx 4/r32/esp
22811
22812 8b/-> *(ebp+8) 6/r32/esi
22813 $check-mu-copy-byte-to-stmt:check-for-output:
22814
22815 (lookup *(esi+0x14) *(esi+0x18))
22816 3d/compare-eax-and 0/imm32
22817 0f 85/jump-if-!= $check-mu-copy-byte-to-stmt:error-too-many-outputs/disp32
22818 $check-mu-copy-byte-to-stmt:get-dest:
22819
22820 (lookup *(esi+0xc) *(esi+0x10))
22821 89/<- %edi 0/r32/eax
22822
22823 3d/compare-eax-and 0/imm32
22824 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22825 $check-mu-copy-byte-to-stmt:get-src:
22826
22827 (lookup *(edi+8) *(edi+0xc))
22828 89/<- %esi 0/r32/eax
22829
22830 3d/compare-eax-and 0/imm32
22831 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22832
22833 (lookup *(esi+8) *(esi+0xc))
22834 3d/compare-eax-and 0/imm32
22835 0f 85/jump-if-!= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22836 $check-mu-copy-byte-to-stmt:types:
22837
22838 (lookup *esi *(esi+4))
22839 (size-of %eax)
22840 3d/compare-eax-and 4/imm32
22841 0f 8f/jump-if-> $check-mu-copy-byte-to-stmt:error-src-too-large/disp32
22842
22843 {
22844 (lookup *esi *(esi+4))
22845 (lookup *(eax+0x18) *(eax+0x1c))
22846 3d/compare-eax-and 0/imm32
22847 75/jump-if-!= break/disp8
22848 e9/jump $check-mu-copy-byte-to-stmt:error-src-not-in-register/disp32
22849 }
22850
22851 (lookup *edi *(edi+4))
22852 (lookup *(eax+8) *(eax+0xc))
22853 89/<- %ebx 0/r32/eax
22854
22855 $check-mu-copy-byte-to-stmt:check-dest-deref:
22856 8b/-> *(edi+0x10) 0/r32/eax
22857 3d/compare-eax-and 0/imm32/false
22858 {
22859 74/jump-if-= break/disp8
22860 (lookup *(ebx+0xc) *(ebx+0x10))
22861 $check-mu-copy-byte-to-stmt:dest-is-deref:
22862
22863 81 7/subop/compare *(eax+0xc) 0/imm32
22864 {
22865 75/jump-if-!= break/disp8
22866 $check-mu-copy-byte-to-stmt:dest-is-deref2:
22867 (lookup *(eax+4) *(eax+8))
22868 }
22869 89/<- %ebx 0/r32/eax
22870 }
22871
22872 (simple-mu-type? %ebx 8)
22873 3d/compare-eax-and 0/imm32/false
22874 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-invalid-dest-type/disp32
22875 $check-mu-copy-byte-to-stmt:end:
22876
22877 81 0/subop/add %esp 0x6c/imm32
22878
22879 5f/pop-to-edi
22880 5e/pop-to-esi
22881 5b/pop-to-ebx
22882 5a/pop-to-edx
22883 58/pop-to-eax
22884
22885 89/<- %esp 5/r32/ebp
22886 5d/pop-to-ebp
22887 c3/return
22888
22889 $check-mu-copy-byte-to-stmt:error-incorrect-inouts:
22890 (write-buffered *(ebp+0x10) "fn ")
22891 8b/-> *(ebp+0xc) 0/r32/eax
22892 (lookup *eax *(eax+4))
22893 (write-buffered *(ebp+0x10) %eax)
22894 (write-buffered *(ebp+0x10) ": stmt 'copy-byte-to' must have two inouts\n")
22895 (flush *(ebp+0x10))
22896 (stop *(ebp+0x14) 1)
22897
22898
22899 $check-mu-copy-byte-to-stmt:error-too-many-outputs:
22900 (write-buffered *(ebp+0x10) "fn ")
22901 8b/-> *(ebp+0xc) 0/r32/eax
22902 (lookup *eax *(eax+4))
22903 (write-buffered *(ebp+0x10) %eax)
22904 (write-buffered *(ebp+0x10) ": stmt 'copy-byte-to' must not have any outputs\n")
22905 (flush *(ebp+0x10))
22906 (stop *(ebp+0x14) 1)
22907
22908
22909 $check-mu-copy-byte-to-stmt:error-src-not-in-register:
22910 (write-buffered *(ebp+0x10) "fn ")
22911 8b/-> *(ebp+0xc) 0/r32/eax
22912 (lookup *eax *(eax+4))
22913 (write-buffered *(ebp+0x10) %eax)
22914 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: source (second inout) must be in a register\n")
22915 (flush *(ebp+0x10))
22916 (stop *(ebp+0x14) 1)
22917
22918
22919 $check-mu-copy-byte-to-stmt:error-invalid-dest-type:
22920 (write-buffered *(ebp+0x10) "fn ")
22921 8b/-> *(ebp+0xc) 0/r32/eax
22922 (lookup *eax *(eax+4))
22923 (write-buffered *(ebp+0x10) %eax)
22924 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: '")
22925 (lookup *edi *(edi+4))
22926 (lookup *eax *(eax+4))
22927 (write-buffered *(ebp+0x10) %eax)
22928 (write-buffered *(ebp+0x10) "' must be a byte\n")
22929 (flush *(ebp+0x10))
22930 (stop *(ebp+0x14) 1)
22931
22932
22933 $check-mu-copy-byte-to-stmt:error-src-too-large:
22934 (write-buffered *(ebp+0x10) "fn ")
22935 8b/-> *(ebp+0xc) 0/r32/eax
22936 (lookup *eax *(eax+4))
22937 (write-buffered *(ebp+0x10) %eax)
22938 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: '")
22939 (lookup *esi *(esi+4))
22940 (lookup *eax *(eax+4))
22941 (write-buffered *(ebp+0x10) %eax)
22942 (write-buffered *(ebp+0x10) "' is too large to copy\n")
22943 (flush *(ebp+0x10))
22944 (stop *(ebp+0x14) 1)
22945
22946
22947 check-mu-compare-stmt:
22948
22949 55/push-ebp
22950 89/<- %ebp 4/r32/esp
22951
22952 50/push-eax
22953 51/push-ecx
22954 52/push-edx
22955 53/push-ebx
22956 56/push-esi
22957 57/push-edi
22958
22959 81 5/subop/subtract %esp 0x60/imm32
22960 68/push 0x60/imm32/size
22961 68/push 0/imm32/read
22962 68/push 0/imm32/write
22963 89/<- %edx 4/r32/esp
22964
22965 8b/-> *(ebp+8) 6/r32/esi
22966 $check-mu-compare-stmt:check-for-output:
22967
22968 (lookup *(esi+0x14) *(esi+0x18))
22969 3d/compare-eax-and 0/imm32
22970 0f 85/jump-if-!= $check-mu-compare-stmt:error-too-many-outputs/disp32
22971 $check-mu-compare-stmt:get-left:
22972
22973 (lookup *(esi+0xc) *(esi+0x10))
22974 89/<- %edi 0/r32/eax
22975
22976 3d/compare-eax-and 0/imm32
22977 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22978 $check-mu-compare-stmt:get-right:
22979
22980 (lookup *(edi+8) *(edi+0xc))
22981 89/<- %esi 0/r32/eax
22982
22983 3d/compare-eax-and 0/imm32
22984 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22985
22986 (lookup *(esi+8) *(esi+0xc))
22987 3d/compare-eax-and 0/imm32
22988 0f 85/jump-if-!= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22989
22990 {
22991 $check-mu-compare-stmt:both-in-mem:
22992 (lookup *esi *(esi+4))
22993 (lookup *(eax+0x8) *(eax+0xc))
22994 (simple-mu-type? %eax 0)
22995 3d/compare-eax-and 0/imm32
22996 0f 85/jump-if-!= break/disp32
22997 (lookup *esi *(esi+4))
22998 (lookup *(eax+0x18) *(eax+0x1c))
22999 3d/compare-eax-and 0/imm32
23000 75/jump-if-!= break/disp8
23001 (lookup *edi *(edi+4))
23002 (lookup *(eax+0x8) *(eax+0xc))
23003 (simple-mu-type? %eax 0)
23004 3d/compare-eax-and 0/imm32
23005 75/jump-if-!= break/disp8
23006 (lookup *edi *(edi+4))
23007 (lookup *(eax+0x18) *(eax+0x1c))
23008 3d/compare-eax-and 0/imm32
23009 75/jump-if-!= break/disp8
23010 e9/jump $check-mu-compare-stmt:error-both-in-memory/disp32
23011 }
23012 $check-mu-compare-stmt:types:
23013
23014 (lookup *esi *(esi+4))
23015 (lookup *(eax+8) *(eax+0xc))
23016 89/<- %ecx 0/r32/eax
23017
23018 8b/-> *(esi+0x10) 0/r32/eax
23019 3d/compare-eax-and 0/imm32/false
23020 {
23021 74/jump-if-= break/disp8
23022 (lookup *(ecx+0xc) *(ecx+0x10))
23023
23024 81 7/subop/compare *(eax+0xc) 0/imm32
23025 {
23026 75/jump-if-!= break/disp8
23027 (lookup *(eax+4) *(eax+8))
23028 }
23029 89/<- %ecx 0/r32/eax
23030 }
23031
23032 (simple-mu-type? %ecx 0x10)
23033 3d/compare-eax-and 0/imm32/false
23034 0f 85/jump-if-!= $check-mu-compare-stmt:error-right-string-literal/disp32
23035
23036 (lookup *esi *(esi+4))
23037 (size-of %eax)
23038 3d/compare-eax-and 4/imm32
23039 0f 8f/jump-if-> $check-mu-compare-stmt:error-right-too-large/disp32
23040
23041 (lookup *edi *(edi+4))
23042 (size-of %eax)
23043 3d/compare-eax-and 4/imm32
23044 0f 8f/jump-if-> $check-mu-compare-stmt:error-left-too-large/disp32
23045
23046 (lookup *edi *(edi+4))
23047 (lookup *(eax+8) *(eax+0xc))
23048 89/<- %ebx 0/r32/eax
23049
23050 8b/-> *(edi+0x10) 0/r32/eax
23051 3d/compare-eax-and 0/imm32/false
23052 {
23053 74/jump-if-= break/disp8
23054 (lookup *(ebx+0xc) *(ebx+0x10))
23055
23056 81 7/subop/compare *(eax+0xc) 0/imm32
23057 {
23058 75/jump-if-!= break/disp8
23059 (lookup *(eax+4) *(eax+8))
23060 }
23061 89/<- %ebx 0/r32/eax
23062 }
23063
23064 (type-match? %ebx %ecx %edx)
23065 3d/compare-eax-and 0/imm32
23066 0f 85/jump-if-!= $check-mu-compare-stmt:end/disp32
23067
23068 {
23069 (lookup *edi *(edi+4))
23070 (lookup *(eax+8) *(eax+0xc))
23071 (mu-addr-type? %eax)
23072 3d/compare-eax-and 0/imm32/false
23073 74/jump-if-= break/disp8
23074 (lookup *esi *(esi+4))
23075 (lookup *eax *(eax+4))
23076 (string-equal? %eax "0")
23077 3d/compare-eax-and 0/imm32/false
23078 74/jump-if-= break/disp8
23079 eb/jump $check-mu-compare-stmt:end/disp8
23080 }
23081
23082 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
23083 $check-mu-compare-stmt:end:
23084
23085 81 0/subop/add %esp 0x6c/imm32
23086
23087 5f/pop-to-edi
23088 5e/pop-to-esi
23089 5b/pop-to-ebx
23090 5a/pop-to-edx
23091 59/pop-to-ecx
23092 58/pop-to-eax
23093
23094 89/<- %esp 5/r32/ebp
23095 5d/pop-to-ebp
23096 c3/return
23097
23098 $check-mu-compare-stmt:error-incorrect-inouts:
23099 (write-buffered *(ebp+0x10) "fn ")
23100 8b/-> *(ebp+0xc) 0/r32/eax
23101 (lookup *eax *(eax+4))
23102 (write-buffered *(ebp+0x10) %eax)
23103 (write-buffered *(ebp+0x10) ": stmt 'compare' must have two inouts\n")
23104 (flush *(ebp+0x10))
23105 (stop *(ebp+0x14) 1)
23106
23107
23108 $check-mu-compare-stmt:error-too-many-outputs:
23109 (write-buffered *(ebp+0x10) "fn ")
23110 8b/-> *(ebp+0xc) 0/r32/eax
23111 (lookup *eax *(eax+4))
23112 (write-buffered *(ebp+0x10) %eax)
23113 (write-buffered *(ebp+0x10) ": stmt 'compare' must not have any outputs\n")
23114 (flush *(ebp+0x10))
23115 (stop *(ebp+0x14) 1)
23116
23117
23118 $check-mu-compare-stmt:error-both-in-memory:
23119 (write-buffered *(ebp+0x10) "fn ")
23120 8b/-> *(ebp+0xc) 0/r32/eax
23121 (lookup *eax *(eax+4))
23122 (write-buffered *(ebp+0x10) %eax)
23123 (write-buffered *(ebp+0x10) ": stmt compare: both inouts are in memory\n")
23124 (flush *(ebp+0x10))
23125 (stop *(ebp+0x14) 1)
23126
23127
23128 $check-mu-compare-stmt:error-left-too-large:
23129 (write-buffered *(ebp+0x10) "fn ")
23130 8b/-> *(ebp+0xc) 0/r32/eax
23131 (lookup *eax *(eax+4))
23132 (write-buffered *(ebp+0x10) %eax)
23133 (write-buffered *(ebp+0x10) ": stmt compare: '")
23134 (lookup *edi *(edi+4))
23135 (lookup *eax *(eax+4))
23136 (write-buffered *(ebp+0x10) %eax)
23137 (write-buffered *(ebp+0x10) "' is too large to compare\n")
23138 (flush *(ebp+0x10))
23139 (stop *(ebp+0x14) 1)
23140
23141
23142 $check-mu-compare-stmt:error-right-too-large:
23143 (write-buffered *(ebp+0x10) "fn ")
23144 8b/-> *(ebp+0xc) 0/r32/eax
23145 (lookup *eax *(eax+4))
23146 (write-buffered *(ebp+0x10) %eax)
23147 (write-buffered *(ebp+0x10) ": stmt compare: '")
23148 (lookup *esi *(esi+4))
23149 (lookup *eax *(eax+4))
23150 (write-buffered *(ebp+0x10) %eax)
23151 (write-buffered *(ebp+0x10) "' is too large to compare\n")
23152 (flush *(ebp+0x10))
23153 (stop *(ebp+0x14) 1)
23154
23155
23156 $check-mu-compare-stmt:error-right-string-literal:
23157 (write-buffered *(ebp+0x10) "fn ")
23158 8b/-> *(ebp+0xc) 0/r32/eax
23159 (lookup *eax *(eax+4))
23160 (write-buffered *(ebp+0x10) %eax)
23161 (write-buffered *(ebp+0x10) ": stmt compare: string literal ")
23162 (lookup *esi *(esi+4))
23163 (lookup *eax *(eax+4))
23164 (write-buffered *(ebp+0x10) %eax)
23165 (write-buffered *(ebp+0x10) " is not supported; use the string-equal? function\n")
23166 (flush *(ebp+0x10))
23167 (stop *(ebp+0x14) 1)
23168
23169
23170 check-mu-address-stmt:
23171
23172 55/push-ebp
23173 89/<- %ebp 4/r32/esp
23174
23175 50/push-eax
23176 51/push-ecx
23177 52/push-edx
23178 56/push-esi
23179 57/push-edi
23180 $check-mu-address-stmt:get-output:
23181
23182 8b/-> *(ebp+8) 6/r32/esi
23183
23184 (lookup *(esi+0x14) *(esi+0x18))
23185 89/<- %edi 0/r32/eax
23186
23187 3d/compare-eax-and 0/imm32
23188 0f 84/jump-if-= $check-mu-address-stmt:error-no-output/disp32
23189
23190 (lookup *(edi+8) *(edi+0xc))
23191 3d/compare-eax-and 0/imm32
23192 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-outputs/disp32
23193 $check-mu-address-stmt:get-inout:
23194
23195 (lookup *(esi+0xc) *(esi+0x10))
23196 89/<- %esi 0/r32/eax
23197
23198 3d/compare-eax-and 0/imm32
23199 0f 84/jump-if-= $check-mu-address-stmt:error-no-inout/disp32
23200
23201 (lookup *(esi+8) *(esi+0xc))
23202 3d/compare-eax-and 0/imm32
23203 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-inouts/disp32
23204 $check-mu-address-stmt:types:
23205
23206 (lookup *edi *(edi+4))
23207 (lookup *(eax+0x18) *(eax+0x1c))
23208 3d/compare-eax-and 0/imm32
23209 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-in-register/disp32
23210
23211 (lookup *edi *(edi+4))
23212 (lookup *(eax+8) *(eax+0xc))
23213 89/<- %edx 0/r32/eax
23214
23215 (mu-addr-type? %edx)
23216 3d/compare-eax-and 0/imm32/false
23217 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-address/disp32
23218
23219 (lookup *(edx+0xc) *(edx+0x10))
23220
23221 81 7/subop/compare *(eax+0xc) 0/imm32
23222 {
23223 75/jump-if-!= break/disp8
23224 (lookup *(eax+4) *(eax+8))
23225 }
23226 89/<- %edx 0/r32/eax
23227
23228 (lookup *esi *(esi+4))
23229 (lookup *(eax+8) *(eax+0xc))
23230 89/<- %ecx 0/r32/eax
23231
23232 8b/-> *(esi+0x10) 0/r32/eax
23233 3d/compare-eax-and 0/imm32/false
23234 {
23235 74/jump-if-= break/disp8
23236 (lookup *(ecx+0xc) *(ecx+0x10))
23237
23238 81 7/subop/compare *(eax+0xc) 0/imm32
23239 {
23240 75/jump-if-!= break/disp8
23241 (lookup *(eax+4) *(eax+8))
23242 }
23243 89/<- %ecx 0/r32/eax
23244 }
23245
23246 (type-equal-ignoring-capacity? %edx %ecx)
23247 3d/compare-eax-and 0/imm32
23248 0f 84/jump-if-= $check-mu-address-stmt:error-type-mismatch/disp32
23249 $check-mu-address-stmt:end:
23250
23251 5f/pop-to-edi
23252 5e/pop-to-esi
23253 5a/pop-to-edx
23254 59/pop-to-ecx
23255 58/pop-to-eax
23256
23257 89/<- %esp 5/r32/ebp
23258 5d/pop-to-ebp
23259 c3/return
23260
23261 $check-mu-address-stmt:error-no-inout:
23262 (write-buffered *(ebp+0x10) "fn ")
23263 8b/-> *(ebp+0xc) 0/r32/eax
23264 (lookup *eax *(eax+4))
23265 (write-buffered *(ebp+0x10) %eax)
23266 (write-buffered *(ebp+0x10) ": stmt 'address' expects an inout\n")
23267 (flush *(ebp+0x10))
23268 (stop *(ebp+0x14) 1)
23269
23270
23271 $check-mu-address-stmt:error-too-many-inouts:
23272 (write-buffered *(ebp+0x10) "fn ")
23273 8b/-> *(ebp+0xc) 0/r32/eax
23274 (lookup *eax *(eax+4))
23275 (write-buffered *(ebp+0x10) %eax)
23276 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one inout\n")
23277 (flush *(ebp+0x10))
23278 (stop *(ebp+0x14) 1)
23279
23280
23281 $check-mu-address-stmt:error-no-output:
23282 (write-buffered *(ebp+0x10) "fn ")
23283 8b/-> *(ebp+0xc) 0/r32/eax
23284 (lookup *eax *(eax+4))
23285 (write-buffered *(ebp+0x10) %eax)
23286 (write-buffered *(ebp+0x10) ": stmt 'address' expects an output\n")
23287 (flush *(ebp+0x10))
23288 (stop *(ebp+0x14) 1)
23289
23290
23291 $check-mu-address-stmt:error-output-not-in-register:
23292 (write-buffered *(ebp+0x10) "fn ")
23293 8b/-> *(ebp+0xc) 0/r32/eax
23294 (lookup *eax *(eax+4))
23295 (write-buffered *(ebp+0x10) %eax)
23296 (write-buffered *(ebp+0x10) ": stmt address: output '")
23297 (lookup *edi *(edi+4))
23298 (lookup *eax *(eax+4))
23299 (write-buffered *(ebp+0x10) %eax)
23300 (write-buffered *(ebp+0x10) "' not in a register\n")
23301 (flush *(ebp+0x10))
23302 (stop *(ebp+0x14) 1)
23303
23304
23305 $check-mu-address-stmt:error-too-many-outputs:
23306 (write-buffered *(ebp+0x10) "fn ")
23307 8b/-> *(ebp+0xc) 0/r32/eax
23308 (lookup *eax *(eax+4))
23309 (write-buffered *(ebp+0x10) %eax)
23310 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one output\n")
23311 (flush *(ebp+0x10))
23312 (stop *(ebp+0x14) 1)
23313
23314
23315 $check-mu-address-stmt:error-output-not-address:
23316 (write-buffered *(ebp+0x10) "fn ")
23317 8b/-> *(ebp+0xc) 0/r32/eax
23318 (lookup *eax *(eax+4))
23319 (write-buffered *(ebp+0x10) %eax)
23320 (write-buffered *(ebp+0x10) ": stmt address: output '")
23321 (lookup *edi *(edi+4))
23322 (lookup *eax *(eax+4))
23323 (write-buffered *(ebp+0x10) %eax)
23324 (write-buffered *(ebp+0x10) "' is not an addr\n")
23325 (flush *(ebp+0x10))
23326 (stop *(ebp+0x14) 1)
23327
23328
23329 $check-mu-address-stmt:error-type-mismatch:
23330 (write-buffered *(ebp+0x10) "fn ")
23331 8b/-> *(ebp+0xc) 0/r32/eax
23332 (lookup *eax *(eax+4))
23333 (write-buffered *(ebp+0x10) %eax)
23334 (write-buffered *(ebp+0x10) ": stmt address: output '")
23335 (lookup *edi *(edi+4))
23336 (lookup *eax *(eax+4))
23337 (write-buffered *(ebp+0x10) %eax)
23338 (write-buffered *(ebp+0x10) "' cannot hold address of '")
23339 (lookup *esi *(esi+4))
23340 (lookup *eax *(eax+4))
23341 (write-buffered *(ebp+0x10) %eax)
23342 (write-buffered *(ebp+0x10) "'\n")
23343 (flush *(ebp+0x10))
23344 (stop *(ebp+0x14) 1)
23345
23346
23347 type-equal-ignoring-capacity?:
23348
23349 55/push-ebp
23350 89/<- %ebp 4/r32/esp
23351
23352 51/push-ecx
23353 52/push-edx
23354 53/push-ebx
23355
23356 8b/-> *(ebp+8) 1/r32/ecx
23357
23358 8b/-> *(ebp+0xc) 3/r32/ebx
23359
23360 81 7/subop/compare *ecx 0/imm32/false
23361 0f 85/jump-if-!= $type-equal-ignoring-capacity?:base-case/disp32
23362
23363 (lookup *(ecx+4) *(ecx+8))
23364 89/<- %edx 0/r32/eax
23365 (lookup *(ebx+4) *(ebx+8))
23366 (type-equal? %edx %eax)
23367 3d/compare-eax-and 0/imm32/false
23368 0f 84/jump-if-= $type-equal-ignoring-capacity?:end/disp32
23369
23370 {
23371 (mu-array? %edx)
23372 3d/compare-eax-and 0/imm32/false
23373 75/jump-if-!= break/disp8
23374 $type-equal-ignoring-capacity?:array:
23375
23376 (lookup *(ecx+0xc) *(ecx+0x10))
23377 (lookup *(eax+4) *(eax+8))
23378 89/<- %ecx 0/r32/eax
23379
23380 (lookup *(ebx+0xc) *(ebx+0x10))
23381 (lookup *(eax+4) *(eax+8))
23382 89/<- %ebx 0/r32/eax
23383 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
23384 }
23385
23386 {
23387 (mu-stream? %edx)
23388 3d/compare-eax-and 0/imm32/false
23389 75/jump-if-!= break/disp8
23390 $type-equal-ignoring-capacity?:stream:
23391
23392 (lookup *(ecx+0xc) *(ecx+0x10))
23393 (lookup *(eax+4) *(eax+8))
23394 89/<- %ecx 0/r32/eax
23395
23396 (lookup *(ebx+0xc) *(ebx+0x10))
23397 (lookup *(eax+4) *(eax+8))
23398 89/<- %ebx 0/r32/eax
23399 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
23400 }
23401 $type-equal-ignoring-capacity?:base-case:
23402
23403 (type-equal? %ecx %ebx)
23404 $type-equal-ignoring-capacity?:end:
23405
23406 5b/pop-to-ebx
23407 5a/pop-to-edx
23408 59/pop-to-ecx
23409
23410 89/<- %esp 5/r32/ebp
23411 5d/pop-to-ebp
23412 c3/return
23413
23414 check-mu-return-stmt:
23415
23416 55/push-ebp
23417 89/<- %ebp 4/r32/esp
23418
23419 50/push-eax
23420 51/push-ecx
23421 52/push-edx
23422 53/push-ebx
23423 56/push-esi
23424 57/push-edi
23425
23426 81 5/subop/subtract %esp 0x60/imm32
23427 68/push 0x60/imm32/size
23428 68/push 0/imm32/read
23429 68/push 0/imm32/write
23430 89/<- %edx 4/r32/esp
23431
23432 8b/-> *(ebp+0xc) 0/r32/eax
23433 (lookup *(eax+0x10) *(eax+0x14))
23434 89/<- %esi 0/r32/eax
23435
23436 89/<- %ebx 0/r32/eax
23437
23438 8b/-> *(ebp+8) 0/r32/eax
23439 (lookup *(eax+0xc) *(eax+0x10))
23440 89/<- %edi 0/r32/eax
23441 {
23442
23443 81 7/subop/compare %ebx 0/imm32
23444 0f 84/jump-if-= break/disp32
23445
23446 81 7/subop/compare %edi 0/imm32
23447 0f 84/jump-if-= $check-mu-return-stmt:error-too-few-inouts/disp32
23448
23449 (lookup *ebx *(ebx+4))
23450 (lookup *(eax+8) *(eax+0xc))
23451 89/<- %ecx 0/r32/eax
23452
23453 (lookup *edi *(edi+4))
23454 (lookup *(eax+8) *(eax+0xc))
23455
23456 81 7/subop/compare *(edi+0x10) 0/imm32/false
23457 {
23458 74/jump-if-= break/disp8
23459 (lookup *(eax+0xc) *(eax+0x10))
23460
23461 81 7/subop/compare *(eax+0xc) 0/imm32
23462 75/jump-if-!= break/disp8
23463 (lookup *(eax+4) *(eax+8))
23464 }
23465
23466 50/push-eax
23467 {
23468 (simple-mu-type? %eax 0)
23469 3d/compare-eax-and 0/imm32/false
23470 74/jump-if-= break/disp8
23471 (simple-mu-type? %ecx 0xf)
23472 3d/compare-eax-and 0/imm32/false
23473 0f 85/jump-if-!= $check-mu-return-stmt:error-literal-to-float/disp32
23474 }
23475 58/pop-to-eax
23476
23477 (type-match? %ecx %eax %edx)
23478 3d/compare-eax-and 0/imm32/false
23479 0f 84/jump-if-= $check-mu-return-stmt:error1/disp32
23480
23481 (register-within-list-with-conflict? %edi %esi %ebx *(ebp+8))
23482 3d/compare-eax-and 0/imm32/false
23483 0f 85/jump-if-!= $check-mu-return-stmt:error2/disp32
23484
23485 (lookup *(ebx+8) *(ebx+0xc))
23486 89/<- %ebx 0/r32/eax
23487
23488 (lookup *(edi+8) *(edi+0xc))
23489 89/<- %edi 0/r32/eax
23490
23491 e9/jump loop/disp32
23492 }
23493
23494 81 7/subop/compare %edi 0/imm32
23495 0f 85/jump-if-!= $check-mu-return-stmt:error-too-many-inouts/disp32
23496 $check-mu-return-stmt:end:
23497
23498 81 0/subop/add %esp 0x6c/imm32
23499
23500 5f/pop-to-edi
23501 5e/pop-to-esi
23502 5b/pop-to-ebx
23503 5a/pop-to-edx
23504 59/pop-to-ecx
23505 58/pop-to-eax
23506
23507 89/<- %esp 5/r32/ebp
23508 5d/pop-to-ebp
23509 c3/return
23510
23511 $check-mu-return-stmt:error1:
23512 (write-buffered *(ebp+0x10) "fn ")
23513 8b/-> *(ebp+0xc) 0/r32/eax
23514 (lookup *eax *(eax+4))
23515 (write-buffered *(ebp+0x10) %eax)
23516 (write-buffered *(ebp+0x10) ": return: '")
23517 (lookup *edi *(edi+4))
23518 (lookup *eax *(eax+4))
23519 (write-buffered *(ebp+0x10) %eax)
23520 (write-buffered *(ebp+0x10) "' has the wrong type\n")
23521 (flush *(ebp+0x10))
23522 (stop *(ebp+0x14) 1)
23523
23524
23525 $check-mu-return-stmt:error2:
23526 (write-buffered *(ebp+0x10) "fn ")
23527 8b/-> *(ebp+0xc) 0/r32/eax
23528 (lookup *eax *(eax+4))
23529 (write-buffered *(ebp+0x10) %eax)
23530 (write-buffered *(ebp+0x10) ": return: '")
23531 (lookup *edi *(edi+4))
23532 (lookup *eax *(eax+4))
23533 (write-buffered *(ebp+0x10) %eax)
23534 (write-buffered *(ebp+0x10) "' is no longer available\n")
23535 (flush *(ebp+0x10))
23536 (stop *(ebp+0x14) 1)
23537
23538
23539 $check-mu-return-stmt:error-literal-to-float:
23540 (write-buffered *(ebp+0x10) "fn ")
23541 8b/-> *(ebp+0xc) 0/r32/eax
23542 (lookup *eax *(eax+4))
23543 (write-buffered *(ebp+0x10) %eax)
23544 (write-buffered *(ebp+0x10) ": return: cannot copy literal '")
23545 (lookup *edi *(edi+4))
23546 (lookup *eax *(eax+4))
23547 (write-buffered *(ebp+0x10) %eax)
23548 (write-buffered *(ebp+0x10) "' to float\n")
23549 (flush *(ebp+0x10))
23550 (stop *(ebp+0x14) 1)
23551
23552
23553 $check-mu-return-stmt:error-too-few-inouts:
23554 (write-buffered *(ebp+0x10) "fn ")
23555 8b/-> *(ebp+0xc) 0/r32/eax
23556 (lookup *eax *(eax+4))
23557 (write-buffered *(ebp+0x10) %eax)
23558 (write-buffered *(ebp+0x10) ": return: too few inouts\n")
23559 (flush *(ebp+0x10))
23560 (stop *(ebp+0x14) 1)
23561
23562
23563 $check-mu-return-stmt:error-too-many-inouts:
23564 (write-buffered *(ebp+0x10) "fn ")
23565 8b/-> *(ebp+0xc) 0/r32/eax
23566 (lookup *eax *(eax+4))
23567 (write-buffered *(ebp+0x10) %eax)
23568 (write-buffered *(ebp+0x10) ": return: too many inouts\n")
23569 (flush *(ebp+0x10))
23570 (stop *(ebp+0x14) 1)
23571
23572
23573 check-all-unique-registers:
23574
23575 55/push-ebp
23576 89/<- %ebp 4/r32/esp
23577
23578 50/push-eax
23579 51/push-ecx
23580 56/push-esi
23581
23582 81 5/subop/subtract %esp 0x60/imm32
23583 68/push 0x60/imm32/size
23584 68/push 0/imm32/read
23585 68/push 0/imm32/write
23586 89/<- %esi 4/r32/esp
23587
23588 8b/-> *(ebp+8) 1/r32/ecx
23589 {
23590
23591 81 7/subop/compare %ecx 0/imm32
23592 0f 84/jump-if-= break/disp32
23593
23594 (lookup *ecx *(ecx+4))
23595 (lookup *(eax+0x18) *(eax+0x1c))
23596
23597 (maybe-get %esi %eax 0xc)
23598 3d/compare-eax-and 0/imm32
23599 0f 85/jump-if-!= $check-all-unique-registers:abort/disp32
23600
23601 (lookup *ecx *(ecx+4))
23602 (lookup *(eax+0x18) *(eax+0x1c))
23603 (get-or-insert %esi %eax 0xc Heap)
23604
23605 (lookup *(ecx+8) *(ecx+0xc))
23606 89/<- %ecx 0/r32/eax
23607 e9/jump loop/disp32
23608 }
23609 $check-all-unique-registers:end:
23610
23611 81 0/subop/add %esp 0x6c/imm32
23612
23613 5e/pop-to-esi
23614 59/pop-to-ecx
23615 58/pop-to-eax
23616
23617 89/<- %esp 5/r32/ebp
23618 5d/pop-to-ebp
23619 c3/return
23620
23621 $check-all-unique-registers:abort:
23622 (write-buffered *(ebp+0x10) "fn ")
23623 8b/-> *(ebp+0xc) 0/r32/eax
23624 (lookup *eax *(eax+4))
23625 (write-buffered *(ebp+0x10) %eax)
23626 (write-buffered *(ebp+0x10) ": outputs must be in unique registers\n")
23627 (flush *(ebp+0x10))
23628 (stop *(ebp+0x14) 1)
23629
23630
23631
23632
23633
23634 register-within-list-with-conflict?:
23635
23636 55/push-ebp
23637 89/<- %ebp 4/r32/esp
23638
23639 51/push-ecx
23640 52/push-edx
23641 53/push-ebx
23642 56/push-esi
23643 57/push-edi
23644
23645 8b/-> *(ebp+8) 0/r32/eax
23646 (lookup *eax *(eax+4))
23647 (lookup *(eax+0x18) *(eax+0x1c))
23648
23649
23650
23651
23652
23653 3d/compare-eax-and 0/imm32
23654 0f 84/jump-if-= $register-within-list-with-conflict?:end/disp32
23655 89/<- %ebx 0/r32/eax
23656
23657 8b/-> *(ebp+0xc) 1/r32/ecx
23658
23659 8b/-> *(ebp+0x10) 2/r32/edx
23660 {
23661
23662 81 7/subop/compare %edi 0/imm32
23663 0f 84/jump-if-= break/disp32
23664
23665 39/compare %ecx 2/r32/edx
23666 0f 84/jump-if-= break/disp32
23667
23668 (lookup *ecx *(ecx+4))
23669 (lookup *(eax+0x18) *(eax+0x1c))
23670
23671 3d/compare-eax-and 0/imm32
23672 74/jump-if-= $register-within-list-with-conflict?:continue/disp8
23673
23674 (string-equal? %eax %ebx)
23675 3d/compare-eax-and 0/imm32/false
23676 {
23677 74/jump-if-= break/disp8
23678
23679
23680
23681 8b/-> *(ebp+0x14) 0/r32/eax
23682 (lookup *(eax+0xc) *(eax+0x10))
23683 (register-conflict? %ebx %eax *(ebp+0xc))
23684 eb/jump $register-within-list-with-conflict?:end/disp8
23685 }
23686 $register-within-list-with-conflict?:continue:
23687
23688 (lookup *(ecx+8) *(ecx+0xc))
23689 89/<- %ecx 0/r32/eax
23690 e9/jump loop/disp32
23691 }
23692
23693 b8/copy-to-eax 0/imm32/false
23694 $register-within-list-with-conflict?:end:
23695
23696 5f/pop-to-edi
23697 5e/pop-to-esi
23698 5b/pop-to-ebx
23699 5a/pop-to-edx
23700 59/pop-to-ecx
23701
23702 89/<- %esp 5/r32/ebp
23703 5d/pop-to-ebp
23704 c3/return
23705
23706
23707
23708
23709
23710 register-conflict?:
23711
23712 55/push-ebp
23713 89/<- %ebp 4/r32/esp
23714
23715 51/push-ecx
23716 52/push-edx
23717 53/push-ebx
23718 56/push-esi
23719 57/push-edi
23720
23721
23722
23723
23724
23725 8b/-> *(ebp+0x10) 7/r32/edi
23726
23727 8b/-> *(ebp+0xc) 6/r32/esi
23728 {
23729
23730 81 7/subop/compare %edi 0/imm32
23731 0f 84/jump-if-= break/disp32
23732
23733 (lookup *edi *(edi+4))
23734 (lookup *(eax+0x18) *(eax+0x1c))
23735 (string-equal? %eax *(ebp+8))
23736 3d/compare-eax-and 0/imm32/false
23737 0f 84/jump-if= $register-conflict?:continue/disp32
23738
23739
23740
23741 (lookup *esi *(esi+4))
23742 (lookup *(eax+0x18) *(eax+0x1c))
23743
23744 3d/compare-eax-and 0/imm32
23745 {
23746 75/jump-if-!= break/disp8
23747
23748
23749 b8/copy-to-eax 1/imm32/true
23750 e9/jump $register-conflict?:end/disp32
23751 }
23752
23753 (string-equal? %eax *(ebp+8))
23754 3d/compare-eax-and 0/imm32/false
23755 0f 94/set-if-= %al
23756
23757
23758
23759
23760 eb/jump $register-conflict?:end/disp8
23761 $register-conflict?:continue:
23762
23763 (lookup *(edi+8) *(edi+0xc))
23764 89/<- %edi 0/r32/eax
23765
23766 (lookup *(esi+8) *(esi+0xc))
23767 89/<- %esi 0/r32/eax
23768 e9/jump loop/disp32
23769 }
23770
23771 (write-buffered Stderr "register-conflict? misused\n")
23772 (flush Stderr)
23773 e8/call syscall_exit/disp32
23774 $register-conflict?:end:
23775
23776 5f/pop-to-edi
23777 5e/pop-to-esi
23778 5b/pop-to-ebx
23779 5a/pop-to-edx
23780 59/pop-to-ecx
23781
23782 89/<- %esp 5/r32/ebp
23783 5d/pop-to-ebp
23784 c3/return
23785
23786 check-final-stmt-is-return:
23787
23788 55/push-ebp
23789 89/<- %ebp 4/r32/esp
23790
23791 50/push-eax
23792 51/push-ecx
23793
23794 8b/-> *(ebp+8) 0/r32/eax
23795 (lookup *(eax+4) *(eax+8))
23796 3d/compare-eax-and 0/imm32
23797 74/jump-if-= $check-final-stmt-is-return:error/disp8
23798 89/<- %ecx 0/r32/eax
23799 {
23800
23801 (lookup *(ecx+8) *(ecx+0xc))
23802 3d/compare-eax-and 0/imm32
23803 74/jump-if-= break/disp8
23804
23805 89/<- %ecx 0/r32/eax
23806 e9/jump loop/disp32
23807 }
23808 $check-final-stmt-is-return:check-tag:
23809
23810 (lookup *ecx *(ecx+4))
23811 81 7/subop/compare *eax 1/imm32/stmt1
23812 75/jump-if-!= $check-final-stmt-is-return:error/disp8
23813 $check-final-stmt-is-return:check-operation:
23814
23815 (lookup *(eax+4) *(eax+8))
23816 (string-equal? %eax "return")
23817 3d/compare-eax-and 0/imm32/false
23818 74/jump-if-= $check-final-stmt-is-return:error/disp8
23819 $check-final-stmt-is-return:end:
23820
23821 59/pop-to-ecx
23822 58/pop-to-eax
23823
23824 89/<- %esp 5/r32/ebp
23825 5d/pop-to-ebp
23826 c3/return
23827
23828 $check-final-stmt-is-return:error:
23829 (write-buffered *(ebp+0x10) "fn ")
23830 8b/-> *(ebp+0xc) 0/r32/eax
23831 (lookup *eax *(eax+4))
23832 (write-buffered *(ebp+0x10) %eax)
23833 (write-buffered *(ebp+0x10) ": final statement should be a 'return'\n")
23834 (flush *(ebp+0x10))
23835 (stop *(ebp+0x14) 1)
23836
23837
23838 check-no-breaks:
23839
23840 55/push-ebp
23841 89/<- %ebp 4/r32/esp
23842
23843 50/push-eax
23844 51/push-ecx
23845
23846 8b/-> *(ebp+8) 0/r32/eax
23847 (lookup *(eax+4) *(eax+8))
23848 3d/compare-eax-and 0/imm32
23849 0f 84/jump-if-= $check-no-breaks:end/disp32
23850 89/<- %ecx 0/r32/eax
23851 {
23852
23853 (lookup *(ecx+8) *(ecx+0xc))
23854 3d/compare-eax-and 0/imm32
23855 74/jump-if-= break/disp8
23856
23857 (lookup *ecx *(ecx+4))
23858 81 7/subop/compare *eax 1/imm32/stmt1
23859 75/jump-if-!= $check-no-breaks:continue/disp8
23860
23861 (lookup *(eax+4) *(eax+8))
23862 (string-starts-with? %eax "break")
23863 3d/compare-eax-and 0/imm32/false
23864 75/jump-if-!= $check-no-breaks:error/disp8
23865 $check-no-breaks:continue:
23866
23867 (lookup *(ecx+8) *(ecx+0xc))
23868 89/<- %ecx 0/r32/eax
23869 e9/jump loop/disp32
23870 }
23871 $check-no-breaks:end:
23872
23873 59/pop-to-ecx
23874 58/pop-to-eax
23875
23876 89/<- %esp 5/r32/ebp
23877 5d/pop-to-ebp
23878 c3/return
23879
23880 $check-no-breaks:error:
23881 (write-buffered *(ebp+0x10) "fn ")
23882 8b/-> *(ebp+0xc) 0/r32/eax
23883 (lookup *eax *(eax+4))
23884 (write-buffered *(ebp+0x10) %eax)
23885 (write-buffered *(ebp+0x10) " has outputs, so you cannot 'break' out of the outermost block. Use 'return'.\n")
23886 (flush *(ebp+0x10))
23887 (stop *(ebp+0x14) 1)
23888
23889
23890 check-mu-get-stmt:
23891
23892 55/push-ebp
23893 89/<- %ebp 4/r32/esp
23894
23895 50/push-eax
23896 51/push-ecx
23897 52/push-edx
23898 53/push-ebx
23899 56/push-esi
23900 57/push-edi
23901
23902 8b/-> *(ebp+8) 6/r32/esi
23903
23904
23905 (lookup *(esi+0xc) *(esi+0x10))
23906 3d/compare-eax-and 0/imm32/false
23907 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
23908 (lookup *eax *(eax+4))
23909 89/<- %ecx 0/r32/eax
23910 $check-mu-get-stmt:check-base:
23911
23912
23913
23914 (lookup *(ecx+8) *(ecx+0xc))
23915 89/<- %ebx 0/r32/eax
23916 {
23917 81 7/subop/compare *ebx 0/imm32/false
23918 0f 85/jump-if-!= break/disp32
23919 $check-mu-get-stmt:base-is-compound:
23920
23921 (lookup *(ebx+4) *(ebx+8))
23922 (simple-mu-type? %eax 2)
23923 3d/compare-eax-and 0/imm32/false
23924 74/jump-if-= break/disp8
23925 $check-mu-get-stmt:base-is-addr:
23926
23927 81 7/subop/compare *(ecx+0x18) 0/imm32
23928 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
23929 $check-mu-get-stmt:base-is-addr-in-register:
23930
23931 (lookup *(ebx+0xc) *(ebx+0x10))
23932 81 7/subop/compare *(eax+0xc) 0/imm32
23933 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
23934 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
23935 (lookup *(eax+4) *(eax+8))
23936 89/<- %ebx 0/r32/eax
23937 }
23938 $check-mu-get-stmt:check-base-typeinfo:
23939
23940 81 7/subop/compare *ebx 0/imm32/false
23941 {
23942 75/jump-if-!= break/disp8
23943 (lookup *(ebx+4) *(ebx+8))
23944 89/<- %ebx 0/r32/eax
23945 }
23946
23947 8b/-> *(ebx+4) 3/r32/ebx
23948 (container? %ebx)
23949 3d/compare-eax-and 0/imm32/false
23950 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
23951
23952
23953 68/push 0/imm32
23954 68/push 0/imm32
23955 89/<- %ecx 4/r32/esp
23956
23957 (find-typeinfo %ebx %ecx)
23958 (lookup *ecx *(ecx+4))
23959
23960 81 0/subop/add %esp 8/imm32
23961
23962 89/<- %edx 0/r32/eax
23963
23964 (lookup *(esi+0xc) *(esi+0x10))
23965 (lookup *(eax+8) *(eax+0xc))
23966 89/<- %ecx 0/r32/eax
23967
23968 3d/compare-eax-and 0/imm32/false
23969 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
23970
23971 (lookup *ecx *(ecx+4))
23972 89/<- %ecx 0/r32/eax
23973
23974 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
23975 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
23976
23977 (lookup *(esi+0xc) *(esi+0x10))
23978 (lookup *(eax+8) *(eax+0xc))
23979 (lookup *(eax+8) *(eax+0xc))
23980 3d/compare-eax-and 0/imm32/false
23981 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
23982
23983 (lookup *(esi+0x14) *(esi+0x18))
23984
23985 3d/compare-eax-and 0/imm32/false
23986 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
23987 (lookup *eax *(eax+4))
23988 89/<- %edi 0/r32/eax
23989 $check-mu-get-stmt:check-output-type:
23990
23991
23992 (lookup *(edi+0x18) *(edi+0x1c))
23993 3d/compare-eax-and 0/imm32
23994 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
23995
23996 (lookup *(edi+8) *(edi+0xc))
23997 81 7/subop/compare *eax 0/imm32/false
23998 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
23999
24000 (lookup *(eax+4) *(eax+8))
24001 (simple-mu-type? %eax 2)
24002 3d/compare-eax-and 0/imm32/false
24003 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
24004 $check-mu-get-stmt:check-output-type-match:
24005
24006 (lookup *(edi+8) *(edi+0xc))
24007 (lookup *(eax+0xc) *(eax+0x10))
24008
24009 81 7/subop/compare *(eax+0xc) 0/imm32/null
24010 {
24011 75/jump-if-!= break/disp8
24012 (lookup *(eax+4) *(eax+8))
24013 }
24014 89/<- %edi 0/r32/eax
24015
24016 (lookup *ecx *(ecx+4))
24017 89/<- %ecx 0/r32/eax
24018
24019 (lookup *(edx+4) *(edx+8))
24020 (get %eax %ecx 0x10)
24021
24022 (lookup *eax *(eax+4))
24023 (lookup *eax *(eax+4))
24024 (lookup *(eax+8) *(eax+0xc))
24025
24026 (type-equal? %edi %eax)
24027 3d/compare-eax-and 0/imm32/false
24028 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
24029
24030 (lookup *(esi+0x14) *(esi+0x18))
24031 (lookup *(eax+8) *(eax+0xc))
24032 3d/compare-eax-and 0/imm32/false
24033 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
24034 $check-mu-get-stmt:end:
24035
24036 5f/pop-to-edi
24037 5e/pop-to-esi
24038 5b/pop-to-ebx
24039 5a/pop-to-edx
24040 59/pop-to-ecx
24041 58/pop-to-eax
24042
24043 89/<- %esp 5/r32/ebp
24044 5d/pop-to-ebp
24045 c3/return
24046
24047 $check-mu-get-stmt:error-too-few-inouts:
24048 (write-buffered *(ebp+0x10) "fn ")
24049 8b/-> *(ebp+0xc) 0/r32/eax
24050 (lookup *eax *(eax+4))
24051 (write-buffered *(ebp+0x10) %eax)
24052 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
24053 (flush *(ebp+0x10))
24054 (stop *(ebp+0x14) 1)
24055
24056
24057 $check-mu-get-stmt:error-too-many-inouts:
24058 (write-buffered *(ebp+0x10) "fn ")
24059 8b/-> *(ebp+0xc) 0/r32/eax
24060 (lookup *eax *(eax+4))
24061 (write-buffered *(ebp+0x10) %eax)
24062 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
24063 (flush *(ebp+0x10))
24064 (stop *(ebp+0x14) 1)
24065
24066
24067 $check-mu-get-stmt:error-too-few-outputs:
24068 (write-buffered *(ebp+0x10) "fn ")
24069 8b/-> *(ebp+0xc) 0/r32/eax
24070 (lookup *eax *(eax+4))
24071 (write-buffered *(ebp+0x10) %eax)
24072 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
24073 (flush *(ebp+0x10))
24074 (stop *(ebp+0x14) 1)
24075
24076
24077 $check-mu-get-stmt:error-too-many-outputs:
24078 (write-buffered *(ebp+0x10) "fn ")
24079 8b/-> *(ebp+0xc) 0/r32/eax
24080 (lookup *eax *(eax+4))
24081 (write-buffered *(ebp+0x10) %eax)
24082 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
24083 (flush *(ebp+0x10))
24084 (stop *(ebp+0x14) 1)
24085
24086
24087 $check-mu-get-stmt:error-bad-base:
24088
24089 (write-buffered *(ebp+0x10) "fn ")
24090 8b/-> *(ebp+0xc) 0/r32/eax
24091 (lookup *eax *(eax+4))
24092 (write-buffered *(ebp+0x10) %eax)
24093 (write-buffered *(ebp+0x10) ": stmt get: var '")
24094 (lookup *(esi+0xc) *(esi+0x10))
24095 (lookup *eax *(eax+4))
24096 (lookup *eax *(eax+4))
24097 (write-buffered *(ebp+0x10) %eax)
24098 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
24099 (flush *(ebp+0x10))
24100 (stop *(ebp+0x14) 1)
24101
24102
24103 $check-mu-get-stmt:error-base-type-addr-but-not-register:
24104 (write-buffered *(ebp+0x10) "fn ")
24105 8b/-> *(ebp+0xc) 0/r32/eax
24106 (lookup *eax *(eax+4))
24107 (write-buffered *(ebp+0x10) %eax)
24108 (write-buffered *(ebp+0x10) ": stmt get: var '")
24109 (lookup *(esi+0xc) *(esi+0x10))
24110 (lookup *eax *(eax+4))
24111 (lookup *eax *(eax+4))
24112 (write-buffered *(ebp+0x10) %eax)
24113 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
24114 (flush *(ebp+0x10))
24115 (stop *(ebp+0x14) 1)
24116
24117
24118 $check-mu-get-stmt:error-bad-field:
24119
24120 (write-buffered *(ebp+0x10) "fn ")
24121 8b/-> *(ebp+0xc) 0/r32/eax
24122 (lookup *eax *(eax+4))
24123 (write-buffered *(ebp+0x10) %eax)
24124 (write-buffered *(ebp+0x10) ": stmt get: type '")
24125
24126 bf/copy-to-edi Type-id/imm32
24127 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
24128 {
24129 81 7/subop/compare %esi 0/imm32
24130 74/jump-if-= break/disp8
24131 (write-buffered *(ebp+0x10) %esi)
24132 }
24133
24134 (write-buffered *(ebp+0x10) "' has no member called '")
24135 (lookup *ecx *(ecx+4))
24136 (write-buffered *(ebp+0x10) %eax)
24137 (write-buffered *(ebp+0x10) "'\n")
24138 (flush *(ebp+0x10))
24139 (stop *(ebp+0x14) 1)
24140
24141
24142 $check-mu-get-stmt:error-output-not-in-register:
24143 (write-buffered *(ebp+0x10) "fn ")
24144 8b/-> *(ebp+0xc) 0/r32/eax
24145 (lookup *eax *(eax+4))
24146 (write-buffered *(ebp+0x10) %eax)
24147 (write-buffered *(ebp+0x10) ": stmt get: output '")
24148 (lookup *edi *(edi+4))
24149 (write-buffered *(ebp+0x10) %eax)
24150 (write-buffered *(ebp+0x10) "' is not in a register\n")
24151 (flush *(ebp+0x10))
24152 (stop *(ebp+0x14) 1)
24153
24154
24155 $check-mu-get-stmt:error-output-type-not-address:
24156 (write-buffered *(ebp+0x10) "fn ")
24157 8b/-> *(ebp+0xc) 0/r32/eax
24158 (lookup *eax *(eax+4))
24159 (write-buffered *(ebp+0x10) %eax)
24160 (write-buffered *(ebp+0x10) ": stmt get: output must be an addr\n")
24161 (flush *(ebp+0x10))
24162 (stop *(ebp+0x14) 1)
24163
24164
24165 $check-mu-get-stmt:error-bad-output-type:
24166 (write-buffered *(ebp+0x10) "fn ")
24167 8b/-> *(ebp+0xc) 0/r32/eax
24168 (lookup *eax *(eax+4))
24169 (write-buffered *(ebp+0x10) %eax)
24170 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
24171 (write-buffered *(ebp+0x10) %ecx)
24172 (write-buffered *(ebp+0x10) "' of type '")
24173 bf/copy-to-edi Type-id/imm32
24174 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
24175 {
24176 81 7/subop/compare %esi 0/imm32
24177 74/jump-if-= break/disp8
24178 (write-buffered *(ebp+0x10) %esi)
24179 }
24180 (write-buffered *(ebp+0x10) "'\n")
24181 (flush *(ebp+0x10))
24182 (stop *(ebp+0x14) 1)
24183
24184
24185 check-mu-index-stmt:
24186
24187 55/push-ebp
24188 89/<- %ebp 4/r32/esp
24189
24190 50/push-eax
24191 51/push-ecx
24192 52/push-edx
24193 53/push-ebx
24194 56/push-esi
24195 57/push-edi
24196
24197 8b/-> *(ebp+8) 6/r32/esi
24198
24199
24200 (lookup *(esi+0xc) *(esi+0x10))
24201 $check-mu-index-stmt:check-no-inouts:
24202 3d/compare-eax-and 0/imm32
24203 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
24204 (lookup *eax *(eax+4))
24205 89/<- %ecx 0/r32/eax
24206
24207
24208 (lookup *(ecx+8) *(ecx+0xc))
24209 89/<- %ebx 0/r32/eax
24210
24211 81 7/subop/compare *ebx 0/imm32/false
24212 {
24213 74/jump-if-= break/disp8
24214 (simple-mu-type? %ebx 3)
24215 3d/compare-eax-and 0/imm32/false
24216 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-atom-type/disp32
24217 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
24218 }
24219 $check-mu-index-stmt:base-is-compound:
24220
24221 {
24222 (lookup *(ebx+4) *(ebx+8))
24223 (simple-mu-type? %eax 2)
24224 3d/compare-eax-and 0/imm32/false
24225 75/jump-if-!= break/disp8
24226 (lookup *(ebx+4) *(ebx+8))
24227 (simple-mu-type? %eax 3)
24228 3d/compare-eax-and 0/imm32/false
24229 75/jump-if-!= break/disp8
24230 e9/jump $check-mu-index-stmt:error-base-non-array-type/disp32
24231 }
24232
24233 {
24234 (lookup *(ebx+4) *(ebx+8))
24235 (simple-mu-type? %eax 2)
24236 3d/compare-eax-and 0/imm32/false
24237 74/jump-if-= break/disp8
24238 $check-mu-index-stmt:base-is-addr:
24239 (lookup *(ebx+0xc) *(ebx+0x10))
24240 (lookup *(eax+4) *(eax+8))
24241 (simple-mu-type? %eax 3)
24242 3d/compare-eax-and 0/imm32/false
24243 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
24244 $check-mu-index-stmt:check-base-addr-is-register:
24245 81 7/subop/compare *(ecx+0x18) 0/imm32
24246 0f 84/jump-if-= $check-mu-index-stmt:error-base-address-array-type-on-stack/disp32
24247 }
24248
24249 {
24250 (lookup *(ebx+4) *(ebx+8))
24251 (simple-mu-type? %eax 3)
24252 3d/compare-eax-and 0/imm32/false
24253 74/jump-if-= break/disp8
24254 $check-mu-index-stmt:base-is-array:
24255 81 7/subop/compare *(ecx+0x18) 0/imm32
24256 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-type-in-register/disp32
24257 }
24258
24259 {
24260 (lookup *(ebx+4) *(ebx+8))
24261 (simple-mu-type? %eax 2)
24262 3d/compare-eax-and 0/imm32/false
24263 74/jump-if-= break/disp8
24264 (lookup *(ebx+0xc) *(ebx+0x10))
24265 89/<- %ebx 0/r32/eax
24266 }
24267
24268
24269 (lookup *(esi+0xc) *(esi+0x10))
24270 (lookup *(eax+8) *(eax+0xc))
24271 $check-mu-index-stmt:check-single-inout:
24272 3d/compare-eax-and 0/imm32
24273 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
24274 (lookup *eax *(eax+4))
24275 89/<- %ecx 0/r32/eax
24276
24277
24278 (lookup *(ecx+8) *(ecx+0xc))
24279 89/<- %edx 0/r32/eax
24280
24281 81 7/subop/compare *edx 0/imm32/false
24282 {
24283 74/jump-if-= break/disp8
24284 $check-mu-index-stmt:index-type-is-atom:
24285 (simple-mu-type? %edx 0)
24286 3d/compare-eax-and 0/imm32/false
24287 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
24288 (simple-mu-type? %edx 1)
24289 3d/compare-eax-and 0/imm32/false
24290 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
24291 (simple-mu-type? %edx 7)
24292 3d/compare-eax-and 0/imm32/false
24293 0f 85/jump-if-!= $check-mu-index-stmt:error-index-offset-atom-type/disp32
24294 e9/jump $check-mu-index-stmt:error-invalid-index-type/disp32
24295 }
24296
24297 {
24298 75/jump-if-!= break/disp8
24299 $check-mu-index-stmt:index-type-is-non-atom:
24300 (lookup *(edx+4) *(edx+8))
24301 (simple-mu-type? %eax 7)
24302 3d/compare-eax-and 0/imm32/false
24303 0f 84/jump-if-= $check-mu-index-stmt:error-invalid-index-type/disp32
24304 }
24305 $check-mu-index-stmt:index-type-done:
24306
24307 {
24308 (simple-mu-type? %edx 0)
24309 3d/compare-eax-and 0/imm32/false
24310 75/jump-if-!= break/disp8
24311 $check-mu-index-stmt:check-index-in-register:
24312 81 7/subop/compare *(ecx+0x18) 0/imm32
24313 0f 84/jump-if-= $check-mu-index-stmt:error-index-on-stack/disp32
24314 }
24315
24316 {
24317 (simple-mu-type? %edx 1)
24318 3d/compare-eax-and 0/imm32/false
24319 74/jump-if-= break/disp8
24320 $check-mu-index-stmt:check-index-can-be-int:
24321 (lookup *(esi+0xc) *(esi+0x10))
24322 (lookup *eax *(eax+4))
24323 (array-element-size %eax)
24324 3d/compare-eax-and 1/imm32
24325 74/jump-if-= break/disp8
24326 3d/compare-eax-and 2/imm32
24327 74/jump-if-= break/disp8
24328 3d/compare-eax-and 4/imm32
24329 74/jump-if-= break/disp8
24330 3d/compare-eax-and 8/imm32
24331 74/jump-if-= break/disp8
24332 e9/jump $check-mu-index-stmt:error-index-needs-offset/disp32
24333 }
24334
24335 (lookup *(esi+0xc) *(esi+0x10))
24336 (lookup *(eax+8) *(eax+0xc))
24337 (lookup *(eax+8) *(eax+0xc))
24338 3d/compare-eax-and 0/imm32/false
24339 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-inouts/disp32
24340
24341
24342 (lookup *(esi+0x14) *(esi+0x18))
24343 3d/compare-eax-and 0/imm32/false
24344 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-outputs/disp32
24345 (lookup *eax *(eax+4))
24346 89/<- %edi 0/r32/eax
24347
24348
24349 (lookup *(edi+8) *(edi+0xc))
24350 89/<- %edx 0/r32/eax
24351 81 7/subop/compare *edx 0/imm32/false
24352 0f 85/jump-if-!= $check-mu-index-stmt:error-output-type-not-address/disp32
24353
24354 (lookup *(edx+4) *(edx+8))
24355 (simple-mu-type? %eax 2)
24356 3d/compare-eax-and 0/imm32/false
24357 0f 84/jump-if-= $check-mu-index-stmt:error-output-type-not-address/disp32
24358
24359 (type-tail %ebx)
24360 89/<- %ebx 0/r32/eax
24361 (type-tail %edx)
24362 (type-equal? %ebx %eax)
24363 3d/compare-eax-and 0/imm32/false
24364 0f 84/jump-if-= $check-mu-index-stmt:error-bad-output-type/disp32
24365
24366 (lookup *(esi+0x14) *(esi+0x18))
24367 (lookup *(eax+8) *(eax+0xc))
24368 3d/compare-eax-and 0/imm32/false
24369 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-outputs/disp32
24370 $check-mu-index-stmt:end:
24371
24372 5f/pop-to-edi
24373 5e/pop-to-esi
24374 5b/pop-to-ebx
24375 5a/pop-to-edx
24376 59/pop-to-ecx
24377 58/pop-to-eax
24378
24379 89/<- %esp 5/r32/ebp
24380 5d/pop-to-ebp
24381 c3/return
24382
24383 $check-mu-index-stmt:error-base-non-array-type:
24384 (write-buffered *(ebp+0x10) "fn ")
24385 8b/-> *(ebp+0xc) 0/r32/eax
24386 (lookup *eax *(eax+4))
24387 (write-buffered *(ebp+0x10) %eax)
24388 (write-buffered *(ebp+0x10) ": stmt index: var '")
24389 (lookup *ecx *(ecx+4))
24390 (write-buffered *(ebp+0x10) %eax)
24391 (write-buffered *(ebp+0x10) "' is not an array\n")
24392 (flush *(ebp+0x10))
24393 (stop *(ebp+0x14) 1)
24394
24395
24396 $check-mu-index-stmt:error-base-array-atom-type:
24397 (write-buffered *(ebp+0x10) "fn ")
24398 8b/-> *(ebp+0xc) 0/r32/eax
24399 (lookup *eax *(eax+4))
24400 (write-buffered *(ebp+0x10) %eax)
24401 (write-buffered *(ebp+0x10) ": stmt index: array '")
24402 (lookup *ecx *(ecx+4))
24403 (write-buffered *(ebp+0x10) %eax)
24404 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
24405 (flush *(ebp+0x10))
24406 (stop *(ebp+0x14) 1)
24407
24408
24409 $check-mu-index-stmt:error-base-address-array-type-on-stack:
24410 (write-buffered *(ebp+0x10) "fn ")
24411 8b/-> *(ebp+0xc) 0/r32/eax
24412 (lookup *eax *(eax+4))
24413 (write-buffered *(ebp+0x10) %eax)
24414 (write-buffered *(ebp+0x10) ": stmt index: var '")
24415 (lookup *ecx *(ecx+4))
24416 (write-buffered *(ebp+0x10) %eax)
24417 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
24418 (flush *(ebp+0x10))
24419 (stop *(ebp+0x14) 1)
24420
24421
24422 $check-mu-index-stmt:error-base-array-type-in-register:
24423 (write-buffered *(ebp+0x10) "fn ")
24424 8b/-> *(ebp+0xc) 0/r32/eax
24425 (lookup *eax *(eax+4))
24426 (write-buffered *(ebp+0x10) %eax)
24427 (write-buffered *(ebp+0x10) ": stmt index: var '")
24428 (lookup *ecx *(ecx+4))
24429 (write-buffered *(ebp+0x10) %eax)
24430 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
24431 (flush *(ebp+0x10))
24432 (stop *(ebp+0x14) 1)
24433
24434
24435 $check-mu-index-stmt:error-too-few-inouts:
24436 (write-buffered *(ebp+0x10) "fn ")
24437 8b/-> *(ebp+0xc) 0/r32/eax
24438 (lookup *eax *(eax+4))
24439 (write-buffered *(ebp+0x10) %eax)
24440 (write-buffered *(ebp+0x10) ": stmt index: too few inouts (2 required)\n")
24441 (flush *(ebp+0x10))
24442 (stop *(ebp+0x14) 1)
24443
24444
24445 $check-mu-index-stmt:error-invalid-index-type:
24446 (write-buffered *(ebp+0x10) "fn ")
24447 8b/-> *(ebp+0xc) 0/r32/eax
24448 (lookup *eax *(eax+4))
24449 (write-buffered *(ebp+0x10) %eax)
24450 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
24451 (lookup *ecx *(ecx+4))
24452 (write-buffered *(ebp+0x10) %eax)
24453 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
24454 (flush *(ebp+0x10))
24455 (stop *(ebp+0x14) 1)
24456
24457
24458 $check-mu-index-stmt:error-index-offset-atom-type:
24459 (write-buffered *(ebp+0x10) "fn ")
24460 8b/-> *(ebp+0xc) 0/r32/eax
24461 (lookup *eax *(eax+4))
24462 (write-buffered *(ebp+0x10) %eax)
24463 (write-buffered *(ebp+0x10) ": stmt index: offset '")
24464 (lookup *ecx *(ecx+4))
24465 (write-buffered *(ebp+0x10) %eax)
24466 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
24467 (flush *(ebp+0x10))
24468 (stop *(ebp+0x14) 1)
24469
24470
24471 $check-mu-index-stmt:error-index-on-stack:
24472 (write-buffered *(ebp+0x10) "fn ")
24473 8b/-> *(ebp+0xc) 0/r32/eax
24474 (lookup *eax *(eax+4))
24475 (write-buffered *(ebp+0x10) %eax)
24476 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
24477 (lookup *ecx *(ecx+4))
24478 (write-buffered *(ebp+0x10) %eax)
24479 (write-buffered *(ebp+0x10) "' must be in a register\n")
24480 (flush *(ebp+0x10))
24481 (stop *(ebp+0x14) 1)
24482
24483
24484 $check-mu-index-stmt:error-index-needs-offset:
24485 (write-buffered *(ebp+0x10) "fn ")
24486 8b/-> *(ebp+0xc) 0/r32/eax
24487 (lookup *eax *(eax+4))
24488 (write-buffered *(ebp+0x10) %eax)
24489 (write-buffered *(ebp+0x10) ": stmt index: cannot take an int for array '")
24490 (lookup *(esi+0xc) *(esi+0x10))
24491 (lookup *eax *(eax+4))
24492 (lookup *eax *(eax+4))
24493 (write-buffered *(ebp+0x10) %eax)
24494 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
24495 (flush *(ebp+0x10))
24496 (stop *(ebp+0x14) 1)
24497
24498
24499 $check-mu-index-stmt:error-too-many-inouts:
24500 (write-buffered *(ebp+0x10) "fn ")
24501 8b/-> *(ebp+0xc) 0/r32/eax
24502 (lookup *eax *(eax+4))
24503 (write-buffered *(ebp+0x10) %eax)
24504 (write-buffered *(ebp+0x10) ": stmt index: too many inouts (2 required)\n")
24505 (flush *(ebp+0x10))
24506 (stop *(ebp+0x14) 1)
24507
24508
24509 $check-mu-index-stmt:error-too-few-outputs:
24510 (write-buffered *(ebp+0x10) "fn ")
24511 8b/-> *(ebp+0xc) 0/r32/eax
24512 (lookup *eax *(eax+4))
24513 (write-buffered *(ebp+0x10) %eax)
24514 (write-buffered *(ebp+0x10) ": stmt index: must have an output\n")
24515 (flush *(ebp+0x10))
24516 (stop *(ebp+0x14) 1)
24517
24518
24519 $check-mu-index-stmt:error-too-many-outputs:
24520 (write-buffered *(ebp+0x10) "fn ")
24521 8b/-> *(ebp+0xc) 0/r32/eax
24522 (lookup *eax *(eax+4))
24523 (write-buffered *(ebp+0x10) %eax)
24524 (write-buffered *(ebp+0x10) ": stmt index: too many outputs (1 required)\n")
24525 (flush *(ebp+0x10))
24526 (stop *(ebp+0x14) 1)
24527
24528
24529 $check-mu-index-stmt:error-output-not-in-register:
24530 (write-buffered *(ebp+0x10) "fn ")
24531 8b/-> *(ebp+0xc) 0/r32/eax
24532 (lookup *eax *(eax+4))
24533 (write-buffered *(ebp+0x10) %eax)
24534 (write-buffered *(ebp+0x10) ": stmt index: output '")
24535 (lookup *edi *(edi+4))
24536 (write-buffered *(ebp+0x10) %eax)
24537 (write-buffered *(ebp+0x10) "' is not in a register\n")
24538 (flush *(ebp+0x10))
24539 (stop *(ebp+0x14) 1)
24540
24541
24542 $check-mu-index-stmt:error-output-type-not-address:
24543 (write-buffered *(ebp+0x10) "fn ")
24544 8b/-> *(ebp+0xc) 0/r32/eax
24545 (lookup *eax *(eax+4))
24546 (write-buffered *(ebp+0x10) %eax)
24547 (write-buffered *(ebp+0x10) ": stmt index: output '")
24548 (lookup *edi *(edi+4))
24549 (write-buffered *(ebp+0x10) %eax)
24550 (write-buffered *(ebp+0x10) "' must be an addr\n")
24551 (flush *(ebp+0x10))
24552 (stop *(ebp+0x14) 1)
24553
24554
24555 $check-mu-index-stmt:error-bad-output-type:
24556 (write-buffered *(ebp+0x10) "fn ")
24557 8b/-> *(ebp+0xc) 0/r32/eax
24558 (lookup *eax *(eax+4))
24559 (write-buffered *(ebp+0x10) %eax)
24560 (write-buffered *(ebp+0x10) ": stmt index: output '")
24561 (lookup *edi *(edi+4))
24562 (write-buffered *(ebp+0x10) %eax)
24563 (write-buffered *(ebp+0x10) "' does not have the right type\n")
24564 (flush *(ebp+0x10))
24565 (stop *(ebp+0x14) 1)
24566
24567
24568 check-mu-length-stmt:
24569
24570 55/push-ebp
24571 89/<- %ebp 4/r32/esp
24572
24573 50/push-eax
24574 51/push-ecx
24575 52/push-edx
24576 53/push-ebx
24577 56/push-esi
24578 57/push-edi
24579
24580 8b/-> *(ebp+8) 6/r32/esi
24581
24582
24583 (lookup *(esi+0xc) *(esi+0x10))
24584 $check-mu-length-stmt:check-no-inouts:
24585 3d/compare-eax-and 0/imm32
24586 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-inouts/disp32
24587 (lookup *eax *(eax+4))
24588 89/<- %ecx 0/r32/eax
24589
24590
24591 (lookup *(ecx+8) *(ecx+0xc))
24592 89/<- %ebx 0/r32/eax
24593
24594 81 7/subop/compare *ebx 0/imm32/false
24595 {
24596 74/jump-if-= break/disp8
24597 (simple-mu-type? %ebx 3)
24598 3d/compare-eax-and 0/imm32/false
24599 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-atom-type/disp32
24600 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
24601 }
24602 $check-mu-length-stmt:base-is-compound:
24603
24604 {
24605 (lookup *(ebx+4) *(ebx+8))
24606 (simple-mu-type? %eax 2)
24607 3d/compare-eax-and 0/imm32/false
24608 75/jump-if-!= break/disp8
24609 (lookup *(ebx+4) *(ebx+8))
24610 (simple-mu-type? %eax 3)
24611 3d/compare-eax-and 0/imm32/false
24612 75/jump-if-!= break/disp8
24613 e9/jump $check-mu-length-stmt:error-base-non-array-type/disp32
24614 }
24615
24616 {
24617 (lookup *(ebx+4) *(ebx+8))
24618 (simple-mu-type? %eax 2)
24619 3d/compare-eax-and 0/imm32/false
24620 74/jump-if-= break/disp8
24621 $check-mu-length-stmt:base-is-addr:
24622 (lookup *(ebx+0xc) *(ebx+0x10))
24623 (lookup *(eax+4) *(eax+8))
24624 (simple-mu-type? %eax 3)
24625 3d/compare-eax-and 0/imm32/false
24626 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
24627 $check-mu-length-stmt:check-base-addr-is-register:
24628 81 7/subop/compare *(ecx+0x18) 0/imm32
24629 0f 84/jump-if-= $check-mu-length-stmt:error-base-address-array-type-on-stack/disp32
24630 }
24631
24632 {
24633 (lookup *(ebx+4) *(ebx+8))
24634 (simple-mu-type? %eax 3)
24635 3d/compare-eax-and 0/imm32/false
24636 74/jump-if-= break/disp8
24637 $check-mu-length-stmt:base-is-array:
24638 81 7/subop/compare *(ecx+0x18) 0/imm32
24639 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-type-in-register/disp32
24640 }
24641
24642 {
24643 (lookup *(ebx+4) *(ebx+8))
24644 (simple-mu-type? %eax 2)
24645 3d/compare-eax-and 0/imm32/false
24646 74/jump-if-= break/disp8
24647 (lookup *(ebx+0xc) *(ebx+0x10))
24648 89/<- %ebx 0/r32/eax
24649 }
24650
24651 (lookup *(esi+0xc) *(esi+0x10))
24652 (lookup *(eax+8) *(eax+0xc))
24653 3d/compare-eax-and 0/imm32/false
24654 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-inouts/disp32
24655
24656
24657 (lookup *(esi+0x14) *(esi+0x18))
24658 3d/compare-eax-and 0/imm32/false
24659 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-outputs/disp32
24660 (lookup *eax *(eax+4))
24661 89/<- %edi 0/r32/eax
24662
24663
24664 (lookup *(edi+8) *(edi+0xc))
24665 (simple-mu-type? %eax 1)
24666 3d/compare-eax-and 0/imm32/false
24667 0f 84/jump-if-= $check-mu-length-stmt:error-invalid-output-type/disp32
24668
24669 (lookup *(esi+0x14) *(esi+0x18))
24670 (lookup *(eax+8) *(eax+0xc))
24671 3d/compare-eax-and 0/imm32/false
24672 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-outputs/disp32
24673 $check-mu-length-stmt:end:
24674
24675 5f/pop-to-edi
24676 5e/pop-to-esi
24677 5b/pop-to-ebx
24678 5a/pop-to-edx
24679 59/pop-to-ecx
24680 58/pop-to-eax
24681
24682 89/<- %esp 5/r32/ebp
24683 5d/pop-to-ebp
24684 c3/return
24685
24686 $check-mu-length-stmt:error-base-non-array-type:
24687 (write-buffered *(ebp+0x10) "fn ")
24688 8b/-> *(ebp+0xc) 0/r32/eax
24689 (lookup *eax *(eax+4))
24690 (write-buffered *(ebp+0x10) %eax)
24691 (write-buffered *(ebp+0x10) ": stmt length: var '")
24692 (lookup *ecx *(ecx+4))
24693 (write-buffered *(ebp+0x10) %eax)
24694 (write-buffered *(ebp+0x10) "' is not an array\n")
24695 (flush *(ebp+0x10))
24696 (stop *(ebp+0x14) 1)
24697
24698
24699 $check-mu-length-stmt:error-base-array-atom-type:
24700 (write-buffered *(ebp+0x10) "fn ")
24701 8b/-> *(ebp+0xc) 0/r32/eax
24702 (lookup *eax *(eax+4))
24703 (write-buffered *(ebp+0x10) %eax)
24704 (write-buffered *(ebp+0x10) ": stmt length: array '")
24705 (lookup *ecx *(ecx+4))
24706 (write-buffered *(ebp+0x10) %eax)
24707 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
24708 (flush *(ebp+0x10))
24709 (stop *(ebp+0x14) 1)
24710
24711
24712 $check-mu-length-stmt:error-base-address-array-type-on-stack:
24713 (write-buffered *(ebp+0x10) "fn ")
24714 8b/-> *(ebp+0xc) 0/r32/eax
24715 (lookup *eax *(eax+4))
24716 (write-buffered *(ebp+0x10) %eax)
24717 (write-buffered *(ebp+0x10) ": stmt length: var '")
24718 (lookup *ecx *(ecx+4))
24719 (write-buffered *(ebp+0x10) %eax)
24720 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
24721 (flush *(ebp+0x10))
24722 (stop *(ebp+0x14) 1)
24723
24724
24725 $check-mu-length-stmt:error-base-array-type-in-register:
24726 (write-buffered *(ebp+0x10) "fn ")
24727 8b/-> *(ebp+0xc) 0/r32/eax
24728 (lookup *eax *(eax+4))
24729 (write-buffered *(ebp+0x10) %eax)
24730 (write-buffered *(ebp+0x10) ": stmt length: var '")
24731 (lookup *ecx *(ecx+4))
24732 (write-buffered *(ebp+0x10) %eax)
24733 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
24734 (flush *(ebp+0x10))
24735 (stop *(ebp+0x14) 1)
24736
24737
24738 $check-mu-length-stmt:error-too-few-inouts:
24739 (write-buffered *(ebp+0x10) "fn ")
24740 8b/-> *(ebp+0xc) 0/r32/eax
24741 (lookup *eax *(eax+4))
24742 (write-buffered *(ebp+0x10) %eax)
24743 (write-buffered *(ebp+0x10) ": stmt length: too few inouts (1 required)\n")
24744 (flush *(ebp+0x10))
24745 (stop *(ebp+0x14) 1)
24746
24747
24748 $check-mu-length-stmt:error-invalid-index-type:
24749 (write-buffered *(ebp+0x10) "fn ")
24750 8b/-> *(ebp+0xc) 0/r32/eax
24751 (lookup *eax *(eax+4))
24752 (write-buffered *(ebp+0x10) %eax)
24753 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
24754 (lookup *ecx *(ecx+4))
24755 (write-buffered *(ebp+0x10) %eax)
24756 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
24757 (flush *(ebp+0x10))
24758 (stop *(ebp+0x14) 1)
24759
24760
24761 $check-mu-length-stmt:error-index-offset-atom-type:
24762 (write-buffered *(ebp+0x10) "fn ")
24763 8b/-> *(ebp+0xc) 0/r32/eax
24764 (lookup *eax *(eax+4))
24765 (write-buffered *(ebp+0x10) %eax)
24766 (write-buffered *(ebp+0x10) ": stmt length: offset '")
24767 (lookup *ecx *(ecx+4))
24768 (write-buffered *(ebp+0x10) %eax)
24769 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
24770 (flush *(ebp+0x10))
24771 (stop *(ebp+0x14) 1)
24772
24773
24774 $check-mu-length-stmt:error-index-on-stack:
24775 (write-buffered *(ebp+0x10) "fn ")
24776 8b/-> *(ebp+0xc) 0/r32/eax
24777 (lookup *eax *(eax+4))
24778 (write-buffered *(ebp+0x10) %eax)
24779 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
24780 (lookup *ecx *(ecx+4))
24781 (write-buffered *(ebp+0x10) %eax)
24782 (write-buffered *(ebp+0x10) "' must be in a register\n")
24783 (flush *(ebp+0x10))
24784 (stop *(ebp+0x14) 1)
24785
24786
24787 $check-mu-length-stmt:error-index-needs-offset:
24788 (write-buffered *(ebp+0x10) "fn ")
24789 8b/-> *(ebp+0xc) 0/r32/eax
24790 (lookup *eax *(eax+4))
24791 (write-buffered *(ebp+0x10) %eax)
24792 (write-buffered *(ebp+0x10) ": stmt length: cannot take an int for array '")
24793 (lookup *(esi+0xc) *(esi+0x10))
24794 (lookup *eax *(eax+4))
24795 (lookup *eax *(eax+4))
24796 (write-buffered *(ebp+0x10) %eax)
24797 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
24798 (flush *(ebp+0x10))
24799 (stop *(ebp+0x14) 1)
24800
24801
24802 $check-mu-length-stmt:error-too-many-inouts:
24803 (write-buffered *(ebp+0x10) "fn ")
24804 8b/-> *(ebp+0xc) 0/r32/eax
24805 (lookup *eax *(eax+4))
24806 (write-buffered *(ebp+0x10) %eax)
24807 (write-buffered *(ebp+0x10) ": stmt length: too many inouts (1 required)\n")
24808 (flush *(ebp+0x10))
24809 (stop *(ebp+0x14) 1)
24810
24811
24812 $check-mu-length-stmt:error-too-few-outputs:
24813 (write-buffered *(ebp+0x10) "fn ")
24814 8b/-> *(ebp+0xc) 0/r32/eax
24815 (lookup *eax *(eax+4))
24816 (write-buffered *(ebp+0x10) %eax)
24817 (write-buffered *(ebp+0x10) ": stmt length: must have an output\n")
24818 (flush *(ebp+0x10))
24819 (stop *(ebp+0x14) 1)
24820
24821
24822 $check-mu-length-stmt:error-too-many-outputs:
24823 (write-buffered *(ebp+0x10) "fn ")
24824 8b/-> *(ebp+0xc) 0/r32/eax
24825 (lookup *eax *(eax+4))
24826 (write-buffered *(ebp+0x10) %eax)
24827 (write-buffered *(ebp+0x10) ": stmt length: too many outputs (1 required)\n")
24828 (flush *(ebp+0x10))
24829 (stop *(ebp+0x14) 1)
24830
24831
24832 $check-mu-length-stmt:error-output-not-in-register:
24833 (write-buffered *(ebp+0x10) "fn ")
24834 8b/-> *(ebp+0xc) 0/r32/eax
24835 (lookup *eax *(eax+4))
24836 (write-buffered *(ebp+0x10) %eax)
24837 (write-buffered *(ebp+0x10) ": stmt length: output '")
24838 (lookup *edi *(edi+4))
24839 (write-buffered *(ebp+0x10) %eax)
24840 (write-buffered *(ebp+0x10) "' is not in a register\n")
24841 (flush *(ebp+0x10))
24842 (stop *(ebp+0x14) 1)
24843
24844
24845 $check-mu-length-stmt:error-invalid-output-type:
24846 (write-buffered *(ebp+0x10) "fn ")
24847 8b/-> *(ebp+0xc) 0/r32/eax
24848 (lookup *eax *(eax+4))
24849 (write-buffered *(ebp+0x10) %eax)
24850 (write-buffered *(ebp+0x10) ": stmt length: output '")
24851 (lookup *edi *(edi+4))
24852 (write-buffered *(ebp+0x10) %eax)
24853 (write-buffered *(ebp+0x10) "' does not have the right type\n")
24854 (flush *(ebp+0x10))
24855 (stop *(ebp+0x14) 1)
24856
24857
24858 check-mu-compute-offset-stmt:
24859
24860 55/push-ebp
24861 89/<- %ebp 4/r32/esp
24862
24863 50/push-eax
24864 51/push-ecx
24865 52/push-edx
24866 53/push-ebx
24867 56/push-esi
24868 57/push-edi
24869
24870 8b/-> *(ebp+8) 6/r32/esi
24871
24872
24873 (lookup *(esi+0xc) *(esi+0x10))
24874 $check-mu-compute-offset-stmt:check-no-inouts:
24875 3d/compare-eax-and 0/imm32
24876 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
24877 (lookup *eax *(eax+4))
24878 89/<- %ecx 0/r32/eax
24879
24880
24881 (lookup *(ecx+8) *(ecx+0xc))
24882 89/<- %ebx 0/r32/eax
24883
24884 81 7/subop/compare *ebx 0/imm32/false
24885 {
24886 74/jump-if-= break/disp8
24887 (simple-mu-type? %ebx 3)
24888 3d/compare-eax-and 0/imm32/false
24889 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-base-array-atom-type/disp32
24890 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24891 }
24892 $check-mu-compute-offset-stmt:base-is-compound:
24893
24894 {
24895 (lookup *(ebx+4) *(ebx+8))
24896 (simple-mu-type? %eax 2)
24897 3d/compare-eax-and 0/imm32/false
24898 75/jump-if-!= break/disp8
24899 (lookup *(ebx+4) *(ebx+8))
24900 (simple-mu-type? %eax 3)
24901 3d/compare-eax-and 0/imm32/false
24902 75/jump-if-!= break/disp8
24903 e9/jump $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24904 }
24905
24906 {
24907 (lookup *(ebx+4) *(ebx+8))
24908 (simple-mu-type? %eax 2)
24909 3d/compare-eax-and 0/imm32/false
24910 74/jump-if-= break/disp8
24911 $check-mu-compute-offset-stmt:base-is-addr:
24912 (lookup *(ebx+0xc) *(ebx+0x10))
24913 (lookup *(eax+4) *(eax+8))
24914 (simple-mu-type? %eax 3)
24915 3d/compare-eax-and 0/imm32/false
24916 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24917 }
24918
24919 {
24920 (lookup *(ebx+4) *(ebx+8))
24921 (simple-mu-type? %eax 2)
24922 3d/compare-eax-and 0/imm32/false
24923 74/jump-if-= break/disp8
24924 (lookup *(ebx+0xc) *(ebx+0x10))
24925 89/<- %ebx 0/r32/eax
24926 }
24927
24928
24929 (lookup *(esi+0xc) *(esi+0x10))
24930 (lookup *(eax+8) *(eax+0xc))
24931 $check-mu-compute-offset-stmt:check-single-inout:
24932 3d/compare-eax-and 0/imm32
24933 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
24934 (lookup *eax *(eax+4))
24935 89/<- %ecx 0/r32/eax
24936
24937
24938 (lookup *(ecx+8) *(ecx+0xc))
24939 89/<- %edx 0/r32/eax
24940
24941 81 7/subop/compare *edx 0/imm32/false
24942 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
24943 {
24944 $check-mu-compute-offset-stmt:index-type-is-atom:
24945 (simple-mu-type? %edx 0)
24946 3d/compare-eax-and 0/imm32/false
24947 75/jump-if-!= break/disp8
24948 (simple-mu-type? %edx 1)
24949 3d/compare-eax-and 0/imm32/false
24950 75/jump-if-!= break/disp8
24951 e9/jump $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
24952 }
24953
24954 (lookup *(esi+0xc) *(esi+0x10))
24955 (lookup *(eax+8) *(eax+0xc))
24956 (lookup *(eax+8) *(eax+0xc))
24957 3d/compare-eax-and 0/imm32/false
24958 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-inouts/disp32
24959
24960
24961 (lookup *(esi+0x14) *(esi+0x18))
24962 3d/compare-eax-and 0/imm32/false
24963 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-outputs/disp32
24964 (lookup *eax *(eax+4))
24965 89/<- %edi 0/r32/eax
24966
24967
24968 (lookup *(edi+8) *(edi+0xc))
24969 89/<- %edx 0/r32/eax
24970 81 7/subop/compare *edx 0/imm32/false
24971 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
24972
24973 (lookup *(edx+4) *(edx+8))
24974 (simple-mu-type? %eax 7)
24975 3d/compare-eax-and 0/imm32/false
24976 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
24977
24978 (type-tail %ebx)
24979 89/<- %ebx 0/r32/eax
24980 (type-tail %edx)
24981 (type-equal? %ebx %eax)
24982 3d/compare-eax-and 0/imm32/false
24983 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-bad-output-type/disp32
24984
24985 (lookup *(esi+0x14) *(esi+0x18))
24986 (lookup *(eax+8) *(eax+0xc))
24987 3d/compare-eax-and 0/imm32/false
24988 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-outputs/disp32
24989 $check-mu-compute-offset-stmt:end:
24990
24991 5f/pop-to-edi
24992 5e/pop-to-esi
24993 5b/pop-to-ebx
24994 5a/pop-to-edx
24995 59/pop-to-ecx
24996 58/pop-to-eax
24997
24998 89/<- %esp 5/r32/ebp
24999 5d/pop-to-ebp
25000 c3/return
25001
25002 $check-mu-compute-offset-stmt:error-base-non-array-type:
25003 (write-buffered *(ebp+0x10) "fn ")
25004 8b/-> *(ebp+0xc) 0/r32/eax
25005 (lookup *eax *(eax+4))
25006 (write-buffered *(ebp+0x10) %eax)
25007 (write-buffered *(ebp+0x10) ": stmt compute-offset: var '")
25008 (lookup *ecx *(ecx+4))
25009 (write-buffered *(ebp+0x10) %eax)
25010 (write-buffered *(ebp+0x10) "' is not an array\n")
25011 (flush *(ebp+0x10))
25012 (stop *(ebp+0x14) 1)
25013
25014
25015 $check-mu-compute-offset-stmt:error-base-array-atom-type:
25016 (write-buffered *(ebp+0x10) "fn ")
25017 8b/-> *(ebp+0xc) 0/r32/eax
25018 (lookup *eax *(eax+4))
25019 (write-buffered *(ebp+0x10) %eax)
25020 (write-buffered *(ebp+0x10) ": stmt compute-offset: array '")
25021 (lookup *ecx *(ecx+4))
25022 (write-buffered *(ebp+0x10) %eax)
25023 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
25024 (flush *(ebp+0x10))
25025 (stop *(ebp+0x14) 1)
25026
25027
25028 $check-mu-compute-offset-stmt:error-too-few-inouts:
25029 (write-buffered *(ebp+0x10) "fn ")
25030 8b/-> *(ebp+0xc) 0/r32/eax
25031 (lookup *eax *(eax+4))
25032 (write-buffered *(ebp+0x10) %eax)
25033 (write-buffered *(ebp+0x10) ": stmt compute-offset: too few inouts (2 required)\n")
25034 (flush *(ebp+0x10))
25035 (stop *(ebp+0x14) 1)
25036
25037
25038 $check-mu-compute-offset-stmt:error-invalid-index-type:
25039 (write-buffered *(ebp+0x10) "fn ")
25040 8b/-> *(ebp+0xc) 0/r32/eax
25041 (lookup *eax *(eax+4))
25042 (write-buffered *(ebp+0x10) %eax)
25043 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
25044 (lookup *ecx *(ecx+4))
25045 (write-buffered *(ebp+0x10) %eax)
25046 (write-buffered *(ebp+0x10) "' must be an int\n")
25047 (flush *(ebp+0x10))
25048 (stop *(ebp+0x14) 1)
25049
25050
25051 $check-mu-compute-offset-stmt:error-index-offset-atom-type:
25052 (write-buffered *(ebp+0x10) "fn ")
25053 8b/-> *(ebp+0xc) 0/r32/eax
25054 (lookup *eax *(eax+4))
25055 (write-buffered *(ebp+0x10) %eax)
25056 (write-buffered *(ebp+0x10) ": stmt compute-offset: offset '")
25057 (lookup *ecx *(ecx+4))
25058 (write-buffered *(ebp+0x10) %eax)
25059 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
25060 (flush *(ebp+0x10))
25061 (stop *(ebp+0x14) 1)
25062
25063
25064 $check-mu-compute-offset-stmt:error-index-on-stack:
25065 (write-buffered *(ebp+0x10) "fn ")
25066 8b/-> *(ebp+0xc) 0/r32/eax
25067 (lookup *eax *(eax+4))
25068 (write-buffered *(ebp+0x10) %eax)
25069 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
25070 (lookup *ecx *(ecx+4))
25071 (write-buffered *(ebp+0x10) %eax)
25072 (write-buffered *(ebp+0x10) "' must be in a register\n")
25073 (flush *(ebp+0x10))
25074 (stop *(ebp+0x14) 1)
25075
25076
25077 $check-mu-compute-offset-stmt:error-too-many-inouts:
25078 (write-buffered *(ebp+0x10) "fn ")
25079 8b/-> *(ebp+0xc) 0/r32/eax
25080 (lookup *eax *(eax+4))
25081 (write-buffered *(ebp+0x10) %eax)
25082 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many inouts (2 required)\n")
25083 (flush *(ebp+0x10))
25084 (stop *(ebp+0x14) 1)
25085
25086
25087 $check-mu-compute-offset-stmt:error-too-few-outputs:
25088 (write-buffered *(ebp+0x10) "fn ")
25089 8b/-> *(ebp+0xc) 0/r32/eax
25090 (lookup *eax *(eax+4))
25091 (write-buffered *(ebp+0x10) %eax)
25092 (write-buffered *(ebp+0x10) ": stmt compute-offset: must have an output\n")
25093 (flush *(ebp+0x10))
25094 (stop *(ebp+0x14) 1)
25095
25096
25097 $check-mu-compute-offset-stmt:error-too-many-outputs:
25098 (write-buffered *(ebp+0x10) "fn ")
25099 8b/-> *(ebp+0xc) 0/r32/eax
25100 (lookup *eax *(eax+4))
25101 (write-buffered *(ebp+0x10) %eax)
25102 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many outputs (1 required)\n")
25103 (flush *(ebp+0x10))
25104 (stop *(ebp+0x14) 1)
25105
25106
25107 $check-mu-compute-offset-stmt:error-output-not-in-register:
25108 (write-buffered *(ebp+0x10) "fn ")
25109 8b/-> *(ebp+0xc) 0/r32/eax
25110 (lookup *eax *(eax+4))
25111 (write-buffered *(ebp+0x10) %eax)
25112 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
25113 (lookup *edi *(edi+4))
25114 (write-buffered *(ebp+0x10) %eax)
25115 (write-buffered *(ebp+0x10) "' is not in a register\n")
25116 (flush *(ebp+0x10))
25117 (stop *(ebp+0x14) 1)
25118
25119
25120 $check-mu-compute-offset-stmt:error-output-type-not-offset:
25121 (write-buffered *(ebp+0x10) "fn ")
25122 8b/-> *(ebp+0xc) 0/r32/eax
25123 (lookup *eax *(eax+4))
25124 (write-buffered *(ebp+0x10) %eax)
25125 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
25126 (lookup *edi *(edi+4))
25127 (write-buffered *(ebp+0x10) %eax)
25128 (write-buffered *(ebp+0x10) "' must be an offset\n")
25129 (flush *(ebp+0x10))
25130 (stop *(ebp+0x14) 1)
25131
25132
25133 $check-mu-compute-offset-stmt:error-bad-output-type:
25134 (write-buffered *(ebp+0x10) "fn ")
25135 8b/-> *(ebp+0xc) 0/r32/eax
25136 (lookup *eax *(eax+4))
25137 (write-buffered *(ebp+0x10) %eax)
25138 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
25139 (lookup *edi *(edi+4))
25140 (write-buffered *(ebp+0x10) %eax)
25141 (write-buffered *(ebp+0x10) "' does not have the right type\n")
25142 (flush *(ebp+0x10))
25143 (stop *(ebp+0x14) 1)
25144
25145
25146 check-mu-copy-object-stmt:
25147
25148 55/push-ebp
25149 89/<- %ebp 4/r32/esp
25150
25151 50/push-eax
25152 51/push-ecx
25153 53/push-ebx
25154 56/push-esi
25155 57/push-edi
25156
25157 8b/-> *(ebp+8) 6/r32/esi
25158 $check-mu-copy-object-stmt:check-for-output:
25159
25160 (lookup *(esi+0x14) *(esi+0x18))
25161 3d/compare-eax-and 0/imm32
25162 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-too-many-outputs/disp32
25163 $check-mu-copy-object-stmt:get-left:
25164
25165 (lookup *(esi+0xc) *(esi+0x10))
25166 89/<- %edi 0/r32/eax
25167
25168 3d/compare-eax-and 0/imm32
25169 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
25170 $check-mu-copy-object-stmt:get-src:
25171
25172 (lookup *(edi+8) *(edi+0xc))
25173 89/<- %esi 0/r32/eax
25174
25175 3d/compare-eax-and 0/imm32
25176 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
25177
25178 (lookup *(esi+8) *(esi+0xc))
25179 3d/compare-eax-and 0/imm32
25180 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
25181 $check-mu-copy-object-stmt:types:
25182
25183 (lookup *esi *(esi+4))
25184 (lookup *(eax+8) *(eax+0xc))
25185 89/<- %ecx 0/r32/eax
25186
25187 8b/-> *(esi+0x10) 0/r32/eax
25188 3d/compare-eax-and 0/imm32/false
25189 {
25190 74/jump-if-= break/disp8
25191 (lookup *(ecx+0xc) *(ecx+0x10))
25192
25193 81 7/subop/compare *(eax+0xc) 0/imm32
25194 {
25195 75/jump-if-!= break/disp8
25196 (lookup *(eax+4) *(eax+8))
25197 }
25198 89/<- %ecx 0/r32/eax
25199 }
25200
25201 (mu-addr-type? %ecx)
25202 3d/compare-eax-and 0/imm32/false
25203 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
25204
25205 (lookup *edi *(edi+4))
25206 (lookup *(eax+8) *(eax+0xc))
25207 89/<- %ebx 0/r32/eax
25208
25209 8b/-> *(edi+0x10) 0/r32/eax
25210 3d/compare-eax-and 0/imm32/false
25211 {
25212 74/jump-if-= break/disp8
25213 (lookup *(ebx+0xc) *(ebx+0x10))
25214
25215 81 7/subop/compare *(eax+0xc) 0/imm32
25216 {
25217 75/jump-if-!= break/disp8
25218 (lookup *(eax+4) *(eax+8))
25219 }
25220 89/<- %ebx 0/r32/eax
25221 }
25222
25223 (type-equal? %ecx %ebx)
25224 3d/compare-eax-and 0/imm32
25225 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
25226 $check-mu-copy-object-stmt:end:
25227
25228 5f/pop-to-edi
25229 5e/pop-to-esi
25230 5b/pop-to-ebx
25231 59/pop-to-ecx
25232 58/pop-to-eax
25233
25234 89/<- %esp 5/r32/ebp
25235 5d/pop-to-ebp
25236 c3/return
25237
25238 $check-mu-copy-object-stmt:error-incorrect-inouts:
25239 (write-buffered *(ebp+0x10) "fn ")
25240 8b/-> *(ebp+0xc) 0/r32/eax
25241 (lookup *eax *(eax+4))
25242 (write-buffered *(ebp+0x10) %eax)
25243 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must have two inouts\n")
25244 (flush *(ebp+0x10))
25245 (stop *(ebp+0x14) 1)
25246
25247
25248 $check-mu-copy-object-stmt:error-too-many-outputs:
25249 (write-buffered *(ebp+0x10) "fn ")
25250 8b/-> *(ebp+0xc) 0/r32/eax
25251 (lookup *eax *(eax+4))
25252 (write-buffered *(ebp+0x10) %eax)
25253 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must not have any outputs\n")
25254 (flush *(ebp+0x10))
25255 (stop *(ebp+0x14) 1)
25256
25257
25258 $check-mu-copy-object-stmt:error-invalid-types:
25259 (write-buffered *(ebp+0x10) "fn ")
25260 8b/-> *(ebp+0xc) 0/r32/eax
25261 (lookup *eax *(eax+4))
25262 (write-buffered *(ebp+0x10) %eax)
25263 (write-buffered *(ebp+0x10) ": stmt copy-object: two inouts with identical addr types expected\n")
25264 (flush *(ebp+0x10))
25265 (stop *(ebp+0x14) 1)
25266
25267
25268 check-mu-clear-object-stmt:
25269
25270 55/push-ebp
25271 89/<- %ebp 4/r32/esp
25272
25273 50/push-eax
25274 51/push-ecx
25275 53/push-ebx
25276 56/push-esi
25277 57/push-edi
25278
25279 8b/-> *(ebp+8) 6/r32/esi
25280 $check-mu-clear-object-stmt:check-for-output:
25281
25282 (lookup *(esi+0x14) *(esi+0x18))
25283 3d/compare-eax-and 0/imm32
25284 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-too-many-outputs/disp32
25285 $check-mu-clear-object-stmt:get-left:
25286
25287 (lookup *(esi+0xc) *(esi+0x10))
25288 89/<- %edi 0/r32/eax
25289
25290 3d/compare-eax-and 0/imm32
25291 0f 84/jump-if-= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
25292 $check-mu-clear-object-stmt:get-src:
25293
25294 (lookup *(edi+8) *(edi+0xc))
25295 3d/compare-eax-and 0/imm32
25296 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
25297 $check-mu-clear-object-stmt:types:
25298
25299 (lookup *edi *(edi+4))
25300 (lookup *(eax+8) *(eax+0xc))
25301 89/<- %ecx 0/r32/eax
25302
25303 8b/-> *(edi+0x10) 0/r32/eax
25304 3d/compare-eax-and 0/imm32/false
25305 {
25306 74/jump-if-= break/disp8
25307 (lookup *(ecx+0xc) *(ecx+0x10))
25308
25309 81 7/subop/compare *(eax+0xc) 0/imm32
25310 {
25311 75/jump-if-!= break/disp8
25312 (lookup *(eax+4) *(eax+8))
25313 }
25314 89/<- %ecx 0/r32/eax
25315 }
25316
25317 (mu-addr-type? %ecx)
25318 3d/compare-eax-and 0/imm32/false
25319 0f 84/jump-if-= $check-mu-clear-object-stmt:error-invalid-type/disp32
25320 $check-mu-clear-object-stmt:end:
25321
25322 5f/pop-to-edi
25323 5e/pop-to-esi
25324 5b/pop-to-ebx
25325 59/pop-to-ecx
25326 58/pop-to-eax
25327
25328 89/<- %esp 5/r32/ebp
25329 5d/pop-to-ebp
25330 c3/return
25331
25332 $check-mu-clear-object-stmt:error-incorrect-inouts:
25333 (write-buffered *(ebp+0x10) "fn ")
25334 8b/-> *(ebp+0xc) 0/r32/eax
25335 (lookup *eax *(eax+4))
25336 (write-buffered *(ebp+0x10) %eax)
25337 (write-buffered *(ebp+0x10) ": stmt 'clear-object' must have a single inout\n")
25338 (flush *(ebp+0x10))
25339 (stop *(ebp+0x14) 1)
25340
25341
25342 $check-mu-clear-object-stmt:error-too-many-outputs:
25343 (write-buffered *(ebp+0x10) "fn ")
25344 8b/-> *(ebp+0xc) 0/r32/eax
25345 (lookup *eax *(eax+4))
25346 (write-buffered *(ebp+0x10) %eax)
25347 (write-buffered *(ebp+0x10) ": stmt 'clear-object' must not have any outputs\n")
25348 (flush *(ebp+0x10))
25349 (stop *(ebp+0x14) 1)
25350
25351
25352 $check-mu-clear-object-stmt:error-invalid-type:
25353 (write-buffered *(ebp+0x10) "fn ")
25354 8b/-> *(ebp+0xc) 0/r32/eax
25355 (lookup *eax *(eax+4))
25356 (write-buffered *(ebp+0x10) %eax)
25357 (write-buffered *(ebp+0x10) ": stmt clear-object: inout must have an addr type\n")
25358 (flush *(ebp+0x10))
25359 (stop *(ebp+0x14) 1)
25360
25361
25362 check-mu-allocate-stmt:
25363
25364 55/push-ebp
25365 89/<- %ebp 4/r32/esp
25366
25367 50/push-eax
25368 53/push-ebx
25369 56/push-esi
25370 57/push-edi
25371
25372 8b/-> *(ebp+8) 6/r32/esi
25373 $check-mu-allocate-stmt:check-for-output:
25374
25375 (lookup *(esi+0x14) *(esi+0x18))
25376 3d/compare-eax-and 0/imm32
25377 0f 85/jump-if-!= $check-mu-allocate-stmt:error-too-many-outputs/disp32
25378 $check-mu-allocate-stmt:get-target:
25379
25380 (lookup *(esi+0xc) *(esi+0x10))
25381 89/<- %edi 0/r32/eax
25382
25383 3d/compare-eax-and 0/imm32
25384 0f 84/jump-if-= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
25385
25386 (lookup *(edi+8) *(edi+0xc))
25387 3d/compare-eax-and 0/imm32
25388 0f 85/jump-if-!= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
25389 $check-mu-allocate-stmt:check-type:
25390
25391 (lookup *edi *(edi+4))
25392 (lookup *(eax+8) *(eax+0xc))
25393 89/<- %ebx 0/r32/eax
25394
25395 8b/-> *(edi+0x10) 0/r32/eax
25396 3d/compare-eax-and 0/imm32/false
25397 {
25398 74/jump-if-= break/disp8
25399 (lookup *(ebx+0xc) *(ebx+0x10))
25400
25401 81 7/subop/compare *(eax+0xc) 0/imm32
25402 {
25403 75/jump-if-!= break/disp8
25404 (lookup *(eax+4) *(eax+8))
25405 }
25406 89/<- %ebx 0/r32/eax
25407 }
25408
25409 (mu-addr-type? %ebx)
25410 3d/compare-eax-and 0/imm32/false
25411 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
25412
25413 (lookup *(ebx+0xc) *(ebx+0x10))
25414 81 7/subop/compare *eax 0/imm32/false
25415 0f 85/jump-if-!= $check-mu-allocate-stmt:error-invalid-type/disp32
25416
25417 (lookup *(eax+4) *(eax+8))
25418 (simple-mu-type? %eax 4)
25419 3d/compare-eax-and 0/imm32/false
25420 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
25421 $check-mu-allocate-stmt:end:
25422
25423 5f/pop-to-edi
25424 5e/pop-to-esi
25425 5b/pop-to-ebx
25426 58/pop-to-eax
25427
25428 89/<- %esp 5/r32/ebp
25429 5d/pop-to-ebp
25430 c3/return
25431
25432 $check-mu-allocate-stmt:error-incorrect-inouts:
25433 (write-buffered *(ebp+0x10) "fn ")
25434 8b/-> *(ebp+0xc) 0/r32/eax
25435 (lookup *eax *(eax+4))
25436 (write-buffered *(ebp+0x10) %eax)
25437 (write-buffered *(ebp+0x10) ": stmt 'allocate' must have a single inout\n")
25438 (flush *(ebp+0x10))
25439 (stop *(ebp+0x14) 1)
25440
25441
25442 $check-mu-allocate-stmt:error-too-many-outputs:
25443 (write-buffered *(ebp+0x10) "fn ")
25444 8b/-> *(ebp+0xc) 0/r32/eax
25445 (lookup *eax *(eax+4))
25446 (write-buffered *(ebp+0x10) %eax)
25447 (write-buffered *(ebp+0x10) ": stmt 'allocate' must not have any outputs\n")
25448 (flush *(ebp+0x10))
25449 (stop *(ebp+0x14) 1)
25450
25451
25452 $check-mu-allocate-stmt:error-invalid-type:
25453 (write-buffered *(ebp+0x10) "fn ")
25454 8b/-> *(ebp+0xc) 0/r32/eax
25455 (lookup *eax *(eax+4))
25456 (write-buffered *(ebp+0x10) %eax)
25457 (write-buffered *(ebp+0x10) ": stmt allocate: inout '")
25458 (lookup *edi *(edi+4))
25459 (lookup *eax *(eax+4))
25460 (write-buffered *(ebp+0x10) %eax)
25461 (write-buffered *(ebp+0x10) "' must have type (addr handle ...)\n")
25462 (flush *(ebp+0x10))
25463 (stop *(ebp+0x14) 1)
25464
25465
25466 check-mu-populate-stmt:
25467
25468 55/push-ebp
25469 89/<- %ebp 4/r32/esp
25470
25471 50/push-eax
25472 53/push-ebx
25473 56/push-esi
25474 57/push-edi
25475
25476 8b/-> *(ebp+8) 6/r32/esi
25477 $check-mu-populate-stmt:check-for-output:
25478
25479 (lookup *(esi+0x14) *(esi+0x18))
25480 3d/compare-eax-and 0/imm32
25481 0f 85/jump-if-!= $check-mu-populate-stmt:error-too-many-outputs/disp32
25482 $check-mu-populate-stmt:get-target:
25483
25484 (lookup *(esi+0xc) *(esi+0x10))
25485 89/<- %edi 0/r32/eax
25486
25487 3d/compare-eax-and 0/imm32
25488 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25489 $check-mu-populate-stmt:get-length:
25490
25491 (lookup *(edi+8) *(edi+0xc))
25492 89/<- %esi 0/r32/eax
25493
25494 3d/compare-eax-and 0/imm32
25495 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25496
25497 (lookup *(esi+8) *(esi+0xc))
25498 3d/compare-eax-and 0/imm32
25499 0f 85/jump-if-!= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25500 $check-mu-populate-stmt:check-target-type:
25501
25502 (lookup *edi *(edi+4))
25503 (lookup *(eax+8) *(eax+0xc))
25504 89/<- %ebx 0/r32/eax
25505 $check-mu-populate-stmt:check-target-type-deref:
25506
25507 8b/-> *(edi+0x10) 0/r32/eax
25508 3d/compare-eax-and 0/imm32/false
25509 {
25510 74/jump-if-= break/disp8
25511 (lookup *(ebx+0xc) *(ebx+0x10))
25512
25513 81 7/subop/compare *(eax+0xc) 0/imm32
25514 {
25515 75/jump-if-!= break/disp8
25516 (lookup *(eax+4) *(eax+8))
25517 }
25518 89/<- %ebx 0/r32/eax
25519 }
25520 $check-mu-populate-stmt:check-target-type-addr:
25521
25522 (mu-addr-type? %ebx)
25523 3d/compare-eax-and 0/imm32/false
25524 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25525
25526 (lookup *(ebx+0xc) *(ebx+0x10))
25527 89/<- %ebx 0/r32/eax
25528 81 7/subop/compare *ebx 0/imm32/false
25529 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
25530 $check-mu-populate-stmt:check-target-type-handle:
25531
25532 (lookup *(ebx+4) *(ebx+8))
25533 (simple-mu-type? %eax 4)
25534 3d/compare-eax-and 0/imm32/false
25535 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25536
25537 (lookup *(ebx+0xc) *(ebx+0x10))
25538 89/<- %ebx 0/r32/eax
25539 81 7/subop/compare *ebx 0/imm32/false
25540 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
25541 $check-mu-populate-stmt:check-target-type-array:
25542
25543 (lookup *(ebx+4) *(ebx+8))
25544 (simple-mu-type? %eax 3)
25545 3d/compare-eax-and 0/imm32/false
25546 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25547 $check-mu-populate-stmt:check-length-type:
25548 (lookup *esi *(esi+4))
25549 (lookup *(eax+8) *(eax+0xc))
25550 89/<- %ebx 0/r32/eax
25551 (simple-mu-type? %ebx 0)
25552 3d/compare-eax-and 0/imm32/false
25553 75/jump-if-!= $check-mu-populate-stmt:end/disp8
25554 (simple-mu-type? %ebx 1)
25555 3d/compare-eax-and 0/imm32/false
25556 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-length-type/disp32
25557 $check-mu-populate-stmt:end:
25558
25559 5f/pop-to-edi
25560 5e/pop-to-esi
25561 5b/pop-to-ebx
25562 58/pop-to-eax
25563
25564 89/<- %esp 5/r32/ebp
25565 5d/pop-to-ebp
25566 c3/return
25567
25568 $check-mu-populate-stmt:error-incorrect-inouts:
25569 (write-buffered *(ebp+0x10) "fn ")
25570 8b/-> *(ebp+0xc) 0/r32/eax
25571 (lookup *eax *(eax+4))
25572 (write-buffered *(ebp+0x10) %eax)
25573 (write-buffered *(ebp+0x10) ": stmt 'populate' must have two inouts\n")
25574 (flush *(ebp+0x10))
25575 (stop *(ebp+0x14) 1)
25576
25577
25578 $check-mu-populate-stmt:error-too-many-outputs:
25579 (write-buffered *(ebp+0x10) "fn ")
25580 8b/-> *(ebp+0xc) 0/r32/eax
25581 (lookup *eax *(eax+4))
25582 (write-buffered *(ebp+0x10) %eax)
25583 (write-buffered *(ebp+0x10) ": stmt 'populate' must not have any outputs\n")
25584 (flush *(ebp+0x10))
25585 (stop *(ebp+0x14) 1)
25586
25587
25588 $check-mu-populate-stmt:error-invalid-target-type:
25589 (write-buffered *(ebp+0x10) "fn ")
25590 8b/-> *(ebp+0xc) 0/r32/eax
25591 (lookup *eax *(eax+4))
25592 (write-buffered *(ebp+0x10) %eax)
25593 (write-buffered *(ebp+0x10) ": stmt populate: first inout '")
25594 (lookup *edi *(edi+4))
25595 (lookup *eax *(eax+4))
25596 (write-buffered *(ebp+0x10) %eax)
25597 (write-buffered *(ebp+0x10) "' must have type (addr handle array ...)\n")
25598 (flush *(ebp+0x10))
25599 (stop *(ebp+0x14) 1)
25600
25601
25602 $check-mu-populate-stmt:error-invalid-length-type:
25603 (write-buffered *(ebp+0x10) "fn ")
25604 8b/-> *(ebp+0xc) 0/r32/eax
25605 (lookup *eax *(eax+4))
25606 (write-buffered *(ebp+0x10) %eax)
25607 (write-buffered *(ebp+0x10) ": stmt populate: second inout '")
25608 (lookup *esi *(esi+4))
25609 (lookup *eax *(eax+4))
25610 (write-buffered *(ebp+0x10) %eax)
25611 (write-buffered *(ebp+0x10) "' must be an int\n")
25612 (flush *(ebp+0x10))
25613 (stop *(ebp+0x14) 1)
25614
25615
25616 check-mu-populate-stream-stmt:
25617
25618 55/push-ebp
25619 89/<- %ebp 4/r32/esp
25620
25621 50/push-eax
25622 53/push-ebx
25623 56/push-esi
25624 57/push-edi
25625
25626 8b/-> *(ebp+8) 6/r32/esi
25627 $check-mu-populate-stream-stmt:check-for-output:
25628
25629 (lookup *(esi+0x14) *(esi+0x18))
25630 3d/compare-eax-and 0/imm32
25631 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-too-many-outputs/disp32
25632 $check-mu-populate-stream-stmt:get-target:
25633
25634 (lookup *(esi+0xc) *(esi+0x10))
25635 89/<- %edi 0/r32/eax
25636
25637 3d/compare-eax-and 0/imm32
25638 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25639 $check-mu-populate-stream-stmt:get-length:
25640
25641 (lookup *(edi+8) *(edi+0xc))
25642 89/<- %esi 0/r32/eax
25643
25644 3d/compare-eax-and 0/imm32
25645 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25646
25647 (lookup *(esi+8) *(esi+0xc))
25648 3d/compare-eax-and 0/imm32
25649 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25650 $check-mu-populate-stream-stmt:check-target-type:
25651
25652 (lookup *edi *(edi+4))
25653 (lookup *(eax+8) *(eax+0xc))
25654 89/<- %ebx 0/r32/eax
25655 $check-mu-populate-stream-stmt:check-target-type-deref:
25656
25657 8b/-> *(edi+0x10) 0/r32/eax
25658 3d/compare-eax-and 0/imm32/false
25659 {
25660 74/jump-if-= break/disp8
25661 (lookup *(ebx+0xc) *(ebx+0x10))
25662
25663 81 7/subop/compare *(eax+0xc) 0/imm32
25664 {
25665 75/jump-if-!= break/disp8
25666 (lookup *(eax+4) *(eax+8))
25667 }
25668 89/<- %ebx 0/r32/eax
25669 }
25670 $check-mu-populate-stream-stmt:check-target-type-addr:
25671
25672 (mu-addr-type? %ebx)
25673 3d/compare-eax-and 0/imm32/false
25674 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25675
25676 (lookup *(ebx+0xc) *(ebx+0x10))
25677 89/<- %ebx 0/r32/eax
25678 81 7/subop/compare *ebx 0/imm32/false
25679 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25680 $check-mu-populate-stream-stmt:check-target-type-handle:
25681
25682 (lookup *(ebx+4) *(ebx+8))
25683 (simple-mu-type? %eax 4)
25684 3d/compare-eax-and 0/imm32/false
25685 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25686
25687 (lookup *(ebx+0xc) *(ebx+0x10))
25688 89/<- %ebx 0/r32/eax
25689 81 7/subop/compare *ebx 0/imm32/false
25690 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25691 $check-mu-populate-stream-stmt:check-target-type-stream:
25692
25693 (lookup *(ebx+4) *(ebx+8))
25694 (simple-mu-type? %eax 0xb)
25695 3d/compare-eax-and 0/imm32/false
25696 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25697 $check-mu-populate-stream-stmt:check-length-type:
25698 (lookup *esi *(esi+4))
25699 (lookup *(eax+8) *(eax+0xc))
25700 89/<- %ebx 0/r32/eax
25701 (simple-mu-type? %ebx 0)
25702 3d/compare-eax-and 0/imm32/false
25703 75/jump-if-!= $check-mu-populate-stream-stmt:end/disp8
25704 (simple-mu-type? %ebx 1)
25705 3d/compare-eax-and 0/imm32/false
25706 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-length-type/disp32
25707 $check-mu-populate-stream-stmt:end:
25708
25709 5f/pop-to-edi
25710 5e/pop-to-esi
25711 5b/pop-to-ebx
25712 58/pop-to-eax
25713
25714 89/<- %esp 5/r32/ebp
25715 5d/pop-to-ebp
25716 c3/return
25717
25718 $check-mu-populate-stream-stmt:error-incorrect-inouts:
25719 (write-buffered *(ebp+0x10) "fn ")
25720 8b/-> *(ebp+0xc) 0/r32/eax
25721 (lookup *eax *(eax+4))
25722 (write-buffered *(ebp+0x10) %eax)
25723 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must have two inouts\n")
25724 (flush *(ebp+0x10))
25725 (stop *(ebp+0x14) 1)
25726
25727
25728 $check-mu-populate-stream-stmt:error-too-many-outputs:
25729 (write-buffered *(ebp+0x10) "fn ")
25730 8b/-> *(ebp+0xc) 0/r32/eax
25731 (lookup *eax *(eax+4))
25732 (write-buffered *(ebp+0x10) %eax)
25733 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must not have any outputs\n")
25734 (flush *(ebp+0x10))
25735 (stop *(ebp+0x14) 1)
25736
25737
25738 $check-mu-populate-stream-stmt:error-invalid-target-type:
25739 (write-buffered *(ebp+0x10) "fn ")
25740 8b/-> *(ebp+0xc) 0/r32/eax
25741 (lookup *eax *(eax+4))
25742 (write-buffered *(ebp+0x10) %eax)
25743 (write-buffered *(ebp+0x10) ": stmt populate-stream: first inout '")
25744 (lookup *edi *(edi+4))
25745 (lookup *eax *(eax+4))
25746 (write-buffered *(ebp+0x10) %eax)
25747 (write-buffered *(ebp+0x10) "' must have type (addr handle stream ...)\n")
25748 (flush *(ebp+0x10))
25749 (stop *(ebp+0x14) 1)
25750
25751
25752 $check-mu-populate-stream-stmt:error-invalid-length-type:
25753 (write-buffered *(ebp+0x10) "fn ")
25754 8b/-> *(ebp+0xc) 0/r32/eax
25755 (lookup *eax *(eax+4))
25756 (write-buffered *(ebp+0x10) %eax)
25757 (write-buffered *(ebp+0x10) ": stmt populate-stream: second inout '")
25758 (lookup *esi *(esi+4))
25759 (lookup *eax *(eax+4))
25760 (write-buffered *(ebp+0x10) %eax)
25761 (write-buffered *(ebp+0x10) "' must be an int\n")
25762 (flush *(ebp+0x10))
25763 (stop *(ebp+0x14) 1)
25764
25765
25766 check-mu-read-from-stream-stmt:
25767
25768 55/push-ebp
25769 89/<- %ebp 4/r32/esp
25770
25771 50/push-eax
25772 51/push-ecx
25773 52/push-edx
25774 53/push-ebx
25775 56/push-esi
25776 57/push-edi
25777
25778 8b/-> *(ebp+8) 6/r32/esi
25779
25780
25781 (lookup *(esi+0xc) *(esi+0x10))
25782 $check-mu-read-from-stream-stmt:check-no-inouts:
25783 3d/compare-eax-and 0/imm32
25784 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
25785 (lookup *eax *(eax+4))
25786 89/<- %ecx 0/r32/eax
25787
25788
25789 (lookup *(ecx+8) *(ecx+0xc))
25790 89/<- %ebx 0/r32/eax
25791 $check-mu-read-from-stream-stmt:check-base-is-compound:
25792
25793 81 7/subop/compare *ebx 0/imm32/false
25794 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25795 $check-mu-read-from-stream-stmt:check-base-is-addr:
25796
25797 (lookup *(ebx+4) *(ebx+8))
25798 (simple-mu-type? %eax 2)
25799 3d/compare-eax-and 0/imm32/false
25800 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25801 $check-mu-read-from-stream-stmt:check-base-is-addr-to-stream:
25802
25803 (lookup *(ebx+0xc) *(ebx+0x10))
25804 89/<- %ebx 0/r32/eax
25805
25806 (lookup *(eax+4) *(eax+8))
25807 (simple-mu-type? %eax 0xb)
25808 3d/compare-eax-and 0/imm32/false
25809 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25810
25811
25812 (lookup *(esi+0xc) *(esi+0x10))
25813 (lookup *(eax+8) *(eax+0xc))
25814 $check-mu-read-from-stream-stmt:check-single-inout:
25815 3d/compare-eax-and 0/imm32
25816 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
25817 (lookup *eax *(eax+4))
25818 89/<- %ecx 0/r32/eax
25819
25820 (lookup *(ecx+8) *(ecx+0xc))
25821 89/<- %edx 0/r32/eax
25822
25823 $check-mu-read-from-stream-stmt:check-target-is-compound:
25824 81 7/subop/compare *edx 0/imm32/false
25825 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
25826 $check-mu-read-from-stream-stmt:check-target-type:
25827
25828 (lookup *(edx+4) *(edx+8))
25829 (simple-mu-type? %eax 2)
25830 3d/compare-eax-and 0/imm32/false
25831 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
25832
25833 (type-tail %ebx)
25834 89/<- %ebx 0/r32/eax
25835 (type-tail %edx)
25836 (type-equal? %ebx %eax)
25837 3d/compare-eax-and 0/imm32/false
25838 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-target-type/disp32
25839 $check-mu-read-from-stream-stmt:check-too-many-inouts:
25840
25841 (lookup *(esi+0xc) *(esi+0x10))
25842 (lookup *(eax+8) *(eax+0xc))
25843 (lookup *(eax+8) *(eax+0xc))
25844 3d/compare-eax-and 0/imm32/false
25845 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-too-many-inouts/disp32
25846 $check-mu-read-from-stream-stmt:check-unexpected-output:
25847
25848 (lookup *(esi+0x14) *(esi+0x18))
25849 3d/compare-eax-and 0/imm32/false
25850 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-unexpected-output/disp32
25851 $check-mu-read-from-stream-stmt:end:
25852
25853 5f/pop-to-edi
25854 5e/pop-to-esi
25855 5b/pop-to-ebx
25856 5a/pop-to-edx
25857 59/pop-to-ecx
25858 58/pop-to-eax
25859
25860 89/<- %esp 5/r32/ebp
25861 5d/pop-to-ebp
25862 c3/return
25863
25864 $check-mu-read-from-stream-stmt:error-invalid-base-type:
25865 (write-buffered *(ebp+0x10) "fn ")
25866 8b/-> *(ebp+0xc) 0/r32/eax
25867 (lookup *eax *(eax+4))
25868 (write-buffered *(ebp+0x10) %eax)
25869 (write-buffered *(ebp+0x10) ": stmt read-from-stream: var '")
25870 (lookup *ecx *(ecx+4))
25871 (write-buffered *(ebp+0x10) %eax)
25872 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
25873 (flush *(ebp+0x10))
25874 (stop *(ebp+0x14) 1)
25875
25876
25877 $check-mu-read-from-stream-stmt:error-too-few-inouts:
25878 (write-buffered *(ebp+0x10) "fn ")
25879 8b/-> *(ebp+0xc) 0/r32/eax
25880 (lookup *eax *(eax+4))
25881 (write-buffered *(ebp+0x10) %eax)
25882 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too few inouts (2 required)\n")
25883 (flush *(ebp+0x10))
25884 (stop *(ebp+0x14) 1)
25885
25886
25887 $check-mu-read-from-stream-stmt:error-target-type-not-address:
25888 (write-buffered *(ebp+0x10) "fn ")
25889 8b/-> *(ebp+0xc) 0/r32/eax
25890 (lookup *eax *(eax+4))
25891 (write-buffered *(ebp+0x10) %eax)
25892 (write-buffered *(ebp+0x10) ": stmt read-from-stream: target '")
25893 (lookup *ecx *(ecx+4))
25894 (write-buffered *(ebp+0x10) %eax)
25895 (write-buffered *(ebp+0x10) "' must be an addr\n")
25896 (flush *(ebp+0x10))
25897 (stop *(ebp+0x14) 1)
25898
25899
25900 $check-mu-read-from-stream-stmt:error-invalid-target-type:
25901 (write-buffered *(ebp+0x10) "fn ")
25902 8b/-> *(ebp+0xc) 0/r32/eax
25903 (lookup *eax *(eax+4))
25904 (write-buffered *(ebp+0x10) %eax)
25905 (write-buffered *(ebp+0x10) ": stmt read-from-stream: second inout '")
25906 (lookup *ecx *(ecx+4))
25907 (write-buffered *(ebp+0x10) %eax)
25908 (write-buffered *(ebp+0x10) "' does not have the right type\n")
25909 (flush *(ebp+0x10))
25910 (stop *(ebp+0x14) 1)
25911
25912
25913 $check-mu-read-from-stream-stmt:error-too-many-inouts:
25914 (write-buffered *(ebp+0x10) "fn ")
25915 8b/-> *(ebp+0xc) 0/r32/eax
25916 (lookup *eax *(eax+4))
25917 (write-buffered *(ebp+0x10) %eax)
25918 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too many inouts (2 required)\n")
25919 (flush *(ebp+0x10))
25920 (stop *(ebp+0x14) 1)
25921
25922
25923 $check-mu-read-from-stream-stmt:error-unexpected-output:
25924 (write-buffered *(ebp+0x10) "fn ")
25925 8b/-> *(ebp+0xc) 0/r32/eax
25926 (lookup *eax *(eax+4))
25927 (write-buffered *(ebp+0x10) %eax)
25928 (write-buffered *(ebp+0x10) ": stmt read-from-stream: unexpected output\n")
25929 (flush *(ebp+0x10))
25930 (stop *(ebp+0x14) 1)
25931
25932
25933 check-mu-write-to-stream-stmt:
25934
25935 55/push-ebp
25936 89/<- %ebp 4/r32/esp
25937
25938 50/push-eax
25939 51/push-ecx
25940 52/push-edx
25941 53/push-ebx
25942 56/push-esi
25943 57/push-edi
25944
25945 8b/-> *(ebp+8) 6/r32/esi
25946
25947
25948 (lookup *(esi+0xc) *(esi+0x10))
25949 $check-mu-write-to-stream-stmt:check-no-inouts:
25950 3d/compare-eax-and 0/imm32
25951 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
25952 (lookup *eax *(eax+4))
25953 89/<- %ecx 0/r32/eax
25954
25955
25956 (lookup *(ecx+8) *(ecx+0xc))
25957 89/<- %ebx 0/r32/eax
25958 $check-mu-write-to-stream-stmt:check-base-is-compound:
25959
25960 81 7/subop/compare *ebx 0/imm32/false
25961 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25962 $check-mu-write-to-stream-stmt:check-base-is-addr:
25963
25964 (lookup *(ebx+4) *(ebx+8))
25965 (simple-mu-type? %eax 2)
25966 3d/compare-eax-and 0/imm32/false
25967 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25968 $check-mu-write-to-stream-stmt:check-base-is-addr-to-stream:
25969
25970 (lookup *(ebx+0xc) *(ebx+0x10))
25971 89/<- %ebx 0/r32/eax
25972
25973 (lookup *(eax+4) *(eax+8))
25974 (simple-mu-type? %eax 0xb)
25975 3d/compare-eax-and 0/imm32/false
25976 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25977
25978
25979 (lookup *(esi+0xc) *(esi+0x10))
25980 (lookup *(eax+8) *(eax+0xc))
25981 $check-mu-write-to-stream-stmt:check-single-inout:
25982 3d/compare-eax-and 0/imm32
25983 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
25984 (lookup *eax *(eax+4))
25985 89/<- %ecx 0/r32/eax
25986
25987 (lookup *(ecx+8) *(ecx+0xc))
25988 89/<- %edx 0/r32/eax
25989
25990 $check-mu-write-to-stream-stmt:check-target-is-compound:
25991 81 7/subop/compare *edx 0/imm32/false
25992 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
25993 $check-mu-write-to-stream-stmt:check-target-type:
25994
25995 (lookup *(edx+4) *(edx+8))
25996 (simple-mu-type? %eax 2)
25997 3d/compare-eax-and 0/imm32/false
25998 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
25999
26000 (type-tail %ebx)
26001 89/<- %ebx 0/r32/eax
26002 (type-tail %edx)
26003 (type-equal? %ebx %eax)
26004 3d/compare-eax-and 0/imm32/false
26005 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-target-type/disp32
26006 $check-mu-write-to-stream-stmt:check-too-many-inouts:
26007
26008 (lookup *(esi+0xc) *(esi+0x10))
26009 (lookup *(eax+8) *(eax+0xc))
26010 (lookup *(eax+8) *(eax+0xc))
26011 3d/compare-eax-and 0/imm32/false
26012 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-too-many-inouts/disp32
26013 $check-mu-write-to-stream-stmt:check-unexpected-output:
26014
26015 (lookup *(esi+0x14) *(esi+0x18))
26016 3d/compare-eax-and 0/imm32/false
26017 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-unexpected-output/disp32
26018 $check-mu-write-to-stream-stmt:end:
26019
26020 5f/pop-to-edi
26021 5e/pop-to-esi
26022 5b/pop-to-ebx
26023 5a/pop-to-edx
26024 59/pop-to-ecx
26025 58/pop-to-eax
26026
26027 89/<- %esp 5/r32/ebp
26028 5d/pop-to-ebp
26029 c3/return
26030
26031 $check-mu-write-to-stream-stmt:error-invalid-base-type:
26032 (write-buffered *(ebp+0x10) "fn ")
26033 8b/-> *(ebp+0xc) 0/r32/eax
26034 (lookup *eax *(eax+4))
26035 (write-buffered *(ebp+0x10) %eax)
26036 (write-buffered *(ebp+0x10) ": stmt write-to-stream: var '")
26037 (lookup *ecx *(ecx+4))
26038 (write-buffered *(ebp+0x10) %eax)
26039 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
26040 (flush *(ebp+0x10))
26041 (stop *(ebp+0x14) 1)
26042
26043
26044 $check-mu-write-to-stream-stmt:error-too-few-inouts:
26045 (write-buffered *(ebp+0x10) "fn ")
26046 8b/-> *(ebp+0xc) 0/r32/eax
26047 (lookup *eax *(eax+4))
26048 (write-buffered *(ebp+0x10) %eax)
26049 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too few inouts (2 required)\n")
26050 (flush *(ebp+0x10))
26051 (stop *(ebp+0x14) 1)
26052
26053
26054 $check-mu-write-to-stream-stmt:error-target-type-not-address:
26055 (write-buffered *(ebp+0x10) "fn ")
26056 8b/-> *(ebp+0xc) 0/r32/eax
26057 (lookup *eax *(eax+4))
26058 (write-buffered *(ebp+0x10) %eax)
26059 (write-buffered *(ebp+0x10) ": stmt write-to-stream: target '")
26060 (lookup *ecx *(ecx+4))
26061 (write-buffered *(ebp+0x10) %eax)
26062 (write-buffered *(ebp+0x10) "' must be an addr\n")
26063 (flush *(ebp+0x10))
26064 (stop *(ebp+0x14) 1)
26065
26066
26067 $check-mu-write-to-stream-stmt:error-invalid-target-type:
26068 (write-buffered *(ebp+0x10) "fn ")
26069 8b/-> *(ebp+0xc) 0/r32/eax
26070 (lookup *eax *(eax+4))
26071 (write-buffered *(ebp+0x10) %eax)
26072 (write-buffered *(ebp+0x10) ": stmt write-to-stream: second inout '")
26073 (lookup *ecx *(ecx+4))
26074 (write-buffered *(ebp+0x10) %eax)
26075 (write-buffered *(ebp+0x10) "' does not have the right type\n")
26076 (flush *(ebp+0x10))
26077 (stop *(ebp+0x14) 1)
26078
26079
26080 $check-mu-write-to-stream-stmt:error-too-many-inouts:
26081 (write-buffered *(ebp+0x10) "fn ")
26082 8b/-> *(ebp+0xc) 0/r32/eax
26083 (lookup *eax *(eax+4))
26084 (write-buffered *(ebp+0x10) %eax)
26085 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too many inouts (2 required)\n")
26086 (flush *(ebp+0x10))
26087 (stop *(ebp+0x14) 1)
26088
26089
26090 $check-mu-write-to-stream-stmt:error-unexpected-output:
26091 (write-buffered *(ebp+0x10) "fn ")
26092 8b/-> *(ebp+0xc) 0/r32/eax
26093 (lookup *eax *(eax+4))
26094 (write-buffered *(ebp+0x10) %eax)
26095 (write-buffered *(ebp+0x10) ": stmt write-to-stream: unexpected output\n")
26096 (flush *(ebp+0x10))
26097 (stop *(ebp+0x14) 1)
26098
26099
26100 check-mu-convert-stmt:
26101
26102 55/push-ebp
26103 89/<- %ebp 4/r32/esp
26104
26105 50/push-eax
26106 51/push-ecx
26107 52/push-edx
26108 56/push-esi
26109 57/push-edi
26110 $check-mu-convert-stmt:get-output:
26111
26112 8b/-> *(ebp+8) 6/r32/esi
26113
26114 (lookup *(esi+0x14) *(esi+0x18))
26115 89/<- %edi 0/r32/eax
26116
26117 3d/compare-eax-and 0/imm32
26118 0f 84/jump-if-= $check-mu-convert-stmt:error-no-output/disp32
26119
26120 (lookup *(edi+8) *(edi+0xc))
26121 3d/compare-eax-and 0/imm32
26122 0f 85/jump-if-!= $check-mu-convert-stmt:error-too-many-outputs/disp32
26123 $check-mu-convert-stmt:get-inout:
26124
26125 (lookup *(esi+0xc) *(esi+0x10))
26126 89/<- %esi 0/r32/eax
26127
26128 3d/compare-eax-and 0/imm32
26129 0f 84/jump-if-= $check-mu-convert-stmt:error-no-inout/disp32
26130
26131 (lookup *(esi+8) *(esi+0xc))
26132 3d/compare-eax-and 0/imm32
26133 0f 85/jump-if-!= $check-mu-convert-stmt:error-too-many-inouts/disp32
26134 $check-mu-convert-stmt:types:
26135
26136 (lookup *esi *(esi+4))
26137 (lookup *(eax+8) *(eax+0xc))
26138 89/<- %ecx 0/r32/eax
26139
26140 8b/-> *(esi+0x10) 0/r32/eax
26141 3d/compare-eax-and 0/imm32/false
26142 {
26143 74/jump-if-= break/disp8
26144 (lookup *(ecx+0xc) *(ecx+0x10))
26145
26146 81 7/subop/compare *(eax+0xc) 0/imm32
26147 {
26148 75/jump-if-!= break/disp8
26149 (lookup *(eax+4) *(eax+8))
26150 }
26151 89/<- %ecx 0/r32/eax
26152 }
26153
26154 {
26155 (simple-mu-type? %ecx 1)
26156 3d/compare-eax-and 0/imm32/false
26157 75/jump-if-!= break/disp8
26158 (simple-mu-type? %ecx 0xf)
26159 3d/compare-eax-and 0/imm32/false
26160 75/jump-if-!= break/disp8
26161 e9/jump $check-mu-convert-stmt:error-invalid-inout-type/disp32
26162 }
26163
26164 (lookup *edi *(edi+4))
26165 (lookup *(eax+0x18) *(eax+0x1c))
26166 3d/compare-eax-and 0/imm32
26167 0f 84/jump-if-= $check-mu-convert-stmt:error-output-not-in-register/disp32
26168
26169 (lookup *edi *(edi+4))
26170 (lookup *(eax+8) *(eax+0xc))
26171 89/<- %edx 0/r32/eax
26172
26173 {
26174 (simple-mu-type? %edx 1)
26175 3d/compare-eax-and 0/imm32/false
26176 75/jump-if-!= break/disp8
26177 (simple-mu-type? %edx 0xf)
26178 3d/compare-eax-and 0/imm32/false
26179 75/jump-if-!= break/disp8
26180 e9/jump $check-mu-convert-stmt:error-invalid-output-type/disp32
26181 }
26182
26183 {
26184 (simple-mu-type? %edx 1)
26185 3d/compare-eax-and 0/imm32/false
26186 74/jump-if-= break/disp8
26187 (simple-mu-type? %ecx 1)
26188 3d/compare-eax-and 0/imm32/false
26189 74/jump-if-= break/disp8
26190 e9/jump $check-mu-convert-stmt:error-int-to-int/disp32
26191 }
26192
26193 {
26194 (simple-mu-type? %edx 0xf)
26195 3d/compare-eax-and 0/imm32/false
26196 74/jump-if-= break/disp8
26197 (simple-mu-type? %ecx 0xf)
26198 3d/compare-eax-and 0/imm32/false
26199 74/jump-if-= break/disp8
26200 e9/jump $check-mu-convert-stmt:error-float-to-float/disp32
26201 }
26202 $check-mu-convert-stmt:end:
26203
26204 5f/pop-to-edi
26205 5e/pop-to-esi
26206 5a/pop-to-edx
26207 59/pop-to-ecx
26208 58/pop-to-eax
26209
26210 89/<- %esp 5/r32/ebp
26211 5d/pop-to-ebp
26212 c3/return
26213
26214 $check-mu-convert-stmt:error-no-inout:
26215 (write-buffered *(ebp+0x10) "fn ")
26216 8b/-> *(ebp+0xc) 0/r32/eax
26217 (lookup *eax *(eax+4))
26218 (write-buffered *(ebp+0x10) %eax)
26219 (write-buffered *(ebp+0x10) ": stmt 'convert' expects an inout\n")
26220 (flush *(ebp+0x10))
26221 (stop *(ebp+0x14) 1)
26222
26223
26224 $check-mu-convert-stmt:error-too-many-inouts:
26225 (write-buffered *(ebp+0x10) "fn ")
26226 8b/-> *(ebp+0xc) 0/r32/eax
26227 (lookup *eax *(eax+4))
26228 (write-buffered *(ebp+0x10) %eax)
26229 (write-buffered *(ebp+0x10) ": stmt 'convert' must have just one inout\n")
26230 (flush *(ebp+0x10))
26231 (stop *(ebp+0x14) 1)
26232
26233
26234 $check-mu-convert-stmt:error-no-output:
26235 (write-buffered *(ebp+0x10) "fn ")
26236 8b/-> *(ebp+0xc) 0/r32/eax
26237 (lookup *eax *(eax+4))
26238 (write-buffered *(ebp+0x10) %eax)
26239 (write-buffered *(ebp+0x10) ": stmt 'convert' expects an output\n")
26240 (flush *(ebp+0x10))
26241 (stop *(ebp+0x14) 1)
26242
26243
26244 $check-mu-convert-stmt:error-output-not-in-register:
26245 (write-buffered *(ebp+0x10) "fn ")
26246 8b/-> *(ebp+0xc) 0/r32/eax
26247 (lookup *eax *(eax+4))
26248 (write-buffered *(ebp+0x10) %eax)
26249 (write-buffered *(ebp+0x10) ": stmt convert: output '")
26250 (lookup *edi *(edi+4))
26251 (lookup *eax *(eax+4))
26252 (write-buffered *(ebp+0x10) %eax)
26253 (write-buffered *(ebp+0x10) "' not in a register\n")
26254 (flush *(ebp+0x10))
26255 (stop *(ebp+0x14) 1)
26256
26257
26258 $check-mu-convert-stmt:error-too-many-outputs:
26259 (write-buffered *(ebp+0x10) "fn ")
26260 8b/-> *(ebp+0xc) 0/r32/eax
26261 (lookup *eax *(eax+4))
26262 (write-buffered *(ebp+0x10) %eax)
26263 (write-buffered *(ebp+0x10) ": stmt 'convert' must have just one output\n")
26264 (flush *(ebp+0x10))
26265 (stop *(ebp+0x14) 1)
26266
26267
26268 $check-mu-convert-stmt:error-invalid-inout-type:
26269 (write-buffered *(ebp+0x10) "fn ")
26270 8b/-> *(ebp+0xc) 0/r32/eax
26271 (lookup *eax *(eax+4))
26272 (write-buffered *(ebp+0x10) %eax)
26273 (write-buffered *(ebp+0x10) ": stmt convert: inout '")
26274 (lookup *esi *(esi+4))
26275 (lookup *eax *(eax+4))
26276 (write-buffered *(ebp+0x10) %eax)
26277 (write-buffered *(ebp+0x10) "' must be an int or float\n")
26278 (flush *(ebp+0x10))
26279 (stop *(ebp+0x14) 1)
26280
26281
26282 $check-mu-convert-stmt:error-invalid-output-type:
26283 (write-buffered *(ebp+0x10) "fn ")
26284 8b/-> *(ebp+0xc) 0/r32/eax
26285 (lookup *eax *(eax+4))
26286 (write-buffered *(ebp+0x10) %eax)
26287 (write-buffered *(ebp+0x10) ": stmt convert: output '")
26288 (lookup *edi *(edi+4))
26289 (lookup *eax *(eax+4))
26290 (write-buffered *(ebp+0x10) %eax)
26291 (write-buffered *(ebp+0x10) "' must be an int or float\n")
26292 (flush *(ebp+0x10))
26293 (stop *(ebp+0x14) 1)
26294
26295
26296 $check-mu-convert-stmt:error-int-to-int:
26297 (write-buffered *(ebp+0x10) "fn ")
26298 8b/-> *(ebp+0xc) 0/r32/eax
26299 (lookup *eax *(eax+4))
26300 (write-buffered *(ebp+0x10) %eax)
26301 (write-buffered *(ebp+0x10) ": stmt convert: no need to convert int to int\n")
26302 (flush *(ebp+0x10))
26303 (stop *(ebp+0x14) 1)
26304
26305
26306 $check-mu-convert-stmt:error-float-to-float:
26307 (write-buffered *(ebp+0x10) "fn ")
26308 8b/-> *(ebp+0xc) 0/r32/eax
26309 (lookup *eax *(eax+4))
26310 (write-buffered *(ebp+0x10) %eax)
26311 (write-buffered *(ebp+0x10) ": stmt convert: no need to convert float to float\n")
26312 (flush *(ebp+0x10))
26313 (stop *(ebp+0x14) 1)
26314
26315
26316 check-mu-call:
26317
26318 55/push-ebp
26319 89/<- %ebp 4/r32/esp
26320
26321 68/push 0/imm32
26322
26323 81 5/subop/subtract %esp 0x60/imm32
26324 68/push 0x60/imm32/size
26325 68/push 0/imm32/read
26326 68/push 0/imm32/write
26327
26328 89/<- *(ebp-4) 4/r32/esp
26329 (clear-stream *(ebp-4))
26330
26331 50/push-eax
26332 51/push-ecx
26333 52/push-edx
26334 53/push-ebx
26335 56/push-esi
26336 57/push-edi
26337
26338 8b/-> *(ebp+8) 6/r32/esi
26339
26340 8b/-> *(ebp+0xc) 7/r32/edi
26341
26342 (lookup *(esi+0xc) *(esi+0x10))
26343 89/<- %ecx 0/r32/eax
26344
26345 (lookup *(edi+8) *(edi+0xc))
26346 89/<- %edx 0/r32/eax
26347 {
26348 $check-mu-call:check-for-inouts:
26349
26350 81 7/subop/compare %ecx 0/imm32
26351 0f 84/jump-if-= break/disp32
26352
26353 81 7/subop/compare %edx 0/imm32
26354 0f 84/jump-if-= break/disp32
26355 $check-mu-call:check-null-addr:
26356
26357 (lookup *ecx *(ecx+4))
26358 (lookup *eax *(eax+4))
26359 (string-equal? %eax "0")
26360 3d/compare-eax-and 0/imm32/false
26361 0f 85/jump-if-!= $check-mu-call:continue-to-next-inout/disp32
26362 $check-mu-call:check-inout-type:
26363
26364 (lookup *ecx *(ecx+4))
26365 (lookup *(eax+8) *(eax+0xc))
26366 89/<- %ebx 0/r32/eax
26367
26368 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26369 {
26370 74/jump-if-= break/disp8
26371 (lookup *(ebx+0xc) *(ebx+0x10))
26372 89/<- %ebx 0/r32/eax
26373
26374 81 7/subop/compare *(ebx+0xc) 0/imm32
26375 75/jump-if-!= break/disp8
26376 (lookup *(ebx+4) *(ebx+8))
26377 89/<- %ebx 0/r32/eax
26378 }
26379
26380 (lookup *edx *(edx+4))
26381
26382 (lookup *(eax+8) *(eax+0xc))
26383
26384 (type-match? %eax %ebx *(ebp-4))
26385 3d/compare-eax-and 0/imm32/false
26386 {
26387 0f 85/jump-if-!= break/disp32
26388 (write-buffered *(ebp+0x14) "fn ")
26389 8b/-> *(ebp+0x10) 0/r32/eax
26390 (lookup *eax *(eax+4))
26391 (write-buffered *(ebp+0x14) %eax)
26392 (write-buffered *(ebp+0x14) ": call ")
26393 (lookup *edi *(edi+4))
26394 (write-buffered *(ebp+0x14) %eax)
26395 (write-buffered *(ebp+0x14) ": type for inout '")
26396 (lookup *ecx *(ecx+4))
26397 (lookup *eax *(eax+4))
26398 (write-buffered *(ebp+0x14) %eax)
26399 (write-buffered *(ebp+0x14) "' is not right\n")
26400 (flush *(ebp+0x14))
26401 (stop *(ebp+0x18) 1)
26402 }
26403 $check-mu-call:continue-to-next-inout:
26404
26405 (lookup *(ecx+8) *(ecx+0xc))
26406 89/<- %ecx 0/r32/eax
26407
26408 (lookup *(edx+8) *(edx+0xc))
26409 89/<- %edx 0/r32/eax
26410
26411 e9/jump loop/disp32
26412 }
26413 $check-mu-call:check-inout-count:
26414
26415 39/compare %ecx 2/r32/edx
26416 {
26417 0f 84/jump-if-= break/disp32
26418
26419
26420 {
26421 81 7/subop/compare %ecx 0/imm32
26422 0f 84/jump-if-= break/disp32
26423 (write-buffered *(ebp+0x14) "fn ")
26424 8b/-> *(ebp+0x10) 0/r32/eax
26425 (lookup *eax *(eax+4))
26426 (write-buffered *(ebp+0x14) %eax)
26427 (write-buffered *(ebp+0x14) ": call ")
26428 (lookup *edi *(edi+4))
26429 (write-buffered *(ebp+0x14) %eax)
26430 (write-buffered *(ebp+0x14) ": too many inouts\n")
26431 (flush *(ebp+0x14))
26432 (stop *(ebp+0x18) 1)
26433 }
26434
26435 {
26436 81 7/subop/compare %edx 0/imm32
26437 0f 84/jump-if-= break/disp32
26438 (write-buffered *(ebp+0x14) "fn ")
26439 8b/-> *(ebp+0x10) 0/r32/eax
26440 (lookup *eax *(eax+4))
26441 (write-buffered *(ebp+0x14) %eax)
26442 (write-buffered *(ebp+0x14) ": call ")
26443 (lookup *edi *(edi+4))
26444 (write-buffered *(ebp+0x14) %eax)
26445 (write-buffered *(ebp+0x14) ": too few inouts\n")
26446 (flush *(ebp+0x14))
26447 (stop *(ebp+0x18) 1)
26448 }
26449 }
26450 $check-mu-call:check-outputs:
26451
26452 (lookup *(esi+0x14) *(esi+0x18))
26453 89/<- %ecx 0/r32/eax
26454
26455 (lookup *(edi+0x10) *(edi+0x14))
26456 89/<- %edx 0/r32/eax
26457 {
26458 $check-mu-call:check-for-outputs:
26459
26460 81 7/subop/compare %ecx 0/imm32
26461 0f 84/jump-if-= break/disp32
26462
26463 81 7/subop/compare %edx 0/imm32
26464 0f 84/jump-if-= break/disp32
26465 $check-mu-call:check-output-type:
26466
26467 (lookup *ecx *(ecx+4))
26468
26469 (lookup *(eax+8) *(eax+0xc))
26470 89/<- %ebx 0/r32/eax
26471
26472 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26473 {
26474 74/jump-if-= break/disp8
26475 (lookup *(ebx+0xc) *(ebx+0x10))
26476 89/<- %ebx 0/r32/eax
26477 }
26478
26479 (lookup *edx *(edx+4))
26480
26481 (lookup *(eax+8) *(eax+0xc))
26482
26483 (type-match? %eax %ebx *(ebp-4))
26484 3d/compare-eax-and 0/imm32/false
26485 {
26486 0f 85/jump-if-!= break/disp32
26487 (write-buffered *(ebp+0x14) "fn ")
26488 8b/-> *(ebp+0x10) 0/r32/eax
26489 (lookup *eax *(eax+4))
26490 (write-buffered *(ebp+0x14) %eax)
26491 (write-buffered *(ebp+0x14) ": call ")
26492 (lookup *edi *(edi+4))
26493 (write-buffered *(ebp+0x14) %eax)
26494 (write-buffered *(ebp+0x14) ": type for output '")
26495 (lookup *ecx *(ecx+4))
26496 (lookup *eax *(eax+4))
26497 (write-buffered *(ebp+0x14) %eax)
26498 (write-buffered *(ebp+0x14) "' is not right\n")
26499 (flush *(ebp+0x14))
26500 (stop *(ebp+0x18) 1)
26501 }
26502 $check-mu-call:check-output-register:
26503
26504 (lookup *ecx *(ecx+4))
26505
26506 (lookup *(eax+18) *(eax+0x1c))
26507 89/<- %ebx 0/r32/eax
26508
26509 3d/compare-eax-and 0/imm32
26510 {
26511 0f 85/jump-if-!= break/disp32
26512 (write-buffered *(ebp+0x14) "fn ")
26513 8b/-> *(ebp+0x10) 0/r32/eax
26514 (lookup *eax *(eax+4))
26515 (write-buffered *(ebp+0x14) %eax)
26516 (write-buffered *(ebp+0x14) ": call ")
26517 (lookup *edi *(edi+4))
26518 (write-buffered *(ebp+0x14) %eax)
26519 (write-buffered *(ebp+0x14) ": output '")
26520 (lookup *ecx *(ecx+4))
26521 (lookup *eax *(eax+4))
26522 (write-buffered *(ebp+0x14) %eax)
26523 (write-buffered *(ebp+0x14) "' is not in a register\n")
26524 (flush *(ebp+0x14))
26525 (stop *(ebp+0x18) 1)
26526 }
26527
26528 (lookup *edx *(edx+4))
26529
26530 (lookup *(eax+18) *(eax+0x1c))
26531
26532 (string-equal? %eax %ebx)
26533 3d/compare-eax-and 0/imm32/false
26534 {
26535 0f 85/jump-if-!= break/disp32
26536 (write-buffered *(ebp+0x14) "fn ")
26537 8b/-> *(ebp+0x10) 0/r32/eax
26538 (lookup *eax *(eax+4))
26539 (write-buffered *(ebp+0x14) %eax)
26540 (write-buffered *(ebp+0x14) ": call ")
26541 (lookup *edi *(edi+4))
26542 (write-buffered *(ebp+0x14) %eax)
26543 (write-buffered *(ebp+0x14) ": register for output '")
26544 (lookup *ecx *(ecx+4))
26545 (lookup *eax *(eax+4))
26546 (write-buffered *(ebp+0x14) %eax)
26547 (write-buffered *(ebp+0x14) "' is not right\n")
26548 (flush *(ebp+0x14))
26549 (stop *(ebp+0x18) 1)
26550 }
26551 $check-mu-call:continue-to-next-output:
26552
26553 (lookup *(ecx+8) *(ecx+0xc))
26554 89/<- %ecx 0/r32/eax
26555
26556 (lookup *(edx+8) *(edx+0xc))
26557 89/<- %edx 0/r32/eax
26558
26559 e9/jump loop/disp32
26560 }
26561 $check-mu-call:check-output-count:
26562
26563 39/compare %ecx 2/r32/edx
26564 {
26565 0f 84/jump-if-= break/disp32
26566
26567
26568 {
26569 81 7/subop/compare %ecx 0/imm32
26570 0f 84/jump-if-= break/disp32
26571 (write-buffered *(ebp+0x14) "fn ")
26572 8b/-> *(ebp+0x10) 0/r32/eax
26573 (lookup *eax *(eax+4))
26574 (write-buffered *(ebp+0x14) %eax)
26575 (write-buffered *(ebp+0x14) ": call ")
26576 (lookup *edi *(edi+4))
26577 (write-buffered *(ebp+0x14) %eax)
26578 (write-buffered *(ebp+0x14) ": too many outputs\n")
26579 (flush *(ebp+0x14))
26580 (stop *(ebp+0x18) 1)
26581 }
26582
26583 {
26584 81 7/subop/compare %edx 0/imm32
26585 0f 84/jump-if-= break/disp32
26586 (write-buffered *(ebp+0x14) "fn ")
26587 8b/-> *(ebp+0x10) 0/r32/eax
26588 (lookup *eax *(eax+4))
26589 (write-buffered *(ebp+0x14) %eax)
26590 (write-buffered *(ebp+0x14) ": call ")
26591 (lookup *edi *(edi+4))
26592 (write-buffered *(ebp+0x14) %eax)
26593 (write-buffered *(ebp+0x14) ": too few outputs\n")
26594 (flush *(ebp+0x14))
26595 (stop *(ebp+0x18) 1)
26596 }
26597 }
26598 $check-mu-call:end:
26599
26600 5f/pop-to-edi
26601 5e/pop-to-esi
26602 5b/pop-to-ebx
26603 5a/pop-to-edx
26604 59/pop-to-ecx
26605 58/pop-to-eax
26606
26607 81 0/subop/add %esp 0x70/imm32
26608
26609 89/<- %esp 5/r32/ebp
26610 5d/pop-to-ebp
26611 c3/return
26612
26613
26614 type-match?:
26615
26616 55/push-ebp
26617 89/<- %ebp 4/r32/esp
26618
26619 {
26620 $type-match?:check-literal-int:
26621 (simple-mu-type? *(ebp+0xc) 0)
26622 3d/compare-eax-and 0/imm32/false
26623 74/jump-if-= break/disp8
26624 (mu-numberlike-output? *(ebp+8))
26625 3d/compare-eax-and 0/imm32/false
26626 74/jump-if-= break/disp8
26627 b8/copy-to-eax 1/imm32/true
26628 e9/jump $type-match?:end/disp32
26629 }
26630
26631 {
26632 $type-match?:check-literal-string:
26633 (simple-mu-type? *(ebp+0xc) 0x10)
26634 3d/compare-eax-and 0/imm32/false
26635 74/jump-if-= break/disp8
26636 (type-component-match? *(ebp+8) Addr-type-string *(ebp+0x10))
26637 e9/jump $type-match?:end/disp32
26638 }
26639 $type-match?:baseline:
26640
26641 (type-component-match? *(ebp+8) *(ebp+0xc) *(ebp+0x10))
26642 $type-match?:end:
26643
26644 89/<- %esp 5/r32/ebp
26645 5d/pop-to-ebp
26646 c3/return
26647
26648 type-component-match?:
26649
26650 55/push-ebp
26651 89/<- %ebp 4/r32/esp
26652
26653 51/push-ecx
26654 52/push-edx
26655 53/push-ebx
26656
26657 8b/-> *(ebp+8) 1/r32/ecx
26658
26659 8b/-> *(ebp+0xc) 2/r32/edx
26660 $type-component-match?:compare-addr:
26661
26662 8b/-> %ecx 0/r32/eax
26663 39/compare %edx 0/r32/eax
26664 b8/copy-to-eax 1/imm32/true
26665 0f 84/jump-if-= $type-component-match?:end/disp32
26666
26667 b8/copy-to-eax 0/imm32/false
26668 81 7/subop/compare %ecx 0/imm32
26669 0f 84/jump-if-= $type-component-match?:end/disp32
26670
26671 81 7/subop/compare %edx 0/imm32
26672 0f 84/jump-if-= $type-component-match?:end/disp32
26673
26674 {
26675 $type-component-match?:check-type-parameter:
26676 81 7/subop/compare *ecx 0/imm32/false
26677 74/jump-if-= break/disp8
26678 81 7/subop/compare *(ecx+4) 0xa/imm32/type-parameter
26679 75/jump-if-!= break/disp8
26680 $type-component-match?:type-parameter:
26681 (type-parameter-match? *(ecx+8) *(ecx+0xc) %edx *(ebp+0x10))
26682 e9/jump $type-component-match?:end/disp32
26683 }
26684
26685 {
26686 $type-component-match?:check-list-type-parameter:
26687
26688 81 7/subop/compare *ecx 0/imm32/false
26689 75/jump-if-!= break/disp8
26690
26691 81 7/subop/compare *(ecx+0xc) 0/imm32
26692 75/jump-if-!= break/disp8
26693
26694 (lookup *(ecx+4) *(ecx+8))
26695 81 7/subop/compare *eax 0/imm32/false
26696 74/jump-if-= break/disp8
26697 81 7/subop/compare *(eax+4) 0xa/imm32/type-parameter
26698 75/jump-if-!= break/disp8
26699 $type-component-match?:list-type-parameter:
26700 (type-parameter-match? *(eax+8) *(eax+0xc) %edx *(ebp+0x10))
26701 e9/jump $type-component-match?:end/disp32
26702 }
26703 $type-component-match?:compare-atom-state:
26704
26705 8b/-> *ecx 3/r32/ebx
26706 39/compare *edx 3/r32/ebx
26707 b8/copy-to-eax 0/imm32/false
26708 0f 85/jump-if-!= $type-component-match?:end/disp32
26709
26710 {
26711 $type-component-match?:check-atom:
26712 81 7/subop/compare %ebx 0/imm32/false
26713 74/jump-if-= break/disp8
26714 $type-component-match?:is-atom:
26715 8b/-> *(ecx+4) 0/r32/eax
26716 39/compare *(edx+4) 0/r32/eax
26717 0f 94/set-if-= %al
26718 25/and-eax-with 0xff/imm32
26719 e9/jump $type-component-match?:end/disp32
26720 }
26721 $type-component-match?:check-left:
26722
26723 (lookup *(ecx+4) *(ecx+8))
26724 89/<- %ebx 0/r32/eax
26725 (lookup *(edx+4) *(edx+8))
26726 (type-component-match? %ebx %eax *(ebp+0x10))
26727 3d/compare-eax-and 0/imm32/false
26728 74/jump-if-= $type-component-match?:end/disp8
26729 $type-component-match?:check-right:
26730
26731 (lookup *(ecx+0xc) *(ecx+0x10))
26732 89/<- %ebx 0/r32/eax
26733 (lookup *(edx+0xc) *(edx+0x10))
26734 (type-component-match? %ebx %eax *(ebp+0x10))
26735 $type-component-match?:end:
26736
26737 5b/pop-to-ebx
26738 5a/pop-to-edx
26739 59/pop-to-ecx
26740
26741 89/<- %esp 5/r32/ebp
26742 5d/pop-to-ebp
26743 c3/return
26744
26745 type-parameter-match?:
26746
26747 55/push-ebp
26748 89/<- %ebp 4/r32/esp
26749
26750 51/push-ecx
26751
26752 (get-or-insert-handle *(ebp+0x14) *(ebp+8) *(ebp+0xc) 0xc)
26753
26754 {
26755 81 7/subop/compare *eax 0/imm32
26756 75/jump-if-!= break/disp8
26757 8b/-> *(ebp+0x10) 1/r32/ecx
26758 89/<- *eax 1/r32/ecx
26759 }
26760
26761 (type-equal? *(ebp+0x10) *eax)
26762 $type-parameter-match?:end:
26763
26764 59/pop-to-ecx
26765
26766 89/<- %esp 5/r32/ebp
26767 5d/pop-to-ebp
26768 c3/return
26769
26770 size-of:
26771
26772 55/push-ebp
26773 89/<- %ebp 4/r32/esp
26774
26775 51/push-ecx
26776
26777 8b/-> *(ebp+8) 1/r32/ecx
26778
26779
26780
26781
26782
26783
26784
26785 (lookup *(ecx+8) *(ecx+0xc))
26786 89/<- %ecx 0/r32/eax
26787
26788 {
26789 (mu-array? %ecx)
26790 3d/compare-eax-and 0/imm32/false
26791 74/jump-if-= break/disp8
26792 (size-of-array %ecx)
26793 eb/jump $size-of:end/disp8
26794 }
26795
26796 {
26797 (mu-stream? %ecx)
26798 3d/compare-eax-and 0/imm32/false
26799 74/jump-if-= break/disp8
26800 (size-of-stream %ecx)
26801 eb/jump $size-of:end/disp8
26802 }
26803
26804 {
26805 81 7/subop/compare *ecx 0/imm32/false
26806 75/jump-if-!= break/disp8
26807 (lookup *(ecx+4) *(ecx+8))
26808 89/<- %ecx 0/r32/eax
26809 }
26810
26811 (size-of-type-id *(ecx+4))
26812 $size-of:end:
26813
26814 59/pop-to-ecx
26815
26816 89/<- %esp 5/r32/ebp
26817 5d/pop-to-ebp
26818 c3/return
26819
26820 size-of-deref:
26821
26822 55/push-ebp
26823 89/<- %ebp 4/r32/esp
26824
26825 51/push-ecx
26826
26827 8b/-> *(ebp+8) 1/r32/ecx
26828 (lookup *(ecx+8) *(ecx+0xc))
26829 89/<- %ecx 0/r32/eax
26830
26831
26832 (lookup *(ecx+0xc) *(ecx+0x10))
26833 89/<- %ecx 0/r32/eax
26834
26835 {
26836 (mu-array? %ecx)
26837 3d/compare-eax-and 0/imm32/false
26838 74/jump-if-= break/disp8
26839 (size-of-array %ecx)
26840 eb/jump $size-of-deref:end/disp8
26841 }
26842
26843 {
26844 (mu-stream? %ecx)
26845 3d/compare-eax-and 0/imm32/false
26846 74/jump-if-= break/disp8
26847 (size-of-stream %ecx)
26848 eb/jump $size-of-deref:end/disp8
26849 }
26850
26851 {
26852 81 7/subop/compare *ecx 0/imm32/false
26853 75/jump-if-!= break/disp8
26854 (lookup *(ecx+4) *(ecx+8))
26855 89/<- %ecx 0/r32/eax
26856 }
26857
26858 (size-of-type-id *(ecx+4))
26859 $size-of-deref:end:
26860
26861 59/pop-to-ecx
26862
26863 89/<- %esp 5/r32/ebp
26864 5d/pop-to-ebp
26865 c3/return
26866
26867 mu-array?:
26868
26869 55/push-ebp
26870 89/<- %ebp 4/r32/esp
26871
26872 51/push-ecx
26873
26874 8b/-> *(ebp+8) 1/r32/ecx
26875
26876 81 7/subop/compare *ecx 0/imm32/false
26877 75/jump-if-!= $mu-array?:return-false/disp8
26878
26879 (lookup *(ecx+4) *(ecx+8))
26880 81 7/subop/compare *eax 0/imm32/false
26881 74/jump-if-= $mu-array?:return-false/disp8
26882
26883 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
26884 0f 94/set-if-= %al
26885 25/and-eax-with 0xff/imm32
26886 eb/jump $mu-array?:end/disp8
26887 $mu-array?:return-false:
26888 b8/copy-to-eax 0/imm32/false
26889 $mu-array?:end:
26890
26891 59/pop-to-ecx
26892
26893 89/<- %esp 5/r32/ebp
26894 5d/pop-to-ebp
26895 c3/return
26896
26897
26898 size-of-array:
26899
26900 55/push-ebp
26901 89/<- %ebp 4/r32/esp
26902
26903 51/push-ecx
26904 52/push-edx
26905
26906 8b/-> *(ebp+8) 1/r32/ecx
26907
26908 (lookup *(ecx+0xc) *(ecx+0x10))
26909 89/<- %ecx 0/r32/eax
26910
26911 (lookup *(ecx+4) *(ecx+8))
26912 8b/-> *(eax+4) 2/r32/edx
26913
26914
26915 (lookup *(ecx+0xc) *(ecx+0x10))
26916 (lookup *(eax+4) *(eax+8))
26917 8b/-> *(eax+8) 1/r32/ecx
26918
26919 (size-of-type-id-as-array-element %edx)
26920 f7 4/subop/multiply-into-edx-eax %ecx
26921 05/add-to-eax 4/imm32
26922
26923 $size-of-array:end:
26924
26925 5a/pop-to-edx
26926 59/pop-to-ecx
26927
26928 89/<- %esp 5/r32/ebp
26929 5d/pop-to-ebp
26930 c3/return
26931
26932 mu-stream?:
26933
26934 55/push-ebp
26935 89/<- %ebp 4/r32/esp
26936
26937 51/push-ecx
26938
26939 8b/-> *(ebp+8) 1/r32/ecx
26940
26941 81 7/subop/compare *ecx 0/imm32/false
26942 75/jump-if-!= $mu-stream?:return-false/disp8
26943
26944 (lookup *(ecx+4) *(ecx+8))
26945 81 7/subop/compare *eax 0/imm32/false
26946 74/jump-if-= $mu-stream?:return-false/disp8
26947
26948 81 7/subop/compare *(eax+4) 0xb/imm32/stream-type-id
26949 0f 94/set-if-= %al
26950 25/and-eax-with 0xff/imm32
26951 eb/jump $mu-stream?:end/disp8
26952 $mu-stream?:return-false:
26953 b8/copy-to-eax 0/imm32/false
26954 $mu-stream?:end:
26955
26956 59/pop-to-ecx
26957
26958 89/<- %esp 5/r32/ebp
26959 5d/pop-to-ebp
26960 c3/return
26961
26962
26963 size-of-stream:
26964
26965 55/push-ebp
26966 89/<- %ebp 4/r32/esp
26967
26968 (size-of-array *(ebp+8))
26969 05/add-to-eax 8/imm32
26970 $size-of-stream:end:
26971
26972 89/<- %esp 5/r32/ebp
26973 5d/pop-to-ebp
26974 c3/return
26975
26976 size-of-type-id:
26977
26978 55/push-ebp
26979 89/<- %ebp 4/r32/esp
26980
26981 51/push-ecx
26982
26983 68/push 0/imm32
26984 68/push 0/imm32
26985 89/<- %ecx 4/r32/esp
26986
26987 8b/-> *(ebp+8) 0/r32/eax
26988
26989 3d/compare-eax-and 0/imm32
26990 0f 84/jump-if-= $size-of-type-id:end/disp32
26991
26992 3d/compare-eax-and 8/imm32/byte
26993 {
26994 75/jump-if-!= break/disp8
26995 b8/copy-to-eax 4/imm32
26996 eb/jump $size-of-type-id:end/disp8
26997 }
26998
26999 3d/compare-eax-and 4/imm32/handle
27000 {
27001 75/jump-if-!= break/disp8
27002 b8/copy-to-eax 8/imm32
27003 eb/jump $size-of-type-id:end/disp8
27004 }
27005
27006 3d/compare-eax-and 0xc/imm32/slice
27007 {
27008 75/jump-if-!= break/disp8
27009 b8/copy-to-eax 8/imm32
27010 eb/jump $size-of-type-id:end/disp8
27011 }
27012
27013
27014 (find-typeinfo %eax %ecx)
27015 {
27016 81 7/subop/compare *ecx 0/imm32
27017 74/jump-if-= break/disp8
27018 $size-of-type-id:user-defined:
27019 (lookup *ecx *(ecx+4))
27020 8b/-> *(eax+0xc) 0/r32/eax
27021 eb/jump $size-of-type-id:end/disp8
27022 }
27023
27024 b8/copy-to-eax 4/imm32
27025 $size-of-type-id:end:
27026
27027 81 0/subop/add %esp 8/imm32
27028
27029 59/pop-to-ecx
27030
27031 89/<- %esp 5/r32/ebp
27032 5d/pop-to-ebp
27033 c3/return
27034
27035
27036
27037
27038 type-tail:
27039
27040 55/push-ebp
27041 89/<- %ebp 4/r32/esp
27042
27043 51/push-ecx
27044
27045 b8/copy-to-eax 0/imm32
27046
27047 8b/-> *(ebp+8) 1/r32/ecx
27048 $type-tail:check-atom:
27049
27050 81 7/subop/compare *ecx 0/imm32/false
27051 0f 85/jump-if-!= $type-tail:end/disp32
27052
27053 (lookup *(ecx+0xc) *(ecx+0x10))
27054 89/<- %ecx 0/r32/eax
27055 $type-tail:check-singleton:
27056
27057 {
27058 81 7/subop/compare *(ecx+0xc) 0/imm32
27059 75/jump-if-!= break/disp8
27060 (lookup *(ecx+4) *(ecx+8))
27061 e9/jump $type-tail:end/disp32
27062 }
27063
27064 {
27065 $type-tail:check-array-capacity:
27066 (lookup *(ecx+0xc) *(ecx+0x10))
27067 81 7/subop/compare *eax 0/imm32/false
27068 75/jump-if-!= break/disp8
27069 $type-tail:check-array-capacity-1:
27070 (lookup *(eax+4) *(eax+8))
27071 3d/compare-eax-and 0/imm32
27072 74/jump-if-= break/disp8
27073 $type-tail:check-array-capacity-2:
27074 (simple-mu-type? %eax 9)
27075 3d/compare-eax-and 0/imm32/false
27076 74/jump-if-= break/disp8
27077 $type-tail:array-capacity:
27078 (lookup *(ecx+4) *(ecx+8))
27079 eb/jump $type-tail:end/disp8
27080 }
27081 $type-tail:check-compound-left:
27082
27083 (lookup *(ecx+4) *(ecx+8))
27084 81 7/subop/compare *eax 0/imm32/false
27085 74/jump-if-= $type-tail:end/disp8
27086 $type-tail:return-tail:
27087
27088 89/<- %eax 1/r32/ecx
27089 $type-tail:end:
27090
27091 59/pop-to-ecx
27092
27093 89/<- %esp 5/r32/ebp
27094 5d/pop-to-ebp
27095 c3/return
27096
27097 type-equal?:
27098
27099 55/push-ebp
27100 89/<- %ebp 4/r32/esp
27101
27102 51/push-ecx
27103 52/push-edx
27104 53/push-ebx
27105
27106 8b/-> *(ebp+8) 1/r32/ecx
27107
27108 8b/-> *(ebp+0xc) 2/r32/edx
27109 $type-equal?:compare-addr:
27110
27111 8b/-> %ecx 0/r32/eax
27112 39/compare %edx 0/r32/eax
27113 b8/copy-to-eax 1/imm32/true
27114 0f 84/jump-if-= $type-equal?:end/disp32
27115 $type-equal?:compare-null-a:
27116
27117 b8/copy-to-eax 0/imm32/false
27118 81 7/subop/compare %ecx 0/imm32
27119 0f 84/jump-if-= $type-equal?:end/disp32
27120 $type-equal?:compare-null-b:
27121
27122 81 7/subop/compare %edx 0/imm32
27123 0f 84/jump-if-= $type-equal?:end/disp32
27124 $type-equal?:compare-atom-state:
27125
27126 8b/-> *ecx 3/r32/ebx
27127 39/compare *edx 3/r32/ebx
27128 b8/copy-to-eax 0/imm32/false
27129 0f 85/jump-if-!= $type-equal?:end/disp32
27130
27131 {
27132 $type-equal?:check-atom:
27133 81 7/subop/compare %ebx 0/imm32/false
27134 74/jump-if-= break/disp8
27135 $type-equal?:is-atom:
27136 8b/-> *(ecx+4) 0/r32/eax
27137 39/compare *(edx+4) 0/r32/eax
27138 0f 94/set-if-= %al
27139 25/and-eax-with 0xff/imm32
27140 e9/jump $type-equal?:end/disp32
27141 }
27142 $type-equal?:check-left:
27143
27144 (lookup *(ecx+4) *(ecx+8))
27145 89/<- %ebx 0/r32/eax
27146 (lookup *(edx+4) *(edx+8))
27147 (type-equal? %eax %ebx)
27148 3d/compare-eax-and 0/imm32/false
27149 74/jump-if-= $type-equal?:end/disp8
27150 $type-equal?:check-right:
27151
27152 (lookup *(ecx+0xc) *(ecx+0x10))
27153 89/<- %ebx 0/r32/eax
27154 (lookup *(edx+0xc) *(edx+0x10))
27155 (type-equal? %eax %ebx)
27156 $type-equal?:end:
27157
27158 5b/pop-to-ebx
27159 5a/pop-to-edx
27160 59/pop-to-ecx
27161
27162 89/<- %esp 5/r32/ebp
27163 5d/pop-to-ebp
27164 c3/return
27165
27166
27167
27168
27169
27170 == data
27171
27172
27173 Curr-local-stack-offset:
27174 0/imm32
27175
27176 == code
27177
27178
27179
27180
27181
27182
27183 emit-subx:
27184
27185 55/push-ebp
27186 89/<- %ebp 4/r32/esp
27187
27188 50/push-eax
27189
27190 (lookup *_Program-functions *_Program-functions->payload)
27191 {
27192
27193 3d/compare-eax-and 0/imm32
27194 0f 84/jump-if-= break/disp32
27195 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
27196
27197 (lookup *(eax+0x20) *(eax+0x24))
27198 e9/jump loop/disp32
27199 }
27200 $emit-subx:end:
27201
27202 58/pop-to-eax
27203
27204 89/<- %esp 5/r32/ebp
27205 5d/pop-to-ebp
27206 c3/return
27207
27208 emit-subx-function:
27209
27210 55/push-ebp
27211 89/<- %ebp 4/r32/esp
27212
27213 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
27214
27215 50/push-eax
27216 51/push-ecx
27217 52/push-edx
27218
27219 c7 0/subop/copy *Curr-block-depth 1/imm32
27220 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
27221
27222 8b/-> *(ebp+0xc) 1/r32/ecx
27223
27224 81 5/subop/subtract %esp 0xc00/imm32
27225 68/push 0xc00/imm32/size
27226 68/push 0/imm32/top
27227 89/<- %edx 4/r32/esp
27228
27229 (lookup *ecx *(ecx+4))
27230
27231 (write-buffered *(ebp+8) %eax)
27232 (write-buffered *(ebp+8) ":\n")
27233 (emit-subx-prologue *(ebp+8))
27234
27235 (lookup *(ecx+0x18) *(ecx+0x1c))
27236
27237 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
27238 (emit-subx-epilogue *(ebp+8))
27239
27240
27241 $emit-subx-function:end:
27242
27243 81 0/subop/add %esp 0xc08/imm32
27244
27245 5a/pop-to-edx
27246 59/pop-to-ecx
27247 58/pop-to-eax
27248
27249 89/<- %esp 5/r32/ebp
27250 5d/pop-to-ebp
27251 c3/return
27252
27253 populate-mu-type-offsets-in-inouts:
27254
27255 55/push-ebp
27256 89/<- %ebp 4/r32/esp
27257
27258 50/push-eax
27259 51/push-ecx
27260 52/push-edx
27261 53/push-ebx
27262 57/push-edi
27263
27264 ba/copy-to-edx 8/imm32
27265
27266 8b/-> *(ebp+8) 1/r32/ecx
27267 (lookup *(ecx+8) *(ecx+0xc))
27268 89/<- %ecx 0/r32/eax
27269 {
27270 $populate-mu-type-offsets-in-inouts:loop:
27271 81 7/subop/compare %ecx 0/imm32
27272 74/jump-if-= break/disp8
27273
27274 (lookup *ecx *(ecx+4))
27275 89/<- %ebx 0/r32/eax
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286 89/<- *(ebx+0x14) 2/r32/edx
27287
27288 (size-of %ebx)
27289 01/add-to %edx 0/r32/eax
27290
27291 (lookup *(ecx+8) *(ecx+0xc))
27292 89/<- %ecx 0/r32/eax
27293
27294 eb/jump loop/disp8
27295 }
27296 $populate-mu-type-offsets-in-inouts:end:
27297
27298 5f/pop-to-edi
27299 5b/pop-to-ebx
27300 5a/pop-to-edx
27301 59/pop-to-ecx
27302 58/pop-to-eax
27303
27304 89/<- %esp 5/r32/ebp
27305 5d/pop-to-ebp
27306 c3/return
27307
27308 emit-subx-stmt-list:
27309
27310 55/push-ebp
27311 89/<- %ebp 4/r32/esp
27312
27313 50/push-eax
27314 51/push-ecx
27315 53/push-ebx
27316 56/push-esi
27317
27318 8b/-> *(ebp+0xc) 6/r32/esi
27319
27320 {
27321 $emit-subx-stmt-list:loop:
27322 81 7/subop/compare %esi 0/imm32
27323 0f 84/jump-if-= break/disp32
27324
27325 (lookup *esi *(esi+4))
27326 89/<- %ecx 0/r32/eax
27327 {
27328 $emit-subx-stmt-list:check-for-block:
27329 81 7/subop/compare *ecx 0/imm32/block
27330 75/jump-if-!= break/disp8
27331 $emit-subx-stmt-list:block:
27332 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27333 }
27334 {
27335 $emit-subx-stmt-list:check-for-stmt:
27336 81 7/subop/compare *ecx 1/imm32/stmt1
27337 0f 85/jump-if-!= break/disp32
27338 $emit-subx-stmt-list:stmt1:
27339 {
27340 (mu-branch? %ecx)
27341 3d/compare-eax-and 0/imm32/false
27342 0f 84/jump-if-= break/disp32
27343 $emit-subx-stmt-list:branch-stmt:
27344 +-- 25 lines: # unconditional return ----------------------------------------------------------------------------------------------------------------------------------------------------
27369 +-- 27 lines: # unconditional loops -----------------------------------------------------------------------------------------------------------------------------------------------------
27396 +-- 16 lines: # unconditional breaks ----------------------------------------------------------------------------------------------------------------------------------------------------
27412 +-- 38 lines: # simple conditional branches without a target ----------------------------------------------------------------------------------------------------------------------------
27450 +-- 19 lines: # conditional branches with an explicit target ----------------------------------------------------------------------------------------------------------------------------
27469 }
27470 $emit-subx-stmt-list:1-to-1:
27471 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27472 e9/jump $emit-subx-stmt-list:continue/disp32
27473 }
27474 {
27475 $emit-subx-stmt-list:check-for-var-def:
27476 81 7/subop/compare *ecx 2/imm32/var-def
27477 75/jump-if-!= break/disp8
27478 $emit-subx-stmt-list:var-def:
27479 (emit-subx-var-def *(ebp+8) %ecx *(ebp+0x18) *(ebp+0x1c))
27480 (push *(ebp+0x10) *(ecx+4))
27481 (push *(ebp+0x10) *(ecx+8))
27482 (push *(ebp+0x10) 0)
27483
27484 eb/jump $emit-subx-stmt-list:continue/disp8
27485 }
27486 {
27487 $emit-subx-stmt-list:check-for-reg-var-def:
27488 81 7/subop/compare *ecx 3/imm32/reg-var-def
27489 0f 85/jump-if-!= break/disp32
27490 $emit-subx-stmt-list:reg-var-def:
27491
27492 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27493
27494 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27495
27496 eb/jump $emit-subx-stmt-list:continue/disp8
27497 }
27498 $emit-subx-stmt-list:continue:
27499
27500 (lookup *(esi+8) *(esi+0xc))
27501 89/<- %esi 0/r32/eax
27502 e9/jump loop/disp32
27503 }
27504 $emit-subx-stmt-list:emit-cleanup:
27505 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
27506 $emit-subx-stmt-list:clean-up:
27507 (clean-up-stack-offset-state *(ebp+0x10) *Curr-block-depth)
27508 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
27509 $emit-subx-stmt-list:end:
27510
27511 5e/pop-to-esi
27512 5b/pop-to-ebx
27513 59/pop-to-ecx
27514 58/pop-to-eax
27515
27516 89/<- %esp 5/r32/ebp
27517 5d/pop-to-ebp
27518 c3/return
27519
27520
27521 push-output-and-maybe-emit-spill:
27522
27523 55/push-ebp
27524 89/<- %ebp 4/r32/esp
27525
27526 50/push-eax
27527 51/push-ecx
27528 52/push-edx
27529
27530 8b/-> *(ebp+0xc) 1/r32/ecx
27531
27532 (lookup *(ecx+0x14) *(ecx+0x18))
27533
27534
27535 (lookup *eax *(eax+4))
27536 89/<- %ecx 0/r32/eax
27537
27538 8b/-> *Curr-block-depth 0/r32/eax
27539 89/<- *(ecx+0x10) 0/r32/eax
27540
27541
27542
27543
27544
27545
27546
27547
27548 81 7/subop/compare *(ecx+0x18) 0/imm32
27549 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
27550
27551 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
27552 89/<- %edx 0/r32/eax
27553 3d/compare-eax-and 0/imm32/false
27554 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
27555 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
27556 89/<- %edx 0/r32/eax
27557
27558 3d/compare-eax-and 0/imm32/false
27559 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
27560
27561
27562 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
27563
27564 (lookup *(ecx+0x18) *(ecx+0x1c))
27565 (emit-push-register *(ebp+8) %eax)
27566 $push-output-and-maybe-emit-spill:push:
27567 8b/-> *(ebp+0xc) 1/r32/ecx
27568 (lookup *(ecx+0x14) *(ecx+0x18))
27569
27570 (push *(ebp+0x10) *eax)
27571 (push *(ebp+0x10) *(eax+4))
27572 (push *(ebp+0x10) %edx)
27573 $push-output-and-maybe-emit-spill:end:
27574
27575 5a/pop-to-edx
27576 59/pop-to-ecx
27577 58/pop-to-eax
27578
27579 89/<- %esp 5/r32/ebp
27580 5d/pop-to-ebp
27581 c3/return
27582
27583 $push-output-and-maybe-emit-spill:abort:
27584
27585 (write-buffered *(ebp+0x1c) "var '")
27586 (write-buffered *(ebp+0x1c) *eax)
27587 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
27588 (flush *(ebp+0x1c))
27589 (stop *(ebp+0x20) 1)
27590
27591
27592 emit-subx-cleanup-and-unconditional-nonlocal-branch:
27593
27594 55/push-ebp
27595 89/<- %ebp 4/r32/esp
27596
27597 50/push-eax
27598 51/push-ecx
27599
27600 8b/-> *(ebp+0xc) 1/r32/ecx
27601
27602 (lookup *(ecx+0xc) *(ecx+0x10))
27603 (lookup *eax *(eax+4))
27604 (lookup *eax *(eax+4))
27605
27606 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
27607
27608 (emit-indent *(ebp+8) *Curr-block-depth)
27609 (write-buffered *(ebp+8) "e9/jump ")
27610 (write-buffered *(ebp+8) %eax)
27611 (lookup *(ecx+4) *(ecx+8))
27612 (string-starts-with? %eax "break")
27613 3d/compare-eax-and 0/imm32/false
27614 {
27615 74/jump-if-= break/disp8
27616 (write-buffered *(ebp+8) ":break/disp32\n")
27617 eb/jump $emit-subx-cleanup-and-unconditional-nonlocal-branch:end/disp8
27618 }
27619 (write-buffered *(ebp+8) ":loop/disp32\n")
27620 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
27621
27622 59/pop-to-ecx
27623 58/pop-to-eax
27624
27625 89/<- %esp 5/r32/ebp
27626 5d/pop-to-ebp
27627 c3/return
27628
27629 emit-outputs:
27630
27631 55/push-ebp
27632 89/<- %ebp 4/r32/esp
27633
27634 50/push-eax
27635 51/push-ecx
27636 56/push-esi
27637 57/push-edi
27638
27639 8b/-> *(ebp+0xc) 0/r32/eax
27640 (lookup *(eax+0xc) *(eax+0x10))
27641 89/<- %esi 0/r32/eax
27642
27643 8b/-> *(ebp+0x10) 0/r32/eax
27644 (lookup *(eax+0x10) *(eax+0x14))
27645 89/<- %edi 0/r32/eax
27646 {
27647 $emit-outputs:loop:
27648 81 7/subop/compare %esi 0/imm32
27649 0f 84/jump-if-= break/disp32
27650
27651
27652 (lookup *edi *(edi+4))
27653 (lookup *(eax+0x18) *(eax+0x1c))
27654 89/<- %ecx 0/r32/eax
27655
27656 8a/copy-byte *(ecx+4) 0/r32/AL
27657 25/and-eax-with 0xff/imm32
27658 3d/compare-eax-and 0x78/imm32/x
27659 {
27660 75/jump-if-!= break/disp8
27661 (emit-float-output *(ebp+8) %esi %ecx)
27662 eb/jump $emit-outputs:continue/disp8
27663 }
27664
27665 (emit-int-output *(ebp+8) %esi %ecx)
27666 $emit-outputs:continue:
27667
27668 (lookup *(esi+8) *(esi+0xc))
27669 89/<- %esi 0/r32/eax
27670
27671 (lookup *(edi+8) *(edi+0xc))
27672 89/<- %edi 0/r32/eax
27673
27674 e9/jump loop/disp32
27675 }
27676 $emit-outputs:end:
27677
27678 5f/pop-to-edi
27679 5e/pop-to-esi
27680 59/pop-to-ecx
27681 58/pop-to-eax
27682
27683 89/<- %esp 5/r32/ebp
27684 5d/pop-to-ebp
27685 c3/return
27686
27687 emit-int-output:
27688
27689 55/push-ebp
27690 89/<- %ebp 4/r32/esp
27691
27692 50/push-eax
27693 51/push-ecx
27694
27695 8b/-> *(ebp+0xc) 0/r32/eax
27696 (lookup *eax *(eax+4))
27697 89/<- %ecx 0/r32/eax
27698
27699 (lookup *(ecx+8) *(ecx+0xc))
27700 (simple-mu-type? %eax 0)
27701 {
27702 3d/compare-eax-and 0/imm32/false
27703 0f 84/jump-if-= break/disp32
27704 (emit-indent *(ebp+8) *Curr-block-depth)
27705 (write-buffered *(ebp+8) "c7 0/subop/copy %")
27706 (write-buffered *(ebp+8) *(ebp+0x10))
27707 (write-buffered *(ebp+8) " ")
27708 (lookup *ecx *(ecx+4))
27709 (write-buffered *(ebp+8) %eax)
27710 (write-buffered *(ebp+8) "/imm32\n")
27711 e9/jump $emit-int-output:end/disp32
27712 }
27713
27714 (emit-indent *(ebp+8) *Curr-block-depth)
27715 (write-buffered *(ebp+8) "8b/->")
27716 (emit-subx-var-as-rm32 *(ebp+8) *(ebp+0xc))
27717 (write-buffered *(ebp+8) " ")
27718 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
27719 (write-int32-hex-buffered *(ebp+8) *eax)
27720 (write-buffered *(ebp+8) "/r32\n")
27721 $emit-int-output:end:
27722
27723 59/pop-to-ecx
27724 58/pop-to-eax
27725
27726 89/<- %esp 5/r32/ebp
27727 5d/pop-to-ebp
27728 c3/return
27729
27730 emit-float-output:
27731
27732 55/push-ebp
27733 89/<- %ebp 4/r32/esp
27734
27735 50/push-eax
27736
27737 (emit-indent *(ebp+8) *Curr-block-depth)
27738 (write-buffered *(ebp+8) "f3 0f 10/->")
27739 (emit-subx-var-as-rm32 *(ebp+8) *(ebp+0xc))
27740 (write-buffered *(ebp+8) " ")
27741 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
27742 (write-int32-hex-buffered *(ebp+8) *eax)
27743 (write-buffered *(ebp+8) "/x32\n")
27744 $emit-float-output:end:
27745
27746 58/pop-to-eax
27747
27748 89/<- %esp 5/r32/ebp
27749 5d/pop-to-ebp
27750 c3/return
27751
27752 mu-branch?:
27753
27754 55/push-ebp
27755 89/<- %ebp 4/r32/esp
27756
27757 51/push-ecx
27758
27759 8b/-> *(ebp+8) 1/r32/ecx
27760 (lookup *(ecx+4) *(ecx+8))
27761 89/<- %ecx 0/r32/eax
27762
27763 (string-starts-with? %ecx "loop")
27764 3d/compare-eax-and 0/imm32/false
27765 75/jump-if-not-equal $mu-branch?:end/disp8
27766
27767 (string-starts-with? %ecx "break")
27768 3d/compare-eax-and 0/imm32/false
27769 75/jump-if-not-equal $mu-branch?:end/disp8
27770
27771 (string-starts-with? %ecx "return")
27772 $mu-branch?:end:
27773
27774 59/pop-to-ecx
27775
27776 89/<- %esp 5/r32/ebp
27777 5d/pop-to-ebp
27778 c3/return
27779
27780 emit-reverse-break:
27781
27782 55/push-ebp
27783 89/<- %ebp 4/r32/esp
27784
27785 50/push-eax
27786
27787 8b/-> *(ebp+0xc) 0/r32/eax
27788
27789 (lookup *(eax+4) *(eax+8))
27790 (get Reverse-branch %eax 0x10 "reverse-branch: ")
27791 (emit-indent *(ebp+8) *Curr-block-depth)
27792 (lookup *eax *(eax+4))
27793 (write-buffered *(ebp+8) %eax)
27794 (write-buffered *(ebp+8) " break/disp32\n")
27795 $emit-reverse-break:end:
27796
27797 58/pop-to-eax
27798
27799 89/<- %esp 5/r32/ebp
27800 5d/pop-to-ebp
27801 c3/return
27802
27803 == data
27804
27805
27806 Reverse-branch:
27807
27808 0x240/imm32/write
27809 0/imm32/read
27810 0x240/imm32/size
27811
27812 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
27813 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
27814 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
27815 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
27816 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
27817 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
27818 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
27819 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
27820 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_8f_jump_label/imm32
27821 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_8f_jump_label/imm32
27822 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
27823 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
27824 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27825 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27826 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27827 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27828 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27829 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27830 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27831 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27832 0x11/imm32/alloc-id _string-break-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27833 0x11/imm32/alloc-id _string-loop-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27834 0x11/imm32/alloc-id _string-break-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27835 0x11/imm32/alloc-id _string-loop-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27836 0x11/imm32/alloc-id _string-break-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27837 0x11/imm32/alloc-id _string-loop-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27838 0x11/imm32/alloc-id _string-break-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27839 0x11/imm32/alloc-id _string-loop-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27840 0x11/imm32/alloc-id _string-break-if-carry/imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27841 0x11/imm32/alloc-id _string-loop-if-carry/imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27842 0x11/imm32/alloc-id _string-break-if-not-carry/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27843 0x11/imm32/alloc-id _string-loop-if-not-carry/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27844 0x11/imm32/alloc-id _string-break-if-overflow/imm32 0x11/imm32/alloc-id _string_0f_81_jump_label/imm32
27845 0x11/imm32/alloc-id _string-loop-if-overflow/imm32 0x11/imm32/alloc-id _string_0f_81_jump_label/imm32
27846 0x11/imm32/alloc-id _string-break-if-not-overflow/imm32 0x11/imm32/alloc-id _string_0f_80_jump_label/imm32
27847 0x11/imm32/alloc-id _string-loop-if-not-overflow/imm32 0x11/imm32/alloc-id _string_0f_80_jump_label/imm32
27848
27849 == code
27850
27851 emit-unconditional-jump-to-depth:
27852
27853 55/push-ebp
27854 89/<- %ebp 4/r32/esp
27855
27856 50/push-eax
27857 51/push-ecx
27858 52/push-edx
27859 53/push-ebx
27860 56/push-esi
27861
27862 8b/-> *(ebp+0xc) 1/r32/ecx
27863
27864 8b/-> *ecx 0/r32/eax
27865
27866 8d/copy-address *(ecx+eax-4) 6/r32/esi
27867
27868 8d/copy-address *(ecx+8) 1/r32/ecx
27869
27870 8b/-> *(ebp+0x10) 2/r32/edx
27871 {
27872 $emit-unconditional-jump-to-depth:loop:
27873
27874 39/compare %esi 1/r32/ecx
27875 0f 82/jump-if-addr< break/disp32
27876
27877 (lookup *esi *(esi+4))
27878 89/<- %ebx 0/r32/eax
27879
27880 39/compare *(ebx+0x10) 2/r32/edx
27881 0f 8c/jump-if-< break/disp32
27882 {
27883 $emit-unconditional-jump-to-depth:check:
27884
27885 39/compare *(ebx+0x10) 2/r32/edx
27886 0f 85/jump-if-!= break/disp32
27887 $emit-unconditional-jump-to-depth:depth-found:
27888
27889 (size-of %ebx)
27890 3d/compare-eax-and 0/imm32
27891 0f 85/jump-if-!= break/disp32
27892 $emit-unconditional-jump-to-depth:label-found:
27893
27894 (emit-indent *(ebp+8) *Curr-block-depth)
27895 (write-buffered *(ebp+8) "e9/jump ")
27896 (lookup *ebx *(ebx+4))
27897 (write-buffered *(ebp+8) %eax)
27898 (write-buffered *(ebp+8) ":")
27899 (write-buffered *(ebp+8) *(ebp+0x14))
27900 (write-buffered *(ebp+8) "/disp32\n")
27901 eb/jump $emit-unconditional-jump-to-depth:end/disp8
27902 }
27903
27904 81 5/subop/subtract %esi 0xc/imm32
27905 e9/jump loop/disp32
27906 }
27907
27908 $emit-unconditional-jump-to-depth:end:
27909
27910 5e/pop-to-esi
27911 5b/pop-to-ebx
27912 5a/pop-to-edx
27913 59/pop-to-ecx
27914 58/pop-to-eax
27915
27916 89/<- %esp 5/r32/ebp
27917 5d/pop-to-ebp
27918 c3/return
27919
27920
27921
27922 emit-cleanup-code-until-depth:
27923
27924 55/push-ebp
27925 89/<- %ebp 4/r32/esp
27926
27927 50/push-eax
27928 51/push-ecx
27929 52/push-edx
27930 53/push-ebx
27931 56/push-esi
27932
27933
27934
27935 8b/-> *(ebp+0xc) 1/r32/ecx
27936
27937 8b/-> *ecx 6/r32/esi
27938
27939 8d/copy-address *(ecx+esi-4) 6/r32/esi
27940
27941 81 0/subop/add %ecx 8/imm32
27942
27943 8b/-> *(ebp+0x10) 2/r32/edx
27944 {
27945 $emit-cleanup-code-until-depth:loop:
27946
27947 39/compare %esi 1/r32/ecx
27948 0f 82/jump-if-addr< break/disp32
27949
27950 (lookup *esi *(esi+4))
27951 89/<- %ebx 0/r32/eax
27952
27953
27954
27955
27956
27957
27958 39/compare *(ebx+0x10) 2/r32/edx
27959 0f 8c/jump-if-< break/disp32
27960
27961 81 7/subop/compare *(ebx+0x18) 0/imm32
27962 {
27963 0f 84/jump-if-= break/disp32
27964 {
27965 $emit-cleanup-code-until-depth:check-for-previous-spill:
27966 8b/-> *(esi+8) 0/r32/eax
27967 3d/compare-eax-and 0/imm32/false
27968 74/jump-if-= break/disp8
27969 $emit-cleanup-code-until-depth:reclaim-var-in-register:
27970 (lookup *(ebx+0x18) *(ebx+0x1c))
27971 (emit-pop-register *(ebp+8) %eax)
27972 }
27973 eb/jump $emit-cleanup-code-until-depth:continue/disp8
27974 }
27975
27976 {
27977 75/jump-if-!= break/disp8
27978 $emit-cleanup-code-until-depth:var-on-stack:
27979 (size-of %ebx)
27980
27981 3d/compare-eax-and 0/imm32
27982 74/jump-if-= break/disp8
27983 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
27984 (emit-indent *(ebp+8) *Curr-block-depth)
27985 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
27986 (write-int32-hex-buffered *(ebp+8) %eax)
27987 (write-buffered *(ebp+8) "/imm32\n")
27988 }
27989 $emit-cleanup-code-until-depth:continue:
27990
27991 81 5/subop/subtract %esi 0xc/imm32
27992 e9/jump loop/disp32
27993 }
27994 $emit-cleanup-code-until-depth:end:
27995
27996 5e/pop-to-esi
27997 5b/pop-to-ebx
27998 5a/pop-to-edx
27999 59/pop-to-ecx
28000 58/pop-to-eax
28001
28002 89/<- %esp 5/r32/ebp
28003 5d/pop-to-ebp
28004 c3/return
28005
28006
28007
28008 emit-cleanup-code-for-non-outputs:
28009
28010 55/push-ebp
28011 89/<- %ebp 4/r32/esp
28012
28013 50/push-eax
28014 51/push-ecx
28015 52/push-edx
28016 53/push-ebx
28017 56/push-esi
28018 57/push-edi
28019
28020 8b/-> *(ebp+0xc) 1/r32/ecx
28021
28022 8b/-> *ecx 6/r32/esi
28023
28024 8d/copy-address *(ecx+esi-4) 6/r32/esi
28025
28026 81 0/subop/add %ecx 8/imm32
28027 {
28028 $emit-cleanup-code-for-non-outputs:loop:
28029
28030 39/compare %esi 1/r32/ecx
28031 0f 82/jump-if-addr< break/disp32
28032
28033 (lookup *esi *(esi+4))
28034 89/<- %ebx 0/r32/eax
28035
28036 81 7/subop/compare *(ebx+0x18) 0/imm32
28037 {
28038 0f 84/jump-if-= break/disp32
28039 {
28040 $emit-cleanup-code-for-non-outputs:check-for-previous-spill:
28041 8b/-> *(esi+8) 0/r32/eax
28042 3d/compare-eax-and 0/imm32/false
28043 0f 84/jump-if-= break/disp32
28044 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register:
28045
28046 (lookup *(ebx+0x18) *(ebx+0x1c))
28047 89/<- %edi 0/r32/eax
28048
28049 (reg-in-function-outputs? *(ebp+0x10) %edi)
28050 3d/compare-eax-and 0/imm32/false
28051 {
28052 75/jump-if-!= break/disp8
28053 (emit-pop-register *(ebp+8) %edi)
28054 eb/jump $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done/disp8
28055 }
28056
28057 (emit-indent *(ebp+8) *Curr-block-depth)
28058 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
28059 }
28060 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done:
28061 eb/jump $emit-cleanup-code-for-non-outputs:continue/disp8
28062 }
28063
28064 {
28065 75/jump-if-!= break/disp8
28066 $emit-cleanup-code-for-non-outputs:var-on-stack:
28067 (size-of %ebx)
28068
28069 3d/compare-eax-and 0/imm32
28070 74/jump-if-= break/disp8
28071 $emit-cleanup-code-for-non-outputs:reclaim-var-on-stack:
28072 (emit-indent *(ebp+8) *Curr-block-depth)
28073 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
28074 (write-int32-hex-buffered *(ebp+8) %eax)
28075 (write-buffered *(ebp+8) "/imm32\n")
28076 }
28077 $emit-cleanup-code-for-non-outputs:continue:
28078
28079 81 5/subop/subtract %esi 0xc/imm32
28080 e9/jump loop/disp32
28081 }
28082 $emit-cleanup-code-for-non-outputs:end:
28083
28084 5f/pop-to-edi
28085 5e/pop-to-esi
28086 5b/pop-to-ebx
28087 5a/pop-to-edx
28088 59/pop-to-ecx
28089 58/pop-to-eax
28090
28091 89/<- %esp 5/r32/ebp
28092 5d/pop-to-ebp
28093 c3/return
28094
28095 emit-push-register:
28096
28097 55/push-ebp
28098 89/<- %ebp 4/r32/esp
28099
28100 8b/-> *(ebp+0xc) 0/r32/eax
28101
28102 8a/copy-byte *(eax+4) 0/r32/AL
28103 25/and-eax-with 0xff/imm32
28104
28105 {
28106 3d/compare-eax-and 0x78/imm32/x
28107 0f 85/jump-if-!= break/disp32
28108
28109 (emit-indent *(ebp+8) *Curr-block-depth)
28110 (write-buffered *(ebp+8) "81 5/subop/subtract %esp 4/imm32\n")
28111 (emit-indent *(ebp+8) *Curr-block-depth)
28112 (write-buffered *(ebp+8) "f3 0f 11/<- *esp ")
28113
28114 8b/-> *(ebp+0xc) 0/r32/eax
28115 8a/copy-byte *(eax+7) 0/r32/AL
28116 25/and-eax-with 0xff/imm32
28117 (write-byte-buffered *(ebp+8) %eax)
28118 (write-buffered *(ebp+8) "/x32\n")
28119 e9/jump $emit-push-register:end/disp32
28120 }
28121
28122 (emit-indent *(ebp+8) *Curr-block-depth)
28123 (write-buffered *(ebp+8) "ff 6/subop/push %")
28124 (write-buffered *(ebp+8) *(ebp+0xc))
28125 (write-buffered *(ebp+8) Newline)
28126 $emit-push-register:end:
28127
28128 89/<- %esp 5/r32/ebp
28129 5d/pop-to-ebp
28130 c3/return
28131
28132 emit-pop-register:
28133
28134 55/push-ebp
28135 89/<- %ebp 4/r32/esp
28136
28137 50/push-eax
28138
28139 8b/-> *(ebp+0xc) 0/r32/eax
28140
28141 8a/copy-byte *(eax+4) 0/r32/AL
28142 25/and-eax-with 0xff/imm32
28143
28144 {
28145 3d/compare-eax-and 0x78/imm32/x
28146 0f 85/jump-if-!= break/disp32
28147
28148 (emit-indent *(ebp+8) *Curr-block-depth)
28149 (write-buffered *(ebp+8) "f3 0f 10/-> *esp ")
28150
28151 8b/-> *(ebp+0xc) 0/r32/eax
28152 8a/copy-byte *(eax+7) 0/r32/AL
28153 25/and-eax-with 0xff/imm32
28154 (write-byte-buffered *(ebp+8) %eax)
28155 (write-buffered *(ebp+8) "/x32\n")
28156 (emit-indent *(ebp+8) *Curr-block-depth)
28157 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
28158 e9/jump $emit-pop-register:end/disp32
28159 }
28160
28161 (emit-indent *(ebp+8) *Curr-block-depth)
28162 (write-buffered *(ebp+8) "8f 0/subop/pop %")
28163 (write-buffered *(ebp+8) *(ebp+0xc))
28164 (write-buffered *(ebp+8) Newline)
28165 $emit-pop-register:end:
28166
28167 58/pop-to-eax
28168
28169 89/<- %esp 5/r32/ebp
28170 5d/pop-to-ebp
28171 c3/return
28172
28173
28174
28175 emit-cleanup-code-until-target:
28176
28177 55/push-ebp
28178 89/<- %ebp 4/r32/esp
28179
28180 50/push-eax
28181 51/push-ecx
28182 52/push-edx
28183 53/push-ebx
28184
28185 8b/-> *(ebp+0xc) 1/r32/ecx
28186
28187 8b/-> *ecx 0/r32/eax
28188
28189 8d/copy-address *(ecx+eax-4) 2/r32/edx
28190
28191 81 0/subop/add %ecx 8/imm32
28192 {
28193 $emit-cleanup-code-until-target:loop:
28194
28195 39/compare %edx 1/r32/ecx
28196 0f 82/jump-if-addr< break/disp32
28197
28198 (lookup *edx *(edx+4))
28199 89/<- %ebx 0/r32/eax
28200
28201 (lookup *ebx *(ebx+4))
28202 (string-equal? %eax *(ebp+0x10))
28203 3d/compare-eax-and 0/imm32/false
28204 0f 85/jump-if-!= break/disp32
28205
28206 81 7/subop/compare *(ebx+0x18) 0/imm32
28207 {
28208 0f 84/jump-if-= break/disp32
28209 {
28210 $emit-cleanup-code-until-target:check-for-previous-spill:
28211 8b/-> *(edx+8) 0/r32/eax
28212 3d/compare-eax-and 0/imm32/false
28213 74/jump-if-= break/disp8
28214 $emit-cleanup-code-until-target:reclaim-var-in-register:
28215 (lookup *(ebx+0x18) *(ebx+0x1c))
28216 (emit-pop-register *(ebp+8) %eax)
28217 }
28218 eb/jump $emit-cleanup-code-until-target:continue/disp8
28219 }
28220
28221 {
28222 75/jump-if-!= break/disp8
28223 $emit-cleanup-code-until-target:reclaim-var-on-stack:
28224 (size-of %ebx)
28225
28226 3d/compare-eax-and 0/imm32
28227 74/jump-if-= break/disp8
28228
28229 (emit-indent *(ebp+8) *Curr-block-depth)
28230 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
28231 (write-int32-hex-buffered *(ebp+8) %eax)
28232 (write-buffered *(ebp+8) "/imm32\n")
28233 }
28234 $emit-cleanup-code-until-target:continue:
28235
28236 81 5/subop/subtract %edx 0xc/imm32
28237 e9/jump loop/disp32
28238 }
28239 $emit-cleanup-code-until-target:end:
28240
28241 5b/pop-to-ebx
28242 5a/pop-to-edx
28243 59/pop-to-ecx
28244 58/pop-to-eax
28245
28246 89/<- %esp 5/r32/ebp
28247 5d/pop-to-ebp
28248 c3/return
28249
28250
28251
28252 clean-up-stack-offset-state:
28253
28254 55/push-ebp
28255 89/<- %ebp 4/r32/esp
28256
28257 50/push-eax
28258 51/push-ecx
28259 52/push-edx
28260 53/push-ebx
28261 56/push-esi
28262
28263 8b/-> *(ebp+8) 1/r32/ecx
28264
28265 8b/-> *ecx 6/r32/esi
28266
28267 8d/copy-address *(ecx+esi-4) 6/r32/esi
28268
28269 81 0/subop/add %ecx 8/imm32
28270
28271 8b/-> *(ebp+0xc) 2/r32/edx
28272 {
28273 $clean-up-stack-offset-state:loop:
28274
28275 39/compare %esi 1/r32/ecx
28276 0f 82/jump-if-addr< break/disp32
28277
28278 (lookup *esi *(esi+4))
28279 89/<- %ebx 0/r32/eax
28280
28281 39/compare *(ebx+0x10) 2/r32/edx
28282 0f 8c/jump-if-< break/disp32
28283
28284 81 7/subop/compare *(ebx+0x18) 0/imm32
28285 {
28286 0f 84/jump-if-= break/disp32
28287 {
28288 $clean-up-stack-offset-state:check-for-previous-spill:
28289 8b/-> *(esi+8) 0/r32/eax
28290 3d/compare-eax-and 0/imm32/false
28291 74/jump-if-= break/disp8
28292 $clean-up-stack-offset-state:reclaim-var-in-register:
28293 81 0/subop/add *Curr-local-stack-offset 4/imm32
28294 }
28295 eb/jump $clean-up-stack-offset-state:continue/disp8
28296 }
28297
28298 {
28299 75/jump-if-!= break/disp8
28300 $clean-up-stack-offset-state:var-on-stack:
28301 (size-of %ebx)
28302 01/add-to *Curr-local-stack-offset 0/r32/eax
28303 }
28304 $clean-up-stack-offset-state:continue:
28305
28306 81 5/subop/subtract %esi 0xc/imm32
28307 e9/jump loop/disp32
28308 }
28309 $clean-up-stack-offset-state:end:
28310
28311 5e/pop-to-esi
28312 5b/pop-to-ebx
28313 5a/pop-to-edx
28314 59/pop-to-ecx
28315 58/pop-to-eax
28316
28317 89/<- %esp 5/r32/ebp
28318 5d/pop-to-ebp
28319 c3/return
28320
28321
28322
28323
28324 not-yet-spilled-this-block?:
28325
28326 55/push-ebp
28327 89/<- %ebp 4/r32/esp
28328
28329 51/push-ecx
28330 52/push-edx
28331 53/push-ebx
28332 56/push-esi
28333 57/push-edi
28334
28335 8b/-> *(ebp+0xc) 1/r32/ecx
28336
28337 8b/-> *ecx 0/r32/eax
28338
28339 8d/copy-address *(ecx+eax-4) 2/r32/edx
28340
28341 8d/copy-address *(ecx+8) 1/r32/ecx
28342
28343 8b/-> *(ebp+8) 3/r32/ebx
28344 8b/-> *(ebx+0x10) 3/r32/ebx
28345
28346 8b/-> *(ebp+8) 6/r32/esi
28347 (lookup *(esi+0x18) *(esi+0x1c))
28348 89/<- %esi 0/r32/eax
28349 {
28350 $not-yet-spilled-this-block?:loop:
28351
28352 39/compare %edx 1/r32/ecx
28353 0f 82/jump-if-addr< break/disp32
28354
28355 (lookup *edx *(edx+4))
28356 89/<- %edi 0/r32/eax
28357
28358 39/compare *(edi+0x10) 3/r32/ebx
28359 0f 8c/jump-if-< break/disp32
28360
28361 (lookup *(edi+0x18) *(edi+0x1c))
28362 89/<- %edi 0/r32/eax
28363
28364 {
28365 $not-yet-spilled-this-block?:check-reg:
28366 81 7/subop/compare %edi 0/imm32
28367 0f 84/jump-if-= break/disp32
28368
28369 (string-equal? %esi %edi)
28370 3d/compare-eax-and 0/imm32/false
28371 74/jump-if-= break/disp8
28372 $not-yet-spilled-this-block?:return-false:
28373 b8/copy-to-eax 0/imm32/false
28374 eb/jump $not-yet-spilled-this-block?:end/disp8
28375 }
28376 $not-yet-spilled-this-block?:continue:
28377
28378 81 5/subop/subtract %edx 0xc/imm32
28379 e9/jump loop/disp32
28380 }
28381 $not-yet-spilled-this-block?:return-true:
28382
28383 b8/copy-to-eax 1/imm32/true
28384 $not-yet-spilled-this-block?:end:
28385
28386 5f/pop-to-edi
28387 5e/pop-to-esi
28388 5b/pop-to-ebx
28389 5a/pop-to-edx
28390 59/pop-to-ecx
28391
28392 89/<- %esp 5/r32/ebp
28393 5d/pop-to-ebp
28394 c3/return
28395
28396
28397 will-not-write-some-register?:
28398
28399 55/push-ebp
28400 89/<- %ebp 4/r32/esp
28401
28402 8b/-> *(ebp+8) 0/r32/eax
28403
28404 (lookup *(eax+0x18) *(eax+0x1c))
28405
28406 (find-register *(ebp+0x10) %eax)
28407
28408 {
28409 3d/compare-eax-and 0/imm32
28410 75/jump-if-!= break/disp8
28411 b8/copy-to-eax 1/imm32/true
28412 eb/jump $will-not-write-some-register?:end/disp8
28413 }
28414
28415 (assigns-in-stmts? *(ebp+0xc) %eax)
28416 3d/compare-eax-and 0/imm32/false
28417
28418 0f 94/set-if-= %al
28419 $will-not-write-some-register?:end:
28420
28421 89/<- %esp 5/r32/ebp
28422 5d/pop-to-ebp
28423 c3/return
28424
28425
28426
28427 find-register:
28428
28429 55/push-ebp
28430 89/<- %ebp 4/r32/esp
28431
28432 51/push-ecx
28433
28434 8b/-> *(ebp+8) 1/r32/ecx
28435 (lookup *(ecx+0x10) *(ecx+0x14))
28436 89/<- %ecx 0/r32/eax
28437 {
28438 $find-register:loop:
28439
28440 81 7/subop/compare %ecx 0/imm32
28441 74/jump-if-= break/disp8
28442
28443 (lookup *ecx *(ecx+4))
28444 (lookup *(eax+0x18) *(eax+0x1c))
28445
28446 $find-register:compare:
28447 (string-equal? *(ebp+0xc) %eax)
28448 {
28449 3d/compare-eax-and 0/imm32/false
28450 74/jump-if-= break/disp8
28451 $find-register:found:
28452 (lookup *ecx *(ecx+4))
28453 eb/jump $find-register:end/disp8
28454 }
28455
28456 (lookup *(ecx+8) *(ecx+0xc))
28457 89/<- %ecx 0/r32/eax
28458
28459 eb/jump loop/disp8
28460 }
28461 $find-register:end:
28462
28463 59/pop-to-ecx
28464
28465 89/<- %esp 5/r32/ebp
28466 5d/pop-to-ebp
28467 c3/return
28468
28469 assigns-in-stmts?:
28470
28471 55/push-ebp
28472 89/<- %ebp 4/r32/esp
28473
28474 51/push-ecx
28475
28476 8b/-> *(ebp+8) 1/r32/ecx
28477 {
28478
28479 81 7/subop/compare %ecx 0/imm32
28480 74/jump-if-= break/disp8
28481
28482 (lookup *ecx *(ecx+4))
28483 (assigns-in-stmt? %eax *(ebp+0xc))
28484 3d/compare-eax-and 0/imm32/false
28485 75/jump-if-!= break/disp8
28486
28487 (lookup *(ecx+8) *(ecx+0xc))
28488 89/<- %ecx 0/r32/eax
28489
28490 eb/jump loop/disp8
28491 }
28492 $assigns-in-stmts?:end:
28493
28494 59/pop-to-ecx
28495
28496 89/<- %esp 5/r32/ebp
28497 5d/pop-to-ebp
28498 c3/return
28499
28500 assigns-in-stmt?:
28501
28502 55/push-ebp
28503 89/<- %ebp 4/r32/esp
28504
28505 51/push-ecx
28506
28507 8b/-> *(ebp+8) 1/r32/ecx
28508
28509 {
28510 81 7/subop/compare *ecx 1/imm32/stmt1
28511 75/jump-if-!= break/disp8
28512 (lookup *(ecx+0x14) *(ecx+0x18))
28513 (assigns-in-stmt-vars? %eax *(ebp+0xc))
28514 eb/jump $assigns-in-stmt?:end/disp8
28515 }
28516
28517 {
28518 81 7/subop/compare *ecx 0/imm32/block
28519 75/jump-if-!= break/disp8
28520 (lookup *(ecx+4) *(ecx+8))
28521 (assigns-in-stmts? %eax *(ebp+0xc))
28522 eb/jump $assigns-in-stmt?:end/disp8
28523 }
28524
28525 b8/copy 0/imm32/false
28526 $assigns-in-stmt?:end:
28527
28528 59/pop-to-ecx
28529
28530 89/<- %esp 5/r32/ebp
28531 5d/pop-to-ebp
28532 c3/return
28533
28534 assigns-in-stmt-vars?:
28535
28536 55/push-ebp
28537 89/<- %ebp 4/r32/esp
28538
28539 51/push-ecx
28540
28541 8b/-> *(ebp+8) 1/r32/ecx
28542 {
28543
28544 81 7/subop/compare %ecx 0/imm32
28545 74/jump-if-= break/disp8
28546
28547 (lookup *ecx *(ecx+4))
28548
28549 {
28550 39/compare *(ebp+0xc) 0/r32/eax
28551 75/jump-if-!= break/disp8
28552 81 7/subop/compare *(ecx+0x10) 0/imm32/false
28553 75/jump-if-!= break/disp8
28554 b8/copy-to-eax 1/imm32/true
28555 eb/jump $assigns-in-stmt-vars?:end/disp8
28556 }
28557
28558 (lookup *(ecx+8) *(ecx+0xc))
28559 89/<- %ecx 0/r32/eax
28560
28561 eb/jump loop/disp8
28562 }
28563 $assigns-in-stmt-vars?:end:
28564
28565 59/pop-to-ecx
28566
28567 89/<- %esp 5/r32/ebp
28568 5d/pop-to-ebp
28569 c3/return
28570
28571
28572
28573
28574
28575 same-register-spilled-before?:
28576
28577 55/push-ebp
28578 89/<- %ebp 4/r32/esp
28579
28580 51/push-ecx
28581 52/push-edx
28582 53/push-ebx
28583 56/push-esi
28584 57/push-edi
28585
28586 8b/-> *(ebp+8) 1/r32/ecx
28587
28588 (lookup *(ecx+0x18) *(ecx+0x1c))
28589 89/<- %edx 0/r32/eax
28590
28591 8b/-> *(ecx+0x10) 3/r32/ebx
28592
28593 8b/-> *(ebp+0xc) 1/r32/ecx
28594 81 0/subop/add %ecx 8/imm32
28595
28596
28597
28598 8b/-> *(ebp+0x10) 6/r32/esi
28599
28600 81 5/subop/subtract %esi 8/imm32
28601 {
28602 $same-register-spilled-before?:loop:
28603
28604 39/compare %esi 1/r32/ecx
28605 0f 82/jump-if-addr< break/disp32
28606
28607 (lookup *esi *(esi+4))
28608
28609 39/compare *(eax+0x10) 3/r32/ebx
28610 0f 8c/jump-if-< break/disp32
28611
28612 81 7/subop/compare *(eax+0x18) 0/imm32
28613 74/jump-if-= $same-register-spilled-before?:continue/disp8
28614
28615 (lookup *(eax+0x18) *(eax+0x1c))
28616 (string-equal? %eax %edx)
28617 3d/compare-eax-and 0/imm32/false
28618 b8/copy-to-eax 1/imm32/true
28619 75/jump-if-!= $same-register-spilled-before?:end/disp8
28620 $same-register-spilled-before?:continue:
28621
28622 81 5/subop/subtract %esi 8/imm32
28623 e9/jump loop/disp32
28624 }
28625 $same-register-spilled-before?:false:
28626 b8/copy-to-eax 0/imm32/false
28627 $same-register-spilled-before?:end:
28628
28629 5f/pop-to-edi
28630 5e/pop-to-esi
28631 5b/pop-to-ebx
28632 5a/pop-to-edx
28633 59/pop-to-ecx
28634
28635 89/<- %esp 5/r32/ebp
28636 5d/pop-to-ebp
28637 c3/return
28638
28639
28640 clean-up-blocks:
28641
28642 55/push-ebp
28643 89/<- %ebp 4/r32/esp
28644
28645 50/push-eax
28646 51/push-ecx
28647 56/push-esi
28648
28649 8b/-> *(ebp+8) 6/r32/esi
28650
28651 8b/-> *(ebp+0xc) 1/r32/ecx
28652 {
28653 $clean-up-blocks:reclaim-loop:
28654
28655 8b/-> *esi 0/r32/eax
28656 3d/compare-eax-and 0/imm32
28657 0f 8e/jump-if-<= break/disp32
28658
28659 (lookup *(esi+eax-4) *(esi+eax))
28660
28661 39/compare *(eax+0x10) 1/r32/ecx
28662 0f 8c/jump-if-< break/disp32
28663 (pop %esi)
28664 (pop %esi)
28665 (pop %esi)
28666 e9/jump loop/disp32
28667 }
28668 $clean-up-blocks:end:
28669
28670 5e/pop-to-esi
28671 59/pop-to-ecx
28672 58/pop-to-eax
28673
28674 89/<- %esp 5/r32/ebp
28675 5d/pop-to-ebp
28676 c3/return
28677
28678 reg-in-function-outputs?:
28679
28680 55/push-ebp
28681 89/<- %ebp 4/r32/esp
28682
28683 51/push-ecx
28684
28685 8b/-> *(ebp+8) 0/r32/eax
28686 (lookup *(eax+0x10) *(eax+0x14))
28687 89/<- %ecx 0/r32/eax
28688
28689 {
28690 81 7/subop/compare %ecx 0/imm32
28691 74/jump-if-= break/disp8
28692
28693 (lookup *ecx *(ecx+4))
28694
28695 (lookup *(eax+0x18) *(eax+0x1c))
28696
28697 (string-equal? %eax *(ebp+0xc))
28698 3d/compare-eax-and 0/imm32/false
28699 75/jump-if-!= $reg-in-function-outputs?:end/disp8
28700
28701 (lookup *(ecx+8) *(ecx+0xc))
28702 89/<- %ecx 0/r32/eax
28703
28704 eb/jump loop/disp8
28705 }
28706
28707 b8/copy-to-eax 0/imm32
28708 $reg-in-function-outputs?:end:
28709
28710 59/pop-to-ecx
28711
28712 89/<- %esp 5/r32/ebp
28713 5d/pop-to-ebp
28714 c3/return
28715
28716 emit-subx-var-def:
28717
28718 55/push-ebp
28719 89/<- %ebp 4/r32/esp
28720
28721 50/push-eax
28722 51/push-ecx
28723 52/push-edx
28724
28725 8b/-> *(ebp+0xc) 0/r32/eax
28726
28727 (lookup *(eax+4) *(eax+8))
28728 89/<- %ecx 0/r32/eax
28729
28730 8b/-> *Curr-block-depth 0/r32/eax
28731 89/<- *(ecx+0x10) 0/r32/eax
28732
28733 (size-of %ecx)
28734 89/<- %edx 0/r32/eax
28735
28736 29/subtract-from *Curr-local-stack-offset 2/r32/edx
28737
28738 8b/-> *Curr-local-stack-offset 0/r32/eax
28739 89/<- *(ecx+0x14) 0/r32/eax
28740
28741 {
28742 (lookup *(ecx+8) *(ecx+0xc))
28743 (mu-array? %eax)
28744 3d/compare-eax-and 0/imm32/false
28745 0f 84/jump-if-= break/disp32
28746
28747 81 5/subop/subtract %edx 4/imm32
28748
28749 (emit-array-data-initialization *(ebp+8) %edx)
28750 e9/jump $emit-subx-var-def:end/disp32
28751 }
28752
28753
28754 {
28755 (lookup *(ecx+8) *(ecx+0xc))
28756 (mu-stream? %eax)
28757 3d/compare-eax-and 0/imm32/false
28758 0f 84/jump-if-= break/disp32
28759
28760 81 5/subop/subtract %edx 0xc/imm32
28761 (lookup *(ecx+8) *(ecx+0xc))
28762 (emit-stream-data-initialization *(ebp+8) %edx %eax *(ebp+0x10) *(ebp+0x14))
28763
28764 (emit-indent *(ebp+8) *Curr-block-depth)
28765 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28766 (emit-indent *(ebp+8) *Curr-block-depth)
28767 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28768
28769 eb/jump $emit-subx-var-def:end/disp8
28770 }
28771
28772 {
28773 81 7/subop/compare %edx 0/imm32
28774 7e/jump-if-<= break/disp8
28775 (emit-indent *(ebp+8) *Curr-block-depth)
28776 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28777
28778 81 5/subop/subtract %edx 4/imm32
28779
28780 eb/jump loop/disp8
28781 }
28782 $emit-subx-var-def:end:
28783
28784 5a/pop-to-edx
28785 59/pop-to-ecx
28786 58/pop-to-eax
28787
28788 89/<- %esp 5/r32/ebp
28789 5d/pop-to-ebp
28790 c3/return
28791
28792 emit-array-data-initialization:
28793
28794 55/push-ebp
28795 89/<- %ebp 4/r32/esp
28796
28797 (emit-indent *(ebp+8) *Curr-block-depth)
28798 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
28799 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28800 (write-buffered *(ebp+8) ")\n")
28801 (emit-indent *(ebp+8) *Curr-block-depth)
28802 (write-buffered *(ebp+8) "68/push ")
28803 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28804 (write-buffered *(ebp+8) "/imm32\n")
28805 $emit-array-data-initialization:end:
28806
28807 89/<- %esp 5/r32/ebp
28808 5d/pop-to-ebp
28809 c3/return
28810
28811 emit-stream-data-initialization:
28812
28813 55/push-ebp
28814 89/<- %ebp 4/r32/esp
28815
28816 50/push-eax
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828 {
28829 (stream-element-type-id *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
28830 3d/compare-eax-and 8/imm32/byte
28831 75/jump-if-!= break/disp8
28832 (emit-indent *(ebp+8) *Curr-block-depth)
28833 (write-buffered *(ebp+8) "81 5/subop/subtract %esp ")
28834 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28835 (write-buffered *(ebp+8) "/imm32\n")
28836 eb/jump $emit-stream-data-initialization:emit-length/disp8
28837 }
28838 (emit-indent *(ebp+8) *Curr-block-depth)
28839 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
28840 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28841 (write-buffered *(ebp+8) ")\n")
28842 $emit-stream-data-initialization:emit-length:
28843 (emit-indent *(ebp+8) *Curr-block-depth)
28844 (write-buffered *(ebp+8) "68/push ")
28845 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28846 (write-buffered *(ebp+8) "/imm32\n")
28847 $emit-stream-data-initialization:end:
28848
28849 58/pop-to-eax
28850
28851 89/<- %esp 5/r32/ebp
28852 5d/pop-to-ebp
28853 c3/return
28854
28855 emit-subx-stmt:
28856
28857 55/push-ebp
28858 89/<- %ebp 4/r32/esp
28859
28860 50/push-eax
28861 51/push-ecx
28862
28863
28864 8b/-> *(ebp+0xc) 1/r32/ecx
28865 (lookup *(ecx+4) *(ecx+8))
28866 89/<- %ecx 0/r32/eax
28867
28868 {
28869
28870 (string-equal? %ecx "copy-byte")
28871 3d/compare-eax-and 0/imm32/false
28872 0f 84/jump-if-= break/disp32
28873 (translate-mu-copy-byte-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28874 e9/jump $emit-subx-stmt:end/disp32
28875 }
28876
28877
28878 {
28879
28880 (string-equal? %ecx "length")
28881 3d/compare-eax-and 0/imm32/false
28882 0f 84/jump-if-= break/disp32
28883 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28884 e9/jump $emit-subx-stmt:end/disp32
28885 }
28886
28887 {
28888
28889 (string-equal? %ecx "index")
28890 3d/compare-eax-and 0/imm32/false
28891 0f 84/jump-if-= break/disp32
28892 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
28893 e9/jump $emit-subx-stmt:end/disp32
28894 }
28895
28896 {
28897
28898 (string-equal? %ecx "compute-offset")
28899 3d/compare-eax-and 0/imm32/false
28900 0f 84/jump-if-= break/disp32
28901 (translate-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28902 e9/jump $emit-subx-stmt:end/disp32
28903 }
28904
28905 {
28906
28907 (string-equal? %ecx "get")
28908 3d/compare-eax-and 0/imm32/false
28909 0f 84/jump-if-= break/disp32
28910 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
28911 e9/jump $emit-subx-stmt:end/disp32
28912 }
28913
28914 {
28915
28916 (string-equal? %ecx "allocate")
28917 3d/compare-eax-and 0/imm32/false
28918 0f 84/jump-if-= break/disp32
28919 (translate-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28920 e9/jump $emit-subx-stmt:end/disp32
28921 }
28922
28923 {
28924
28925 (string-equal? %ecx "copy-object")
28926 3d/compare-eax-and 0/imm32/false
28927 0f 84/jump-if-= break/disp32
28928 (translate-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28929 e9/jump $emit-subx-stmt:end/disp32
28930 }
28931
28932 {
28933
28934 (string-equal? %ecx "clear-object")
28935 3d/compare-eax-and 0/imm32/false
28936 0f 84/jump-if-= break/disp32
28937 (translate-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28938 e9/jump $emit-subx-stmt:end/disp32
28939 }
28940
28941 {
28942
28943 (string-equal? %ecx "populate")
28944 3d/compare-eax-and 0/imm32/false
28945 0f 84/jump-if-= break/disp32
28946 (translate-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28947 e9/jump $emit-subx-stmt:end/disp32
28948 }
28949
28950 {
28951
28952 (string-equal? %ecx "populate-stream")
28953 3d/compare-eax-and 0/imm32/false
28954 0f 84/jump-if-= break/disp32
28955 (translate-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28956 e9/jump $emit-subx-stmt:end/disp32
28957 }
28958
28959 {
28960
28961 (string-equal? %ecx "read-from-stream")
28962 3d/compare-eax-and 0/imm32/false
28963 0f 84/jump-if-= break/disp32
28964 (translate-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28965 e9/jump $emit-subx-stmt:end/disp32
28966 }
28967
28968 {
28969
28970 (string-equal? %ecx "write-to-stream")
28971 3d/compare-eax-and 0/imm32/false
28972 0f 84/jump-if-= break/disp32
28973 (translate-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28974 e9/jump $emit-subx-stmt:end/disp32
28975 }
28976
28977
28978 (redundant-copy? *(ebp+0xc))
28979 3d/compare-eax-and 0/imm32/false
28980 75/jump-if-!= $emit-subx-stmt:end/disp8
28981
28982 {
28983 $emit-subx-stmt:check-for-primitive:
28984
28985 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
28986 3d/compare-eax-and 0/imm32
28987 74/jump-if-= break/disp8
28988 $emit-subx-stmt:primitive:
28989 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
28990 e9/jump $emit-subx-stmt:end/disp32
28991 }
28992
28993 $emit-subx-stmt:call:
28994 (emit-call *(ebp+8) *(ebp+0xc))
28995 $emit-subx-stmt:end:
28996
28997 59/pop-to-ecx
28998 58/pop-to-eax
28999
29000 89/<- %esp 5/r32/ebp
29001 5d/pop-to-ebp
29002 c3/return
29003
29004 redundant-copy?:
29005
29006 55/push-ebp
29007 89/<- %ebp 4/r32/esp
29008
29009 56/push-esi
29010 57/push-edi
29011
29012 8b/-> *(ebp+8) 6/r32/esi
29013
29014 (lookup *(esi+4) *(esi+8))
29015 (string-equal? %eax "copy")
29016 3d/compare-eax-and 0/imm32/false
29017 0f 84/jump-if-= $redundant-copy?:end/disp32
29018
29019 (lookup *(esi+0x14) *(esi+0x18))
29020 (lookup *eax *(eax+4))
29021 (lookup *(eax+0x18) *(eax+0x1c))
29022
29023 3d/compare-eax-and 0/imm32
29024 74/jump-if-= $redundant-copy?:end/disp8
29025 89/<- %edi 0/r32/eax
29026
29027 (lookup *(esi+0xc) *(esi+0x10))
29028
29029 81 7/subop/compare *(eax+0x10) 0/imm32/false
29030 {
29031 74/jump-if-= break/disp8
29032 b8/copy-to-eax 0/imm32/false
29033 e9/jump $redundant-copy?:end/disp32
29034 }
29035 (lookup *eax *(eax+4))
29036 (lookup *(eax+0x18) *(eax+0x1c))
29037
29038 3d/compare-eax-and 0/imm32
29039 74/jump-if-= $redundant-copy?:end/disp8
29040 (string-equal? %eax %edi)
29041 $redundant-copy?:end:
29042
29043 5f/pop-to-edi
29044 5e/pop-to-esi
29045
29046 89/<- %esp 5/r32/ebp
29047 5d/pop-to-ebp
29048 c3/return
29049
29050 translate-mu-length-stmt:
29051
29052 55/push-ebp
29053 89/<- %ebp 4/r32/esp
29054
29055 50/push-eax
29056 51/push-ecx
29057 52/push-edx
29058 53/push-ebx
29059 56/push-esi
29060
29061 8b/-> *(ebp+0xc) 6/r32/esi
29062
29063 (lookup *(esi+0xc) *(esi+0x10))
29064 (lookup *eax *(eax+4))
29065 89/<- %ebx 0/r32/eax
29066
29067 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29068 89/<- %ecx 0/r32/eax
29069
29070 (lookup *(esi+0x14) *(esi+0x18))
29071 (lookup *eax *(eax+4))
29072 (lookup *(eax+0x18) *(eax+0x1c))
29073 89/<- %edx 0/r32/eax
29074
29075 {
29076 81 7/subop/compare %ecx 1/imm32
29077 75/jump-if-!= break/disp8
29078 $translate-mu-length-stmt:size-1:
29079 (emit-save-size-to *(ebp+8) %ebx %edx)
29080 e9/jump $translate-mu-length-stmt:end/disp32
29081 }
29082
29083 {
29084 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
29085 3d/compare-eax-and 0/imm32/false
29086 74/jump-if-= break/disp8
29087 81 7/subop/compare %ecx 0xff/imm32
29088 7f/jump-if-> break/disp8
29089 $translate-mu-length-stmt:size-power-of-2:
29090 (emit-save-size-to *(ebp+8) %ebx %edx)
29091 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
29092 e9/jump $translate-mu-length-stmt:end/disp32
29093 }
29094
29095
29096 {
29097 $translate-mu-length-stmt:complex:
29098 (string-equal? %edx "eax")
29099 3d/compare-eax-and 0/imm32/false
29100 75/break-if-!= break/disp8
29101 (emit-indent *(ebp+8) *Curr-block-depth)
29102 (write-buffered *(ebp+8) "50/push-eax\n")
29103 }
29104 {
29105 (string-equal? %edx "ecx")
29106 3d/compare-eax-and 0/imm32/false
29107 75/break-if-!= break/disp8
29108 (emit-indent *(ebp+8) *Curr-block-depth)
29109 (write-buffered *(ebp+8) "51/push-ecx\n")
29110 }
29111 {
29112 (string-equal? %edx "edx")
29113 3d/compare-eax-and 0/imm32/false
29114 75/break-if-!= break/disp8
29115 (emit-indent *(ebp+8) *Curr-block-depth)
29116 (write-buffered *(ebp+8) "52/push-edx\n")
29117 }
29118
29119 (emit-save-size-to *(ebp+8) %ebx "eax")
29120 (emit-indent *(ebp+8) *Curr-block-depth)
29121 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
29122 (emit-indent *(ebp+8) *Curr-block-depth)
29123 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
29124 (write-int32-hex-buffered *(ebp+8) %ecx)
29125 (write-buffered *(ebp+8) "/imm32\n")
29126 (emit-indent *(ebp+8) *Curr-block-depth)
29127 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
29128 {
29129 (string-equal? %edx "eax")
29130 3d/compare-eax-and 0/imm32/false
29131 75/break-if-!= break/disp8
29132 (emit-indent *(ebp+8) *Curr-block-depth)
29133 (write-buffered *(ebp+8) "89/<- %")
29134 (write-buffered *(ebp+8) %edx)
29135 (write-buffered *(ebp+8) " 0/r32/eax\n")
29136 }
29137
29138 {
29139 (string-equal? %edx "edx")
29140 3d/compare-eax-and 0/imm32/false
29141 75/break-if-!= break/disp8
29142 (emit-indent *(ebp+8) *Curr-block-depth)
29143 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
29144 }
29145 {
29146 (string-equal? %edx "ecx")
29147 3d/compare-eax-and 0/imm32/false
29148 75/break-if-!= break/disp8
29149 (emit-indent *(ebp+8) *Curr-block-depth)
29150 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
29151 }
29152 {
29153 (string-equal? %edx "eax")
29154 3d/compare-eax-and 0/imm32/false
29155 75/break-if-!= break/disp8
29156 (emit-indent *(ebp+8) *Curr-block-depth)
29157 (write-buffered *(ebp+8) "58/pop-to-eax\n")
29158 }
29159 $translate-mu-length-stmt:end:
29160
29161 5e/pop-to-esi
29162 5b/pop-to-ebx
29163 5a/pop-to-edx
29164 59/pop-to-ecx
29165 58/pop-to-eax
29166
29167 89/<- %esp 5/r32/ebp
29168 5d/pop-to-ebp
29169 c3/return
29170
29171 array-element-size:
29172
29173 55/push-ebp
29174 89/<- %ebp 4/r32/esp
29175
29176 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
29177 (size-of-type-id-as-array-element %eax)
29178 $array-element-size:end:
29179
29180 89/<- %esp 5/r32/ebp
29181 5d/pop-to-ebp
29182 c3/return
29183
29184 array-element-type-id:
29185
29186
29187 55/push-ebp
29188 89/<- %ebp 4/r32/esp
29189
29190 8b/-> *(ebp+8) 0/r32/eax
29191
29192 (lookup *(eax+8) *(eax+0xc))
29193
29194 3d/compare-eax-with 0/imm32
29195 0f 84/jump-if-== $array-element-type-id:error0/disp32
29196
29197 81 7/subop/compare *eax 0/imm32/false
29198 0f 85/jump-if-!= $array-element-type-id:error1/disp32
29199
29200 {
29201 50/push-eax
29202 (lookup *(eax+4) *(eax+8))
29203 (simple-mu-type? %eax 2)
29204 3d/compare-eax-with 0/imm32/false
29205 58/pop-to-eax
29206 74/jump-if-= break/disp8
29207 $array-element-type-id:skip-addr:
29208 (lookup *(eax+0xc) *(eax+0x10))
29209 }
29210
29211 3d/compare-eax-with 0/imm32
29212 0f 84/jump-if-= $array-element-type-id:error2/disp32
29213
29214 81 7/subop/compare *eax 0/imm32/false
29215 0f 85/jump-if-!= $array-element-type-id:error2/disp32
29216
29217 {
29218 50/push-eax
29219 (lookup *(eax+4) *(eax+8))
29220 (simple-mu-type? %eax 3)
29221 3d/compare-eax-with 0/imm32/false
29222 58/pop-to-eax
29223 $array-element-type-id:no-array:
29224 0f 84/jump-if-= $array-element-type-id:error2/disp32
29225 }
29226 $array-element-type-id:skip-array:
29227
29228 (lookup *(eax+0xc) *(eax+0x10))
29229
29230 3d/compare-eax-with 0/imm32
29231 0f 84/jump-if-= $array-element-type-id:error2/disp32
29232
29233 81 7/subop/compare *eax 0/imm32/false
29234 0f 85/jump-if-!= $array-element-type-id:error2/disp32
29235
29236 (lookup *(eax+4) *(eax+8))
29237
29238
29239 {
29240 81 7/subop/compare *eax 0/imm32/false
29241 75/jump-if-!= break/disp8
29242 (lookup *(eax+4) *(eax+8))
29243 }
29244
29245 8b/-> *(eax+4) 0/r32/eax
29246 $array-element-type-id:end:
29247
29248 89/<- %esp 5/r32/ebp
29249 5d/pop-to-ebp
29250 c3/return
29251
29252 $array-element-type-id:error0:
29253 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
29254 50/push-eax
29255 8b/-> *(ebp+8) 0/r32/eax
29256 (lookup *eax *(eax+4))
29257 (write-buffered *(ebp+0xc) %eax)
29258 58/pop-to-eax
29259 (write-buffered *(ebp+0xc) "' has no type\n")
29260 (flush *(ebp+0xc))
29261 (stop *(ebp+0x10) 1)
29262
29263
29264 $array-element-type-id:error1:
29265 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
29266 50/push-eax
29267 8b/-> *(ebp+8) 0/r32/eax
29268 (lookup *eax *(eax+4))
29269 (write-buffered *(ebp+0xc) %eax)
29270 58/pop-to-eax
29271 (write-buffered *(ebp+0xc) "' has atomic type ")
29272 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
29273 (write-buffered *(ebp+0xc) Newline)
29274 (flush *(ebp+0xc))
29275 (stop *(ebp+0x10) 1)
29276
29277
29278 $array-element-type-id:error2:
29279 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
29280 50/push-eax
29281 8b/-> *(ebp+8) 0/r32/eax
29282 (lookup *eax *(eax+4))
29283 (write-buffered *(ebp+0xc) %eax)
29284 58/pop-to-eax
29285 (write-buffered *(ebp+0xc) "' has non-array type\n")
29286 (flush *(ebp+0xc))
29287 (stop *(ebp+0x10) 1)
29288
29289
29290 size-of-type-id-as-array-element:
29291
29292 55/push-ebp
29293 89/<- %ebp 4/r32/esp
29294
29295 8b/-> *(ebp+8) 0/r32/eax
29296
29297 3d/compare-eax-and 8/imm32/byte
29298 {
29299 75/jump-if-!= break/disp8
29300 b8/copy-to-eax 1/imm32
29301 eb/jump $size-of-type-id-as-array-element:end/disp8
29302 }
29303
29304 (size-of-type-id %eax)
29305 $size-of-type-id-as-array-element:end:
29306
29307 89/<- %esp 5/r32/ebp
29308 5d/pop-to-ebp
29309 c3/return
29310
29311 stream-element-type-id:
29312
29313
29314 55/push-ebp
29315 89/<- %ebp 4/r32/esp
29316
29317 8b/-> *(ebp+8) 0/r32/eax
29318
29319 3d/compare-eax-with 0/imm32
29320 0f 84/jump-if-== $stream-element-type-id:error0/disp32
29321
29322 81 7/subop/compare *eax 0/imm32/false
29323 0f 85/jump-if-!= $stream-element-type-id:error1/disp32
29324
29325 {
29326 50/push-eax
29327 (lookup *(eax+4) *(eax+8))
29328 (simple-mu-type? %eax 2)
29329 3d/compare-eax-with 0/imm32/false
29330 58/pop-to-eax
29331 74/jump-if-= break/disp8
29332 $stream-element-type-id:skip-addr:
29333 (lookup *(eax+0xc) *(eax+0x10))
29334 }
29335
29336 3d/compare-eax-with 0/imm32
29337 0f 84/jump-if-= $stream-element-type-id:error2/disp32
29338
29339 81 7/subop/compare *eax 0/imm32/false
29340 0f 85/jump-if-!= $stream-element-type-id:error2/disp32
29341
29342 {
29343 50/push-eax
29344 (lookup *(eax+4) *(eax+8))
29345 (simple-mu-type? %eax 0xb)
29346 3d/compare-eax-with 0/imm32/false
29347 58/pop-to-eax
29348 $stream-element-type-id:no-stream:
29349 0f 84/jump-if-= $stream-element-type-id:error2/disp32
29350 }
29351 $stream-element-type-id:skip-stream:
29352
29353 (lookup *(eax+0xc) *(eax+0x10))
29354
29355 3d/compare-eax-with 0/imm32
29356 0f 84/jump-if-= $stream-element-type-id:error2/disp32
29357
29358 81 7/subop/compare *eax 0/imm32/false
29359 0f 85/jump-if-!= $stream-element-type-id:error2/disp32
29360
29361 (lookup *(eax+4) *(eax+8))
29362
29363 {
29364 81 7/subop/compare *eax 0/imm32/false
29365 75/jump-if-!= break/disp8
29366 (lookup *(eax+4) *(eax+8))
29367 }
29368
29369 8b/-> *(eax+4) 0/r32/eax
29370 $stream-element-type-id:end:
29371
29372 89/<- %esp 5/r32/ebp
29373 5d/pop-to-ebp
29374 c3/return
29375
29376 $stream-element-type-id:error0:
29377 (write-buffered *(ebp+0xc) "stream-element-type-id: var '")
29378 50/push-eax
29379 8b/-> *(ebp+8) 0/r32/eax
29380 (lookup *eax *(eax+4))
29381 (write-buffered *(ebp+0xc) %eax)
29382 58/pop-to-eax
29383 (write-buffered *(ebp+0xc) "' has no type\n")
29384 (flush *(ebp+0xc))
29385 (stop *(ebp+0x10) 1)
29386
29387
29388 $stream-element-type-id:error1:
29389 (write-buffered *(ebp+0xc) "stream-element-type-id: var '")
29390 50/push-eax
29391 8b/-> *(ebp+8) 0/r32/eax
29392 (lookup *eax *(eax+4))
29393 (write-buffered *(ebp+0xc) %eax)
29394 58/pop-to-eax
29395 (write-buffered *(ebp+0xc) "' has atomic type ")
29396 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
29397 (write-buffered *(ebp+0xc) Newline)
29398 (flush *(ebp+0xc))
29399 (stop *(ebp+0x10) 1)
29400
29401
29402 $stream-element-type-id:error2:
29403 (write-buffered *(ebp+0xc) "stream-element-type-id: var '")
29404 50/push-eax
29405 8b/-> *(ebp+8) 0/r32/eax
29406 (lookup *eax *(eax+4))
29407 (write-buffered *(ebp+0xc) %eax)
29408 58/pop-to-eax
29409 (write-buffered *(ebp+0xc) "' has non-stream type\n")
29410 (flush *(ebp+0xc))
29411 (stop *(ebp+0x10) 1)
29412
29413
29414 emit-save-size-to:
29415
29416 55/push-ebp
29417 89/<- %ebp 4/r32/esp
29418
29419 50/push-eax
29420 53/push-ebx
29421
29422 8b/-> *(ebp+0xc) 3/r32/ebx
29423 (emit-indent *(ebp+8) *Curr-block-depth)
29424 (write-buffered *(ebp+8) "8b/-> *")
29425
29426 {
29427 81 7/subop/compare *(ebx+0x18)) 0/imm32
29428 74/jump-if-= break/disp8
29429 $emit-save-size-to:emit-base-from-register:
29430 (lookup *(ebx+0x18) *(ebx+0x1c))
29431 (write-buffered *(ebp+8) %eax)
29432 eb/jump $emit-save-size-to:emit-output/disp8
29433 }
29434
29435 {
29436 81 7/subop/compare *(ebx+0x14)) 0/imm32
29437 74/jump-if-= break/disp8
29438 $emit-save-size-to:emit-base-from-stack:
29439 (write-buffered *(ebp+8) "(ebp+")
29440 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
29441 (write-buffered *(ebp+8) ")")
29442 }
29443 $emit-save-size-to:emit-output:
29444 (write-buffered *(ebp+8) " ")
29445 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
29446 (write-int32-hex-buffered *(ebp+8) *eax)
29447 (write-buffered *(ebp+8) "/r32\n")
29448 $emit-save-size-to:end:
29449
29450 5b/pop-to-ebx
29451 58/pop-to-eax
29452
29453 89/<- %esp 5/r32/ebp
29454 5d/pop-to-ebp
29455 c3/return
29456
29457 emit-divide-by-shift-right:
29458
29459 55/push-ebp
29460 89/<- %ebp 4/r32/esp
29461
29462 50/push-eax
29463
29464 (emit-indent *(ebp+8) *Curr-block-depth)
29465 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
29466 (write-buffered *(ebp+8) *(ebp+0xc))
29467 (write-buffered *(ebp+8) Space)
29468 (num-shift-rights *(ebp+0x10))
29469 (write-int32-hex-buffered *(ebp+8) %eax)
29470 (write-buffered *(ebp+8) "/imm8\n")
29471 $emit-divide-by-shift-right:end:
29472
29473 58/pop-to-eax
29474
29475 89/<- %esp 5/r32/ebp
29476 5d/pop-to-ebp
29477 c3/return
29478
29479 translate-mu-copy-byte-stmt:
29480
29481 55/push-ebp
29482 89/<- %ebp 4/r32/esp
29483
29484 50/push-eax
29485 56/push-esi
29486
29487 8b/-> *(ebp+0xc) 6/r32/esi
29488
29489 (emit-indent *(ebp+8) *Curr-block-depth)
29490 (write-buffered *(ebp+8) "8a/byte->")
29491
29492 (lookup *(esi+0xc) *(esi+0x10))
29493 (emit-subx-var-as-rm32 *(ebp+8) %eax)
29494
29495 (lookup *(esi+0x14) *(esi+0x18))
29496 (lookup *eax *(eax+4))
29497 (lookup *(eax+0x18) *(eax+0x1c))
29498 (maybe-get Mu-registers %eax 0xc)
29499 (write-buffered *(ebp+8) Space)
29500 (write-int32-hex-buffered *(ebp+8) *eax)
29501 (write-buffered *(ebp+8) "/r32\n")
29502
29503 (emit-indent *(ebp+8) *Curr-block-depth)
29504 (write-buffered *(ebp+8) "81 4/subop/and %")
29505 8b/-> *(ebp+0xc) 0/r32/eax
29506 (lookup *(esi+0x14) *(esi+0x18))
29507 (lookup *eax *(eax+4))
29508 (lookup *(eax+0x18) *(eax+0x1c))
29509 (write-buffered *(ebp+8) %eax)
29510 (write-buffered *(ebp+8) " 0xff/imm32\n")
29511 $translate-mu-copy-byte-stmt:end:
29512
29513 5e/pop-to-esi
29514 58/pop-to-eax
29515
29516 89/<- %esp 5/r32/ebp
29517 5d/pop-to-ebp
29518 c3/return
29519
29520
29521 translate-mu-index-stmt:
29522
29523 55/push-ebp
29524 89/<- %ebp 4/r32/esp
29525
29526 53/push-ebx
29527
29528 8b/-> *(ebp+0xc) 3/r32/ebx
29529
29530 (lookup *(ebx+0xc) *(ebx+0x10))
29531 (lookup *eax *(eax+4))
29532 89/<- %ebx 0/r32/eax
29533
29534 (emit-mu-index-bounds-check *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
29535
29536 {
29537 81 7/subop/compare *(ebx+0x18) 0/imm32
29538 74/jump-if-= break/disp8
29539
29540 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
29541 eb/jump $translate-mu-index-stmt:end/disp8
29542 }
29543
29544 {
29545 81 7/subop/compare *(ebx+0x14) 0/imm32
29546 74/jump-if-= break/disp8
29547
29548 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
29549 eb/jump $translate-mu-index-stmt:end/disp8
29550 }
29551 $translate-mu-index-stmt:end:
29552
29553 5b/pop-to-ebx
29554
29555 89/<- %esp 5/r32/ebp
29556 5d/pop-to-ebp
29557 c3/return
29558
29559 $translate-mu-index-stmt:error1:
29560 (write-buffered *(ebp+0x14) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
29561 (flush *(ebp+0x14))
29562 (stop *(ebp+0x18) 1)
29563
29564
29565 $translate-mu-index-stmt:error2:
29566 (write-buffered *(ebp+0x14) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
29567 (flush *(ebp+0x14))
29568 (stop *(ebp+0x18) 1)
29569
29570
29571 emit-mu-index-bounds-check:
29572
29573 55/push-ebp
29574 89/<- %ebp 4/r32/esp
29575
29576 50/push-eax
29577 51/push-ecx
29578 52/push-edx
29579 53/push-ebx
29580
29581 8b/-> *(ebp+0xc) 1/r32/ecx
29582
29583 (emit-indent *(ebp+8) *Curr-block-depth)
29584 (write-buffered *(ebp+8) "(__check-mu-array-bounds ")
29585 $emit-mu-index-bounds-check:compute-base:
29586
29587 (lookup *(ecx+0xc) *(ecx+0x10))
29588 (lookup *eax *(eax+4))
29589 89/<- %ebx 0/r32/eax
29590 $emit-mu-index-bounds-check:emit-index:
29591
29592 (lookup *(ecx+0xc) *(ecx+0x10))
29593 (lookup *(eax+8) *(eax+0xc))
29594 (lookup *eax *(eax+4))
29595 89/<- %edx 0/r32/eax
29596
29597 81 7/subop/compare *(edx+0x18) 0/imm32
29598 {
29599 0f 84/jump-if-= break/disp32
29600 $emit-mu-index-bounds-check:emit-register-index:
29601 (write-buffered *(ebp+8) "%")
29602 (lookup *(edx+0x18) *(edx+0x1c))
29603 (write-buffered *(ebp+8) %eax)
29604 eb/jump $emit-mu-index-bounds-check:index-done/disp8
29605 }
29606
29607 $emit-mu-index-bounds-check:emit-literal-index:
29608 (lookup *(edx+8) *(edx+0xc))
29609 (simple-mu-type? %eax 0)
29610 3d/compare-eax-and 0/imm32/false
29611 {
29612 0f 84/jump-if-= break/disp32
29613 (lookup *edx *(edx+4))
29614 (write-buffered *(ebp+8) %eax)
29615 }
29616 $emit-mu-index-bounds-check:index-done:
29617 (write-buffered *(ebp+8) " ")
29618 $emit-mu-index-bounds-check:emit-element-size:
29619
29620 {
29621 {
29622 (lookup *(edx+8) *(edx+0xc))
29623 (simple-mu-type? %eax 0)
29624 3d/compare-eax-and 0/imm32/false
29625 75/jump-if-!= break/disp8
29626 (lookup *(edx+8) *(edx+0xc))
29627 (simple-mu-type? %eax 1)
29628 3d/compare-eax-and 0/imm32/false
29629 75/jump-if-!= break/disp8
29630 eb/jump $emit-mu-index-bounds-check:emit-element-size-offset/disp8
29631 }
29632 $emit-mu-index-bounds-check:emit-int-register-index:
29633 (array-element-size %ebx *(ebp+0x14) *(ebp+0x18))
29634 (write-int32-hex-buffered *(ebp+8) %eax)
29635 e9/jump $emit-mu-index-bounds-check:emit-base/disp32
29636 }
29637 $emit-mu-index-bounds-check:emit-element-size-offset:
29638
29639 (lookup *(edx+8) *(edx+0xc))
29640 81 7/subop/compare *eax 0/imm32/false
29641 {
29642 75/jump-if-!= break/disp8
29643 (lookup *(eax+4) *(eax+8))
29644 (simple-mu-type? %eax 7)
29645 3d/compare-eax-and 0/imm32/false
29646 {
29647 0f 84/jump-if-= break/disp32
29648 $emit-mu-index-bounds-check:emit-offset-register-index:
29649 (write-buffered *(ebp+8) "1")
29650 }
29651 }
29652 $emit-mu-index-bounds-check:emit-base:
29653
29654 81 7/subop/compare *(ebx+0x18) 0/imm32
29655 {
29656 74/jump-if-= break/disp8
29657 (write-buffered *(ebp+8) " *")
29658 (lookup *(ebx+0x18) *(ebx+0x1c))
29659 (write-buffered *(ebp+8) %eax)
29660 e9/jump $emit-mu-index-bounds-check:emit-function-name/disp32
29661 }
29662
29663 (write-buffered *(ebp+8) " *(ebp+")
29664 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
29665 (write-buffered *(ebp+8) ")")
29666 $emit-mu-index-bounds-check:emit-function-name:
29667
29668 (write-buffered *(ebp+8) " \"")
29669 8b/-> *(ebp+0x10) 1/r32/ecx
29670 (lookup *ecx *(ecx+4))
29671 (write-buffered *(ebp+8) %eax)
29672 (write-buffered *(ebp+8) "\"")
29673 $emit-mu-index-bounds-check:emit-array-name:
29674
29675 (write-buffered *(ebp+8) " \"")
29676 (lookup *ebx *(ebx+4))
29677 (write-buffered *(ebp+8) %eax)
29678 (write-buffered *(ebp+8) "\")\n")
29679 $emit-mu-index-bounds-check:end:
29680
29681 5b/pop-to-ebx
29682 5a/pop-to-edx
29683 59/pop-to-ecx
29684 58/pop-to-eax
29685
29686 89/<- %esp 5/r32/ebp
29687 5d/pop-to-ebp
29688 c3/return
29689
29690 translate-mu-index-stmt-with-array-in-register:
29691
29692 55/push-ebp
29693 89/<- %ebp 4/r32/esp
29694
29695 50/push-eax
29696 51/push-ecx
29697 52/push-edx
29698 53/push-ebx
29699
29700 8b/-> *(ebp+0xc) 1/r32/ecx
29701
29702 (lookup *(ecx+0xc) *(ecx+0x10))
29703 (lookup *eax *(eax+4))
29704 89/<- %ebx 0/r32/eax
29705
29706 (emit-indent *(ebp+8) *Curr-block-depth)
29707 (write-buffered *(ebp+8) "81 7/subop/compare %")
29708 (lookup *(ebx+0x18) *(ebx+0x1c))
29709 (write-buffered *(ebp+8) %eax)
29710 (write-buffered *(ebp+8) " 0/imm32\n")
29711 (emit-indent *(ebp+8) *Curr-block-depth)
29712 (write-buffered *(ebp+8) "0f 84/jump-if-= __mu-abort-null-index-base-address/disp32\n")
29713
29714 (emit-indent *(ebp+8) *Curr-block-depth)
29715 (write-buffered *(ebp+8) "8d/copy-address *(")
29716
29717 $translate-mu-index-stmt-with-array-in-register:emit-base:
29718
29719 (lookup *(ebx+0x18) *(ebx+0x1c))
29720 (write-buffered *(ebp+8) %eax)
29721 (write-buffered *(ebp+8) " + ")
29722
29723 (lookup *(ecx+0xc) *(ecx+0x10))
29724 (lookup *(eax+8) *(eax+0xc))
29725 (lookup *eax *(eax+4))
29726 89/<- %edx 0/r32/eax
29727
29728 81 7/subop/compare *(edx+0x18) 0/imm32
29729 {
29730 0f 84/jump-if-= break/disp32
29731 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
29732
29733 (lookup *(edx+8) *(edx+0xc))
29734 (simple-mu-type? %eax 1)
29735 3d/compare-eax-and 0/imm32/false
29736 {
29737 0f 84/jump-if-= break/disp32
29738 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
29739
29740
29741 (lookup *(edx+0x18) *(edx+0x1c))
29742 (write-buffered *(ebp+8) %eax)
29743 (write-buffered *(ebp+8) "<<")
29744
29745
29746 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29747 (num-shift-rights %eax)
29748 (write-int32-hex-buffered *(ebp+8) %eax)
29749 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
29750 }
29751
29752 (lookup *(edx+8) *(edx+0xc))
29753 81 7/subop/compare *eax 0/imm32/false
29754 0f 85/jump-if-!= $translate-mu-index-stmt:error2/disp32
29755
29756 (lookup *(eax+4) *(eax+8))
29757 (simple-mu-type? %eax 7)
29758 3d/compare-eax-and 0/imm32/false
29759 {
29760 0f 84/jump-if-= break/disp32
29761
29762 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
29763 (lookup *(edx+0x18) *(edx+0x1c))
29764 (write-buffered *(ebp+8) %eax)
29765 }
29766 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
29767 (write-buffered *(ebp+8) " + 4) ")
29768 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
29769 }
29770
29771 (lookup *(edx+8) *(edx+0xc))
29772 (simple-mu-type? %eax 0)
29773 3d/compare-eax-and 0/imm32/false
29774 {
29775 0f 84/jump-if-= break/disp32
29776 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
29777
29778 (lookup *edx *(edx+4))
29779 (parse-hex-int %eax)
29780 89/<- %edx 0/r32/eax
29781
29782 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29783 f7 4/subop/multiply-into-edx-eax %edx
29784
29785 05/add-to-eax 4/imm32
29786
29787
29788 (write-int32-hex-buffered *(ebp+8) %eax)
29789 (write-buffered *(ebp+8) ") ")
29790 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
29791 }
29792
29793 e9/jump $translate-mu-index-stmt:error1/disp32
29794 $translate-mu-index-stmt-with-array-in-register:emit-output:
29795
29796 8b/-> *(ebp+0xc) 1/r32/ecx
29797 (lookup *(ecx+0x14) *(ecx+0x18))
29798 (lookup *eax *(eax+4))
29799 (lookup *(eax+0x18) *(eax+0x1c))
29800 (get Mu-registers %eax 0xc "Mu-registers")
29801 (write-int32-hex-buffered *(ebp+8) *eax)
29802 (write-buffered *(ebp+8) "/r32\n")
29803 $translate-mu-index-stmt-with-array-in-register:end:
29804
29805 5b/pop-to-ebx
29806 5a/pop-to-edx
29807 59/pop-to-ecx
29808 58/pop-to-eax
29809
29810 89/<- %esp 5/r32/ebp
29811 5d/pop-to-ebp
29812 c3/return
29813
29814 translate-mu-index-stmt-with-array-on-stack:
29815
29816 55/push-ebp
29817 89/<- %ebp 4/r32/esp
29818
29819 50/push-eax
29820 51/push-ecx
29821 52/push-edx
29822 53/push-ebx
29823
29824 (emit-indent *(ebp+8) *Curr-block-depth)
29825 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
29826
29827 8b/-> *(ebp+0xc) 0/r32/eax
29828 (lookup *(eax+0xc) *(eax+0x10))
29829 89/<- %edx 0/r32/eax
29830
29831 (lookup *eax *(eax+4))
29832 89/<- %ecx 0/r32/eax
29833
29834 (lookup *(edx+8) *(edx+0xc))
29835
29836 (lookup *eax *(eax+4))
29837 89/<- %edx 0/r32/eax
29838
29839 81 7/subop/compare *(edx+0x18) 0/imm32
29840 {
29841 0f 84/jump-if-= break/disp32
29842 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
29843
29844 (lookup *(edx+8) *(edx+0xc))
29845 (simple-mu-type? %eax 1)
29846 3d/compare-eax-and 0/imm32/false
29847 {
29848 0f 84/jump-if-= break/disp32
29849 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
29850
29851
29852 (lookup *(edx+0x18) *(edx+0x1c))
29853 (write-buffered *(ebp+8) %eax)
29854 (write-buffered *(ebp+8) "<<")
29855
29856
29857 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
29858 (num-shift-rights %eax)
29859 (write-int32-hex-buffered *(ebp+8) %eax)
29860
29861 (write-buffered *(ebp+8) " + ")
29862
29863 8b/-> *(ecx+0x14) 0/r32/eax
29864 05/add-to-eax 4/imm32
29865 (write-int32-hex-buffered *(ebp+8) %eax)
29866 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
29867 }
29868
29869 (lookup *(edx+8) *(edx+0xc))
29870 81 7/subop/compare *eax 0/imm32/false
29871 0f 85/jump-if-!= $translate-mu-index-stmt:error2/disp32
29872
29873 (lookup *(eax+4) *(eax+8))
29874 (simple-mu-type? %eax 7)
29875 3d/compare-eax-and 0/imm32/false
29876 {
29877 0f 84/jump-if-= break/disp32
29878
29879 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
29880 (lookup *(edx+0x18) *(edx+0x1c))
29881 (write-buffered *(ebp+8) %eax)
29882 }
29883 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
29884 (write-buffered *(ebp+8) ") ")
29885 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
29886 }
29887
29888 (lookup *(edx+8) *(edx+0xc))
29889 (simple-mu-type? %eax 0)
29890 3d/compare-eax-and 0/imm32/false
29891 {
29892 0f 84/jump-if-= break/disp32
29893 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
29894
29895 (lookup *edx *(edx+4))
29896 (parse-hex-int %eax)
29897 89/<- %edx 0/r32/eax
29898
29899 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
29900 f7 4/subop/multiply-into-edx-eax %edx
29901
29902 03/add *(ecx+0x14) 0/r32/eax
29903
29904 05/add-to-eax 4/imm32
29905
29906
29907 (write-int32-hex-buffered *(ebp+8) %eax)
29908 (write-buffered *(ebp+8) ") ")
29909 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
29910 }
29911
29912 e9/jump $translate-mu-index-stmt:error1/disp32
29913 $translate-mu-index-stmt-with-array-on-stack:emit-output:
29914
29915 8b/-> *(ebp+0xc) 0/r32/eax
29916 (lookup *(eax+0x14) *(eax+0x18))
29917 (lookup *eax *(eax+4))
29918 (lookup *(eax+0x18) *(eax+0x1c))
29919 (get Mu-registers %eax 0xc "Mu-registers")
29920 (write-int32-hex-buffered *(ebp+8) *eax)
29921 (write-buffered *(ebp+8) "/r32\n")
29922 $translate-mu-index-stmt-with-array-on-stack:end:
29923
29924 5b/pop-to-ebx
29925 5a/pop-to-edx
29926 59/pop-to-ecx
29927 58/pop-to-eax
29928
29929 89/<- %esp 5/r32/ebp
29930 5d/pop-to-ebp
29931 c3/return
29932
29933 translate-mu-compute-offset-stmt:
29934
29935 55/push-ebp
29936 89/<- %ebp 4/r32/esp
29937
29938 50/push-eax
29939
29940 8b/-> *(ebp+0xc) 0/r32/eax
29941 (lookup *(eax+0xc) *(eax+0x10))
29942 (lookup *(eax+8) *(eax+0xc))
29943 (lookup *eax *(eax+4))
29944 (lookup *(eax+8) *(eax+0xc))
29945 (simple-mu-type? %eax 0)
29946 3d/compare-eax-and 0/imm32/false
29947 {
29948 74/jump-if-= break/disp8
29949
29950 (translate-mu-compute-offset-stmt-with-literal-index *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
29951 eb/jump $translate-mu-compute-offset-stmt:end/disp8
29952 }
29953 (translate-mu-compute-offset-stmt-with-register-index *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
29954 $translate-mu-compute-offset-stmt:end:
29955
29956 58/pop-to-eax
29957
29958 89/<- %esp 5/r32/ebp
29959 5d/pop-to-ebp
29960 c3/return
29961
29962 translate-mu-compute-offset-stmt-with-register-index:
29963
29964 55/push-ebp
29965 89/<- %ebp 4/r32/esp
29966
29967 50/push-eax
29968 51/push-ecx
29969 52/push-edx
29970 53/push-ebx
29971
29972 (emit-indent *(ebp+8) *Curr-block-depth)
29973 (write-buffered *(ebp+8) "69/multiply")
29974
29975 8b/-> *(ebp+0xc) 1/r32/ecx
29976
29977 (lookup *(ecx+0xc) *(ecx+0x10))
29978 89/<- %ebx 0/r32/eax
29979 $translate-mu-compute-offset-stmt-with-register-index:emit-index:
29980 (lookup *(ebx+8) *(ebx+0xc))
29981 (emit-subx-var-as-rm32 *(ebp+8) %eax)
29982 (write-buffered *(ebp+8) Space)
29983 $translate-mu-compute-offset-stmt-with-register-index:emit-elem-size:
29984
29985 (lookup *ebx *(ebx+4))
29986 89/<- %ebx 0/r32/eax
29987
29988 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29989 (write-int32-hex-buffered *(ebp+8) %eax)
29990 (write-buffered *(ebp+8) "/imm32 ")
29991 $translate-mu-compute-offset-stmt-with-register-index:emit-output:
29992
29993 (lookup *(ecx+0x14) *(ecx+0x18))
29994 (lookup *eax *(eax+4))
29995 (lookup *(eax+0x18) *(eax+0x1c))
29996 (get Mu-registers %eax 0xc "Mu-registers")
29997 (write-int32-hex-buffered *(ebp+8) *eax)
29998 (write-buffered *(ebp+8) "/r32\n")
29999 $translate-mu-compute-offset-stmt-with-register-index:end:
30000
30001 5b/pop-to-ebx
30002 5a/pop-to-edx
30003 59/pop-to-ecx
30004 58/pop-to-eax
30005
30006 89/<- %esp 5/r32/ebp
30007 5d/pop-to-ebp
30008 c3/return
30009
30010 translate-mu-compute-offset-stmt-with-literal-index:
30011
30012 55/push-ebp
30013 89/<- %ebp 4/r32/esp
30014
30015 50/push-eax
30016 51/push-ecx
30017 52/push-edx
30018 53/push-ebx
30019
30020 (emit-indent *(ebp+8) *Curr-block-depth)
30021 (write-buffered *(ebp+8) "c7/copy %")
30022
30023 8b/-> *(ebp+0xc) 1/r32/ecx
30024 $translate-mu-compute-offset-stmt-with-literal-index:emit-output:
30025
30026 (lookup *(ecx+0x14) *(ecx+0x18))
30027 (lookup *eax *(eax+4))
30028 (lookup *(eax+0x18) *(eax+0x1c))
30029 (write-buffered *(ebp+8) %eax)
30030 (write-buffered *(ebp+8) Space)
30031 $translate-mu-compute-offset-stmt-with-literal-index:emit-offset:
30032
30033 (lookup *(ecx+0xc) *(ecx+0x10))
30034 89/<- %ebx 0/r32/eax
30035
30036 (lookup *(ebx+8) *(ebx+0xc))
30037 (lookup *eax *(eax+4))
30038 (lookup *eax *(eax+4))
30039 (parse-hex-int %eax)
30040 89/<- %edx 0/r32/eax
30041
30042 (lookup *ebx *(ebx+4))
30043
30044 (array-element-size %eax *(ebp+0x10) *(ebp+0x14))
30045 0f af/multiply %edx 0/r32/eax
30046 (write-int32-hex-buffered *(ebp+8) %eax)
30047 (write-buffered *(ebp+8) "/imm32\n")
30048 $translate-mu-compute-offset-stmt-with-literal-index:end:
30049
30050 5b/pop-to-ebx
30051 5a/pop-to-edx
30052 59/pop-to-ecx
30053 58/pop-to-eax
30054
30055 89/<- %esp 5/r32/ebp
30056 5d/pop-to-ebp
30057 c3/return
30058
30059 translate-mu-get-stmt:
30060
30061 55/push-ebp
30062 89/<- %ebp 4/r32/esp
30063
30064 50/push-eax
30065 51/push-ecx
30066 52/push-edx
30067
30068 8b/-> *(ebp+0xc) 1/r32/ecx
30069
30070 (lookup *(ecx+0xc) *(ecx+0x10))
30071 (lookup *eax *(eax+4))
30072
30073 81 7/subop/compare *(eax+0x18) 0/imm32
30074 {
30075 0f 84/jump-if-= break/disp32
30076 $translate-mu-get-stmt:emit-null-check-for-register-input:
30077
30078 (emit-indent *(ebp+8) *Curr-block-depth)
30079 (write-buffered *(ebp+8) "81 7/subop/compare %")
30080 (lookup *(eax+0x18) *(eax+0x1c))
30081 (write-buffered *(ebp+8) %eax)
30082 (write-buffered *(ebp+8) " 0/imm32\n")
30083
30084 (emit-indent *(ebp+8) *Curr-block-depth)
30085 (write-buffered *(ebp+8) "0f 84/jump-if-= __mu-abort-null-get-base-address/disp32\n")
30086 }
30087
30088 (mu-get-offset %ecx)
30089 89/<- %edx 0/r32/eax
30090
30091 (lookup *(ecx+0xc) *(ecx+0x10))
30092 (lookup *eax *(eax+4))
30093
30094 (emit-indent *(ebp+8) *Curr-block-depth)
30095 (write-buffered *(ebp+8) "8d/copy-address ")
30096
30097 81 7/subop/compare *(eax+0x18) 0/imm32
30098 {
30099 0f 84/jump-if-= break/disp32
30100 $translate-mu-get-stmt:emit-register-input:
30101
30102 (write-buffered *(ebp+8) "*(")
30103 (lookup *(eax+0x18) *(eax+0x1c))
30104 (write-buffered *(ebp+8) %eax)
30105 (write-buffered *(ebp+8) " + ")
30106 (write-int32-hex-buffered *(ebp+8) %edx)
30107 (write-buffered *(ebp+8) ") ")
30108 e9/jump $translate-mu-get-stmt:emit-output/disp32
30109 }
30110
30111 {
30112 $translate-mu-get-stmt:emit-stack-input:
30113
30114 (write-buffered *(ebp+8) "*(ebp+")
30115 03/add *(eax+0x14) 2/r32/edx
30116 (write-int32-hex-buffered *(ebp+8) %edx)
30117 (write-buffered *(ebp+8) ") ")
30118 eb/jump $translate-mu-get-stmt:emit-output/disp8
30119 }
30120 $translate-mu-get-stmt:emit-output:
30121
30122 (lookup *(ecx+0x14) *(ecx+0x18))
30123 (lookup *eax *(eax+4))
30124
30125 (lookup *(eax+0x18) *(eax+0x1c))
30126 (get Mu-registers %eax 0xc "Mu-registers")
30127 (write-int32-hex-buffered *(ebp+8) *eax)
30128 (write-buffered *(ebp+8) "/r32\n")
30129 $translate-mu-get-stmt:end:
30130
30131 5a/pop-to-edx
30132 59/pop-to-ecx
30133 58/pop-to-eax
30134
30135 89/<- %esp 5/r32/ebp
30136 5d/pop-to-ebp
30137 c3/return
30138
30139 translate-mu-copy-object-stmt:
30140
30141 55/push-ebp
30142 89/<- %ebp 4/r32/esp
30143
30144 50/push-eax
30145
30146 (emit-indent *(ebp+8) *Curr-block-depth)
30147 (write-buffered *(ebp+8) "(copy-bytes")
30148
30149 8b/-> *(ebp+0xc) 0/r32/eax
30150
30151 (lookup *(eax+0xc) *(eax+0x10))
30152 (emit-subx-call-operand *(ebp+8) %eax)
30153
30154 (lookup *(eax+8) *(eax+0xc))
30155 (emit-subx-call-operand *(ebp+8) %eax)
30156
30157 (write-buffered *(ebp+8) Space)
30158 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
30159 (write-int32-hex-buffered *(ebp+8) %eax)
30160 (write-buffered *(ebp+8) ")\n")
30161 $translate-mu-copy-object-stmt:end:
30162
30163 58/pop-to-eax
30164
30165 89/<- %esp 5/r32/ebp
30166 5d/pop-to-ebp
30167 c3/return
30168
30169 translate-mu-clear-object-stmt:
30170
30171 55/push-ebp
30172 89/<- %ebp 4/r32/esp
30173
30174 50/push-eax
30175
30176 (emit-indent *(ebp+8) *Curr-block-depth)
30177 (write-buffered *(ebp+8) "(zero-out")
30178
30179 8b/-> *(ebp+0xc) 0/r32/eax
30180
30181 (lookup *(eax+0xc) *(eax+0x10))
30182
30183 (emit-subx-call-operand *(ebp+8) %eax)
30184 (write-buffered *(ebp+8) Space)
30185 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
30186 (write-int32-hex-buffered *(ebp+8) %eax)
30187 (write-buffered *(ebp+8) ")\n")
30188 $translate-mu-clear-object-stmt:end:
30189
30190 58/pop-to-eax
30191
30192 89/<- %esp 5/r32/ebp
30193 5d/pop-to-ebp
30194 c3/return
30195
30196 translate-mu-allocate-stmt:
30197
30198 55/push-ebp
30199 89/<- %ebp 4/r32/esp
30200
30201 50/push-eax
30202 56/push-esi
30203 57/push-edi
30204
30205 8b/-> *(ebp+0xc) 6/r32/esi
30206
30207 (lookup *(esi+0xc) *(esi+0x10))
30208 89/<- %edi 0/r32/eax
30209
30210 (emit-indent *(ebp+8) *Curr-block-depth)
30211 (write-buffered *(ebp+8) "(allocate Heap ")
30212 (addr-handle-payload-size %edi *(ebp+0x10) *(ebp+0x14))
30213 (write-int32-hex-buffered *(ebp+8) %eax)
30214 (emit-subx-call-operand *(ebp+8) %edi)
30215 (write-buffered *(ebp+8) ")\n")
30216 $translate-mu-allocate-stmt:end:
30217
30218 5f/pop-to-edi
30219 5e/pop-to-esi
30220 58/pop-to-eax
30221
30222 89/<- %esp 5/r32/ebp
30223 5d/pop-to-ebp
30224 c3/return
30225
30226 addr-handle-payload-size:
30227
30228 55/push-ebp
30229 89/<- %ebp 4/r32/esp
30230
30231 8b/-> *(ebp+8) 0/r32/eax
30232 (lookup *eax *(eax+4))
30233 (lookup *(eax+8) *(eax+0xc))
30234
30235
30236
30237
30238 $addr-handle-payload-size:skip-addr:
30239 (lookup *(eax+0xc) *(eax+0x10))
30240
30241
30242
30243
30244 $addr-handle-payload-size:skip-handle:
30245 (lookup *(eax+0xc) *(eax+0x10))
30246
30247
30248 81 7/subop/compare *eax 0/imm32/false
30249 {
30250 75/jump-if-!= break/disp8
30251 (lookup *(eax+4) *(eax+8))
30252 }
30253
30254
30255 (size-of-type-id *(eax+4))
30256 $addr-handle-payload-size:end:
30257
30258 89/<- %esp 5/r32/ebp
30259 5d/pop-to-ebp
30260 c3/return
30261
30262 addr-payload-size:
30263
30264 55/push-ebp
30265 89/<- %ebp 4/r32/esp
30266
30267 8b/-> *(ebp+8) 0/r32/eax
30268 (lookup *eax *(eax+4))
30269 (lookup *(eax+8) *(eax+0xc))
30270
30271
30272
30273
30274 $addr-payload-size:skip-addr:
30275 (lookup *(eax+0xc) *(eax+0x10))
30276
30277
30278 81 7/subop/compare *eax 0/imm32/false
30279 {
30280 75/jump-if-!= break/disp8
30281 (lookup *(eax+4) *(eax+8))
30282 }
30283
30284
30285 (size-of-type-id *(eax+4))
30286 $addr-payload-size:end:
30287
30288 89/<- %esp 5/r32/ebp
30289 5d/pop-to-ebp
30290 c3/return
30291
30292 translate-mu-populate-stmt:
30293
30294 55/push-ebp
30295 89/<- %ebp 4/r32/esp
30296
30297 50/push-eax
30298 51/push-ecx
30299 56/push-esi
30300 57/push-edi
30301
30302 8b/-> *(ebp+0xc) 6/r32/esi
30303
30304 (lookup *(esi+0xc) *(esi+0x10))
30305 89/<- %edi 0/r32/eax
30306
30307 (lookup *(edi+8) *(edi+0xc))
30308 89/<- %ecx 0/r32/eax
30309
30310 (emit-indent *(ebp+8) *Curr-block-depth)
30311 (write-buffered *(ebp+8) "(allocate-array2 Heap ")
30312 (addr-handle-array-payload-size %edi *(ebp+0x10) *(ebp+0x14))
30313 (write-int32-hex-buffered *(ebp+8) %eax)
30314 (emit-subx-call-operand *(ebp+8) %ecx)
30315 (emit-subx-call-operand *(ebp+8) %edi)
30316 (write-buffered *(ebp+8) ")\n")
30317 $translate-mu-populate-stmt:end:
30318
30319 5f/pop-to-edi
30320 5e/pop-to-esi
30321 59/pop-to-ecx
30322 58/pop-to-eax
30323
30324 89/<- %esp 5/r32/ebp
30325 5d/pop-to-ebp
30326 c3/return
30327
30328 translate-mu-populate-stream-stmt:
30329
30330 55/push-ebp
30331 89/<- %ebp 4/r32/esp
30332
30333 50/push-eax
30334 51/push-ecx
30335 56/push-esi
30336 57/push-edi
30337
30338 8b/-> *(ebp+0xc) 6/r32/esi
30339
30340 (lookup *(esi+0xc) *(esi+0x10))
30341 89/<- %edi 0/r32/eax
30342
30343 (lookup *(edi+8) *(edi+0xc))
30344 89/<- %ecx 0/r32/eax
30345
30346 (emit-indent *(ebp+8) *Curr-block-depth)
30347 (write-buffered *(ebp+8) "(new-stream Heap ")
30348 (addr-handle-stream-payload-size %edi *(ebp+0x10) *(ebp+0x14))
30349 (write-int32-hex-buffered *(ebp+8) %eax)
30350 (emit-subx-call-operand *(ebp+8) %ecx)
30351 (emit-subx-call-operand *(ebp+8) %edi)
30352 (write-buffered *(ebp+8) ")\n")
30353 $translate-mu-populate-stream-stmt:end:
30354
30355 5f/pop-to-edi
30356 5e/pop-to-esi
30357 59/pop-to-ecx
30358 58/pop-to-eax
30359
30360 89/<- %esp 5/r32/ebp
30361 5d/pop-to-ebp
30362 c3/return
30363
30364 translate-mu-read-from-stream-stmt:
30365
30366 55/push-ebp
30367 89/<- %ebp 4/r32/esp
30368
30369 50/push-eax
30370 51/push-ecx
30371 56/push-esi
30372 57/push-edi
30373
30374 8b/-> *(ebp+0xc) 6/r32/esi
30375
30376 (lookup *(esi+0xc) *(esi+0x10))
30377 89/<- %ecx 0/r32/eax
30378
30379 (lookup *(ecx+8) *(ecx+0xc))
30380 89/<- %edi 0/r32/eax
30381
30382 (emit-indent *(ebp+8) *Curr-block-depth)
30383 (write-buffered *(ebp+8) "(read-from-stream")
30384 (emit-subx-call-operand *(ebp+8) %ecx)
30385 (emit-subx-call-operand *(ebp+8) %edi)
30386 (write-buffered *(ebp+8) Space)
30387 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
30388 (write-int32-hex-buffered *(ebp+8) %eax)
30389 (write-buffered *(ebp+8) ")\n")
30390 $translate-mu-read-from-stream-stmt:end:
30391
30392 5f/pop-to-edi
30393 5e/pop-to-esi
30394 59/pop-to-ecx
30395 58/pop-to-eax
30396
30397 89/<- %esp 5/r32/ebp
30398 5d/pop-to-ebp
30399 c3/return
30400
30401 translate-mu-write-to-stream-stmt:
30402
30403 55/push-ebp
30404 89/<- %ebp 4/r32/esp
30405
30406 50/push-eax
30407 51/push-ecx
30408 56/push-esi
30409 57/push-edi
30410
30411 8b/-> *(ebp+0xc) 6/r32/esi
30412
30413 (lookup *(esi+0xc) *(esi+0x10))
30414 89/<- %ecx 0/r32/eax
30415
30416 (lookup *(ecx+8) *(ecx+0xc))
30417 89/<- %edi 0/r32/eax
30418
30419 (emit-indent *(ebp+8) *Curr-block-depth)
30420 (write-buffered *(ebp+8) "(write-to-stream")
30421 (emit-subx-call-operand *(ebp+8) %ecx)
30422 (flush *(ebp+8))
30423 (emit-subx-call-operand *(ebp+8) %edi)
30424 (flush *(ebp+8))
30425 (write-buffered *(ebp+8) Space)
30426 (flush *(ebp+8))
30427 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
30428 (write-int32-hex-buffered *(ebp+8) %eax)
30429 (write-buffered *(ebp+8) ")\n")
30430 $translate-mu-write-to-stream-stmt:end:
30431
30432 5f/pop-to-edi
30433 5e/pop-to-esi
30434 59/pop-to-ecx
30435 58/pop-to-eax
30436
30437 89/<- %esp 5/r32/ebp
30438 5d/pop-to-ebp
30439 c3/return
30440
30441 addr-handle-array-payload-size:
30442
30443 55/push-ebp
30444 89/<- %ebp 4/r32/esp
30445
30446 8b/-> *(ebp+8) 0/r32/eax
30447 (lookup *eax *(eax+4))
30448 (lookup *(eax+8) *(eax+0xc))
30449
30450
30451
30452
30453 $addr-handle-array-payload-size:skip-addr:
30454 (lookup *(eax+0xc) *(eax+0x10))
30455
30456
30457
30458
30459 $addr-handle-array-payload-size:skip-handle:
30460 (lookup *(eax+0xc) *(eax+0x10))
30461
30462
30463
30464
30465 $addr-handle-array-payload-size:skip-array:
30466 (lookup *(eax+0xc) *(eax+0x10))
30467
30468
30469 81 7/subop/compare *eax 0/imm32/false
30470 {
30471 75/jump-if-!= break/disp8
30472 (lookup *(eax+4) *(eax+8))
30473 }
30474 $addr-handle-array-payload-size:compute-size:
30475
30476
30477 (size-of-type-id-as-array-element *(eax+4))
30478 $addr-handle-array-payload-size:end:
30479
30480 89/<- %esp 5/r32/ebp
30481 5d/pop-to-ebp
30482 c3/return
30483
30484 addr-handle-stream-payload-size:
30485
30486 55/push-ebp
30487 89/<- %ebp 4/r32/esp
30488
30489 8b/-> *(ebp+8) 0/r32/eax
30490 (lookup *eax *(eax+4))
30491 (lookup *(eax+8) *(eax+0xc))
30492
30493
30494
30495
30496 $addr-handle-stream-payload-size:skip-addr:
30497 (lookup *(eax+0xc) *(eax+0x10))
30498
30499
30500
30501
30502 $addr-handle-stream-payload-size:skip-handle:
30503 (lookup *(eax+0xc) *(eax+0x10))
30504
30505
30506
30507
30508 $addr-handle-stream-payload-size:skip-stream:
30509 (lookup *(eax+0xc) *(eax+0x10))
30510
30511
30512 81 7/subop/compare *eax 0/imm32/false
30513 {
30514 75/jump-if-!= break/disp8
30515 (lookup *(eax+4) *(eax+8))
30516 }
30517 $addr-handle-stream-payload-size:compute-size:
30518
30519
30520 (size-of-type-id-as-array-element *(eax+4))
30521 $addr-handle-stream-payload-size:end:
30522
30523 89/<- %esp 5/r32/ebp
30524 5d/pop-to-ebp
30525 c3/return
30526
30527 power-of-2?:
30528
30529
30530 55/push-ebp
30531 89/<- %ebp 4/r32/esp
30532
30533 8b/-> *(ebp+8) 0/r32/eax
30534
30535 3d/compare-eax-with 0/imm32
30536 0f 8c/jump-if-< $power-of-2?:abort/disp32
30537
30538 48/decrement-eax
30539
30540 23/and-> *(ebp+8) 0/r32/eax
30541
30542 3d/compare-eax-and 0/imm32
30543 0f 94/set-byte-if-= %al
30544 25/and-eax-with 0xff/imm32
30545 $power-of-2?:end:
30546
30547 89/<- %esp 5/r32/ebp
30548 5d/pop-to-ebp
30549 c3/return
30550
30551 $power-of-2?:abort:
30552 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
30553 (flush *(ebp+0xc))
30554 (stop *(ebp+0x10) 1)
30555
30556
30557 num-shift-rights:
30558
30559
30560 55/push-ebp
30561 89/<- %ebp 4/r32/esp
30562
30563 51/push-ecx
30564
30565 8b/-> *(ebp+8) 1/r32/ecx
30566
30567 b8/copy-to-eax 0/imm32
30568 {
30569
30570 81 7/subop/compare %ecx 1/imm32
30571 7e/jump-if-<= break/disp8
30572 40/increment-eax
30573 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
30574 eb/jump loop/disp8
30575 }
30576 $num-shift-rights:end:
30577
30578 59/pop-to-ecx
30579
30580 89/<- %esp 5/r32/ebp
30581 5d/pop-to-ebp
30582 c3/return
30583
30584 mu-get-offset:
30585
30586 55/push-ebp
30587 89/<- %ebp 4/r32/esp
30588
30589 8b/-> *(ebp+8) 0/r32/eax
30590 (lookup *(eax+0xc) *(eax+0x10))
30591 (lookup *(eax+8) *(eax+0xc))
30592
30593 (lookup *eax *(eax+4))
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604 8b/-> *(eax+0x14) 0/r32/eax
30605
30606
30607
30608
30609 $emit-get-offset:end:
30610
30611 89/<- %esp 5/r32/ebp
30612 5d/pop-to-ebp
30613 c3/return
30614
30615 emit-subx-block:
30616
30617 55/push-ebp
30618 89/<- %ebp 4/r32/esp
30619
30620 50/push-eax
30621 51/push-ecx
30622 56/push-esi
30623
30624 8b/-> *(ebp+0xc) 6/r32/esi
30625
30626 (lookup *(esi+0xc) *(esi+0x10))
30627 8b/-> *Curr-block-depth 1/r32/ecx
30628 89/<- *(eax+0x10) 1/r32/ecx
30629
30630 (lookup *(esi+4) *(esi+8))
30631
30632 {
30633 $emit-subx-block:check-empty:
30634 3d/compare-eax-and 0/imm32
30635 0f 84/jump-if-= break/disp32
30636 (emit-indent *(ebp+8) *Curr-block-depth)
30637 (write-buffered *(ebp+8) "{\n")
30638
30639 (lookup *(esi+0xc) *(esi+0x10))
30640 89/<- %ecx 0/r32/eax
30641
30642 (lookup *ecx *(ecx+4))
30643 (write-buffered *(ebp+8) %eax)
30644 (write-buffered *(ebp+8) ":loop:\n")
30645 ff 0/subop/increment *Curr-block-depth
30646 (push *(ebp+0x10) *(esi+0xc))
30647 (push *(ebp+0x10) *(esi+0x10))
30648 (push *(ebp+0x10) 0)
30649
30650 (lookup *(esi+4) *(esi+8))
30651 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
30652 (pop *(ebp+0x10))
30653 (pop *(ebp+0x10))
30654 (pop *(ebp+0x10))
30655 ff 1/subop/decrement *Curr-block-depth
30656 (emit-indent *(ebp+8) *Curr-block-depth)
30657 (write-buffered *(ebp+8) "}\n")
30658 (lookup *ecx *(ecx+4))
30659 (write-buffered *(ebp+8) %eax)
30660 (write-buffered *(ebp+8) ":break:\n")
30661 }
30662 $emit-subx-block:end:
30663
30664 5e/pop-to-esi
30665 59/pop-to-ecx
30666 58/pop-to-eax
30667
30668 89/<- %esp 5/r32/ebp
30669 5d/pop-to-ebp
30670 c3/return
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721 == data
30722 Primitives:
30723
30724 _Primitive-increment-eax:
30725
30726 0x11/imm32/alloc-id:fake
30727 _string-increment/imm32/name
30728 0/imm32/no-inouts
30729 0/imm32/no-inouts
30730 0x11/imm32/alloc-id:fake
30731 Single-int-var-in-eax/imm32/outputs
30732 0x11/imm32/alloc-id:fake
30733 _string_40_increment_eax/imm32/subx-name
30734 0/imm32/no-rm32
30735 0/imm32/no-r32
30736 0/imm32/no-imm32
30737 0/imm32/no-imm8
30738 0/imm32/no-disp32
30739 0/imm32/no-xm32
30740 0/imm32/no-x32
30741 0x11/imm32/alloc-id:fake
30742 _Primitive-increment-ecx/imm32/next
30743 _Primitive-increment-ecx:
30744 0x11/imm32/alloc-id:fake:payload
30745
30746 0x11/imm32/alloc-id:fake
30747 _string-increment/imm32/name
30748 0/imm32/no-inouts
30749 0/imm32/no-inouts
30750 0x11/imm32/alloc-id:fake
30751 Single-int-var-in-ecx/imm32/outputs
30752 0x11/imm32/alloc-id:fake
30753 _string_41_increment_ecx/imm32/subx-name
30754 0/imm32/no-rm32
30755 0/imm32/no-r32
30756 0/imm32/no-imm32
30757 0/imm32/no-imm8
30758 0/imm32/no-disp32
30759 0/imm32/no-xm32
30760 0/imm32/no-x32
30761 0x11/imm32/alloc-id:fake
30762 _Primitive-increment-edx/imm32/next
30763 _Primitive-increment-edx:
30764 0x11/imm32/alloc-id:fake:payload
30765
30766 0x11/imm32/alloc-id:fake
30767 _string-increment/imm32/name
30768 0/imm32/no-inouts
30769 0/imm32/no-inouts
30770 0x11/imm32/alloc-id:fake
30771 Single-int-var-in-edx/imm32/outputs
30772 0x11/imm32/alloc-id:fake
30773 _string_42_increment_edx/imm32/subx-name
30774 0/imm32/no-rm32
30775 0/imm32/no-r32
30776 0/imm32/no-imm32
30777 0/imm32/no-imm8
30778 0/imm32/no-disp32
30779 0/imm32/no-xm32
30780 0/imm32/no-x32
30781 0x11/imm32/alloc-id:fake
30782 _Primitive-increment-ebx/imm32/next
30783 _Primitive-increment-ebx:
30784 0x11/imm32/alloc-id:fake:payload
30785
30786 0x11/imm32/alloc-id:fake
30787 _string-increment/imm32/name
30788 0/imm32/no-inouts
30789 0/imm32/no-inouts
30790 0x11/imm32/alloc-id:fake
30791 Single-int-var-in-ebx/imm32/outputs
30792 0x11/imm32/alloc-id:fake
30793 _string_43_increment_ebx/imm32/subx-name
30794 0/imm32/no-rm32
30795 0/imm32/no-r32
30796 0/imm32/no-imm32
30797 0/imm32/no-imm8
30798 0/imm32/no-disp32
30799 0/imm32/no-xm32
30800 0/imm32/no-x32
30801 0x11/imm32/alloc-id:fake
30802 _Primitive-increment-esi/imm32/next
30803 _Primitive-increment-esi:
30804 0x11/imm32/alloc-id:fake:payload
30805
30806 0x11/imm32/alloc-id:fake
30807 _string-increment/imm32/name
30808 0/imm32/no-inouts
30809 0/imm32/no-inouts
30810 0x11/imm32/alloc-id:fake
30811 Single-int-var-in-esi/imm32/outputs
30812 0x11/imm32/alloc-id:fake
30813 _string_46_increment_esi/imm32/subx-name
30814 0/imm32/no-rm32
30815 0/imm32/no-r32
30816 0/imm32/no-imm32
30817 0/imm32/no-imm8
30818 0/imm32/no-disp32
30819 0/imm32/no-xm32
30820 0/imm32/no-x32
30821 0x11/imm32/alloc-id:fake
30822 _Primitive-increment-edi/imm32/next
30823 _Primitive-increment-edi:
30824 0x11/imm32/alloc-id:fake:payload
30825
30826 0x11/imm32/alloc-id:fake
30827 _string-increment/imm32/name
30828 0/imm32/no-inouts
30829 0/imm32/no-inouts
30830 0x11/imm32/alloc-id:fake
30831 Single-int-var-in-edi/imm32/outputs
30832 0x11/imm32/alloc-id:fake
30833 _string_47_increment_edi/imm32/subx-name
30834 0/imm32/no-rm32
30835 0/imm32/no-r32
30836 0/imm32/no-imm32
30837 0/imm32/no-imm8
30838 0/imm32/no-disp32
30839 0/imm32/no-xm32
30840 0/imm32/no-x32
30841 0x11/imm32/alloc-id:fake
30842 _Primitive-decrement-eax/imm32/next
30843 _Primitive-decrement-eax:
30844 0x11/imm32/alloc-id:fake:payload
30845
30846 0x11/imm32/alloc-id:fake
30847 _string-decrement/imm32/name
30848 0/imm32/no-inouts
30849 0/imm32/no-inouts
30850 0x11/imm32/alloc-id:fake
30851 Single-int-var-in-eax/imm32/outputs
30852 0x11/imm32/alloc-id:fake
30853 _string_48_decrement_eax/imm32/subx-name
30854 0/imm32/no-rm32
30855 0/imm32/no-r32
30856 0/imm32/no-imm32
30857 0/imm32/no-imm8
30858 0/imm32/no-disp32
30859 0/imm32/no-xm32
30860 0/imm32/no-x32
30861 0x11/imm32/alloc-id:fake
30862 _Primitive-decrement-ecx/imm32/next
30863 _Primitive-decrement-ecx:
30864 0x11/imm32/alloc-id:fake:payload
30865
30866 0x11/imm32/alloc-id:fake
30867 _string-decrement/imm32/name
30868 0/imm32/no-inouts
30869 0/imm32/no-inouts
30870 0x11/imm32/alloc-id:fake
30871 Single-int-var-in-ecx/imm32/outputs
30872 0x11/imm32/alloc-id:fake
30873 _string_49_decrement_ecx/imm32/subx-name
30874 0/imm32/no-rm32
30875 0/imm32/no-r32
30876 0/imm32/no-imm32
30877 0/imm32/no-imm8
30878 0/imm32/no-disp32
30879 0/imm32/no-xm32
30880 0/imm32/no-x32
30881 0x11/imm32/alloc-id:fake
30882 _Primitive-decrement-edx/imm32/next
30883 _Primitive-decrement-edx:
30884 0x11/imm32/alloc-id:fake:payload
30885
30886 0x11/imm32/alloc-id:fake
30887 _string-decrement/imm32/name
30888 0/imm32/no-inouts
30889 0/imm32/no-inouts
30890 0x11/imm32/alloc-id:fake
30891 Single-int-var-in-edx/imm32/outputs
30892 0x11/imm32/alloc-id:fake
30893 _string_4a_decrement_edx/imm32/subx-name
30894 0/imm32/no-rm32
30895 0/imm32/no-r32
30896 0/imm32/no-imm32
30897 0/imm32/no-imm8
30898 0/imm32/no-disp32
30899 0/imm32/no-xm32
30900 0/imm32/no-x32
30901 0x11/imm32/alloc-id:fake
30902 _Primitive-decrement-ebx/imm32/next
30903 _Primitive-decrement-ebx:
30904 0x11/imm32/alloc-id:fake:payload
30905
30906 0x11/imm32/alloc-id:fake
30907 _string-decrement/imm32/name
30908 0/imm32/no-inouts
30909 0/imm32/no-inouts
30910 0x11/imm32/alloc-id:fake
30911 Single-int-var-in-ebx/imm32/outputs
30912 0x11/imm32/alloc-id:fake
30913 _string_4b_decrement_ebx/imm32/subx-name
30914 0/imm32/no-rm32
30915 0/imm32/no-r32
30916 0/imm32/no-imm32
30917 0/imm32/no-imm8
30918 0/imm32/no-disp32
30919 0/imm32/no-xm32
30920 0/imm32/no-x32
30921 0x11/imm32/alloc-id:fake
30922 _Primitive-decrement-esi/imm32/next
30923 _Primitive-decrement-esi:
30924 0x11/imm32/alloc-id:fake:payload
30925
30926 0x11/imm32/alloc-id:fake
30927 _string-decrement/imm32/name
30928 0/imm32/no-inouts
30929 0/imm32/no-inouts
30930 0x11/imm32/alloc-id:fake
30931 Single-int-var-in-esi/imm32/outputs
30932 0x11/imm32/alloc-id:fake
30933 _string_4e_decrement_esi/imm32/subx-name
30934 0/imm32/no-rm32
30935 0/imm32/no-r32
30936 0/imm32/no-imm32
30937 0/imm32/no-imm8
30938 0/imm32/no-disp32
30939 0/imm32/no-xm32
30940 0/imm32/no-x32
30941 0x11/imm32/alloc-id:fake
30942 _Primitive-decrement-edi/imm32/next
30943 _Primitive-decrement-edi:
30944 0x11/imm32/alloc-id:fake:payload
30945
30946 0x11/imm32/alloc-id:fake
30947 _string-decrement/imm32/name
30948 0/imm32/no-inouts
30949 0/imm32/no-inouts
30950 0x11/imm32/alloc-id:fake
30951 Single-int-var-in-edi/imm32/outputs
30952 0x11/imm32/alloc-id:fake
30953 _string_4f_decrement_edi/imm32/subx-name
30954 0/imm32/no-rm32
30955 0/imm32/no-r32
30956 0/imm32/no-imm32
30957 0/imm32/no-imm8
30958 0/imm32/no-disp32
30959 0/imm32/no-xm32
30960 0/imm32/no-x32
30961 0x11/imm32/alloc-id:fake
30962 _Primitive-increment-mem/imm32/next
30963 _Primitive-increment-mem:
30964 0x11/imm32/alloc-id:fake:payload
30965
30966 0x11/imm32/alloc-id:fake
30967 _string-increment/imm32/name
30968 0x11/imm32/alloc-id:fake
30969 Single-int-var-in-mem/imm32/inouts
30970 0/imm32/no-outputs
30971 0/imm32/no-outputs
30972 0x11/imm32/alloc-id:fake
30973 _string_ff_subop_increment/imm32/subx-name
30974 1/imm32/rm32-is-first-inout
30975 0/imm32/no-r32
30976 0/imm32/no-imm32
30977 0/imm32/no-imm8
30978 0/imm32/no-disp32
30979 0/imm32/no-xm32
30980 0/imm32/no-x32
30981 0x11/imm32/alloc-id:fake
30982 _Primitive-increment-reg/imm32/next
30983 _Primitive-increment-reg:
30984 0x11/imm32/alloc-id:fake:payload
30985
30986 0x11/imm32/alloc-id:fake
30987 _string-increment/imm32/name
30988 0/imm32/no-inouts
30989 0/imm32/no-inouts
30990 0x11/imm32/alloc-id:fake
30991 Single-int-var-in-some-register/imm32/outputs
30992 0x11/imm32/alloc-id:fake
30993 _string_ff_subop_increment/imm32/subx-name
30994 3/imm32/rm32-is-first-output
30995 0/imm32/no-r32
30996 0/imm32/no-imm32
30997 0/imm32/no-imm8
30998 0/imm32/no-disp32
30999 0/imm32/no-xm32
31000 0/imm32/no-x32
31001 0x11/imm32/alloc-id:fake
31002 _Primitive-decrement-mem/imm32/next
31003 _Primitive-decrement-mem:
31004 0x11/imm32/alloc-id:fake:payload
31005
31006 0x11/imm32/alloc-id:fake
31007 _string-decrement/imm32/name
31008 0x11/imm32/alloc-id:fake
31009 Single-int-var-in-mem/imm32/inouts
31010 0/imm32/no-outputs
31011 0/imm32/no-outputs
31012 0x11/imm32/alloc-id:fake
31013 _string_ff_subop_decrement/imm32/subx-name
31014 1/imm32/rm32-is-first-inout
31015 0/imm32/no-r32
31016 0/imm32/no-imm32
31017 0/imm32/no-imm8
31018 0/imm32/no-disp32
31019 0/imm32/no-xm32
31020 0/imm32/no-x32
31021 0x11/imm32/alloc-id:fake
31022 _Primitive-decrement-reg/imm32/next
31023 _Primitive-decrement-reg:
31024 0x11/imm32/alloc-id:fake:payload
31025
31026 0x11/imm32/alloc-id:fake
31027 _string-decrement/imm32/name
31028 0/imm32/no-inouts
31029 0/imm32/no-inouts
31030 0x11/imm32/alloc-id:fake
31031 Single-int-var-in-some-register/imm32/outputs
31032 0x11/imm32/alloc-id:fake
31033 _string_ff_subop_decrement/imm32/subx-name
31034 3/imm32/rm32-is-first-output
31035 0/imm32/no-r32
31036 0/imm32/no-imm32
31037 0/imm32/no-imm8
31038 0/imm32/no-disp32
31039 0/imm32/no-xm32
31040 0/imm32/no-x32
31041 0x11/imm32/alloc-id:fake
31042 _Primitive-add-to-eax/imm32/next
31043
31044 _Primitive-add-to-eax:
31045 0x11/imm32/alloc-id:fake:payload
31046
31047 0x11/imm32/alloc-id:fake
31048 _string-add/imm32/name
31049 0x11/imm32/alloc-id:fake
31050 Single-lit-var/imm32/inouts
31051 0x11/imm32/alloc-id:fake
31052 Single-int-var-in-eax/imm32/outputs
31053 0x11/imm32/alloc-id:fake
31054 _string_05_add_to_eax/imm32/subx-name
31055 0/imm32/no-rm32
31056 0/imm32/no-r32
31057 1/imm32/imm32-is-first-inout
31058 0/imm32/no-imm8
31059 0/imm32/no-disp32
31060 0/imm32/no-xm32
31061 0/imm32/no-x32
31062 0x11/imm32/alloc-id:fake
31063 _Primitive-add-reg-to-reg/imm32/next
31064 _Primitive-add-reg-to-reg:
31065 0x11/imm32/alloc-id:fake:payload
31066
31067 0x11/imm32/alloc-id:fake
31068 _string-add/imm32/name
31069 0x11/imm32/alloc-id:fake
31070 Single-int-var-in-some-register/imm32/inouts
31071 0x11/imm32/alloc-id:fake
31072 Single-int-var-in-some-register/imm32/outputs
31073 0x11/imm32/alloc-id:fake
31074 _string_01_add_to/imm32/subx-name
31075 3/imm32/rm32-is-first-output
31076 1/imm32/r32-is-first-inout
31077 0/imm32/no-imm32
31078 0/imm32/no-imm8
31079 0/imm32/no-disp32
31080 0/imm32/no-xm32
31081 0/imm32/no-x32
31082 0x11/imm32/alloc-id:fake
31083 _Primitive-add-reg-to-mem/imm32/next
31084 _Primitive-add-reg-to-mem:
31085 0x11/imm32/alloc-id:fake:payload
31086
31087 0x11/imm32/alloc-id:fake
31088 _string-add-to/imm32/name
31089 0x11/imm32/alloc-id:fake
31090 Two-args-int-stack-int-reg/imm32/inouts
31091 0/imm32/no-outputs
31092 0/imm32/no-outputs
31093 0x11/imm32/alloc-id:fake
31094 _string_01_add_to/imm32/subx-name
31095 1/imm32/rm32-is-first-inout
31096 2/imm32/r32-is-second-inout
31097 0/imm32/no-imm32
31098 0/imm32/no-imm8
31099 0/imm32/no-disp32
31100 0/imm32/no-xm32
31101 0/imm32/no-x32
31102 0x11/imm32/alloc-id:fake
31103 _Primitive-add-mem-to-reg/imm32/next
31104 _Primitive-add-mem-to-reg:
31105 0x11/imm32/alloc-id:fake:payload
31106
31107 0x11/imm32/alloc-id:fake
31108 _string-add/imm32/name
31109 0x11/imm32/alloc-id:fake
31110 Single-int-var-in-mem/imm32/inouts
31111 0x11/imm32/alloc-id:fake
31112 Single-int-var-in-some-register/imm32/outputs
31113 0x11/imm32/alloc-id:fake
31114 _string_03_add/imm32/subx-name
31115 1/imm32/rm32-is-first-inout
31116 3/imm32/r32-is-first-output
31117 0/imm32/no-imm32
31118 0/imm32/no-imm8
31119 0/imm32/no-disp32
31120 0/imm32/no-xm32
31121 0/imm32/no-x32
31122 0x11/imm32/alloc-id:fake
31123 _Primitive-add-lit-to-reg/imm32/next
31124 _Primitive-add-lit-to-reg:
31125 0x11/imm32/alloc-id:fake:payload
31126
31127 0x11/imm32/alloc-id:fake
31128 _string-add/imm32/name
31129 0x11/imm32/alloc-id:fake
31130 Single-lit-var/imm32/inouts
31131 0x11/imm32/alloc-id:fake
31132 Single-int-var-in-some-register/imm32/outputs
31133 0x11/imm32/alloc-id:fake
31134 _string_81_subop_add/imm32/subx-name
31135 3/imm32/rm32-is-first-output
31136 0/imm32/no-r32
31137 1/imm32/imm32-is-first-inout
31138 0/imm32/no-imm8
31139 0/imm32/no-disp32
31140 0/imm32/no-xm32
31141 0/imm32/no-x32
31142 0x11/imm32/alloc-id:fake
31143 _Primitive-add-lit-to-mem/imm32/next
31144 _Primitive-add-lit-to-mem:
31145 0x11/imm32/alloc-id:fake:payload
31146
31147 0x11/imm32/alloc-id:fake
31148 _string-add-to/imm32/name
31149 0x11/imm32/alloc-id:fake
31150 Int-var-and-literal/imm32/inouts
31151 0/imm32/no-outputs
31152 0/imm32/no-outputs
31153 0x11/imm32/alloc-id:fake
31154 _string_81_subop_add/imm32/subx-name
31155 1/imm32/rm32-is-first-inout
31156 0/imm32/no-r32
31157 2/imm32/imm32-is-second-inout
31158 0/imm32/no-imm8
31159 0/imm32/no-disp32
31160 0/imm32/no-xm32
31161 0/imm32/no-x32
31162 0x11/imm32/alloc-id:fake
31163 _Primitive-subtract-from-eax/imm32/next
31164
31165 _Primitive-subtract-from-eax:
31166 0x11/imm32/alloc-id:fake:payload
31167
31168 0x11/imm32/alloc-id:fake
31169 _string-subtract/imm32/name
31170 0x11/imm32/alloc-id:fake
31171 Single-lit-var/imm32/inouts
31172 0x11/imm32/alloc-id:fake
31173 Single-int-var-in-eax/imm32/outputs
31174 0x11/imm32/alloc-id:fake
31175 _string_2d_subtract_from_eax/imm32/subx-name
31176 0/imm32/no-rm32
31177 0/imm32/no-r32
31178 1/imm32/imm32-is-first-inout
31179 0/imm32/no-imm8
31180 0/imm32/no-disp32
31181 0/imm32/no-xm32
31182 0/imm32/no-x32
31183 0x11/imm32/alloc-id:fake
31184 _Primitive-subtract-reg-from-reg/imm32/next
31185 _Primitive-subtract-reg-from-reg:
31186 0x11/imm32/alloc-id:fake:payload
31187
31188 0x11/imm32/alloc-id:fake
31189 _string-subtract/imm32/name
31190 0x11/imm32/alloc-id:fake
31191 Single-int-var-in-some-register/imm32/inouts
31192 0x11/imm32/alloc-id:fake
31193 Single-int-var-in-some-register/imm32/outputs
31194 0x11/imm32/alloc-id:fake
31195 _string_29_subtract_from/imm32/subx-name
31196 3/imm32/rm32-is-first-output
31197 1/imm32/r32-is-first-inout
31198 0/imm32/no-imm32
31199 0/imm32/no-imm8
31200 0/imm32/no-disp32
31201 0/imm32/no-xm32
31202 0/imm32/no-x32
31203 0x11/imm32/alloc-id:fake
31204 _Primitive-subtract-reg-from-mem/imm32/next
31205 _Primitive-subtract-reg-from-mem:
31206 0x11/imm32/alloc-id:fake:payload
31207
31208 0x11/imm32/alloc-id:fake
31209 _string-subtract-from/imm32/name
31210 0x11/imm32/alloc-id:fake
31211 Two-args-int-stack-int-reg/imm32/inouts
31212 0/imm32/no-outputs
31213 0/imm32/no-outputs
31214 0x11/imm32/alloc-id:fake
31215 _string_29_subtract_from/imm32/subx-name
31216 1/imm32/rm32-is-first-inout
31217 2/imm32/r32-is-second-inout
31218 0/imm32/no-imm32
31219 0/imm32/no-imm8
31220 0/imm32/no-disp32
31221 0/imm32/no-xm32
31222 0/imm32/no-x32
31223 0x11/imm32/alloc-id:fake
31224 _Primitive-subtract-mem-from-reg/imm32/next
31225 _Primitive-subtract-mem-from-reg:
31226 0x11/imm32/alloc-id:fake:payload
31227
31228 0x11/imm32/alloc-id:fake
31229 _string-subtract/imm32/name
31230 0x11/imm32/alloc-id:fake
31231 Single-int-var-in-mem/imm32/inouts
31232 0x11/imm32/alloc-id:fake
31233 Single-int-var-in-some-register/imm32/outputs
31234 0x11/imm32/alloc-id:fake
31235 _string_2b_subtract/imm32/subx-name
31236 1/imm32/rm32-is-first-inout
31237 3/imm32/r32-is-first-output
31238 0/imm32/no-imm32
31239 0/imm32/no-imm8
31240 0/imm32/no-disp32
31241 0/imm32/no-xm32
31242 0/imm32/no-x32
31243 0x11/imm32/alloc-id:fake
31244 _Primitive-subtract-lit-from-reg/imm32/next
31245 _Primitive-subtract-lit-from-reg:
31246 0x11/imm32/alloc-id:fake:payload
31247
31248 0x11/imm32/alloc-id:fake
31249 _string-subtract/imm32/name
31250 0x11/imm32/alloc-id:fake
31251 Single-lit-var/imm32/inouts
31252 0x11/imm32/alloc-id:fake
31253 Single-int-var-in-some-register/imm32/outputs
31254 0x11/imm32/alloc-id:fake
31255 _string_81_subop_subtract/imm32/subx-name
31256 3/imm32/rm32-is-first-output
31257 0/imm32/no-r32
31258 1/imm32/imm32-is-first-inout
31259 0/imm32/no-imm8
31260 0/imm32/no-disp32
31261 0/imm32/no-xm32
31262 0/imm32/no-x32
31263 0x11/imm32/alloc-id:fake
31264 _Primitive-subtract-lit-from-mem/imm32/next
31265 _Primitive-subtract-lit-from-mem:
31266 0x11/imm32/alloc-id:fake:payload
31267
31268 0x11/imm32/alloc-id:fake
31269 _string-subtract-from/imm32/name
31270 0x11/imm32/alloc-id:fake
31271 Int-var-and-literal/imm32/inouts
31272 0/imm32/no-outputs
31273 0/imm32/no-outputs
31274 0x11/imm32/alloc-id:fake
31275 _string_81_subop_subtract/imm32/subx-name
31276 1/imm32/rm32-is-first-inout
31277 0/imm32/no-r32
31278 2/imm32/imm32-is-second-inout
31279 0/imm32/no-imm8
31280 0/imm32/no-disp32
31281 0/imm32/no-xm32
31282 0/imm32/no-x32
31283 0x11/imm32/alloc-id:fake
31284 _Primitive-and-with-eax/imm32/next
31285
31286 _Primitive-and-with-eax:
31287 0x11/imm32/alloc-id:fake:payload
31288
31289 0x11/imm32/alloc-id:fake
31290 _string-and/imm32/name
31291 0x11/imm32/alloc-id:fake
31292 Single-lit-var/imm32/inouts
31293 0x11/imm32/alloc-id:fake
31294 Single-int-var-in-eax/imm32/outputs
31295 0x11/imm32/alloc-id:fake
31296 _string_25_and_with_eax/imm32/subx-name
31297 0/imm32/no-rm32
31298 0/imm32/no-r32
31299 1/imm32/imm32-is-first-inout
31300 0/imm32/no-imm8
31301 0/imm32/no-disp32
31302 0/imm32/no-xm32
31303 0/imm32/no-x32
31304 0x11/imm32/alloc-id:fake
31305 _Primitive-and-reg-with-reg/imm32/next
31306 _Primitive-and-reg-with-reg:
31307 0x11/imm32/alloc-id:fake:payload
31308
31309 0x11/imm32/alloc-id:fake
31310 _string-and/imm32/name
31311 0x11/imm32/alloc-id:fake
31312 Single-int-var-in-some-register/imm32/inouts
31313 0x11/imm32/alloc-id:fake
31314 Single-int-var-in-some-register/imm32/outputs
31315 0x11/imm32/alloc-id:fake
31316 _string_21_and_with/imm32/subx-name
31317 3/imm32/rm32-is-first-output
31318 1/imm32/r32-is-first-inout
31319 0/imm32/no-imm32
31320 0/imm32/no-imm8
31321 0/imm32/no-disp32
31322 0/imm32/no-xm32
31323 0/imm32/no-x32
31324 0x11/imm32/alloc-id:fake
31325 _Primitive-and-reg-with-mem/imm32/next
31326 _Primitive-and-reg-with-mem:
31327 0x11/imm32/alloc-id:fake:payload
31328
31329 0x11/imm32/alloc-id:fake
31330 _string-and-with/imm32/name
31331 0x11/imm32/alloc-id:fake
31332 Two-args-int-stack-int-reg/imm32/inouts
31333 0/imm32/no-outputs
31334 0/imm32/no-outputs
31335 0x11/imm32/alloc-id:fake
31336 _string_21_and_with/imm32/subx-name
31337 1/imm32/rm32-is-first-inout
31338 2/imm32/r32-is-second-inout
31339 0/imm32/no-imm32
31340 0/imm32/no-imm8
31341 0/imm32/no-disp32
31342 0/imm32/no-xm32
31343 0/imm32/no-x32
31344 0x11/imm32/alloc-id:fake
31345 _Primitive-and-mem-with-reg/imm32/next
31346 _Primitive-and-mem-with-reg:
31347 0x11/imm32/alloc-id:fake:payload
31348
31349 0x11/imm32/alloc-id:fake
31350 _string-and/imm32/name
31351 0x11/imm32/alloc-id:fake
31352 Single-int-var-in-mem/imm32/inouts
31353 0x11/imm32/alloc-id:fake
31354 Single-int-var-in-some-register/imm32/outputs
31355 0x11/imm32/alloc-id:fake
31356 _string_23_and/imm32/subx-name
31357 1/imm32/rm32-is-first-inout
31358 3/imm32/r32-is-first-output
31359 0/imm32/no-imm32
31360 0/imm32/no-imm8
31361 0/imm32/no-disp32
31362 0/imm32/no-xm32
31363 0/imm32/no-x32
31364 0x11/imm32/alloc-id:fake
31365 _Primitive-and-lit-with-reg/imm32/next
31366 _Primitive-and-lit-with-reg:
31367 0x11/imm32/alloc-id:fake:payload
31368
31369 0x11/imm32/alloc-id:fake
31370 _string-and/imm32/name
31371 0x11/imm32/alloc-id:fake
31372 Single-lit-var/imm32/inouts
31373 0x11/imm32/alloc-id:fake
31374 Single-int-var-in-some-register/imm32/outputs
31375 0x11/imm32/alloc-id:fake
31376 _string_81_subop_and/imm32/subx-name
31377 3/imm32/rm32-is-first-output
31378 0/imm32/no-r32
31379 1/imm32/imm32-is-first-inout
31380 0/imm32/no-imm8
31381 0/imm32/no-disp32
31382 0/imm32/no-xm32
31383 0/imm32/no-x32
31384 0x11/imm32/alloc-id:fake
31385 _Primitive-and-lit-with-mem/imm32/next
31386 _Primitive-and-lit-with-mem:
31387 0x11/imm32/alloc-id:fake:payload
31388
31389 0x11/imm32/alloc-id:fake
31390 _string-and-with/imm32/name
31391 0x11/imm32/alloc-id:fake
31392 Int-var-and-literal/imm32/inouts
31393 0/imm32/no-outputs
31394 0/imm32/no-outputs
31395 0x11/imm32/alloc-id:fake
31396 _string_81_subop_and/imm32/subx-name
31397 1/imm32/rm32-is-first-inout
31398 0/imm32/no-r32
31399 2/imm32/imm32-is-second-inout
31400 0/imm32/no-imm8
31401 0/imm32/no-disp32
31402 0/imm32/no-xm32
31403 0/imm32/no-x32
31404 0x11/imm32/alloc-id:fake
31405 _Primitive-or-with-eax/imm32/next
31406
31407 _Primitive-or-with-eax:
31408 0x11/imm32/alloc-id:fake:payload
31409
31410 0x11/imm32/alloc-id:fake
31411 _string-or/imm32/name
31412 0x11/imm32/alloc-id:fake
31413 Single-lit-var/imm32/inouts
31414 0x11/imm32/alloc-id:fake
31415 Single-int-var-in-eax/imm32/outputs
31416 0x11/imm32/alloc-id:fake
31417 _string_0d_or_with_eax/imm32/subx-name
31418 0/imm32/no-rm32
31419 0/imm32/no-r32
31420 1/imm32/imm32-is-first-inout
31421 0/imm32/no-imm8
31422 0/imm32/no-disp32
31423 0/imm32/no-xm32
31424 0/imm32/no-x32
31425 0x11/imm32/alloc-id:fake
31426 _Primitive-or-reg-with-reg/imm32/next
31427 _Primitive-or-reg-with-reg:
31428 0x11/imm32/alloc-id:fake:payload
31429
31430 0x11/imm32/alloc-id:fake
31431 _string-or/imm32/name
31432 0x11/imm32/alloc-id:fake
31433 Single-int-var-in-some-register/imm32/inouts
31434 0x11/imm32/alloc-id:fake
31435 Single-int-var-in-some-register/imm32/outputs
31436 0x11/imm32/alloc-id:fake
31437 _string_09_or_with/imm32/subx-name
31438 3/imm32/rm32-is-first-output
31439 1/imm32/r32-is-first-inout
31440 0/imm32/no-imm32
31441 0/imm32/no-imm8
31442 0/imm32/no-disp32
31443 0/imm32/no-xm32
31444 0/imm32/no-x32
31445 0x11/imm32/alloc-id:fake
31446 _Primitive-or-reg-with-mem/imm32/next
31447 _Primitive-or-reg-with-mem:
31448 0x11/imm32/alloc-id:fake:payload
31449
31450 0x11/imm32/alloc-id:fake
31451 _string-or-with/imm32/name
31452 0x11/imm32/alloc-id:fake
31453 Two-args-int-stack-int-reg/imm32/inouts
31454 0/imm32/no-outputs
31455 0/imm32/no-outputs
31456 0x11/imm32/alloc-id:fake
31457 _string_09_or_with/imm32/subx-name
31458 1/imm32/rm32-is-first-inout
31459 2/imm32/r32-is-second-inout
31460 0/imm32/no-imm32
31461 0/imm32/no-imm8
31462 0/imm32/no-disp32
31463 0/imm32/no-xm32
31464 0/imm32/no-x32
31465 0x11/imm32/alloc-id:fake
31466 _Primitive-or-mem-with-reg/imm32/next
31467 _Primitive-or-mem-with-reg:
31468 0x11/imm32/alloc-id:fake:payload
31469
31470 0x11/imm32/alloc-id:fake
31471 _string-or/imm32/name
31472 0x11/imm32/alloc-id:fake
31473 Single-int-var-in-mem/imm32/inouts
31474 0x11/imm32/alloc-id:fake
31475 Single-int-var-in-some-register/imm32/outputs
31476 0x11/imm32/alloc-id:fake
31477 _string_0b_or/imm32/subx-name
31478 1/imm32/rm32-is-first-inout
31479 3/imm32/r32-is-first-output
31480 0/imm32/no-imm32
31481 0/imm32/no-imm8
31482 0/imm32/no-disp32
31483 0/imm32/no-xm32
31484 0/imm32/no-x32
31485 0x11/imm32/alloc-id:fake
31486 _Primitive-or-lit-with-reg/imm32/next
31487 _Primitive-or-lit-with-reg:
31488 0x11/imm32/alloc-id:fake:payload
31489
31490 0x11/imm32/alloc-id:fake
31491 _string-or/imm32/name
31492 0x11/imm32/alloc-id:fake
31493 Single-lit-var/imm32/inouts
31494 0x11/imm32/alloc-id:fake
31495 Single-int-var-in-some-register/imm32/outputs
31496 0x11/imm32/alloc-id:fake
31497 _string_81_subop_or/imm32/subx-name
31498 3/imm32/rm32-is-first-output
31499 0/imm32/no-r32
31500 1/imm32/imm32-is-first-inout
31501 0/imm32/no-imm8
31502 0/imm32/no-disp32
31503 0/imm32/no-xm32
31504 0/imm32/no-x32
31505 0x11/imm32/alloc-id:fake
31506 _Primitive-or-lit-with-mem/imm32/next
31507 _Primitive-or-lit-with-mem:
31508 0x11/imm32/alloc-id:fake:payload
31509
31510 0x11/imm32/alloc-id:fake
31511 _string-or-with/imm32/name
31512 0x11/imm32/alloc-id:fake
31513 Int-var-and-literal/imm32/inouts
31514 0/imm32/no-outputs
31515 0/imm32/no-outputs
31516 0x11/imm32/alloc-id:fake
31517 _string_81_subop_or/imm32/subx-name
31518 1/imm32/rm32-is-first-inout
31519 0/imm32/no-r32
31520 2/imm32/imm32-is-second-inout
31521 0/imm32/no-imm8
31522 0/imm32/no-disp32
31523 0/imm32/no-xm32
31524 0/imm32/no-x32
31525 0x11/imm32/alloc-id:fake
31526 _Primitive-not-reg/imm32/next
31527
31528 _Primitive-not-reg:
31529 0x11/imm32/alloc-id:fake:payload
31530
31531 0x11/imm32/alloc-id:fake
31532 _string-not/imm32/name
31533 0/imm32/no-inouts
31534 0/imm32/no-inouts
31535 0x11/imm32/alloc-id:fake
31536 Single-int-var-in-some-register/imm32/outputs
31537 0x11/imm32/alloc-id:fake
31538 _string_f7_subop_not/imm32/subx-name
31539 3/imm32/rm32-is-first-output
31540 0/imm32/no-r32
31541 0/imm32/no-imm32
31542 0/imm32/no-imm8
31543 0/imm32/no-disp32
31544 0/imm32/no-xm32
31545 0/imm32/no-x32
31546 0x11/imm32/alloc-id:fake
31547 _Primitive-not-mem/imm32/next
31548 _Primitive-not-mem:
31549 0x11/imm32/alloc-id:fake:payload
31550
31551 0x11/imm32/alloc-id:fake
31552 _string-not/imm32/name
31553 0x11/imm32/alloc-id:fake
31554 Single-int-var-in-mem/imm32/inouts
31555 0/imm32/no-outputs
31556 0/imm32/no-outputs
31557 0x11/imm32/alloc-id:fake
31558 _string_f7_subop_not/imm32/subx-name
31559 1/imm32/rm32-is-first-inout
31560 0/imm32/no-r32
31561 0/imm32/no-imm32
31562 0/imm32/no-imm8
31563 0/imm32/no-disp32
31564 0/imm32/no-xm32
31565 0/imm32/no-x32
31566 0x11/imm32/alloc-id:fake
31567 _Primitive-xor-with-eax/imm32/next
31568
31569 _Primitive-xor-with-eax:
31570 0x11/imm32/alloc-id:fake:payload
31571
31572 0x11/imm32/alloc-id:fake
31573 _string-xor/imm32/name
31574 0x11/imm32/alloc-id:fake
31575 Single-lit-var/imm32/inouts
31576 0x11/imm32/alloc-id:fake
31577 Single-int-var-in-eax/imm32/outputs
31578 0x11/imm32/alloc-id:fake
31579 _string_35_xor_with_eax/imm32/subx-name
31580 0/imm32/no-rm32
31581 0/imm32/no-r32
31582 1/imm32/imm32-is-first-inout
31583 0/imm32/no-imm8
31584 0/imm32/no-disp32
31585 0/imm32/no-xm32
31586 0/imm32/no-x32
31587 0x11/imm32/alloc-id:fake
31588 _Primitive-xor-reg-with-reg/imm32/next
31589 _Primitive-xor-reg-with-reg:
31590 0x11/imm32/alloc-id:fake:payload
31591
31592 0x11/imm32/alloc-id:fake
31593 _string-xor/imm32/name
31594 0x11/imm32/alloc-id:fake
31595 Single-int-var-in-some-register/imm32/inouts
31596 0x11/imm32/alloc-id:fake
31597 Single-int-var-in-some-register/imm32/outputs
31598 0x11/imm32/alloc-id:fake
31599 _string_31_xor_with/imm32/subx-name
31600 3/imm32/rm32-is-first-output
31601 1/imm32/r32-is-first-inout
31602 0/imm32/no-imm32
31603 0/imm32/no-imm8
31604 0/imm32/no-disp32
31605 0/imm32/no-xm32
31606 0/imm32/no-x32
31607 0x11/imm32/alloc-id:fake
31608 _Primitive-xor-reg-with-mem/imm32/next
31609 _Primitive-xor-reg-with-mem:
31610 0x11/imm32/alloc-id:fake:payload
31611
31612 0x11/imm32/alloc-id:fake
31613 _string-xor-with/imm32/name
31614 0x11/imm32/alloc-id:fake
31615 Two-args-int-stack-int-reg/imm32/inouts
31616 0/imm32/no-outputs
31617 0/imm32/no-outputs
31618 0x11/imm32/alloc-id:fake
31619 _string_31_xor_with/imm32/subx-name
31620 1/imm32/rm32-is-first-inout
31621 2/imm32/r32-is-second-inout
31622 0/imm32/no-imm32
31623 0/imm32/no-imm8
31624 0/imm32/no-disp32
31625 0/imm32/no-xm32
31626 0/imm32/no-x32
31627 0x11/imm32/alloc-id:fake
31628 _Primitive-xor-mem-with-reg/imm32/next
31629 _Primitive-xor-mem-with-reg:
31630 0x11/imm32/alloc-id:fake:payload
31631
31632 0x11/imm32/alloc-id:fake
31633 _string-xor/imm32/name
31634 0x11/imm32/alloc-id:fake
31635 Single-int-var-in-mem/imm32/inouts
31636 0x11/imm32/alloc-id:fake
31637 Single-int-var-in-some-register/imm32/outputs
31638 0x11/imm32/alloc-id:fake
31639 _string_33_xor/imm32/subx-name
31640 1/imm32/rm32-is-first-inout
31641 3/imm32/r32-is-first-output
31642 0/imm32/no-imm32
31643 0/imm32/no-imm8
31644 0/imm32/no-disp32
31645 0/imm32/no-xm32
31646 0/imm32/no-x32
31647 0x11/imm32/alloc-id:fake
31648 _Primitive-xor-lit-with-reg/imm32/next
31649 _Primitive-xor-lit-with-reg:
31650 0x11/imm32/alloc-id:fake:payload
31651
31652 0x11/imm32/alloc-id:fake
31653 _string-xor/imm32/name
31654 0x11/imm32/alloc-id:fake
31655 Single-lit-var/imm32/inouts
31656 0x11/imm32/alloc-id:fake
31657 Single-int-var-in-some-register/imm32/outputs
31658 0x11/imm32/alloc-id:fake
31659 _string_81_subop_xor/imm32/subx-name
31660 3/imm32/rm32-is-first-output
31661 0/imm32/no-r32
31662 1/imm32/imm32-is-first-inout
31663 0/imm32/no-imm8
31664 0/imm32/no-disp32
31665 0/imm32/no-xm32
31666 0/imm32/no-x32
31667 0x11/imm32/alloc-id:fake
31668 _Primitive-xor-lit-with-mem/imm32/next
31669 _Primitive-xor-lit-with-mem:
31670 0x11/imm32/alloc-id:fake:payload
31671
31672 0x11/imm32/alloc-id:fake
31673 _string-xor-with/imm32/name
31674 0x11/imm32/alloc-id:fake
31675 Int-var-and-literal/imm32/inouts
31676 0/imm32/no-outputs
31677 0/imm32/no-outputs
31678 0x11/imm32/alloc-id:fake
31679 _string_81_subop_xor/imm32/subx-name
31680 1/imm32/rm32-is-first-inout
31681 0/imm32/no-r32
31682 2/imm32/imm32-is-second-inout
31683 0/imm32/no-imm8
31684 0/imm32/no-disp32
31685 0/imm32/no-xm32
31686 0/imm32/no-x32
31687 0x11/imm32/alloc-id:fake
31688 _Primitive-shift-reg-left-by-lit/imm32/next
31689 _Primitive-shift-reg-left-by-lit:
31690 0x11/imm32/alloc-id:fake:payload
31691
31692 0x11/imm32/alloc-id:fake
31693 _string-shift-left/imm32/name
31694 0x11/imm32/alloc-id:fake
31695 Single-lit-var/imm32/inouts
31696 0x11/imm32/alloc-id:fake
31697 Single-int-var-in-some-register/imm32/outputs
31698 0x11/imm32/alloc-id:fake
31699 _string_c1_subop_shift_left/imm32/subx-name
31700 3/imm32/rm32-is-first-output
31701 0/imm32/no-r32
31702 0/imm32/no-imm32
31703 1/imm32/imm8-is-first-inout
31704 0/imm32/no-disp32
31705 0/imm32/no-xm32
31706 0/imm32/no-x32
31707 0x11/imm32/alloc-id:fake
31708 _Primitive-shift-reg-right-by-lit/imm32/next
31709 _Primitive-shift-reg-right-by-lit:
31710 0x11/imm32/alloc-id:fake:payload
31711
31712 0x11/imm32/alloc-id:fake
31713 _string-shift-right/imm32/name
31714 0x11/imm32/alloc-id:fake
31715 Single-lit-var/imm32/inouts
31716 0x11/imm32/alloc-id:fake
31717 Single-int-var-in-some-register/imm32/outputs
31718 0x11/imm32/alloc-id:fake
31719 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
31720 3/imm32/rm32-is-first-output
31721 0/imm32/no-r32
31722 0/imm32/no-imm32
31723 1/imm32/imm8-is-first-inout
31724 0/imm32/no-disp32
31725 0/imm32/no-xm32
31726 0/imm32/no-x32
31727 0x11/imm32/alloc-id:fake
31728 _Primitive-shift-reg-right-signed-by-lit/imm32/next
31729 _Primitive-shift-reg-right-signed-by-lit:
31730 0x11/imm32/alloc-id:fake:payload
31731
31732 0x11/imm32/alloc-id:fake
31733 _string-shift-right-signed/imm32/name
31734 0x11/imm32/alloc-id:fake
31735 Single-lit-var/imm32/inouts
31736 0x11/imm32/alloc-id:fake
31737 Single-int-var-in-some-register/imm32/outputs
31738 0x11/imm32/alloc-id:fake
31739 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
31740 3/imm32/rm32-is-first-output
31741 0/imm32/no-r32
31742 0/imm32/no-imm32
31743 1/imm32/imm8-is-first-inout
31744 0/imm32/no-disp32
31745 0/imm32/no-xm32
31746 0/imm32/no-x32
31747 0x11/imm32/alloc-id:fake
31748 _Primitive-shift-mem-left-by-lit/imm32/next
31749 _Primitive-shift-mem-left-by-lit:
31750 0x11/imm32/alloc-id:fake:payload
31751
31752 0x11/imm32/alloc-id:fake
31753 _string-shift-left/imm32/name
31754 0x11/imm32/alloc-id:fake
31755 Int-var-and-literal/imm32/inouts
31756 0/imm32/no-outputs
31757 0/imm32/no-outputs
31758 0x11/imm32/alloc-id:fake
31759 _string_c1_subop_shift_left/imm32/subx-name
31760 1/imm32/rm32-is-first-inout
31761 0/imm32/no-r32
31762 0/imm32/no-imm32
31763 2/imm32/imm8-is-second-inout
31764 0/imm32/no-disp32
31765 0/imm32/no-xm32
31766 0/imm32/no-x32
31767 0x11/imm32/alloc-id:fake
31768 _Primitive-shift-mem-right-by-lit/imm32/next
31769 _Primitive-shift-mem-right-by-lit:
31770 0x11/imm32/alloc-id:fake:payload
31771
31772 0x11/imm32/alloc-id:fake
31773 _string-shift-right/imm32/name
31774 0x11/imm32/alloc-id:fake
31775 Int-var-and-literal/imm32/inouts
31776 0/imm32/no-outputs
31777 0/imm32/no-outputs
31778 0x11/imm32/alloc-id:fake
31779 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
31780 1/imm32/rm32-is-first-inout
31781 0/imm32/no-r32
31782 0/imm32/no-imm32
31783 2/imm32/imm8-is-second-inout
31784 0/imm32/no-disp32
31785 0/imm32/no-xm32
31786 0/imm32/no-x32
31787 0x11/imm32/alloc-id:fake
31788 _Primitive-shift-mem-right-signed-by-lit/imm32/next
31789 _Primitive-shift-mem-right-signed-by-lit:
31790 0x11/imm32/alloc-id:fake:payload
31791
31792 0x11/imm32/alloc-id:fake
31793 _string-shift-right-signed/imm32/name
31794 0x11/imm32/alloc-id:fake
31795 Int-var-and-literal/imm32/inouts
31796 0/imm32/no-outputs
31797 0/imm32/no-outputs
31798 0x11/imm32/alloc-id:fake
31799 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
31800 1/imm32/rm32-is-first-inout
31801 0/imm32/no-r32
31802 0/imm32/no-imm32
31803 2/imm32/imm8-is-second-inout
31804 0/imm32/no-disp32
31805 0/imm32/no-xm32
31806 0/imm32/no-x32
31807 0x11/imm32/alloc-id:fake
31808 _Primitive-copy-to-eax/imm32/next
31809
31810 _Primitive-copy-to-eax:
31811 0x11/imm32/alloc-id:fake:payload
31812
31813 0x11/imm32/alloc-id:fake
31814 _string-copy/imm32/name
31815 0x11/imm32/alloc-id:fake
31816 Single-lit-var/imm32/inouts
31817 0x11/imm32/alloc-id:fake
31818 Single-int-var-in-eax/imm32/outputs
31819 0x11/imm32/alloc-id:fake
31820 _string_b8_copy_to_eax/imm32/subx-name
31821 0/imm32/no-rm32
31822 0/imm32/no-r32
31823 1/imm32/imm32-is-first-inout
31824 0/imm32/no-imm8
31825 0/imm32/no-disp32
31826 0/imm32/no-xm32
31827 0/imm32/no-x32
31828 0x11/imm32/alloc-id:fake
31829 _Primitive-copy-to-ecx/imm32/next
31830 _Primitive-copy-to-ecx:
31831 0x11/imm32/alloc-id:fake:payload
31832
31833 0x11/imm32/alloc-id:fake
31834 _string-copy/imm32/name
31835 0x11/imm32/alloc-id:fake
31836 Single-lit-var/imm32/inouts
31837 0x11/imm32/alloc-id:fake
31838 Single-int-var-in-ecx/imm32/outputs
31839 0x11/imm32/alloc-id:fake
31840 _string_b9_copy_to_ecx/imm32/subx-name
31841 0/imm32/no-rm32
31842 0/imm32/no-r32
31843 1/imm32/imm32-is-first-inout
31844 0/imm32/no-imm8
31845 0/imm32/no-disp32
31846 0/imm32/no-xm32
31847 0/imm32/no-x32
31848 0x11/imm32/alloc-id:fake
31849 _Primitive-copy-to-edx/imm32/next
31850 _Primitive-copy-to-edx:
31851 0x11/imm32/alloc-id:fake:payload
31852
31853 0x11/imm32/alloc-id:fake
31854 _string-copy/imm32/name
31855 0x11/imm32/alloc-id:fake
31856 Single-lit-var/imm32/inouts
31857 0x11/imm32/alloc-id:fake
31858 Single-int-var-in-edx/imm32/outputs
31859 0x11/imm32/alloc-id:fake
31860 _string_ba_copy_to_edx/imm32/subx-name
31861 0/imm32/no-rm32
31862 0/imm32/no-r32
31863 1/imm32/imm32-is-first-inout
31864 0/imm32/no-imm8
31865 0/imm32/no-disp32
31866 0/imm32/no-xm32
31867 0/imm32/no-x32
31868 0x11/imm32/alloc-id:fake
31869 _Primitive-copy-to-ebx/imm32/next
31870 _Primitive-copy-to-ebx:
31871 0x11/imm32/alloc-id:fake:payload
31872
31873 0x11/imm32/alloc-id:fake
31874 _string-copy/imm32/name
31875 0x11/imm32/alloc-id:fake
31876 Single-lit-var/imm32/inouts
31877 0x11/imm32/alloc-id:fake
31878 Single-int-var-in-ebx/imm32/outputs
31879 0x11/imm32/alloc-id:fake
31880 _string_bb_copy_to_ebx/imm32/subx-name
31881 0/imm32/no-rm32
31882 0/imm32/no-r32
31883 1/imm32/imm32-is-first-inout
31884 0/imm32/no-imm8
31885 0/imm32/no-disp32
31886 0/imm32/no-xm32
31887 0/imm32/no-x32
31888 0x11/imm32/alloc-id:fake
31889 _Primitive-copy-to-esi/imm32/next
31890 _Primitive-copy-to-esi:
31891 0x11/imm32/alloc-id:fake:payload
31892
31893 0x11/imm32/alloc-id:fake
31894 _string-copy/imm32/name
31895 0x11/imm32/alloc-id:fake
31896 Single-lit-var/imm32/inouts
31897 0x11/imm32/alloc-id:fake
31898 Single-int-var-in-esi/imm32/outputs
31899 0x11/imm32/alloc-id:fake
31900 _string_be_copy_to_esi/imm32/subx-name
31901 0/imm32/no-rm32
31902 0/imm32/no-r32
31903 1/imm32/imm32-is-first-inout
31904 0/imm32/no-imm8
31905 0/imm32/no-disp32
31906 0/imm32/no-xm32
31907 0/imm32/no-x32
31908 0x11/imm32/alloc-id:fake
31909 _Primitive-copy-to-edi/imm32/next
31910 _Primitive-copy-to-edi:
31911 0x11/imm32/alloc-id:fake:payload
31912
31913 0x11/imm32/alloc-id:fake
31914 _string-copy/imm32/name
31915 0x11/imm32/alloc-id:fake
31916 Single-lit-var/imm32/inouts
31917 0x11/imm32/alloc-id:fake
31918 Single-int-var-in-edi/imm32/outputs
31919 0x11/imm32/alloc-id:fake
31920 _string_bf_copy_to_edi/imm32/subx-name
31921 0/imm32/no-rm32
31922 0/imm32/no-r32
31923 1/imm32/imm32-is-first-inout
31924 0/imm32/no-imm8
31925 0/imm32/no-disp32
31926 0/imm32/no-xm32
31927 0/imm32/no-x32
31928 0x11/imm32/alloc-id:fake
31929 _Primitive-copy-reg-to-reg/imm32/next
31930 _Primitive-copy-reg-to-reg:
31931 0x11/imm32/alloc-id:fake:payload
31932
31933 0x11/imm32/alloc-id:fake
31934 _string-copy/imm32/name
31935 0x11/imm32/alloc-id:fake
31936 Single-int-var-in-some-register/imm32/inouts
31937 0x11/imm32/alloc-id:fake
31938 Single-int-var-in-some-register/imm32/outputs
31939 0x11/imm32/alloc-id:fake
31940 _string_89_<-/imm32/subx-name
31941 3/imm32/rm32-is-first-output
31942 1/imm32/r32-is-first-inout
31943 0/imm32/no-imm32
31944 0/imm32/no-imm8
31945 0/imm32/no-disp32
31946 0/imm32/no-xm32
31947 0/imm32/no-x32
31948 0x11/imm32/alloc-id:fake
31949 _Primitive-copy-reg-to-mem/imm32/next
31950 _Primitive-copy-reg-to-mem:
31951 0x11/imm32/alloc-id:fake:payload
31952
31953 0x11/imm32/alloc-id:fake
31954 _string-copy-to/imm32/name
31955 0x11/imm32/alloc-id:fake
31956 Two-args-int-stack-int-reg/imm32/inouts
31957 0/imm32/no-outputs
31958 0/imm32/no-outputs
31959 0x11/imm32/alloc-id:fake
31960 _string_89_<-/imm32/subx-name
31961 1/imm32/rm32-is-first-inout
31962 2/imm32/r32-is-second-inout
31963 0/imm32/no-imm32
31964 0/imm32/no-imm8
31965 0/imm32/no-disp32
31966 0/imm32/no-xm32
31967 0/imm32/no-x32
31968 0x11/imm32/alloc-id:fake
31969 _Primitive-copy-mem-to-reg/imm32/next
31970 _Primitive-copy-mem-to-reg:
31971 0x11/imm32/alloc-id:fake:payload
31972
31973 0x11/imm32/alloc-id:fake
31974 _string-copy/imm32/name
31975 0x11/imm32/alloc-id:fake
31976 Single-int-var-in-mem/imm32/inouts
31977 0x11/imm32/alloc-id:fake
31978 Single-int-var-in-some-register/imm32/outputs
31979 0x11/imm32/alloc-id:fake
31980 _string_8b_->/imm32/subx-name
31981 1/imm32/rm32-is-first-inout
31982 3/imm32/r32-is-first-output
31983 0/imm32/no-imm32
31984 0/imm32/no-imm8
31985 0/imm32/no-disp32
31986 0/imm32/no-xm32
31987 0/imm32/no-x32
31988 0x11/imm32/alloc-id:fake
31989 _Primitive-copy-lit-to-reg/imm32/next
31990 _Primitive-copy-lit-to-reg:
31991 0x11/imm32/alloc-id:fake:payload
31992
31993 0x11/imm32/alloc-id:fake
31994 _string-copy/imm32/name
31995 0x11/imm32/alloc-id:fake
31996 Single-lit-var/imm32/inouts
31997 0x11/imm32/alloc-id:fake
31998 Single-int-var-in-some-register/imm32/outputs
31999 0x11/imm32/alloc-id:fake
32000 _string_c7_subop_copy/imm32/subx-name
32001 3/imm32/rm32-is-first-output
32002 0/imm32/no-r32
32003 1/imm32/imm32-is-first-inout
32004 0/imm32/no-imm8
32005 0/imm32/no-disp32
32006 0/imm32/no-xm32
32007 0/imm32/no-x32
32008 0x11/imm32/alloc-id:fake
32009 _Primitive-copy-lit-to-mem/imm32/next
32010 _Primitive-copy-lit-to-mem:
32011 0x11/imm32/alloc-id:fake:payload
32012
32013 0x11/imm32/alloc-id:fake
32014 _string-copy-to/imm32/name
32015 0x11/imm32/alloc-id:fake
32016 Int-var-and-literal/imm32/inouts
32017 0/imm32/no-outputs
32018 0/imm32/no-outputs
32019 0x11/imm32/alloc-id:fake
32020 _string_c7_subop_copy/imm32/subx-name
32021 1/imm32/rm32-is-first-inout
32022 0/imm32/no-r32
32023 2/imm32/imm32-is-second-inout
32024 0/imm32/no-imm8
32025 0/imm32/no-disp32
32026 0/imm32/no-xm32
32027 0/imm32/no-x32
32028 0x11/imm32/alloc-id:fake
32029 _Primitive-copy-byte-from-reg/imm32/next
32030
32031 _Primitive-copy-byte-from-reg:
32032 0x11/imm32/alloc-id:fake:payload
32033
32034 0x11/imm32/alloc-id:fake
32035 _string-copy-byte/imm32/name
32036 0x11/imm32/alloc-id:fake
32037 Single-byte-var-in-some-register/imm32/inouts
32038 0x11/imm32/alloc-id:fake
32039 Single-byte-var-in-some-register/imm32/outputs
32040 0x11/imm32/alloc-id:fake
32041 _string_8a_copy_byte/imm32/subx-name
32042 1/imm32/rm32-is-first-inout
32043 3/imm32/r32-is-first-output
32044 0/imm32/no-imm32
32045 0/imm32/no-imm8
32046 0/imm32/no-disp32
32047 0/imm32/no-xm32
32048 0/imm32/no-x32
32049 0x11/imm32/alloc-id:fake
32050 _Primitive-copy-byte-from-mem/imm32/next
32051 _Primitive-copy-byte-from-mem:
32052 0x11/imm32/alloc-id:fake:payload
32053
32054 0x11/imm32/alloc-id:fake
32055 _string-copy-byte/imm32/name
32056 0x11/imm32/alloc-id:fake
32057 Single-byte-var-in-mem/imm32/inouts
32058 0x11/imm32/alloc-id:fake
32059 Single-byte-var-in-some-register/imm32/outputs
32060 0x11/imm32/alloc-id:fake
32061 _string_8a_copy_byte/imm32/subx-name
32062 1/imm32/rm32-is-first-inout
32063 3/imm32/r32-is-first-output
32064 0/imm32/no-imm32
32065 0/imm32/no-imm8
32066 0/imm32/no-disp32
32067 0/imm32/no-xm32
32068 0/imm32/no-x32
32069 0x11/imm32/alloc-id:fake
32070 _Primitive-copy-byte-to-mem/imm32/next
32071 _Primitive-copy-byte-to-mem:
32072 0x11/imm32/alloc-id:fake:payload
32073
32074 0x11/imm32/alloc-id:fake
32075 _string-copy-byte-to/imm32/name
32076 0x11/imm32/alloc-id:fake
32077 Two-args-byte-stack-byte-reg/imm32/inouts
32078 0/imm32/no-outputs
32079 0/imm32/no-outputs
32080 0x11/imm32/alloc-id:fake
32081 _string_88_copy_byte/imm32/subx-name
32082 1/imm32/rm32-is-first-inout
32083 2/imm32/r32-is-second-inout
32084 0/imm32/no-imm32
32085 0/imm32/no-imm8
32086 0/imm32/no-disp32
32087 0/imm32/no-xm32
32088 0/imm32/no-x32
32089 0x11/imm32/alloc-id:fake
32090 _Primitive-address/imm32/next
32091
32092 _Primitive-address:
32093 0x11/imm32/alloc-id:fake:payload
32094
32095 0x11/imm32/alloc-id:fake
32096 _string-address/imm32/name
32097 0x11/imm32/alloc-id:fake
32098 Single-int-var-in-mem/imm32/inouts
32099 0x11/imm32/alloc-id:fake
32100 Single-addr-var-in-some-register/imm32/outputs
32101 0x11/imm32/alloc-id:fake
32102 _string_8d_copy_address/imm32/subx-name
32103 1/imm32/rm32-is-first-inout
32104 3/imm32/r32-is-first-output
32105 0/imm32/no-imm32
32106 0/imm32/no-imm8
32107 0/imm32/no-disp32
32108 0/imm32/no-xm32
32109 0/imm32/no-x32
32110 0x11/imm32/alloc-id:fake
32111 _Primitive-compare-reg-with-reg/imm32/next
32112
32113 _Primitive-compare-reg-with-reg:
32114 0x11/imm32/alloc-id:fake:payload
32115
32116 0x11/imm32/alloc-id:fake
32117 _string-compare/imm32/name
32118 0x11/imm32/alloc-id:fake
32119 Two-int-args-in-regs/imm32/inouts
32120 0/imm32/no-outputs
32121 0/imm32/no-outputs
32122 0x11/imm32/alloc-id:fake
32123 _string_39_compare->/imm32/subx-name
32124 1/imm32/rm32-is-first-inout
32125 2/imm32/r32-is-second-inout
32126 0/imm32/no-imm32
32127 0/imm32/no-imm8
32128 0/imm32/no-disp32
32129 0/imm32/no-xm32
32130 0/imm32/no-x32
32131 0x11/imm32/alloc-id:fake
32132 _Primitive-compare-mem-with-reg/imm32/next
32133 _Primitive-compare-mem-with-reg:
32134 0x11/imm32/alloc-id:fake:payload
32135
32136 0x11/imm32/alloc-id:fake
32137 _string-compare/imm32/name
32138 0x11/imm32/alloc-id:fake
32139 Two-args-int-stack-int-reg/imm32/inouts
32140 0/imm32/no-outputs
32141 0/imm32/no-outputs
32142 0x11/imm32/alloc-id:fake
32143 _string_39_compare->/imm32/subx-name
32144 1/imm32/rm32-is-first-inout
32145 2/imm32/r32-is-second-inout
32146 0/imm32/no-imm32
32147 0/imm32/no-imm8
32148 0/imm32/no-disp32
32149 0/imm32/no-xm32
32150 0/imm32/no-x32
32151 0x11/imm32/alloc-id:fake
32152 _Primitive-compare-reg-with-mem/imm32/next
32153 _Primitive-compare-reg-with-mem:
32154 0x11/imm32/alloc-id:fake:payload
32155
32156 0x11/imm32/alloc-id:fake
32157 _string-compare/imm32/name
32158 0x11/imm32/alloc-id:fake
32159 Two-args-int-reg-int-stack/imm32/inouts
32160 0/imm32/no-outputs
32161 0/imm32/no-outputs
32162 0x11/imm32/alloc-id:fake
32163 _string_3b_compare<-/imm32/subx-name
32164 2/imm32/rm32-is-second-inout
32165 1/imm32/r32-is-first-inout
32166 0/imm32/no-imm32
32167 0/imm32/no-imm8
32168 0/imm32/no-disp32
32169 0/imm32/no-xm32
32170 0/imm32/no-x32
32171 0x11/imm32/alloc-id:fake
32172 _Primitive-compare-eax-with-literal/imm32/next
32173 _Primitive-compare-eax-with-literal:
32174 0x11/imm32/alloc-id:fake:payload
32175
32176 0x11/imm32/alloc-id:fake
32177 _string-compare/imm32/name
32178 0x11/imm32/alloc-id:fake
32179 Two-args-int-eax-int-literal/imm32/inouts
32180 0/imm32/no-outputs
32181 0/imm32/no-outputs
32182 0x11/imm32/alloc-id:fake
32183 _string_3d_compare_eax_with/imm32/subx-name
32184 0/imm32/no-rm32
32185 0/imm32/no-r32
32186 2/imm32/imm32-is-second-inout
32187 0/imm32/no-imm8
32188 0/imm32/no-disp32
32189 0/imm32/no-xm32
32190 0/imm32/no-x32
32191 0x11/imm32/alloc-id:fake
32192 _Primitive-compare-reg-with-literal/imm32/next
32193 _Primitive-compare-reg-with-literal:
32194 0x11/imm32/alloc-id:fake:payload
32195
32196 0x11/imm32/alloc-id:fake
32197 _string-compare/imm32/name
32198 0x11/imm32/alloc-id:fake
32199 Int-var-in-register-and-literal/imm32/inouts
32200 0/imm32/no-outputs
32201 0/imm32/no-outputs
32202 0x11/imm32/alloc-id:fake
32203 _string_81_subop_compare/imm32/subx-name
32204 1/imm32/rm32-is-first-inout
32205 0/imm32/no-r32
32206 2/imm32/imm32-is-second-inout
32207 0/imm32/no-imm8
32208 0/imm32/no-disp32
32209 0/imm32/no-xm32
32210 0/imm32/no-x32
32211 0x11/imm32/alloc-id:fake
32212 _Primitive-compare-mem-with-literal/imm32/next
32213 _Primitive-compare-mem-with-literal:
32214 0x11/imm32/alloc-id:fake:payload
32215
32216 0x11/imm32/alloc-id:fake
32217 _string-compare/imm32/name
32218 0x11/imm32/alloc-id:fake
32219 Int-var-and-literal/imm32/inouts
32220 0/imm32/no-outputs
32221 0/imm32/no-outputs
32222 0x11/imm32/alloc-id:fake
32223 _string_81_subop_compare/imm32/subx-name
32224 1/imm32/rm32-is-first-inout
32225 0/imm32/no-r32
32226 2/imm32/imm32-is-second-inout
32227 0/imm32/no-imm8
32228 0/imm32/no-disp32
32229 0/imm32/no-xm32
32230 0/imm32/no-x32
32231 0x11/imm32/alloc-id:fake
32232 _Primitive-negate-reg/imm32/next
32233
32234 _Primitive-negate-reg:
32235 0x11/imm32/alloc-id:fake:payload
32236
32237 0x11/imm32/alloc-id:fake
32238 _string-negate/imm32/name
32239 0/imm32/no-inouts
32240 0/imm32/no-inouts
32241 0x11/imm32/alloc-id:fake
32242 Single-int-var-in-some-register/imm32/outputs
32243 0x11/imm32/alloc-id:fake
32244 _string_f7_subop_negate/imm32/subx-name
32245 3/imm32/rm32-is-first-output
32246 0/imm32/no-r32
32247 0/imm32/no-imm32
32248 0/imm32/no-imm8
32249 0/imm32/no-disp32
32250 0/imm32/no-xm32
32251 0/imm32/no-x32
32252 0x11/imm32/alloc-id:fake
32253 _Primitive-negate-mem/imm32/next
32254 _Primitive-negate-mem:
32255 0x11/imm32/alloc-id:fake:payload
32256
32257 0x11/imm32/alloc-id:fake
32258 _string-negate/imm32/name
32259 0x11/imm32/alloc-id:fake
32260 Single-int-var-in-mem/imm32/inouts
32261 0/imm32/no-outputs
32262 0/imm32/no-outputs
32263 0x11/imm32/alloc-id:fake
32264 _string_f7_subop_negate/imm32/subx-name
32265 1/imm32/rm32-is-first-inout
32266 0/imm32/no-r32
32267 0/imm32/no-imm32
32268 0/imm32/no-imm8
32269 0/imm32/no-disp32
32270 0/imm32/no-xm32
32271 0/imm32/no-x32
32272 0x11/imm32/alloc-id:fake
32273 _Primitive-multiply-reg-by-reg/imm32/next
32274
32275 _Primitive-multiply-reg-by-reg:
32276 0x11/imm32/alloc-id:fake:payload
32277
32278 0x11/imm32/alloc-id:fake
32279 _string-multiply/imm32/name
32280 0x11/imm32/alloc-id:fake
32281 Single-int-var-in-some-register/imm32/inouts
32282 0x11/imm32/alloc-id:fake
32283 Single-int-var-in-some-register/imm32/outputs
32284 0x11/imm32/alloc-id:fake
32285 _string_0f_af_multiply/imm32/subx-name
32286 1/imm32/rm32-is-first-inout
32287 3/imm32/r32-is-first-output
32288 0/imm32/no-imm32
32289 0/imm32/no-imm8
32290 0/imm32/no-disp32
32291 0/imm32/no-xm32
32292 0/imm32/no-x32
32293 0x11/imm32/alloc-id:fake
32294 _Primitive-multiply-reg-by-mem/imm32/next
32295 _Primitive-multiply-reg-by-mem:
32296 0x11/imm32/alloc-id:fake:payload
32297
32298 0x11/imm32/alloc-id:fake
32299 _string-multiply/imm32/name
32300 0x11/imm32/alloc-id:fake
32301 Single-int-var-in-mem/imm32/inouts
32302 0x11/imm32/alloc-id:fake
32303 Single-int-var-in-some-register/imm32/outputs
32304 0x11/imm32/alloc-id:fake
32305 _string_0f_af_multiply/imm32/subx-name
32306 1/imm32/rm32-is-first-inout
32307 3/imm32/r32-is-first-output
32308 0/imm32/no-imm32
32309 0/imm32/no-imm8
32310 0/imm32/no-disp32
32311 0/imm32/no-xm32
32312 0/imm32/no-x32
32313 0x11/imm32/alloc-id:fake
32314 _Primitive-convert-mem-to-xreg/imm32/next
32315
32316 _Primitive-convert-mem-to-xreg:
32317 0x11/imm32/alloc-id:fake:payload
32318
32319 0x11/imm32/alloc-id:fake
32320 _string-convert/imm32/name
32321 0x11/imm32/alloc-id:fake
32322 Single-int-var-in-mem/imm32/inouts
32323 0x11/imm32/alloc-id:fake
32324 Single-float-var-in-some-register/imm32/outputs
32325 0x11/imm32/alloc-id:fake
32326 _string_f3_0f_2a_convert_to_float/imm32/subx-name
32327 1/imm32/rm32-is-first-inout
32328 0/imm32/no-r32
32329 0/imm32/no-imm32
32330 0/imm32/no-imm8
32331 0/imm32/no-disp32
32332 0/imm32/no-xm32
32333 3/imm32/x32-is-first-output
32334 0x11/imm32/alloc-id:fake
32335 _Primitive-convert-reg-to-xreg/imm32/next
32336 _Primitive-convert-reg-to-xreg:
32337 0x11/imm32/alloc-id:fake:payload
32338
32339 0x11/imm32/alloc-id:fake
32340 _string-convert/imm32/name
32341 0x11/imm32/alloc-id:fake
32342 Single-int-var-in-some-register/imm32/inouts
32343 0x11/imm32/alloc-id:fake
32344 Single-float-var-in-some-register/imm32/outputs
32345 0x11/imm32/alloc-id:fake
32346 _string_f3_0f_2a_convert_to_float/imm32/subx-name
32347 1/imm32/rm32-is-first-inout
32348 0/imm32/no-r32
32349 0/imm32/no-imm32
32350 0/imm32/no-imm8
32351 0/imm32/no-disp32
32352 0/imm32/no-xm32
32353 3/imm32/x32-is-first-output
32354 0x11/imm32/alloc-id:fake
32355 _Primitive-convert-xmem-to-reg/imm32/next
32356
32357 _Primitive-convert-xmem-to-reg:
32358 0x11/imm32/alloc-id:fake:payload
32359
32360 0x11/imm32/alloc-id:fake
32361 _string-convert/imm32/name
32362 0x11/imm32/alloc-id:fake
32363 Single-float-var-in-mem/imm32/inouts
32364 0x11/imm32/alloc-id:fake
32365 Single-int-var-in-some-register/imm32/outputs
32366 0x11/imm32/alloc-id:fake
32367 _string_f3_0f_2d_convert_to_int/imm32/subx-name
32368 0/imm32/no-rm32
32369 3/imm32/r32-is-first-output
32370 0/imm32/no-imm32
32371 0/imm32/no-imm8
32372 0/imm32/no-disp32
32373 1/imm32/xm32-is-first-inout
32374 0/imm32/no-x32
32375 0x11/imm32/alloc-id:fake
32376 _Primitive-convert-xreg-to-reg/imm32/next
32377 _Primitive-convert-xreg-to-reg:
32378 0x11/imm32/alloc-id:fake:payload
32379
32380 0x11/imm32/alloc-id:fake
32381 _string-convert/imm32/name
32382 0x11/imm32/alloc-id:fake
32383 Single-float-var-in-some-register/imm32/inouts
32384 0x11/imm32/alloc-id:fake
32385 Single-int-var-in-some-register/imm32/outputs
32386 0x11/imm32/alloc-id:fake
32387 _string_f3_0f_2d_convert_to_int/imm32/subx-name
32388 0/imm32/no-rm32
32389 3/imm32/r32-is-first-output
32390 0/imm32/no-imm32
32391 0/imm32/no-imm8
32392 0/imm32/no-disp32
32393 1/imm32/xm32-is-first-inout
32394 0/imm32/no-x32
32395 0x11/imm32/alloc-id:fake
32396 _Primitive-truncate-xmem-to-reg/imm32/next
32397 _Primitive-truncate-xmem-to-reg:
32398 0x11/imm32/alloc-id:fake:payload
32399
32400 0x11/imm32/alloc-id:fake
32401 _string-truncate/imm32/name
32402 0x11/imm32/alloc-id:fake
32403 Single-float-var-in-mem/imm32/inouts
32404 0x11/imm32/alloc-id:fake
32405 Single-int-var-in-some-register/imm32/outputs
32406 0x11/imm32/alloc-id:fake
32407 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
32408 0/imm32/no-rm32
32409 3/imm32/r32-is-first-output
32410 0/imm32/no-imm32
32411 0/imm32/no-imm8
32412 0/imm32/no-disp32
32413 1/imm32/xm32-is-first-inout
32414 0/imm32/no-x32
32415 0x11/imm32/alloc-id:fake
32416 _Primitive-truncate-xreg-to-reg/imm32/next
32417 _Primitive-truncate-xreg-to-reg:
32418 0x11/imm32/alloc-id:fake:payload
32419
32420 0x11/imm32/alloc-id:fake
32421 _string-truncate/imm32/name
32422 0x11/imm32/alloc-id:fake
32423 Single-float-var-in-some-register/imm32/inouts
32424 0x11/imm32/alloc-id:fake
32425 Single-int-var-in-some-register/imm32/outputs
32426 0x11/imm32/alloc-id:fake
32427 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
32428 0/imm32/no-rm32
32429 3/imm32/r32-is-first-output
32430 0/imm32/no-imm32
32431 0/imm32/no-imm8
32432 0/imm32/no-disp32
32433 1/imm32/xm32-is-first-inout
32434 0/imm32/no-x32
32435 0x11/imm32/alloc-id:fake
32436 _Primitive-reinterpret-xmem-as-reg/imm32/next
32437
32438 _Primitive-reinterpret-xmem-as-reg:
32439 0x11/imm32/alloc-id:fake:payload
32440
32441 0x11/imm32/alloc-id:fake
32442 _string-reinterpret/imm32/name
32443 0x11/imm32/alloc-id:fake
32444 Single-float-var-in-mem/imm32/inouts
32445 0x11/imm32/alloc-id:fake
32446 Single-int-var-in-some-register/imm32/outputs
32447 0x11/imm32/alloc-id:fake
32448 _string_8b_->/imm32/subx-name
32449 0/imm32/no-rm32
32450 3/imm32/r32-is-first-output
32451 0/imm32/no-imm32
32452 0/imm32/no-imm8
32453 0/imm32/no-disp32
32454 1/imm32/xm32-is-first-inout
32455 0/imm32/no-x32
32456 0x11/imm32/alloc-id:fake
32457 _Primitive-reinterpret-mem-as-xreg/imm32/next
32458 _Primitive-reinterpret-mem-as-xreg:
32459 0x11/imm32/alloc-id:fake:payload
32460
32461 0x11/imm32/alloc-id:fake
32462 _string-reinterpret/imm32/name
32463 0x11/imm32/alloc-id:fake
32464 Single-int-var-in-mem/imm32/inouts
32465 0x11/imm32/alloc-id:fake
32466 Single-float-var-in-some-register/imm32/outputs
32467 0x11/imm32/alloc-id:fake
32468 _string_f3_0f_10_copy/imm32/subx-name
32469 1/imm32/rm32-is-first-inout
32470 0/imm32/no-r32
32471 0/imm32/no-imm32
32472 0/imm32/no-imm8
32473 0/imm32/no-disp32
32474 0/imm32/no-xm32
32475 3/imm32/x32-is-first-output
32476 0x11/imm32/alloc-id:fake
32477 _Primitive-copy-xreg-to-xreg/imm32/next
32478
32479 _Primitive-copy-xreg-to-xreg:
32480 0x11/imm32/alloc-id:fake:payload
32481
32482 0x11/imm32/alloc-id:fake
32483 _string-copy/imm32/name
32484 0x11/imm32/alloc-id:fake
32485 Single-float-var-in-some-register/imm32/inouts
32486 0x11/imm32/alloc-id:fake
32487 Single-float-var-in-some-register/imm32/outputs
32488 0x11/imm32/alloc-id:fake
32489 _string_f3_0f_11_copy/imm32/subx-name
32490 0/imm32/no-rm32
32491 0/imm32/no-r32
32492 0/imm32/no-imm32
32493 0/imm32/no-imm8
32494 0/imm32/no-disp32
32495 3/imm32/xm32-is-first-output
32496 1/imm32/x32-is-first-inout
32497 0x11/imm32/alloc-id:fake
32498 _Primitive-copy-xreg-to-mem/imm32/next
32499 _Primitive-copy-xreg-to-mem:
32500 0x11/imm32/alloc-id:fake:payload
32501
32502 0x11/imm32/alloc-id:fake
32503 _string-copy-to/imm32/name
32504 0x11/imm32/alloc-id:fake
32505 Two-args-float-stack-float-reg/imm32/inouts
32506 0/imm32/no-outputs
32507 0/imm32/no-outputs
32508 0x11/imm32/alloc-id:fake
32509 _string_f3_0f_11_copy/imm32/subx-name
32510 0/imm32/no-rm32
32511 0/imm32/no-r32
32512 0/imm32/no-imm32
32513 0/imm32/no-imm8
32514 0/imm32/no-disp32
32515 1/imm32/xm32-is-first-inout
32516 2/imm32/x32-is-second-inout
32517 0x11/imm32/alloc-id:fake
32518 _Primitive-copy-mem-to-xreg/imm32/next
32519 _Primitive-copy-mem-to-xreg:
32520 0x11/imm32/alloc-id:fake:payload
32521
32522 0x11/imm32/alloc-id:fake
32523 _string-copy/imm32/name
32524 0x11/imm32/alloc-id:fake
32525 Single-float-var-in-mem/imm32/inouts
32526 0x11/imm32/alloc-id:fake
32527 Single-float-var-in-some-register/imm32/outputs
32528 0x11/imm32/alloc-id:fake
32529 _string_f3_0f_10_copy/imm32/subx-name
32530 0/imm32/no-rm32
32531 0/imm32/no-r32
32532 0/imm32/no-imm32
32533 0/imm32/no-imm8
32534 0/imm32/no-disp32
32535 1/imm32/xm32-is-first-inout
32536 3/imm32/x32-is-first-output
32537 0x11/imm32/alloc-id:fake
32538 _Primitive-address-of-xmem/imm32/next
32539
32540 _Primitive-address-of-xmem:
32541 0x11/imm32/alloc-id:fake:payload
32542
32543 0x11/imm32/alloc-id:fake
32544 _string-address/imm32/name
32545 0x11/imm32/alloc-id:fake
32546 Single-float-var-in-mem/imm32/inouts
32547 0x11/imm32/alloc-id:fake
32548 Single-addr-var-in-some-register/imm32/outputs
32549 0x11/imm32/alloc-id:fake
32550 _string_8d_copy_address/imm32/subx-name
32551 1/imm32/rm32-is-first-inout
32552 3/imm32/r32-is-first-output
32553 0/imm32/no-imm32
32554 0/imm32/no-imm8
32555 0/imm32/no-disp32
32556 0/imm32/no-xm32
32557 0/imm32/no-x32
32558 0x11/imm32/alloc-id:fake
32559 _Primitive-add-xreg-to-xreg/imm32/next
32560
32561 _Primitive-add-xreg-to-xreg:
32562 0x11/imm32/alloc-id:fake:payload
32563
32564 0x11/imm32/alloc-id:fake
32565 _string-add/imm32/name
32566 0x11/imm32/alloc-id:fake
32567 Single-float-var-in-some-register/imm32/inouts
32568 0x11/imm32/alloc-id:fake
32569 Single-float-var-in-some-register/imm32/outputs
32570 0x11/imm32/alloc-id:fake
32571 _string_f3_0f_58_add/imm32/subx-name
32572 0/imm32/no-rm32
32573 0/imm32/no-r32
32574 0/imm32/no-imm32
32575 0/imm32/no-imm8
32576 0/imm32/no-disp32
32577 1/imm32/xm32-is-first-inout
32578 3/imm32/x32-is-first-output
32579 0x11/imm32/alloc-id:fake
32580 _Primitive-add-mem-to-xreg/imm32/next
32581 _Primitive-add-mem-to-xreg:
32582 0x11/imm32/alloc-id:fake:payload
32583
32584 0x11/imm32/alloc-id:fake
32585 _string-add/imm32/name
32586 0x11/imm32/alloc-id:fake
32587 Single-float-var-in-mem/imm32/inouts
32588 0x11/imm32/alloc-id:fake
32589 Single-float-var-in-some-register/imm32/outputs
32590 0x11/imm32/alloc-id:fake
32591 _string_f3_0f_58_add/imm32/subx-name
32592 0/imm32/no-rm32
32593 0/imm32/no-r32
32594 0/imm32/no-imm32
32595 0/imm32/no-imm8
32596 0/imm32/no-disp32
32597 1/imm32/xm32-is-first-inout
32598 3/imm32/x32-is-first-output
32599 0x11/imm32/alloc-id:fake
32600 _Primitive-subtract-xreg-from-xreg/imm32/next
32601
32602 _Primitive-subtract-xreg-from-xreg:
32603 0x11/imm32/alloc-id:fake:payload
32604
32605 0x11/imm32/alloc-id:fake
32606 _string-subtract/imm32/name
32607 0x11/imm32/alloc-id:fake
32608 Single-float-var-in-some-register/imm32/inouts
32609 0x11/imm32/alloc-id:fake
32610 Single-float-var-in-some-register/imm32/outputs
32611 0x11/imm32/alloc-id:fake
32612 _string_f3_0f_5c_subtract/imm32/subx-name
32613 0/imm32/no-rm32
32614 0/imm32/no-r32
32615 0/imm32/no-imm32
32616 0/imm32/no-imm8
32617 0/imm32/no-disp32
32618 1/imm32/xm32-is-first-inout
32619 3/imm32/x32-is-first-output
32620 0x11/imm32/alloc-id:fake
32621 _Primitive-subtract-mem-from-xreg/imm32/next
32622 _Primitive-subtract-mem-from-xreg:
32623 0x11/imm32/alloc-id:fake:payload
32624
32625 0x11/imm32/alloc-id:fake
32626 _string-subtract/imm32/name
32627 0x11/imm32/alloc-id:fake
32628 Single-float-var-in-mem/imm32/inouts
32629 0x11/imm32/alloc-id:fake
32630 Single-float-var-in-some-register/imm32/outputs
32631 0x11/imm32/alloc-id:fake
32632 _string_f3_0f_5c_subtract/imm32/subx-name
32633 0/imm32/no-rm32
32634 0/imm32/no-r32
32635 0/imm32/no-imm32
32636 0/imm32/no-imm8
32637 0/imm32/no-disp32
32638 1/imm32/xm32-is-first-inout
32639 3/imm32/x32-is-first-output
32640 0x11/imm32/alloc-id:fake
32641 _Primitive-multiply-xreg-by-xreg/imm32/next
32642
32643 _Primitive-multiply-xreg-by-xreg:
32644 0x11/imm32/alloc-id:fake:payload
32645
32646 0x11/imm32/alloc-id:fake
32647 _string-multiply/imm32/name
32648 0x11/imm32/alloc-id:fake
32649 Single-float-var-in-some-register/imm32/inouts
32650 0x11/imm32/alloc-id:fake
32651 Single-float-var-in-some-register/imm32/outputs
32652 0x11/imm32/alloc-id:fake
32653 _string_f3_0f_59_multiply/imm32/subx-name
32654 0/imm32/no-rm32
32655 0/imm32/no-r32
32656 0/imm32/no-imm32
32657 0/imm32/no-imm8
32658 0/imm32/no-disp32
32659 1/imm32/xm32-is-first-inout
32660 3/imm32/x32-is-first-output
32661 0x11/imm32/alloc-id:fake
32662 _Primitive-multiply-xreg-by-mem/imm32/next
32663 _Primitive-multiply-xreg-by-mem:
32664 0x11/imm32/alloc-id:fake:payload
32665
32666 0x11/imm32/alloc-id:fake
32667 _string-multiply/imm32/name
32668 0x11/imm32/alloc-id:fake
32669 Single-float-var-in-mem/imm32/inouts
32670 0x11/imm32/alloc-id:fake
32671 Single-float-var-in-some-register/imm32/outputs
32672 0x11/imm32/alloc-id:fake
32673 _string_f3_0f_59_multiply/imm32/subx-name
32674 0/imm32/no-rm32
32675 0/imm32/no-r32
32676 0/imm32/no-imm32
32677 0/imm32/no-imm8
32678 0/imm32/no-disp32
32679 1/imm32/xm32-is-first-inout
32680 3/imm32/x32-is-first-output
32681 0x11/imm32/alloc-id:fake
32682 _Primitive-divide-xreg-by-xreg/imm32/next
32683
32684 _Primitive-divide-xreg-by-xreg:
32685 0x11/imm32/alloc-id:fake:payload
32686
32687 0x11/imm32/alloc-id:fake
32688 _string-divide/imm32/name
32689 0x11/imm32/alloc-id:fake
32690 Single-float-var-in-some-register/imm32/inouts
32691 0x11/imm32/alloc-id:fake
32692 Single-float-var-in-some-register/imm32/outputs
32693 0x11/imm32/alloc-id:fake
32694 _string_f3_0f_5e_divide/imm32/subx-name
32695 0/imm32/no-rm32
32696 0/imm32/no-r32
32697 0/imm32/no-imm32
32698 0/imm32/no-imm8
32699 0/imm32/no-disp32
32700 1/imm32/xm32-is-first-inout
32701 3/imm32/x32-is-first-output
32702 0x11/imm32/alloc-id:fake
32703 _Primitive-divide-xreg-by-mem/imm32/next
32704 _Primitive-divide-xreg-by-mem:
32705 0x11/imm32/alloc-id:fake:payload
32706
32707 0x11/imm32/alloc-id:fake
32708 _string-divide/imm32/name
32709 0x11/imm32/alloc-id:fake
32710 Single-float-var-in-mem/imm32/inouts
32711 0x11/imm32/alloc-id:fake
32712 Single-float-var-in-some-register/imm32/outputs
32713 0x11/imm32/alloc-id:fake
32714 _string_f3_0f_5e_divide/imm32/subx-name
32715 0/imm32/no-rm32
32716 0/imm32/no-r32
32717 0/imm32/no-imm32
32718 0/imm32/no-imm8
32719 0/imm32/no-disp32
32720 1/imm32/xm32-is-first-inout
32721 3/imm32/x32-is-first-output
32722 0x11/imm32/alloc-id:fake
32723 _Primitive-max-xreg-with-xreg/imm32/next
32724
32725 _Primitive-max-xreg-with-xreg:
32726 0x11/imm32/alloc-id:fake:payload
32727
32728 0x11/imm32/alloc-id:fake
32729 _string-max/imm32/name
32730 0x11/imm32/alloc-id:fake
32731 Single-float-var-in-some-register/imm32/inouts
32732 0x11/imm32/alloc-id:fake
32733 Single-float-var-in-some-register/imm32/outputs
32734 0x11/imm32/alloc-id:fake
32735 _string_f3_0f_5f_max/imm32/subx-name
32736 0/imm32/no-rm32
32737 0/imm32/no-r32
32738 0/imm32/no-imm32
32739 0/imm32/no-imm8
32740 0/imm32/no-disp32
32741 1/imm32/xm32-is-first-inout
32742 3/imm32/x32-is-first-output
32743 0x11/imm32/alloc-id:fake
32744 _Primitive-max-xreg-with-mem/imm32/next
32745 _Primitive-max-xreg-with-mem:
32746 0x11/imm32/alloc-id:fake:payload
32747
32748 0x11/imm32/alloc-id:fake
32749 _string-max/imm32/name
32750 0x11/imm32/alloc-id:fake
32751 Single-float-var-in-mem/imm32/inouts
32752 0x11/imm32/alloc-id:fake
32753 Single-float-var-in-some-register/imm32/outputs
32754 0x11/imm32/alloc-id:fake
32755 _string_f3_0f_5f_max/imm32/subx-name
32756 0/imm32/no-rm32
32757 0/imm32/no-r32
32758 0/imm32/no-imm32
32759 0/imm32/no-imm8
32760 0/imm32/no-disp32
32761 1/imm32/xm32-is-first-inout
32762 3/imm32/x32-is-first-output
32763 0x11/imm32/alloc-id:fake
32764 _Primitive-min-xreg-with-xreg/imm32/next
32765
32766 _Primitive-min-xreg-with-xreg:
32767 0x11/imm32/alloc-id:fake:payload
32768
32769 0x11/imm32/alloc-id:fake
32770 _string-min/imm32/name
32771 0x11/imm32/alloc-id:fake
32772 Single-float-var-in-some-register/imm32/inouts
32773 0x11/imm32/alloc-id:fake
32774 Single-float-var-in-some-register/imm32/outputs
32775 0x11/imm32/alloc-id:fake
32776 _string_f3_0f_5d_min/imm32/subx-name
32777 0/imm32/no-rm32
32778 0/imm32/no-r32
32779 0/imm32/no-imm32
32780 0/imm32/no-imm8
32781 0/imm32/no-disp32
32782 1/imm32/xm32-is-first-inout
32783 3/imm32/x32-is-first-output
32784 0x11/imm32/alloc-id:fake
32785 _Primitive-min-xreg-with-mem/imm32/next
32786 _Primitive-min-xreg-with-mem:
32787 0x11/imm32/alloc-id:fake:payload
32788
32789 0x11/imm32/alloc-id:fake
32790 _string-min/imm32/name
32791 0x11/imm32/alloc-id:fake
32792 Single-float-var-in-mem/imm32/inouts
32793 0x11/imm32/alloc-id:fake
32794 Single-float-var-in-some-register/imm32/outputs
32795 0x11/imm32/alloc-id:fake
32796 _string_f3_0f_5d_min/imm32/subx-name
32797 0/imm32/no-rm32
32798 0/imm32/no-r32
32799 0/imm32/no-imm32
32800 0/imm32/no-imm8
32801 0/imm32/no-disp32
32802 1/imm32/xm32-is-first-inout
32803 3/imm32/x32-is-first-output
32804 0x11/imm32/alloc-id:fake
32805 _Primitive-reciprocal-xreg-to-xreg/imm32/next
32806
32807 _Primitive-reciprocal-xreg-to-xreg:
32808 0x11/imm32/alloc-id:fake:payload
32809
32810 0x11/imm32/alloc-id:fake
32811 _string-reciprocal/imm32/name
32812 0x11/imm32/alloc-id:fake
32813 Single-float-var-in-some-register/imm32/inouts
32814 0x11/imm32/alloc-id:fake
32815 Single-float-var-in-some-register/imm32/outputs
32816 0x11/imm32/alloc-id:fake
32817 _string_f3_0f_53_reciprocal/imm32/subx-name
32818 0/imm32/no-rm32
32819 0/imm32/no-r32
32820 0/imm32/no-imm32
32821 0/imm32/no-imm8
32822 0/imm32/no-disp32
32823 1/imm32/xm32-is-first-inout
32824 3/imm32/x32-is-first-output
32825 0x11/imm32/alloc-id:fake
32826 _Primitive-reciprocal-mem-to-xreg/imm32/next
32827 _Primitive-reciprocal-mem-to-xreg:
32828 0x11/imm32/alloc-id:fake:payload
32829
32830 0x11/imm32/alloc-id:fake
32831 _string-reciprocal/imm32/name
32832 0x11/imm32/alloc-id:fake
32833 Single-float-var-in-mem/imm32/inouts
32834 0x11/imm32/alloc-id:fake
32835 Single-float-var-in-some-register/imm32/outputs
32836 0x11/imm32/alloc-id:fake
32837 _string_f3_0f_53_reciprocal/imm32/subx-name
32838 0/imm32/no-rm32
32839 0/imm32/no-r32
32840 0/imm32/no-imm32
32841 0/imm32/no-imm8
32842 0/imm32/no-disp32
32843 1/imm32/xm32-is-first-inout
32844 3/imm32/x32-is-first-output
32845 0x11/imm32/alloc-id:fake
32846 _Primitive-square-root-xreg-to-xreg/imm32/next
32847
32848 _Primitive-square-root-xreg-to-xreg:
32849 0x11/imm32/alloc-id:fake:payload
32850
32851 0x11/imm32/alloc-id:fake
32852 _string-square-root/imm32/name
32853 0x11/imm32/alloc-id:fake
32854 Single-float-var-in-some-register/imm32/inouts
32855 0x11/imm32/alloc-id:fake
32856 Single-float-var-in-some-register/imm32/outputs
32857 0x11/imm32/alloc-id:fake
32858 _string_f3_0f_51_square_root/imm32/subx-name
32859 0/imm32/no-rm32
32860 0/imm32/no-r32
32861 0/imm32/no-imm32
32862 0/imm32/no-imm8
32863 0/imm32/no-disp32
32864 1/imm32/xm32-is-first-inout
32865 3/imm32/x32-is-first-output
32866 0x11/imm32/alloc-id:fake
32867 _Primitive-square-root-mem-to-xreg/imm32/next
32868 _Primitive-square-root-mem-to-xreg:
32869 0x11/imm32/alloc-id:fake:payload
32870
32871 0x11/imm32/alloc-id:fake
32872 _string-square-root/imm32/name
32873 0x11/imm32/alloc-id:fake
32874 Single-float-var-in-mem/imm32/inouts
32875 0x11/imm32/alloc-id:fake
32876 Single-float-var-in-some-register/imm32/outputs
32877 0x11/imm32/alloc-id:fake
32878 _string_f3_0f_51_square_root/imm32/subx-name
32879 0/imm32/no-rm32
32880 0/imm32/no-r32
32881 0/imm32/no-imm32
32882 0/imm32/no-imm8
32883 0/imm32/no-disp32
32884 1/imm32/xm32-is-first-inout
32885 3/imm32/x32-is-first-output
32886 0x11/imm32/alloc-id:fake
32887 _Primitive-inverse-square-root-xreg-to-xreg/imm32/next
32888
32889 _Primitive-inverse-square-root-xreg-to-xreg:
32890 0x11/imm32/alloc-id:fake:payload
32891
32892 0x11/imm32/alloc-id:fake
32893 _string-inverse-square-root/imm32/name
32894 0x11/imm32/alloc-id:fake
32895 Single-float-var-in-some-register/imm32/inouts
32896 0x11/imm32/alloc-id:fake
32897 Single-float-var-in-some-register/imm32/outputs
32898 0x11/imm32/alloc-id:fake
32899 _string_f3_0f_52_inverse_square_root/imm32/subx-name
32900 0/imm32/no-rm32
32901 0/imm32/no-r32
32902 0/imm32/no-imm32
32903 0/imm32/no-imm8
32904 0/imm32/no-disp32
32905 1/imm32/xm32-is-first-inout
32906 3/imm32/x32-is-first-output
32907 0x11/imm32/alloc-id:fake
32908 _Primitive-inverse-square-root-mem-to-xreg/imm32/next
32909 _Primitive-inverse-square-root-mem-to-xreg:
32910 0x11/imm32/alloc-id:fake:payload
32911
32912 0x11/imm32/alloc-id:fake
32913 _string-inverse-square-root/imm32/name
32914 0x11/imm32/alloc-id:fake
32915 Single-float-var-in-mem/imm32/inouts
32916 0x11/imm32/alloc-id:fake
32917 Single-float-var-in-some-register/imm32/outputs
32918 0x11/imm32/alloc-id:fake
32919 _string_f3_0f_52_inverse_square_root/imm32/subx-name
32920 0/imm32/no-rm32
32921 0/imm32/no-r32
32922 0/imm32/no-imm32
32923 0/imm32/no-imm8
32924 0/imm32/no-disp32
32925 1/imm32/xm32-is-first-inout
32926 3/imm32/x32-is-first-output
32927 0x11/imm32/alloc-id:fake
32928 _Primitive-compare-xreg-with-xreg/imm32/next
32929
32930 _Primitive-compare-xreg-with-xreg:
32931 0x11/imm32/alloc-id:fake:payload
32932
32933 0x11/imm32/alloc-id:fake
32934 _string-compare/imm32/name
32935 0x11/imm32/alloc-id:fake
32936 Two-float-args-in-regs/imm32/inouts
32937 0/imm32/no-outputs
32938 0/imm32/no-outputs
32939 0x11/imm32/alloc-id:fake
32940 _string_0f_2f_compare/imm32/subx-name
32941 0/imm32/no-rm32
32942 0/imm32/no-r32
32943 0/imm32/no-imm32
32944 0/imm32/no-imm8
32945 0/imm32/no-disp32
32946 2/imm32/xm32-is-second-inout
32947 1/imm32/x32-is-first-inout
32948 0x11/imm32/alloc-id:fake
32949 _Primitive-compare-xreg-with-mem/imm32/next
32950 _Primitive-compare-xreg-with-mem:
32951 0x11/imm32/alloc-id:fake:payload
32952
32953 0x11/imm32/alloc-id:fake
32954 _string-compare/imm32/name
32955 0x11/imm32/alloc-id:fake
32956 Two-args-float-reg-float-stack/imm32/inouts
32957 0/imm32/no-outputs
32958 0/imm32/no-outputs
32959 0x11/imm32/alloc-id:fake
32960 _string_0f_2f_compare/imm32/subx-name
32961 0/imm32/no-rm32
32962 0/imm32/no-r32
32963 0/imm32/no-imm32
32964 0/imm32/no-imm8
32965 0/imm32/no-disp32
32966 2/imm32/xm32-is-second-inout
32967 1/imm32/x32-is-first-inout
32968 0x11/imm32/alloc-id:fake
32969 _Primitive-break-if-addr</imm32/next
32970
32971 _Primitive-break-if-addr<:
32972 0x11/imm32/alloc-id:fake:payload
32973 0x11/imm32/alloc-id:fake
32974 _string-break-if-addr</imm32/name
32975 0/imm32/no-inouts
32976 0/imm32/no-inouts
32977 0/imm32/no-outputs
32978 0/imm32/no-outputs
32979 0x11/imm32/alloc-id:fake
32980 _string_0f_82_jump_break/imm32/subx-name
32981 0/imm32/no-rm32
32982 0/imm32/no-r32
32983 0/imm32/no-imm32
32984 0/imm32/no-imm8
32985 0/imm32/no-disp32
32986 0/imm32/no-xm32
32987 0/imm32/no-x32
32988 0x11/imm32/alloc-id:fake
32989 _Primitive-break-if-addr>=/imm32/next
32990 _Primitive-break-if-addr>=:
32991 0x11/imm32/alloc-id:fake:payload
32992 0x11/imm32/alloc-id:fake
32993 _string-break-if-addr>=/imm32/name
32994 0/imm32/no-inouts
32995 0/imm32/no-inouts
32996 0/imm32/no-outputs
32997 0/imm32/no-outputs
32998 0x11/imm32/alloc-id:fake
32999 _string_0f_83_jump_break/imm32/subx-name
33000 0/imm32/no-rm32
33001 0/imm32/no-r32
33002 0/imm32/no-imm32
33003 0/imm32/no-imm8
33004 0/imm32/no-disp32
33005 0/imm32/no-xm32
33006 0/imm32/no-x32
33007 0x11/imm32/alloc-id:fake
33008 _Primitive-break-if-=/imm32/next
33009 _Primitive-break-if-=:
33010 0x11/imm32/alloc-id:fake:payload
33011 0x11/imm32/alloc-id:fake
33012 _string-break-if-=/imm32/name
33013 0/imm32/no-inouts
33014 0/imm32/no-inouts
33015 0/imm32/no-outputs
33016 0/imm32/no-outputs
33017 0x11/imm32/alloc-id:fake
33018 _string_0f_84_jump_break/imm32/subx-name
33019 0/imm32/no-rm32
33020 0/imm32/no-r32
33021 0/imm32/no-imm32
33022 0/imm32/no-imm8
33023 0/imm32/no-disp32
33024 0/imm32/no-xm32
33025 0/imm32/no-x32
33026 0x11/imm32/alloc-id:fake
33027 _Primitive-break-if-!=/imm32/next
33028 _Primitive-break-if-!=:
33029 0x11/imm32/alloc-id:fake:payload
33030 0x11/imm32/alloc-id:fake
33031 _string-break-if-!=/imm32/name
33032 0/imm32/no-inouts
33033 0/imm32/no-inouts
33034 0/imm32/no-outputs
33035 0/imm32/no-outputs
33036 0x11/imm32/alloc-id:fake
33037 _string_0f_85_jump_break/imm32/subx-name
33038 0/imm32/no-rm32
33039 0/imm32/no-r32
33040 0/imm32/no-imm32
33041 0/imm32/no-imm8
33042 0/imm32/no-disp32
33043 0/imm32/no-xm32
33044 0/imm32/no-x32
33045 0x11/imm32/alloc-id:fake
33046 _Primitive-break-if-addr<=/imm32/next
33047 _Primitive-break-if-addr<=:
33048 0x11/imm32/alloc-id:fake:payload
33049 0x11/imm32/alloc-id:fake
33050 _string-break-if-addr<=/imm32/name
33051 0/imm32/no-inouts
33052 0/imm32/no-inouts
33053 0/imm32/no-outputs
33054 0/imm32/no-outputs
33055 0x11/imm32/alloc-id:fake
33056 _string_0f_86_jump_break/imm32/subx-name
33057 0/imm32/no-rm32
33058 0/imm32/no-r32
33059 0/imm32/no-imm32
33060 0/imm32/no-imm8
33061 0/imm32/no-disp32
33062 0/imm32/no-xm32
33063 0/imm32/no-x32
33064 0x11/imm32/alloc-id:fake
33065 _Primitive-break-if-addr>/imm32/next
33066 _Primitive-break-if-addr>:
33067 0x11/imm32/alloc-id:fake:payload
33068 0x11/imm32/alloc-id:fake
33069 _string-break-if-addr>/imm32/name
33070 0/imm32/no-inouts
33071 0/imm32/no-inouts
33072 0/imm32/no-outputs
33073 0/imm32/no-outputs
33074 0x11/imm32/alloc-id:fake
33075 _string_0f_87_jump_break/imm32/subx-name
33076 0/imm32/no-rm32
33077 0/imm32/no-r32
33078 0/imm32/no-imm32
33079 0/imm32/no-imm8
33080 0/imm32/no-disp32
33081 0/imm32/no-xm32
33082 0/imm32/no-x32
33083 0x11/imm32/alloc-id:fake
33084 _Primitive-break-if-</imm32/next
33085 _Primitive-break-if-<:
33086 0x11/imm32/alloc-id:fake:payload
33087 0x11/imm32/alloc-id:fake
33088 _string-break-if-</imm32/name
33089 0/imm32/no-inouts
33090 0/imm32/no-inouts
33091 0/imm32/no-outputs
33092 0/imm32/no-outputs
33093 0x11/imm32/alloc-id:fake
33094 _string_0f_8c_jump_break/imm32/subx-name
33095 0/imm32/no-rm32
33096 0/imm32/no-r32
33097 0/imm32/no-imm32
33098 0/imm32/no-imm8
33099 0/imm32/no-disp32
33100 0/imm32/no-xm32
33101 0/imm32/no-x32
33102 0x11/imm32/alloc-id:fake
33103 _Primitive-break-if->=/imm32/next
33104 _Primitive-break-if->=:
33105 0x11/imm32/alloc-id:fake:payload
33106 0x11/imm32/alloc-id:fake
33107 _string-break-if->=/imm32/name
33108 0/imm32/no-inouts
33109 0/imm32/no-inouts
33110 0/imm32/no-outputs
33111 0/imm32/no-outputs
33112 0x11/imm32/alloc-id:fake
33113 _string_0f_8d_jump_break/imm32/subx-name
33114 0/imm32/no-rm32
33115 0/imm32/no-r32
33116 0/imm32/no-imm32
33117 0/imm32/no-imm8
33118 0/imm32/no-disp32
33119 0/imm32/no-xm32
33120 0/imm32/no-x32
33121 0x11/imm32/alloc-id:fake
33122 _Primitive-break-if-<=/imm32/next
33123 _Primitive-break-if-<=:
33124 0x11/imm32/alloc-id:fake:payload
33125 0x11/imm32/alloc-id:fake
33126 _string-break-if-<=/imm32/name
33127 0/imm32/no-inouts
33128 0/imm32/no-inouts
33129 0/imm32/no-outputs
33130 0/imm32/no-outputs
33131 0x11/imm32/alloc-id:fake
33132 _string_0f_8e_jump_break/imm32/subx-name
33133 0/imm32/no-rm32
33134 0/imm32/no-r32
33135 0/imm32/no-imm32
33136 0/imm32/no-imm8
33137 0/imm32/no-disp32
33138 0/imm32/no-xm32
33139 0/imm32/no-x32
33140 0x11/imm32/alloc-id:fake
33141 _Primitive-break-if->/imm32/next
33142 _Primitive-break-if->:
33143 0x11/imm32/alloc-id:fake:payload
33144 0x11/imm32/alloc-id:fake
33145 _string-break-if->/imm32/name
33146 0/imm32/no-inouts
33147 0/imm32/no-inouts
33148 0/imm32/no-outputs
33149 0/imm32/no-outputs
33150 0x11/imm32/alloc-id:fake
33151 _string_0f_8f_jump_break/imm32/subx-name
33152 0/imm32/no-rm32
33153 0/imm32/no-r32
33154 0/imm32/no-imm32
33155 0/imm32/no-imm8
33156 0/imm32/no-disp32
33157 0/imm32/no-xm32
33158 0/imm32/no-x32
33159 0x11/imm32/alloc-id:fake
33160 _Primitive-break-if-carry/imm32/next
33161 _Primitive-break-if-carry:
33162 0x11/imm32/alloc-id:fake:payload
33163 0x11/imm32/alloc-id:fake
33164 _string-break-if-carry/imm32/name
33165 0/imm32/no-inouts
33166 0/imm32/no-inouts
33167 0/imm32/no-outputs
33168 0/imm32/no-outputs
33169 0x11/imm32/alloc-id:fake
33170 _string_0f_82_jump_break/imm32/subx-name
33171 0/imm32/no-rm32
33172 0/imm32/no-r32
33173 0/imm32/no-imm32
33174 0/imm32/no-imm8
33175 0/imm32/no-disp32
33176 0/imm32/no-xm32
33177 0/imm32/no-x32
33178 0x11/imm32/alloc-id:fake
33179 _Primitive-break-if-not-carry/imm32/next
33180 _Primitive-break-if-not-carry:
33181 0x11/imm32/alloc-id:fake:payload
33182 0x11/imm32/alloc-id:fake
33183 _string-break-if-not-carry/imm32/name
33184 0/imm32/no-inouts
33185 0/imm32/no-inouts
33186 0/imm32/no-outputs
33187 0/imm32/no-outputs
33188 0x11/imm32/alloc-id:fake
33189 _string_0f_83_jump_break/imm32/subx-name
33190 0/imm32/no-rm32
33191 0/imm32/no-r32
33192 0/imm32/no-imm32
33193 0/imm32/no-imm8
33194 0/imm32/no-disp32
33195 0/imm32/no-xm32
33196 0/imm32/no-x32
33197 0x11/imm32/alloc-id:fake
33198 _Primitive-break-if-overflow/imm32/next
33199 _Primitive-break-if-overflow:
33200 0x11/imm32/alloc-id:fake:payload
33201 0x11/imm32/alloc-id:fake
33202 _string-break-if-overflow/imm32/name
33203 0/imm32/no-inouts
33204 0/imm32/no-inouts
33205 0/imm32/no-outputs
33206 0/imm32/no-outputs
33207 0x11/imm32/alloc-id:fake
33208 _string_0f_80_jump_break/imm32/subx-name
33209 0/imm32/no-rm32
33210 0/imm32/no-r32
33211 0/imm32/no-imm32
33212 0/imm32/no-imm8
33213 0/imm32/no-disp32
33214 0/imm32/no-xm32
33215 0/imm32/no-x32
33216 0x11/imm32/alloc-id:fake
33217 _Primitive-break-if-not-overflow/imm32/next
33218 _Primitive-break-if-not-overflow:
33219 0x11/imm32/alloc-id:fake:payload
33220 0x11/imm32/alloc-id:fake
33221 _string-break-if-not-overflow/imm32/name
33222 0/imm32/no-inouts
33223 0/imm32/no-inouts
33224 0/imm32/no-outputs
33225 0/imm32/no-outputs
33226 0x11/imm32/alloc-id:fake
33227 _string_0f_81_jump_break/imm32/subx-name
33228 0/imm32/no-rm32
33229 0/imm32/no-r32
33230 0/imm32/no-imm32
33231 0/imm32/no-imm8
33232 0/imm32/no-disp32
33233 0/imm32/no-xm32
33234 0/imm32/no-x32
33235 0x11/imm32/alloc-id:fake
33236 _Primitive-break/imm32/next
33237 _Primitive-break:
33238 0x11/imm32/alloc-id:fake:payload
33239 0x11/imm32/alloc-id:fake
33240 _string-break/imm32/name
33241 0/imm32/no-inouts
33242 0/imm32/no-inouts
33243 0/imm32/no-outputs
33244 0/imm32/no-outputs
33245 0x11/imm32/alloc-id:fake
33246 _string_e9_jump_break/imm32/subx-name
33247 0/imm32/no-rm32
33248 0/imm32/no-r32
33249 0/imm32/no-imm32
33250 0/imm32/no-imm8
33251 0/imm32/no-disp32
33252 0/imm32/no-xm32
33253 0/imm32/no-x32
33254 0x11/imm32/alloc-id:fake
33255 _Primitive-loop-if-addr</imm32/next
33256 _Primitive-loop-if-addr<:
33257 0x11/imm32/alloc-id:fake:payload
33258 0x11/imm32/alloc-id:fake
33259 _string-loop-if-addr</imm32/name
33260 0/imm32/no-inouts
33261 0/imm32/no-inouts
33262 0/imm32/no-outputs
33263 0/imm32/no-outputs
33264 0x11/imm32/alloc-id:fake
33265 _string_0f_82_jump_loop/imm32/subx-name
33266 0/imm32/no-rm32
33267 0/imm32/no-r32
33268 0/imm32/no-imm32
33269 0/imm32/no-imm8
33270 0/imm32/no-disp32
33271 0/imm32/no-xm32
33272 0/imm32/no-x32
33273 0x11/imm32/alloc-id:fake
33274 _Primitive-loop-if-addr>=/imm32/next
33275 _Primitive-loop-if-addr>=:
33276 0x11/imm32/alloc-id:fake:payload
33277 0x11/imm32/alloc-id:fake
33278 _string-loop-if-addr>=/imm32/name
33279 0/imm32/no-inouts
33280 0/imm32/no-inouts
33281 0/imm32/no-outputs
33282 0/imm32/no-outputs
33283 0x11/imm32/alloc-id:fake
33284 _string_0f_83_jump_loop/imm32/subx-name
33285 0/imm32/no-rm32
33286 0/imm32/no-r32
33287 0/imm32/no-imm32
33288 0/imm32/no-imm8
33289 0/imm32/no-disp32
33290 0/imm32/no-xm32
33291 0/imm32/no-x32
33292 0x11/imm32/alloc-id:fake
33293 _Primitive-loop-if-=/imm32/next
33294 _Primitive-loop-if-=:
33295 0x11/imm32/alloc-id:fake:payload
33296 0x11/imm32/alloc-id:fake
33297 _string-loop-if-=/imm32/name
33298 0/imm32/no-inouts
33299 0/imm32/no-inouts
33300 0/imm32/no-outputs
33301 0/imm32/no-outputs
33302 0x11/imm32/alloc-id:fake
33303 _string_0f_84_jump_loop/imm32/subx-name
33304 0/imm32/no-rm32
33305 0/imm32/no-r32
33306 0/imm32/no-imm32
33307 0/imm32/no-imm8
33308 0/imm32/no-disp32
33309 0/imm32/no-xm32
33310 0/imm32/no-x32
33311 0x11/imm32/alloc-id:fake
33312 _Primitive-loop-if-!=/imm32/next
33313 _Primitive-loop-if-!=:
33314 0x11/imm32/alloc-id:fake:payload
33315 0x11/imm32/alloc-id:fake
33316 _string-loop-if-!=/imm32/name
33317 0/imm32/no-inouts
33318 0/imm32/no-inouts
33319 0/imm32/no-outputs
33320 0/imm32/no-outputs
33321 0x11/imm32/alloc-id:fake
33322 _string_0f_85_jump_loop/imm32/subx-name
33323 0/imm32/no-rm32
33324 0/imm32/no-r32
33325 0/imm32/no-imm32
33326 0/imm32/no-imm8
33327 0/imm32/no-disp32
33328 0/imm32/no-xm32
33329 0/imm32/no-x32
33330 0x11/imm32/alloc-id:fake
33331 _Primitive-loop-if-addr<=/imm32/next
33332 _Primitive-loop-if-addr<=:
33333 0x11/imm32/alloc-id:fake:payload
33334 0x11/imm32/alloc-id:fake
33335 _string-loop-if-addr<=/imm32/name
33336 0/imm32/no-inouts
33337 0/imm32/no-inouts
33338 0/imm32/no-outputs
33339 0/imm32/no-outputs
33340 0x11/imm32/alloc-id:fake
33341 _string_0f_86_jump_loop/imm32/subx-name
33342 0/imm32/no-rm32
33343 0/imm32/no-r32
33344 0/imm32/no-imm32
33345 0/imm32/no-imm8
33346 0/imm32/no-disp32
33347 0/imm32/no-xm32
33348 0/imm32/no-x32
33349 0x11/imm32/alloc-id:fake
33350 _Primitive-loop-if-addr>/imm32/next
33351 _Primitive-loop-if-addr>:
33352 0x11/imm32/alloc-id:fake:payload
33353 0x11/imm32/alloc-id:fake
33354 _string-loop-if-addr>/imm32/name
33355 0/imm32/no-inouts
33356 0/imm32/no-inouts
33357 0/imm32/no-outputs
33358 0/imm32/no-outputs
33359 0x11/imm32/alloc-id:fake
33360 _string_0f_87_jump_loop/imm32/subx-name
33361 0/imm32/no-rm32
33362 0/imm32/no-r32
33363 0/imm32/no-imm32
33364 0/imm32/no-imm8
33365 0/imm32/no-disp32
33366 0/imm32/no-xm32
33367 0/imm32/no-x32
33368 0x11/imm32/alloc-id:fake
33369 _Primitive-loop-if-</imm32/next
33370 _Primitive-loop-if-<:
33371 0x11/imm32/alloc-id:fake:payload
33372 0x11/imm32/alloc-id:fake
33373 _string-loop-if-</imm32/name
33374 0/imm32/no-inouts
33375 0/imm32/no-inouts
33376 0/imm32/no-outputs
33377 0/imm32/no-outputs
33378 0x11/imm32/alloc-id:fake
33379 _string_0f_8c_jump_loop/imm32/subx-name
33380 0/imm32/no-rm32
33381 0/imm32/no-r32
33382 0/imm32/no-imm32
33383 0/imm32/no-imm8
33384 0/imm32/no-disp32
33385 0/imm32/no-xm32
33386 0/imm32/no-x32
33387 0x11/imm32/alloc-id:fake
33388 _Primitive-loop-if->=/imm32/next
33389 _Primitive-loop-if->=:
33390 0x11/imm32/alloc-id:fake:payload
33391 0x11/imm32/alloc-id:fake
33392 _string-loop-if->=/imm32/name
33393 0/imm32/no-inouts
33394 0/imm32/no-inouts
33395 0/imm32/no-outputs
33396 0/imm32/no-outputs
33397 0x11/imm32/alloc-id:fake
33398 _string_0f_8d_jump_loop/imm32/subx-name
33399 0/imm32/no-rm32
33400 0/imm32/no-r32
33401 0/imm32/no-imm32
33402 0/imm32/no-imm8
33403 0/imm32/no-disp32
33404 0/imm32/no-xm32
33405 0/imm32/no-x32
33406 0x11/imm32/alloc-id:fake
33407 _Primitive-loop-if-<=/imm32/next
33408 _Primitive-loop-if-<=:
33409 0x11/imm32/alloc-id:fake:payload
33410 0x11/imm32/alloc-id:fake
33411 _string-loop-if-<=/imm32/name
33412 0/imm32/no-inouts
33413 0/imm32/no-inouts
33414 0/imm32/no-outputs
33415 0/imm32/no-outputs
33416 0x11/imm32/alloc-id:fake
33417 _string_0f_8e_jump_loop/imm32/subx-name
33418 0/imm32/no-rm32
33419 0/imm32/no-r32
33420 0/imm32/no-imm32
33421 0/imm32/no-imm8
33422 0/imm32/no-disp32
33423 0/imm32/no-xm32
33424 0/imm32/no-x32
33425 0x11/imm32/alloc-id:fake
33426 _Primitive-loop-if->/imm32/next
33427 _Primitive-loop-if->:
33428 0x11/imm32/alloc-id:fake:payload
33429 0x11/imm32/alloc-id:fake
33430 _string-loop-if->/imm32/name
33431 0/imm32/no-inouts
33432 0/imm32/no-inouts
33433 0/imm32/no-outputs
33434 0/imm32/no-outputs
33435 0x11/imm32/alloc-id:fake
33436 _string_0f_8f_jump_loop/imm32/subx-name
33437 0/imm32/no-rm32
33438 0/imm32/no-r32
33439 0/imm32/no-imm32
33440 0/imm32/no-imm8
33441 0/imm32/no-disp32
33442 0/imm32/no-xm32
33443 0/imm32/no-x32
33444 0x11/imm32/alloc-id:fake
33445 _Primitive-loop-if-carry/imm32/next
33446 _Primitive-loop-if-carry:
33447 0x11/imm32/alloc-id:fake:payload
33448 0x11/imm32/alloc-id:fake
33449 _string-loop-if-carry/imm32/name
33450 0/imm32/no-inouts
33451 0/imm32/no-inouts
33452 0/imm32/no-outputs
33453 0/imm32/no-outputs
33454 0x11/imm32/alloc-id:fake
33455 _string_0f_82_jump_loop/imm32/subx-name
33456 0/imm32/no-rm32
33457 0/imm32/no-r32
33458 0/imm32/no-imm32
33459 0/imm32/no-imm8
33460 0/imm32/no-disp32
33461 0/imm32/no-xm32
33462 0/imm32/no-x32
33463 0x11/imm32/alloc-id:fake
33464 _Primitive-loop-if-not-carry/imm32/next
33465 _Primitive-loop-if-not-carry:
33466 0x11/imm32/alloc-id:fake:payload
33467 0x11/imm32/alloc-id:fake
33468 _string-loop-if-not-carry/imm32/name
33469 0/imm32/no-inouts
33470 0/imm32/no-inouts
33471 0/imm32/no-outputs
33472 0/imm32/no-outputs
33473 0x11/imm32/alloc-id:fake
33474 _string_0f_83_jump_loop/imm32/subx-name
33475 0/imm32/no-rm32
33476 0/imm32/no-r32
33477 0/imm32/no-imm32
33478 0/imm32/no-imm8
33479 0/imm32/no-disp32
33480 0/imm32/no-xm32
33481 0/imm32/no-x32
33482 0x11/imm32/alloc-id:fake
33483 _Primitive-loop-if-overflow/imm32/next
33484 _Primitive-loop-if-overflow:
33485 0x11/imm32/alloc-id:fake:payload
33486 0x11/imm32/alloc-id:fake
33487 _string-loop-if-overflow/imm32/name
33488 0/imm32/no-inouts
33489 0/imm32/no-inouts
33490 0/imm32/no-outputs
33491 0/imm32/no-outputs
33492 0x11/imm32/alloc-id:fake
33493 _string_0f_80_jump_loop/imm32/subx-name
33494 0/imm32/no-rm32
33495 0/imm32/no-r32
33496 0/imm32/no-imm32
33497 0/imm32/no-imm8
33498 0/imm32/no-disp32
33499 0/imm32/no-xm32
33500 0/imm32/no-x32
33501 0x11/imm32/alloc-id:fake
33502 _Primitive-loop-if-not-overflow/imm32/next
33503 _Primitive-loop-if-not-overflow:
33504 0x11/imm32/alloc-id:fake:payload
33505 0x11/imm32/alloc-id:fake
33506 _string-loop-if-not-overflow/imm32/name
33507 0/imm32/no-inouts
33508 0/imm32/no-inouts
33509 0/imm32/no-outputs
33510 0/imm32/no-outputs
33511 0x11/imm32/alloc-id:fake
33512 _string_0f_81_jump_loop/imm32/subx-name
33513 0/imm32/no-rm32
33514 0/imm32/no-r32
33515 0/imm32/no-imm32
33516 0/imm32/no-imm8
33517 0/imm32/no-disp32
33518 0/imm32/no-xm32
33519 0/imm32/no-x32
33520 0x11/imm32/alloc-id:fake
33521 _Primitive-loop/imm32/next
33522 _Primitive-loop:
33523 0x11/imm32/alloc-id:fake:payload
33524 0x11/imm32/alloc-id:fake
33525 _string-loop/imm32/name
33526 0/imm32/no-inouts
33527 0/imm32/no-inouts
33528 0/imm32/no-outputs
33529 0/imm32/no-outputs
33530 0x11/imm32/alloc-id:fake
33531 _string_e9_jump_loop/imm32/subx-name
33532 0/imm32/no-rm32
33533 0/imm32/no-r32
33534 0/imm32/no-imm32
33535 0/imm32/no-imm8
33536 0/imm32/no-disp32
33537 0/imm32/no-xm32
33538 0/imm32/no-x32
33539 0x11/imm32/alloc-id:fake
33540 _Primitive-break-if-addr<-named/imm32/next
33541
33542 _Primitive-break-if-addr<-named:
33543 0x11/imm32/alloc-id:fake:payload
33544 0x11/imm32/alloc-id:fake
33545 _string-break-if-addr</imm32/name
33546 0x11/imm32/alloc-id:fake
33547 Single-lit-var/imm32/inouts
33548 0/imm32/no-outputs
33549 0/imm32/no-outputs
33550 0x11/imm32/alloc-id:fake
33551 _string_0f_82_jump_label/imm32/subx-name
33552 0/imm32/no-rm32
33553 0/imm32/no-r32
33554 0/imm32/no-imm32
33555 0/imm32/no-imm8
33556 1/imm32/disp32-is-first-inout
33557 0/imm32/no-xm32
33558 0/imm32/no-x32
33559 0x11/imm32/alloc-id:fake
33560 _Primitive-break-if-addr>=-named/imm32/next
33561 _Primitive-break-if-addr>=-named:
33562 0x11/imm32/alloc-id:fake:payload
33563 0x11/imm32/alloc-id:fake
33564 _string-break-if-addr>=/imm32/name
33565 0x11/imm32/alloc-id:fake
33566 Single-lit-var/imm32/inouts
33567 0/imm32/no-outputs
33568 0/imm32/no-outputs
33569 0x11/imm32/alloc-id:fake
33570 _string_0f_83_jump_label/imm32/subx-name
33571 0/imm32/no-rm32
33572 0/imm32/no-r32
33573 0/imm32/no-imm32
33574 0/imm32/no-imm8
33575 1/imm32/disp32-is-first-inout
33576 0/imm32/no-xm32
33577 0/imm32/no-x32
33578 0x11/imm32/alloc-id:fake
33579 _Primitive-break-if-=-named/imm32/next
33580 _Primitive-break-if-=-named:
33581 0x11/imm32/alloc-id:fake:payload
33582 0x11/imm32/alloc-id:fake
33583 _string-break-if-=/imm32/name
33584 0x11/imm32/alloc-id:fake
33585 Single-lit-var/imm32/inouts
33586 0/imm32/no-outputs
33587 0/imm32/no-outputs
33588 0x11/imm32/alloc-id:fake
33589 _string_0f_84_jump_label/imm32/subx-name
33590 0/imm32/no-rm32
33591 0/imm32/no-r32
33592 0/imm32/no-imm32
33593 0/imm32/no-imm8
33594 1/imm32/disp32-is-first-inout
33595 0/imm32/no-xm32
33596 0/imm32/no-x32
33597 0x11/imm32/alloc-id:fake
33598 _Primitive-break-if-!=-named/imm32/next
33599 _Primitive-break-if-!=-named:
33600 0x11/imm32/alloc-id:fake:payload
33601 0x11/imm32/alloc-id:fake
33602 _string-break-if-!=/imm32/name
33603 0x11/imm32/alloc-id:fake
33604 Single-lit-var/imm32/inouts
33605 0/imm32/no-outputs
33606 0/imm32/no-outputs
33607 0x11/imm32/alloc-id:fake
33608 _string_0f_85_jump_label/imm32/subx-name
33609 0/imm32/no-rm32
33610 0/imm32/no-r32
33611 0/imm32/no-imm32
33612 0/imm32/no-imm8
33613 1/imm32/disp32-is-first-inout
33614 0/imm32/no-xm32
33615 0/imm32/no-x32
33616 0x11/imm32/alloc-id:fake
33617 _Primitive-break-if-addr<=-named/imm32/next
33618 _Primitive-break-if-addr<=-named:
33619 0x11/imm32/alloc-id:fake:payload
33620 0x11/imm32/alloc-id:fake
33621 _string-break-if-addr<=/imm32/name
33622 0x11/imm32/alloc-id:fake
33623 Single-lit-var/imm32/inouts
33624 0/imm32/no-outputs
33625 0/imm32/no-outputs
33626 0x11/imm32/alloc-id:fake
33627 _string_0f_86_jump_label/imm32/subx-name
33628 0/imm32/no-rm32
33629 0/imm32/no-r32
33630 0/imm32/no-imm32
33631 0/imm32/no-imm8
33632 1/imm32/disp32-is-first-inout
33633 0/imm32/no-xm32
33634 0/imm32/no-x32
33635 0x11/imm32/alloc-id:fake
33636 _Primitive-break-if-addr>-named/imm32/next
33637 _Primitive-break-if-addr>-named:
33638 0x11/imm32/alloc-id:fake:payload
33639 0x11/imm32/alloc-id:fake
33640 _string-break-if-addr>/imm32/name
33641 0x11/imm32/alloc-id:fake
33642 Single-lit-var/imm32/inouts
33643 0/imm32/no-outputs
33644 0/imm32/no-outputs
33645 0x11/imm32/alloc-id:fake
33646 _string_0f_87_jump_label/imm32/subx-name
33647 0/imm32/no-rm32
33648 0/imm32/no-r32
33649 0/imm32/no-imm32
33650 0/imm32/no-imm8
33651 1/imm32/disp32-is-first-inout
33652 0/imm32/no-xm32
33653 0/imm32/no-x32
33654 0x11/imm32/alloc-id:fake
33655 _Primitive-break-if-<-named/imm32/next
33656 _Primitive-break-if-<-named:
33657 0x11/imm32/alloc-id:fake:payload
33658 0x11/imm32/alloc-id:fake
33659 _string-break-if-</imm32/name
33660 0x11/imm32/alloc-id:fake
33661 Single-lit-var/imm32/inouts
33662 0/imm32/no-outputs
33663 0/imm32/no-outputs
33664 0x11/imm32/alloc-id:fake
33665 _string_0f_8c_jump_label/imm32/subx-name
33666 0/imm32/no-rm32
33667 0/imm32/no-r32
33668 0/imm32/no-imm32
33669 0/imm32/no-imm8
33670 1/imm32/disp32-is-first-inout
33671 0/imm32/no-xm32
33672 0/imm32/no-x32
33673 0x11/imm32/alloc-id:fake
33674 _Primitive-break-if->=-named/imm32/next
33675 _Primitive-break-if->=-named:
33676 0x11/imm32/alloc-id:fake:payload
33677 0x11/imm32/alloc-id:fake
33678 _string-break-if->=/imm32/name
33679 0x11/imm32/alloc-id:fake
33680 Single-lit-var/imm32/inouts
33681 0/imm32/no-outputs
33682 0/imm32/no-outputs
33683 0x11/imm32/alloc-id:fake
33684 _string_0f_8d_jump_label/imm32/subx-name
33685 0/imm32/no-rm32
33686 0/imm32/no-r32
33687 0/imm32/no-imm32
33688 0/imm32/no-imm8
33689 1/imm32/disp32-is-first-inout
33690 0/imm32/no-xm32
33691 0/imm32/no-x32
33692 0x11/imm32/alloc-id:fake
33693 _Primitive-break-if-<=-named/imm32/next
33694 _Primitive-break-if-<=-named:
33695 0x11/imm32/alloc-id:fake:payload
33696 0x11/imm32/alloc-id:fake
33697 _string-break-if-<=/imm32/name
33698 0x11/imm32/alloc-id:fake
33699 Single-lit-var/imm32/inouts
33700 0/imm32/no-outputs
33701 0/imm32/no-outputs
33702 0x11/imm32/alloc-id:fake
33703 _string_0f_8e_jump_label/imm32/subx-name
33704 0/imm32/no-rm32
33705 0/imm32/no-r32
33706 0/imm32/no-imm32
33707 0/imm32/no-imm8
33708 1/imm32/disp32-is-first-inout
33709 0/imm32/no-xm32
33710 0/imm32/no-x32
33711 0x11/imm32/alloc-id:fake
33712 _Primitive-break-if->-named/imm32/next
33713 _Primitive-break-if->-named:
33714 0x11/imm32/alloc-id:fake:payload
33715 0x11/imm32/alloc-id:fake
33716 _string-break-if->/imm32/name
33717 0x11/imm32/alloc-id:fake
33718 Single-lit-var/imm32/inouts
33719 0/imm32/no-outputs
33720 0/imm32/no-outputs
33721 0x11/imm32/alloc-id:fake
33722 _string_0f_8f_jump_label/imm32/subx-name
33723 0/imm32/no-rm32
33724 0/imm32/no-r32
33725 0/imm32/no-imm32
33726 0/imm32/no-imm8
33727 1/imm32/disp32-is-first-inout
33728 0/imm32/no-xm32
33729 0/imm32/no-x32
33730 0x11/imm32/alloc-id:fake
33731 _Primitive-break-named/imm32/next
33732 _Primitive-break-named:
33733 0x11/imm32/alloc-id:fake:payload
33734 0x11/imm32/alloc-id:fake
33735 _string-break/imm32/name
33736 0x11/imm32/alloc-id:fake
33737 Single-lit-var/imm32/inouts
33738 0/imm32/no-outputs
33739 0/imm32/no-outputs
33740 0x11/imm32/alloc-id:fake
33741 _string_e9_jump_label/imm32/subx-name
33742 0/imm32/no-rm32
33743 0/imm32/no-r32
33744 0/imm32/no-imm32
33745 0/imm32/no-imm8
33746 1/imm32/disp32-is-first-inout
33747 0/imm32/no-xm32
33748 0/imm32/no-x32
33749 0x11/imm32/alloc-id:fake
33750 _Primitive-loop-if-addr<-named/imm32/next
33751 _Primitive-loop-if-addr<-named:
33752 0x11/imm32/alloc-id:fake:payload
33753 0x11/imm32/alloc-id:fake
33754 _string-loop-if-addr</imm32/name
33755 0x11/imm32/alloc-id:fake
33756 Single-lit-var/imm32/inouts
33757 0/imm32/no-outputs
33758 0/imm32/no-outputs
33759 0x11/imm32/alloc-id:fake
33760 _string_0f_82_jump_label/imm32/subx-name
33761 0/imm32/no-rm32
33762 0/imm32/no-r32
33763 0/imm32/no-imm32
33764 0/imm32/no-imm8
33765 1/imm32/disp32-is-first-inout
33766 0/imm32/no-xm32
33767 0/imm32/no-x32
33768 0x11/imm32/alloc-id:fake
33769 _Primitive-loop-if-addr>=-named/imm32/next
33770 _Primitive-loop-if-addr>=-named:
33771 0x11/imm32/alloc-id:fake:payload
33772 0x11/imm32/alloc-id:fake
33773 _string-loop-if-addr>=/imm32/name
33774 0x11/imm32/alloc-id:fake
33775 Single-lit-var/imm32/inouts
33776 0/imm32/no-outputs
33777 0/imm32/no-outputs
33778 0x11/imm32/alloc-id:fake
33779 _string_0f_83_jump_label/imm32/subx-name
33780 0/imm32/no-rm32
33781 0/imm32/no-r32
33782 0/imm32/no-imm32
33783 0/imm32/no-imm8
33784 1/imm32/disp32-is-first-inout
33785 0/imm32/no-xm32
33786 0/imm32/no-x32
33787 0x11/imm32/alloc-id:fake
33788 _Primitive-loop-if-=-named/imm32/next
33789 _Primitive-loop-if-=-named:
33790 0x11/imm32/alloc-id:fake:payload
33791 0x11/imm32/alloc-id:fake
33792 _string-loop-if-=/imm32/name
33793 0x11/imm32/alloc-id:fake
33794 Single-lit-var/imm32/inouts
33795 0/imm32/no-outputs
33796 0/imm32/no-outputs
33797 0x11/imm32/alloc-id:fake
33798 _string_0f_84_jump_label/imm32/subx-name
33799 0/imm32/no-rm32
33800 0/imm32/no-r32
33801 0/imm32/no-imm32
33802 0/imm32/no-imm8
33803 1/imm32/disp32-is-first-inout
33804 0/imm32/no-xm32
33805 0/imm32/no-x32
33806 0x11/imm32/alloc-id:fake
33807 _Primitive-loop-if-!=-named/imm32/next
33808 _Primitive-loop-if-!=-named:
33809 0x11/imm32/alloc-id:fake:payload
33810 0x11/imm32/alloc-id:fake
33811 _string-loop-if-!=/imm32/name
33812 0x11/imm32/alloc-id:fake
33813 Single-lit-var/imm32/inouts
33814 0/imm32/no-outputs
33815 0/imm32/no-outputs
33816 0x11/imm32/alloc-id:fake
33817 _string_0f_85_jump_label/imm32/subx-name
33818 0/imm32/no-rm32
33819 0/imm32/no-r32
33820 0/imm32/no-imm32
33821 0/imm32/no-imm8
33822 1/imm32/disp32-is-first-inout
33823 0/imm32/no-xm32
33824 0/imm32/no-x32
33825 0x11/imm32/alloc-id:fake
33826 _Primitive-loop-if-addr<=-named/imm32/next
33827 _Primitive-loop-if-addr<=-named:
33828 0x11/imm32/alloc-id:fake:payload
33829 0x11/imm32/alloc-id:fake
33830 _string-loop-if-addr<=/imm32/name
33831 0x11/imm32/alloc-id:fake
33832 Single-lit-var/imm32/inouts
33833 0/imm32/no-outputs
33834 0/imm32/no-outputs
33835 0x11/imm32/alloc-id:fake
33836 _string_0f_86_jump_label/imm32/subx-name
33837 0/imm32/no-rm32
33838 0/imm32/no-r32
33839 0/imm32/no-imm32
33840 0/imm32/no-imm8
33841 1/imm32/disp32-is-first-inout
33842 0/imm32/no-xm32
33843 0/imm32/no-x32
33844 0x11/imm32/alloc-id:fake
33845 _Primitive-loop-if-addr>-named/imm32/next
33846 _Primitive-loop-if-addr>-named:
33847 0x11/imm32/alloc-id:fake:payload
33848 0x11/imm32/alloc-id:fake
33849 _string-loop-if-addr>/imm32/name
33850 0x11/imm32/alloc-id:fake
33851 Single-lit-var/imm32/inouts
33852 0/imm32/no-outputs
33853 0/imm32/no-outputs
33854 0x11/imm32/alloc-id:fake
33855 _string_0f_87_jump_label/imm32/subx-name
33856 0/imm32/no-rm32
33857 0/imm32/no-r32
33858 0/imm32/no-imm32
33859 0/imm32/no-imm8
33860 1/imm32/disp32-is-first-inout
33861 0/imm32/no-xm32
33862 0/imm32/no-x32
33863 0x11/imm32/alloc-id:fake
33864 _Primitive-loop-if-<-named/imm32/next
33865 _Primitive-loop-if-<-named:
33866 0x11/imm32/alloc-id:fake:payload
33867 0x11/imm32/alloc-id:fake
33868 _string-loop-if-</imm32/name
33869 0x11/imm32/alloc-id:fake
33870 Single-lit-var/imm32/inouts
33871 0/imm32/no-outputs
33872 0/imm32/no-outputs
33873 0x11/imm32/alloc-id:fake
33874 _string_0f_8c_jump_label/imm32/subx-name
33875 0/imm32/no-rm32
33876 0/imm32/no-r32
33877 0/imm32/no-imm32
33878 0/imm32/no-imm8
33879 1/imm32/disp32-is-first-inout
33880 0/imm32/no-xm32
33881 0/imm32/no-x32
33882 0x11/imm32/alloc-id:fake
33883 _Primitive-loop-if->=-named/imm32/next
33884 _Primitive-loop-if->=-named:
33885 0x11/imm32/alloc-id:fake:payload
33886 0x11/imm32/alloc-id:fake
33887 _string-loop-if->=/imm32/name
33888 0x11/imm32/alloc-id:fake
33889 Single-lit-var/imm32/inouts
33890 0/imm32/no-outputs
33891 0/imm32/no-outputs
33892 0x11/imm32/alloc-id:fake
33893 _string_0f_8d_jump_label/imm32/subx-name
33894 0/imm32/no-rm32
33895 0/imm32/no-r32
33896 0/imm32/no-imm32
33897 0/imm32/no-imm8
33898 1/imm32/disp32-is-first-inout
33899 0/imm32/no-xm32
33900 0/imm32/no-x32
33901 0x11/imm32/alloc-id:fake
33902 _Primitive-loop-if-<=-named/imm32/next
33903 _Primitive-loop-if-<=-named:
33904 0x11/imm32/alloc-id:fake:payload
33905 0x11/imm32/alloc-id:fake
33906 _string-loop-if-<=/imm32/name
33907 0x11/imm32/alloc-id:fake
33908 Single-lit-var/imm32/inouts
33909 0/imm32/no-outputs
33910 0/imm32/no-outputs
33911 0x11/imm32/alloc-id:fake
33912 _string_0f_8e_jump_label/imm32/subx-name
33913 0/imm32/no-rm32
33914 0/imm32/no-r32
33915 0/imm32/no-imm32
33916 0/imm32/no-imm8
33917 1/imm32/disp32-is-first-inout
33918 0/imm32/no-xm32
33919 0/imm32/no-x32
33920 0x11/imm32/alloc-id:fake
33921 _Primitive-loop-if->-named/imm32/next
33922 _Primitive-loop-if->-named:
33923 0x11/imm32/alloc-id:fake:payload
33924 0x11/imm32/alloc-id:fake
33925 _string-loop-if->/imm32/name
33926 0x11/imm32/alloc-id:fake
33927 Single-lit-var/imm32/inouts
33928 0/imm32/no-outputs
33929 0/imm32/no-outputs
33930 0x11/imm32/alloc-id:fake
33931 _string_0f_8f_jump_label/imm32/subx-name
33932 0/imm32/no-rm32
33933 0/imm32/no-r32
33934 0/imm32/no-imm32
33935 0/imm32/no-imm8
33936 1/imm32/disp32-is-first-inout
33937 0/imm32/no-xm32
33938 0/imm32/no-x32
33939 0x11/imm32/alloc-id:fake
33940 _Primitive-loop-named/imm32/next
33941 _Primitive-loop-named:
33942 0x11/imm32/alloc-id:fake:payload
33943 0x11/imm32/alloc-id:fake
33944 _string-loop/imm32/name
33945 0x11/imm32/alloc-id:fake
33946 Single-lit-var/imm32/inouts
33947 0/imm32/no-outputs
33948 0/imm32/no-outputs
33949 0x11/imm32/alloc-id:fake
33950 _string_e9_jump_label/imm32/subx-name
33951 0/imm32/no-rm32
33952 0/imm32/no-r32
33953 0/imm32/no-imm32
33954 0/imm32/no-imm8
33955 1/imm32/disp32-is-first-inout
33956 0/imm32/no-xm32
33957 0/imm32/no-x32
33958 0x11/imm32/alloc-id:fake
33959 _Primitive-break-if-float</imm32/next
33960
33961 _Primitive-break-if-float<:
33962 0x11/imm32/alloc-id:fake:payload
33963 0x11/imm32/alloc-id:fake
33964 _string-break-if-float</imm32/name
33965 0/imm32/no-inouts
33966 0/imm32/no-inouts
33967 0/imm32/no-outputs
33968 0/imm32/no-outputs
33969 0x11/imm32/alloc-id:fake
33970 _string_0f_82_jump_break/imm32/subx-name
33971 0/imm32/no-rm32
33972 0/imm32/no-r32
33973 0/imm32/no-imm32
33974 0/imm32/no-imm8
33975 0/imm32/no-disp32
33976 0/imm32/no-xm32
33977 0/imm32/no-x32
33978 0x11/imm32/alloc-id:fake
33979 _Primitive-break-if-float>=/imm32/next
33980 _Primitive-break-if-float>=:
33981 0x11/imm32/alloc-id:fake:payload
33982 0x11/imm32/alloc-id:fake
33983 _string-break-if-float>=/imm32/name
33984 0/imm32/no-inouts
33985 0/imm32/no-inouts
33986 0/imm32/no-outputs
33987 0/imm32/no-outputs
33988 0x11/imm32/alloc-id:fake
33989 _string_0f_83_jump_break/imm32/subx-name
33990 0/imm32/no-rm32
33991 0/imm32/no-r32
33992 0/imm32/no-imm32
33993 0/imm32/no-imm8
33994 0/imm32/no-disp32
33995 0/imm32/no-xm32
33996 0/imm32/no-x32
33997 0x11/imm32/alloc-id:fake
33998 _Primitive-break-if-float<=/imm32/next
33999 _Primitive-break-if-float<=:
34000 0x11/imm32/alloc-id:fake:payload
34001 0x11/imm32/alloc-id:fake
34002 _string-break-if-float<=/imm32/name
34003 0/imm32/no-inouts
34004 0/imm32/no-inouts
34005 0/imm32/no-outputs
34006 0/imm32/no-outputs
34007 0x11/imm32/alloc-id:fake
34008 _string_0f_86_jump_break/imm32/subx-name
34009 0/imm32/no-rm32
34010 0/imm32/no-r32
34011 0/imm32/no-imm32
34012 0/imm32/no-imm8
34013 0/imm32/no-disp32
34014 0/imm32/no-xm32
34015 0/imm32/no-x32
34016 0x11/imm32/alloc-id:fake
34017 _Primitive-break-if-float>/imm32/next
34018 _Primitive-break-if-float>:
34019 0x11/imm32/alloc-id:fake:payload
34020 0x11/imm32/alloc-id:fake
34021 _string-break-if-float>/imm32/name
34022 0/imm32/no-inouts
34023 0/imm32/no-inouts
34024 0/imm32/no-outputs
34025 0/imm32/no-outputs
34026 0x11/imm32/alloc-id:fake
34027 _string_0f_87_jump_break/imm32/subx-name
34028 0/imm32/no-rm32
34029 0/imm32/no-r32
34030 0/imm32/no-imm32
34031 0/imm32/no-imm8
34032 0/imm32/no-disp32
34033 0/imm32/no-xm32
34034 0/imm32/no-x32
34035 0x11/imm32/alloc-id:fake
34036 _Primitive-loop-if-float</imm32/next
34037 _Primitive-loop-if-float<:
34038 0x11/imm32/alloc-id:fake:payload
34039 0x11/imm32/alloc-id:fake
34040 _string-loop-if-float</imm32/name
34041 0/imm32/no-inouts
34042 0/imm32/no-inouts
34043 0/imm32/no-outputs
34044 0/imm32/no-outputs
34045 0x11/imm32/alloc-id:fake
34046 _string_0f_82_jump_loop/imm32/subx-name
34047 0/imm32/no-rm32
34048 0/imm32/no-r32
34049 0/imm32/no-imm32
34050 0/imm32/no-imm8
34051 0/imm32/no-disp32
34052 0/imm32/no-xm32
34053 0/imm32/no-x32
34054 0x11/imm32/alloc-id:fake
34055 _Primitive-loop-if-float>=/imm32/next
34056 _Primitive-loop-if-float>=:
34057 0x11/imm32/alloc-id:fake:payload
34058 0x11/imm32/alloc-id:fake
34059 _string-loop-if-float>=/imm32/name
34060 0/imm32/no-inouts
34061 0/imm32/no-inouts
34062 0/imm32/no-outputs
34063 0/imm32/no-outputs
34064 0x11/imm32/alloc-id:fake
34065 _string_0f_83_jump_loop/imm32/subx-name
34066 0/imm32/no-rm32
34067 0/imm32/no-r32
34068 0/imm32/no-imm32
34069 0/imm32/no-imm8
34070 0/imm32/no-disp32
34071 0/imm32/no-xm32
34072 0/imm32/no-x32
34073 0x11/imm32/alloc-id:fake
34074 _Primitive-loop-if-float<=/imm32/next
34075 _Primitive-loop-if-float<=:
34076 0x11/imm32/alloc-id:fake:payload
34077 0x11/imm32/alloc-id:fake
34078 _string-loop-if-float<=/imm32/name
34079 0/imm32/no-inouts
34080 0/imm32/no-inouts
34081 0/imm32/no-outputs
34082 0/imm32/no-outputs
34083 0x11/imm32/alloc-id:fake
34084 _string_0f_86_jump_loop/imm32/subx-name
34085 0/imm32/no-rm32
34086 0/imm32/no-r32
34087 0/imm32/no-imm32
34088 0/imm32/no-imm8
34089 0/imm32/no-disp32
34090 0/imm32/no-xm32
34091 0/imm32/no-x32
34092 0x11/imm32/alloc-id:fake
34093 _Primitive-loop-if-float>/imm32/next
34094 _Primitive-loop-if-float>:
34095 0x11/imm32/alloc-id:fake:payload
34096 0x11/imm32/alloc-id:fake
34097 _string-loop-if-float>/imm32/name
34098 0/imm32/no-inouts
34099 0/imm32/no-inouts
34100 0/imm32/no-outputs
34101 0/imm32/no-outputs
34102 0x11/imm32/alloc-id:fake
34103 _string_0f_87_jump_loop/imm32/subx-name
34104 0/imm32/no-rm32
34105 0/imm32/no-r32
34106 0/imm32/no-imm32
34107 0/imm32/no-imm8
34108 0/imm32/no-disp32
34109 0/imm32/no-xm32
34110 0/imm32/no-x32
34111 0x11/imm32/alloc-id:fake
34112 _Primitive-break-if-float<-named/imm32/next
34113 _Primitive-break-if-float<-named:
34114 0x11/imm32/alloc-id:fake:payload
34115 0x11/imm32/alloc-id:fake
34116 _string-break-if-float</imm32/name
34117 0x11/imm32/alloc-id:fake
34118 Single-lit-var/imm32/inouts
34119 0/imm32/no-outputs
34120 0/imm32/no-outputs
34121 0x11/imm32/alloc-id:fake
34122 _string_0f_82_jump_label/imm32/subx-name
34123 0/imm32/no-rm32
34124 0/imm32/no-r32
34125 0/imm32/no-imm32
34126 0/imm32/no-imm8
34127 1/imm32/disp32-is-first-inout
34128 0/imm32/no-xm32
34129 0/imm32/no-x32
34130 0x11/imm32/alloc-id:fake
34131 _Primitive-break-if-float>=-named/imm32/next
34132 _Primitive-break-if-float>=-named:
34133 0x11/imm32/alloc-id:fake:payload
34134 0x11/imm32/alloc-id:fake
34135 _string-break-if-float>=/imm32/name
34136 0x11/imm32/alloc-id:fake
34137 Single-lit-var/imm32/inouts
34138 0/imm32/no-outputs
34139 0/imm32/no-outputs
34140 0x11/imm32/alloc-id:fake
34141 _string_0f_83_jump_label/imm32/subx-name
34142 0/imm32/no-rm32
34143 0/imm32/no-r32
34144 0/imm32/no-imm32
34145 0/imm32/no-imm8
34146 1/imm32/disp32-is-first-inout
34147 0/imm32/no-xm32
34148 0/imm32/no-x32
34149 0x11/imm32/alloc-id:fake
34150 _Primitive-break-if-float<=-named/imm32/next
34151 _Primitive-break-if-float<=-named:
34152 0x11/imm32/alloc-id:fake:payload
34153 0x11/imm32/alloc-id:fake
34154 _string-break-if-float<=/imm32/name
34155 0x11/imm32/alloc-id:fake
34156 Single-lit-var/imm32/inouts
34157 0/imm32/no-outputs
34158 0/imm32/no-outputs
34159 0x11/imm32/alloc-id:fake
34160 _string_0f_86_jump_label/imm32/subx-name
34161 0/imm32/no-rm32
34162 0/imm32/no-r32
34163 0/imm32/no-imm32
34164 0/imm32/no-imm8
34165 1/imm32/disp32-is-first-inout
34166 0/imm32/no-xm32
34167 0/imm32/no-x32
34168 0x11/imm32/alloc-id:fake
34169 _Primitive-break-if-float>-named/imm32/next
34170 _Primitive-break-if-float>-named:
34171 0x11/imm32/alloc-id:fake:payload
34172 0x11/imm32/alloc-id:fake
34173 _string-break-if-float>/imm32/name
34174 0x11/imm32/alloc-id:fake
34175 Single-lit-var/imm32/inouts
34176 0/imm32/no-outputs
34177 0/imm32/no-outputs
34178 0x11/imm32/alloc-id:fake
34179 _string_0f_87_jump_label/imm32/subx-name
34180 0/imm32/no-rm32
34181 0/imm32/no-r32
34182 0/imm32/no-imm32
34183 0/imm32/no-imm8
34184 1/imm32/disp32-is-first-inout
34185 0/imm32/no-xm32
34186 0/imm32/no-x32
34187 0x11/imm32/alloc-id:fake
34188 _Primitive-loop-if-float<-named/imm32/next
34189 _Primitive-loop-if-float<-named:
34190 0x11/imm32/alloc-id:fake:payload
34191 0x11/imm32/alloc-id:fake
34192 _string-loop-if-float</imm32/name
34193 0x11/imm32/alloc-id:fake
34194 Single-lit-var/imm32/inouts
34195 0/imm32/no-outputs
34196 0/imm32/no-outputs
34197 0x11/imm32/alloc-id:fake
34198 _string_0f_82_jump_label/imm32/subx-name
34199 0/imm32/no-rm32
34200 0/imm32/no-r32
34201 0/imm32/no-imm32
34202 0/imm32/no-imm8
34203 1/imm32/disp32-is-first-inout
34204 0/imm32/no-xm32
34205 0/imm32/no-x32
34206 0x11/imm32/alloc-id:fake
34207 _Primitive-loop-if-float>=-named/imm32/next
34208 _Primitive-loop-if-float>=-named:
34209 0x11/imm32/alloc-id:fake:payload
34210 0x11/imm32/alloc-id:fake
34211 _string-loop-if-float>=/imm32/name
34212 0x11/imm32/alloc-id:fake
34213 Single-lit-var/imm32/inouts
34214 0/imm32/no-outputs
34215 0/imm32/no-outputs
34216 0x11/imm32/alloc-id:fake
34217 _string_0f_83_jump_label/imm32/subx-name
34218 0/imm32/no-rm32
34219 0/imm32/no-r32
34220 0/imm32/no-imm32
34221 0/imm32/no-imm8
34222 1/imm32/disp32-is-first-inout
34223 0/imm32/no-xm32
34224 0/imm32/no-x32
34225 0x11/imm32/alloc-id:fake
34226 _Primitive-loop-if-float<=-named/imm32/next
34227 _Primitive-loop-if-float<=-named:
34228 0x11/imm32/alloc-id:fake:payload
34229 0x11/imm32/alloc-id:fake
34230 _string-loop-if-float<=/imm32/name
34231 0x11/imm32/alloc-id:fake
34232 Single-lit-var/imm32/inouts
34233 0/imm32/no-outputs
34234 0/imm32/no-outputs
34235 0x11/imm32/alloc-id:fake
34236 _string_0f_86_jump_label/imm32/subx-name
34237 0/imm32/no-rm32
34238 0/imm32/no-r32
34239 0/imm32/no-imm32
34240 0/imm32/no-imm8
34241 1/imm32/disp32-is-first-inout
34242 0/imm32/no-xm32
34243 0/imm32/no-x32
34244 0x11/imm32/alloc-id:fake
34245 _Primitive-loop-if-float>-named/imm32/next
34246 _Primitive-loop-if-float>-named:
34247 0x11/imm32/alloc-id:fake:payload
34248 0x11/imm32/alloc-id:fake
34249 _string-loop-if-float>/imm32/name
34250 0x11/imm32/alloc-id:fake
34251 Single-lit-var/imm32/inouts
34252 0/imm32/no-outputs
34253 0/imm32/no-outputs
34254 0x11/imm32/alloc-id:fake
34255 _string_0f_87_jump_label/imm32/subx-name
34256 0/imm32/no-rm32
34257 0/imm32/no-r32
34258 0/imm32/no-imm32
34259 0/imm32/no-imm8
34260 1/imm32/disp32-is-first-inout
34261 0/imm32/no-xm32
34262 0/imm32/no-x32
34263 0/imm32/next
34264 0/imm32/next
34265
34266
34267 _string-add:
34268 0x11/imm32/alloc-id:fake:payload
34269
34270 0x3/imm32/size
34271 0x61/a 0x64/d 0x64/d
34272 _string-address:
34273 0x11/imm32/alloc-id:fake:payload
34274
34275 0x7/imm32/size
34276 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
34277 _string-add-to:
34278 0x11/imm32/alloc-id:fake:payload
34279
34280 0x6/imm32/size
34281 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
34282 _string-and:
34283 0x11/imm32/alloc-id:fake:payload
34284
34285 0x3/imm32/size
34286 0x61/a 0x6e/n 0x64/d
34287 _string-and-with:
34288 0x11/imm32/alloc-id:fake:payload
34289
34290 0x8/imm32/size
34291 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34292 _string-break:
34293 0x11/imm32/alloc-id:fake:payload
34294
34295 0x5/imm32/size
34296 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
34297 _string-break-if-<:
34298 0x11/imm32/alloc-id:fake:payload
34299
34300 0xa/imm32/size
34301 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
34302 _string-break-if-<=:
34303 0x11/imm32/alloc-id:fake:payload
34304
34305 0xb/imm32/size
34306 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
34307 _string-break-if-=:
34308 0x11/imm32/alloc-id:fake:payload
34309
34310 0xa/imm32/size
34311 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
34312 _string-break-if->:
34313 0x11/imm32/alloc-id:fake:payload
34314
34315 0xa/imm32/size
34316 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
34317 _string-break-if->=:
34318 0x11/imm32/alloc-id:fake:payload
34319
34320 0xb/imm32/size
34321 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
34322 _string-break-if-!=:
34323 0x11/imm32/alloc-id:fake:payload
34324
34325 0xb/imm32/size
34326 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
34327 _string-break-if-addr<:
34328 0x11/imm32/alloc-id:fake:payload
34329
34330 0xe/imm32/size
34331 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/<
34332 _string-break-if-addr<=:
34333 0x11/imm32/alloc-id:fake:payload
34334
34335 0xf/imm32/size
34336 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/=
34337 _string-break-if-addr>:
34338 0x11/imm32/alloc-id:fake:payload
34339
34340 0xe/imm32/size
34341 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/>
34342 _string-break-if-addr>=:
34343 0x11/imm32/alloc-id:fake:payload
34344
34345 0xf/imm32/size
34346 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/=
34347 _string-break-if-float<:
34348 0x11/imm32/alloc-id:fake:payload
34349
34350 0xf/imm32/size
34351 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/<
34352 _string-break-if-float<=:
34353 0x11/imm32/alloc-id:fake:payload
34354
34355 0x10/imm32/size
34356 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/< 0x3d/=
34357 _string-break-if-float>:
34358 0x11/imm32/alloc-id:fake:payload
34359
34360 0xf/imm32/size
34361 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/>
34362 _string-break-if-float>=:
34363 0x11/imm32/alloc-id:fake:payload
34364
34365 0x10/imm32/size
34366 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/> 0x3d/=
34367 _string-break-if-carry:
34368 0x11/imm32/alloc-id:fake:payload
34369
34370 0xe/imm32/size
34371 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x63/c 0x61/a 0x72/r 0x72/r 0x79/y
34372 _string-break-if-not-carry:
34373 0x11/imm32/alloc-id:fake:payload
34374
34375 0x12/imm32/size
34376 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x63/c 0x61/a 0x72/r 0x72/r 0x79/y
34377 _string-break-if-overflow:
34378 0x11/imm32/alloc-id:fake:payload
34379
34380 0x11/imm32/size
34381 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34382 _string-break-if-not-overflow:
34383 0x11/imm32/alloc-id:fake:payload
34384
34385 0x15/imm32/size
34386 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34387 _string-compare:
34388 0x11/imm32/alloc-id:fake:payload
34389
34390 0x7/imm32/size
34391 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
34392 _string-copy:
34393 0x11/imm32/alloc-id:fake:payload
34394
34395 0x4/imm32/size
34396 0x63/c 0x6f/o 0x70/p 0x79/y
34397 _string-copy-to:
34398 0x11/imm32/alloc-id:fake:payload
34399
34400 0x7/imm32/size
34401 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
34402 _string-copy-byte:
34403 0x11/imm32/alloc-id:fake:payload
34404
34405 0x9/imm32/size
34406 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x62/b 0x79/y 0x74/t 0x65/e
34407 _string-copy-byte-to:
34408 0x11/imm32/alloc-id:fake:payload
34409
34410 0xc/imm32/size
34411 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/dash 0x74/t 0x6f/o
34412 _string-decrement:
34413 0x11/imm32/alloc-id:fake:payload
34414
34415 0x9/imm32/size
34416 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
34417 _string-increment:
34418 0x11/imm32/alloc-id:fake:payload
34419
34420 0x9/imm32/size
34421 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
34422 _string-loop:
34423 0x11/imm32/alloc-id:fake:payload
34424
34425 0x4/imm32/size
34426 0x6c/l 0x6f/o 0x6f/o 0x70/p
34427 _string-loop-if-<:
34428 0x11/imm32/alloc-id:fake:payload
34429
34430 0x9/imm32/size
34431 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
34432 _string-loop-if-<=:
34433 0x11/imm32/alloc-id:fake:payload
34434
34435 0xa/imm32/size
34436 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
34437 _string-loop-if-=:
34438 0x11/imm32/alloc-id:fake:payload
34439
34440 0x9/imm32/size
34441 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
34442 _string-loop-if->:
34443 0x11/imm32/alloc-id:fake:payload
34444
34445 0x9/imm32/size
34446 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
34447 _string-loop-if->=:
34448 0x11/imm32/alloc-id:fake:payload
34449
34450 0xa/imm32/size
34451 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
34452 _string-loop-if-!=:
34453 0x11/imm32/alloc-id:fake:payload
34454
34455 0xa/imm32/size
34456 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
34457 _string-loop-if-addr<:
34458 0x11/imm32/alloc-id:fake:payload
34459
34460 0xd/imm32/size
34461 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/<
34462 _string-loop-if-addr<=:
34463 0x11/imm32/alloc-id:fake:payload
34464
34465 0xe/imm32/size
34466 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/=
34467 _string-loop-if-addr>:
34468 0x11/imm32/alloc-id:fake:payload
34469
34470 0xd/imm32/size
34471 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/>
34472 _string-loop-if-addr>=:
34473 0x11/imm32/alloc-id:fake:payload
34474
34475 0xe/imm32/size
34476 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/=
34477 _string-loop-if-float<:
34478 0x11/imm32/alloc-id:fake:payload
34479
34480 0xe/imm32/size
34481 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/<
34482 _string-loop-if-float<=:
34483 0x11/imm32/alloc-id:fake:payload
34484
34485 0xf/imm32/size
34486 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3c/< 0x3d/=
34487 _string-loop-if-float>:
34488 0x11/imm32/alloc-id:fake:payload
34489
34490 0xe/imm32/size
34491 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/>
34492 _string-loop-if-float>=:
34493 0x11/imm32/alloc-id:fake:payload
34494
34495 0xf/imm32/size
34496 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t 0x3e/> 0x3d/=
34497 _string-loop-if-carry:
34498 0x11/imm32/alloc-id:fake:payload
34499
34500 0xd/imm32/size
34501 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x63/c 0x61/a 0x72/r 0x72/r 0x79/y
34502 _string-loop-if-not-carry:
34503 0x11/imm32/alloc-id:fake:payload
34504
34505 0x11/imm32/size
34506 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x63/c 0x61/a 0x72/r 0x72/r 0x79/y
34507 _string-loop-if-overflow:
34508 0x11/imm32/alloc-id:fake:payload
34509
34510 0x10/imm32/size
34511 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34512 _string-loop-if-not-overflow:
34513 0x11/imm32/alloc-id:fake:payload
34514
34515 0x14/imm32/size
34516 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34517 _string-multiply:
34518 0x11/imm32/alloc-id:fake:payload
34519
34520 0x8/imm32/size
34521 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
34522 _string-convert:
34523 0x11/imm32/alloc-id:fake:payload
34524
34525 0x7/imm32/size
34526 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t
34527 _string-truncate:
34528 0x11/imm32/alloc-id:fake:payload
34529
34530 0x8/imm32/size
34531 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e
34532 _string-reinterpret:
34533 0x11/imm32/alloc-id:fake:payload
34534
34535 0xb/imm32/size
34536 0x72/r 0x65/e 0x69/i 0x6e/n 0x74/t 0x65/e 0x72/r 0x70/p 0x72/r 0x65/e 0x74/t
34537 _string-divide:
34538 0x11/imm32/alloc-id:fake:payload
34539
34540 0x6/imm32/size
34541 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
34542 _string-max:
34543 0x11/imm32/alloc-id:fake:payload
34544
34545 0x3/imm32/size
34546 0x6d/m 0x61/a 0x78/x
34547 _string-min:
34548 0x11/imm32/alloc-id:fake:payload
34549
34550 0x3/imm32/size
34551 0x6d/m 0x69/i 0x6e/n
34552 _string-reciprocal:
34553 0x11/imm32/alloc-id:fake:payload
34554
34555 0xa/imm32/size
34556 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
34557 _string-square-root:
34558 0x11/imm32/alloc-id:fake:payload
34559
34560 0xb/imm32/size
34561 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
34562 _string-inverse-square-root:
34563 0x11/imm32/alloc-id:fake:payload
34564
34565 0x13/imm32/size
34566 0x69/i 0x6e/n 0x76/v 0x65/e 0x72/r 0x73/s 0x65/e 0x2d/dash 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
34567 _string-negate:
34568 0x11/imm32/alloc-id:fake:payload
34569
34570 0x6/imm32/size
34571 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
34572 _string-not:
34573 0x11/imm32/alloc-id:fake:payload
34574
34575 0x3/imm32/size
34576 0x6e/n 0x6f/o 0x74/t
34577 _string-or:
34578 0x11/imm32/alloc-id:fake:payload
34579
34580 0x2/imm32/size
34581 0x6f/o 0x72/r
34582 _string-or-with:
34583 0x11/imm32/alloc-id:fake:payload
34584
34585 0x7/imm32/size
34586 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34587 _string-subtract:
34588 0x11/imm32/alloc-id:fake:payload
34589
34590 0x8/imm32/size
34591 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
34592 _string-subtract-from:
34593 0x11/imm32/alloc-id:fake:payload
34594
34595 0xd/imm32/size
34596 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
34597 _string-xor:
34598 0x11/imm32/alloc-id:fake:payload
34599
34600 0x3/imm32/size
34601 0x78/x 0x6f/o 0x72/r
34602 _string-xor-with:
34603 0x11/imm32/alloc-id:fake:payload
34604
34605 0x8/imm32/size
34606 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34607 _string-shift-left:
34608 0x11/imm32/alloc-id:fake:payload
34609
34610 0xa/imm32/size
34611 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x6c/l 0x65/e 0x66/f 0x74/t
34612 _string-shift-right:
34613 0x11/imm32/alloc-id:fake:payload
34614
34615 0xb/imm32/size
34616 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t
34617 _string-shift-right-signed:
34618 0x11/imm32/alloc-id:fake:payload
34619
34620 0x12/imm32/size
34621 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x73/s 0x69/i 0x67/g 0x6e/n 0x65/e 0x64/d
34622
34623
34624 _string_01_add_to:
34625 0x11/imm32/alloc-id:fake:payload
34626
34627 0x9/imm32/size
34628 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
34629 _string_03_add:
34630 0x11/imm32/alloc-id:fake:payload
34631
34632 0x6/imm32/size
34633 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
34634 _string_05_add_to_eax:
34635 0x11/imm32/alloc-id:fake:payload
34636
34637 0xd/imm32/size
34638 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
34639 _string_09_or_with:
34640 0x11/imm32/alloc-id:fake:payload
34641
34642 0xa/imm32/size
34643 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34644 _string_0b_or:
34645 0x11/imm32/alloc-id:fake:payload
34646
34647 0x5/imm32/size
34648 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
34649 _string_0d_or_with_eax:
34650 0x11/imm32/alloc-id:fake:payload
34651
34652 0xe/imm32/size
34653 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
34654 _string_0f_80_jump_label:
34655 0x11/imm32/alloc-id:fake:payload
34656
34657 0x16/imm32/size
34658 0x30/0 0x66/f 0x20/space 0x38/8 0x30/0 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34659 _string_0f_80_jump_break:
34660 0x11/imm32/alloc-id:fake:payload
34661
34662 0x23/imm32/size
34663 0x30/0 0x66/f 0x20/space 0x38/8 0x30/0 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w 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
34664 _string_0f_80_jump_loop:
34665 0x11/imm32/alloc-id:fake:payload
34666
34667 0x22/imm32/size
34668 0x30/0 0x66/f 0x20/space 0x38/8 0x30/0 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
34669 _string_0f_81_jump_label:
34670 0x11/imm32/alloc-id:fake:payload
34671
34672 0x1a/imm32/size
34673 0x30/0 0x66/f 0x20/space 0x38/8 0x31/1 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w
34674 _string_0f_81_jump_break:
34675 0x11/imm32/alloc-id:fake:payload
34676
34677 0x27/imm32/size
34678 0x30/0 0x66/f 0x20/space 0x38/8 0x31/1 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w 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
34679 _string_0f_81_jump_loop:
34680 0x11/imm32/alloc-id:fake:payload
34681
34682 0x26/imm32/size
34683 0x30/0 0x66/f 0x20/space 0x38/8 0x31/1 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x6e/n 0x6f/o 0x74/t 0x2d/dash 0x6f/o 0x76/v 0x65/e 0x72/r 0x66/f 0x6c/l 0x6f/o 0x77/w 0x20/space 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2f/slash 0x64/d 0x69/i 0x73/s 0x70/p 0x33/3 0x32/2
34684 _string_0f_82_jump_label:
34685 0x11/imm32/alloc-id:fake:payload
34686
34687 0x13/imm32/size
34688 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/<
34689 _string_0f_82_jump_break:
34690 0x11/imm32/alloc-id:fake:payload
34691
34692 0x20/imm32/size
34693 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
34694 _string_0f_82_jump_loop:
34695 0x11/imm32/alloc-id:fake:payload
34696
34697 0x1f/imm32/size
34698 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
34699 _string_0f_83_jump_label:
34700 0x11/imm32/alloc-id:fake:payload
34701
34702 0x14/imm32/size
34703 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/=
34704 _string_0f_83_jump_break:
34705 0x11/imm32/alloc-id:fake:payload
34706
34707 0x21/imm32/size
34708 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
34709 _string_0f_83_jump_loop:
34710 0x11/imm32/alloc-id:fake:payload
34711
34712 0x20/imm32/size
34713 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
34714 _string_0f_84_jump_label:
34715 0x11/imm32/alloc-id:fake:payload
34716
34717 0xf/imm32/size
34718 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/=
34719 _string_0f_84_jump_break:
34720 0x11/imm32/alloc-id:fake:payload
34721
34722 0x1c/imm32/size
34723 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
34724 _string_0f_84_jump_loop:
34725 0x11/imm32/alloc-id:fake:payload
34726
34727 0x1a/imm32/size
34728 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
34729 _string_0f_85_jump_label:
34730 0x11/imm32/alloc-id:fake:payload
34731
34732 0x10/imm32/size
34733 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/=
34734 _string_0f_85_jump_break:
34735 0x11/imm32/alloc-id:fake:payload
34736
34737 0x1d/imm32/size
34738 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
34739 _string_0f_85_jump_loop:
34740 0x11/imm32/alloc-id:fake:payload
34741
34742 0x1c/imm32/size
34743 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
34744 _string_0f_86_jump_label:
34745 0x11/imm32/alloc-id:fake:payload
34746
34747 0x14/imm32/size
34748 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/=
34749 _string_0f_86_jump_break:
34750 0x11/imm32/alloc-id:fake:payload
34751
34752 0x21/imm32/size
34753 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
34754 _string_0f_86_jump_loop:
34755 0x11/imm32/alloc-id:fake:payload
34756
34757 0x20/imm32/size
34758 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
34759 _string_0f_87_jump_label:
34760 0x11/imm32/alloc-id:fake:payload
34761
34762 0x13/imm32/size
34763 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/>
34764 _string_0f_87_jump_break:
34765 0x11/imm32/alloc-id:fake:payload
34766
34767 0x20/imm32/size
34768 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
34769 _string_0f_87_jump_loop:
34770 0x11/imm32/alloc-id:fake:payload
34771
34772 0x1f/imm32/size
34773 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
34774 _string_0f_8c_jump_label:
34775 0x11/imm32/alloc-id:fake:payload
34776
34777 0xf/imm32/size
34778 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/<
34779 _string_0f_8c_jump_break:
34780 0x11/imm32/alloc-id:fake:payload
34781
34782 0x1c/imm32/size
34783 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
34784 _string_0f_8c_jump_loop:
34785 0x11/imm32/alloc-id:fake:payload
34786
34787 0x1b/imm32/size
34788 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
34789 _string_0f_8d_jump_label:
34790 0x11/imm32/alloc-id:fake:payload
34791
34792 0x10/imm32/size
34793 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/=
34794 _string_0f_8d_jump_break:
34795 0x11/imm32/alloc-id:fake:payload
34796
34797 0x1d/imm32/size
34798 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
34799 _string_0f_8d_jump_loop:
34800 0x11/imm32/alloc-id:fake:payload
34801
34802 0x1c/imm32/size
34803 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
34804 _string_0f_8e_jump_label:
34805 0x11/imm32/alloc-id:fake:payload
34806
34807 0x10/imm32/size
34808 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/=
34809 _string_0f_8e_jump_break:
34810 0x11/imm32/alloc-id:fake:payload
34811
34812 0x1d/imm32/size
34813 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
34814 _string_0f_8e_jump_loop:
34815 0x11/imm32/alloc-id:fake:payload
34816
34817 0x1c/imm32/size
34818 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
34819 _string_0f_8f_jump_label:
34820 0x11/imm32/alloc-id:fake:payload
34821
34822 0xf/imm32/size
34823 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/>
34824 _string_0f_8f_jump_break:
34825 0x11/imm32/alloc-id:fake:payload
34826
34827 0x1c/imm32/size
34828 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
34829 _string_0f_8f_jump_loop:
34830 0x11/imm32/alloc-id:fake:payload
34831
34832 0x1b/imm32/size
34833 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
34834 _string_0f_af_multiply:
34835 0x11/imm32/alloc-id:fake:payload
34836
34837 0xe/imm32/size
34838 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
34839 _string_f3_0f_2a_convert_to_float:
34840 0x11/imm32/alloc-id:fake:payload
34841
34842 0x19/imm32/size
34843 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x61/a 0x2f/slash 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x66/f 0x6c/l 0x6f/o 0x61/a 0x74/t
34844 _string_f3_0f_2d_convert_to_int:
34845 0x11/imm32/alloc-id:fake:payload
34846
34847 0x17/imm32/size
34848 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x64/d 0x2f/slash 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x69/i 0x6e/n 0x74/t
34849 _string_f3_0f_2c_truncate_to_int:
34850 0x11/imm32/alloc-id:fake:payload
34851
34852 0x18/imm32/size
34853 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x32/2 0x63/c 0x2f/slash 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e 0x2d/dash 0x74/t 0x6f/o 0x2d/dash 0x69/i 0x6e/n 0x74/t
34854 _string_f3_0f_58_add:
34855 0x11/imm32/alloc-id:fake:payload
34856
34857 0xc/imm32/size
34858 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x38/8 0x2f/slash 0x61/a 0x64/d 0x64/d
34859 _string_f3_0f_5c_subtract:
34860 0x11/imm32/alloc-id:fake:payload
34861
34862 0x11/imm32/size
34863 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x63/c 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
34864 _string_f3_0f_59_multiply:
34865 0x11/imm32/alloc-id:fake:payload
34866
34867 0x11/imm32/size
34868 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x39/9 0x2f/slash 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
34869 _string_f3_0f_5e_divide:
34870 0x11/imm32/alloc-id:fake:payload
34871
34872 0xf/imm32/size
34873 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x65/e 0x2f/slash 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
34874 _string_f3_0f_53_reciprocal:
34875 0x11/imm32/alloc-id:fake:payload
34876
34877 0x13/imm32/size
34878 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x33/3 0x2f/slash 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
34879 _string_f3_0f_51_square_root:
34880 0x11/imm32/alloc-id:fake:payload
34881
34882 0x14/imm32/size
34883 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x31/1 0x2f/slash 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
34884 _string_f3_0f_52_inverse_square_root:
34885 0x11/imm32/alloc-id:fake:payload
34886
34887 0x1c/imm32/size
34888 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x32/2 0x2f/slash 0x69/i 0x6e/n 0x76/v 0x65/e 0x72/r 0x73/s 0x65/e 0x2d/dash 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/dash 0x72/r 0x6f/o 0x6f/o 0x74/t
34889 _string_f3_0f_5d_min:
34890 0x11/imm32/alloc-id:fake:payload
34891
34892 0xc/imm32/size
34893 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x64/d 0x2f/slash 0x6d/m 0x69/i 0x6e/n
34894 _string_f3_0f_5f_max:
34895 0x11/imm32/alloc-id:fake:payload
34896
34897 0xc/imm32/size
34898 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x66/f 0x2f/slash 0x6d/m 0x61/a 0x78/x
34899 _string_f3_0f_10_copy:
34900 0x11/imm32/alloc-id:fake:payload
34901
34902 0xd/imm32/size
34903 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x31/1 0x30/0 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
34904 _string_f3_0f_11_copy:
34905 0x11/imm32/alloc-id:fake:payload
34906
34907 0xd/imm32/size
34908 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x31/1 0x31/1 0x2f/slash 0x63/c 0x6f/o 0x70/p 0x79/y
34909 _string_0f_2f_compare:
34910 0x11/imm32/alloc-id:fake:payload
34911
34912 0xd/imm32/size
34913 0x30/0 0x66/f 0x20/space 0x32/2 0x66/f 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
34914 _string_21_and_with:
34915 0x11/imm32/alloc-id:fake:payload
34916
34917 0xb/imm32/size
34918 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34919 _string_23_and:
34920 0x11/imm32/alloc-id:fake:payload
34921
34922 0x6/imm32/size
34923 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
34924 _string_25_and_with_eax:
34925 0x11/imm32/alloc-id:fake:payload
34926
34927 0xf/imm32/size
34928 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
34929 _string_29_subtract_from:
34930 0x11/imm32/alloc-id:fake:payload
34931
34932 0x10/imm32/size
34933 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
34934 _string_2b_subtract:
34935 0x11/imm32/alloc-id:fake:payload
34936
34937 0xb/imm32/size
34938 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
34939 _string_2d_subtract_from_eax:
34940 0x11/imm32/alloc-id:fake:payload
34941
34942 0x14/imm32/size
34943 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
34944 _string_31_xor_with:
34945 0x11/imm32/alloc-id:fake:payload
34946
34947 0xb/imm32/size
34948 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34949 _string_33_xor:
34950 0x11/imm32/alloc-id:fake:payload
34951
34952 0x6/imm32/size
34953 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
34954 _string_35_xor_with_eax:
34955 0x11/imm32/alloc-id:fake:payload
34956
34957 0xf/imm32/size
34958 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
34959 _string_39_compare->:
34960 0x11/imm32/alloc-id:fake:payload
34961
34962 0xc/imm32/size
34963 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
34964 _string_3b_compare<-:
34965 0x11/imm32/alloc-id:fake:payload
34966
34967 0xc/imm32/size
34968 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
34969 _string_3d_compare_eax_with:
34970 0x11/imm32/alloc-id:fake:payload
34971
34972 0x13/imm32/size
34973 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
34974 _string_40_increment_eax:
34975 0x11/imm32/alloc-id:fake:payload
34976
34977 0x10/imm32/size
34978 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
34979 _string_41_increment_ecx:
34980 0x11/imm32/alloc-id:fake:payload
34981
34982 0x10/imm32/size
34983 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
34984 _string_42_increment_edx:
34985 0x11/imm32/alloc-id:fake:payload
34986
34987 0x10/imm32/size
34988 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
34989 _string_43_increment_ebx:
34990 0x11/imm32/alloc-id:fake:payload
34991
34992 0x10/imm32/size
34993 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
34994 _string_46_increment_esi:
34995 0x11/imm32/alloc-id:fake:payload
34996
34997 0x10/imm32/size
34998 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
34999 _string_47_increment_edi:
35000 0x11/imm32/alloc-id:fake:payload
35001
35002 0x10/imm32/size
35003 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
35004 _string_48_decrement_eax:
35005 0x11/imm32/alloc-id:fake:payload
35006
35007 0x10/imm32/size
35008 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
35009 _string_49_decrement_ecx:
35010 0x11/imm32/alloc-id:fake:payload
35011
35012 0x10/imm32/size
35013 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
35014 _string_4a_decrement_edx:
35015 0x11/imm32/alloc-id:fake:payload
35016
35017 0x10/imm32/size
35018 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
35019 _string_4b_decrement_ebx:
35020 0x11/imm32/alloc-id:fake:payload
35021
35022 0x10/imm32/size
35023 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
35024 _string_4e_decrement_esi:
35025 0x11/imm32/alloc-id:fake:payload
35026
35027 0x10/imm32/size
35028 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
35029 _string_4f_decrement_edi:
35030 0x11/imm32/alloc-id:fake:payload
35031
35032 0x10/imm32/size
35033 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
35034 _string_81_subop_add:
35035 0x11/imm32/alloc-id:fake:payload
35036
35037 0xe/imm32/size
35038 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
35039 _string_81_subop_or:
35040 0x11/imm32/alloc-id:fake:payload
35041
35042 0xd/imm32/size
35043 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
35044 _string_81_subop_and:
35045 0x11/imm32/alloc-id:fake:payload
35046
35047 0xe/imm32/size
35048 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
35049 _string_81_subop_subtract:
35050 0x11/imm32/alloc-id:fake:payload
35051
35052 0x13/imm32/size
35053 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
35054 _string_81_subop_xor:
35055 0x11/imm32/alloc-id:fake:payload
35056
35057 0xe/imm32/size
35058 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
35059 _string_81_subop_compare:
35060 0x11/imm32/alloc-id:fake:payload
35061
35062 0x12/imm32/size
35063 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
35064 _string_89_<-:
35065 0x11/imm32/alloc-id:fake:payload
35066
35067 0x5/imm32/size
35068 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
35069 _string_8b_->:
35070 0x11/imm32/alloc-id:fake:payload
35071
35072 0x5/imm32/size
35073 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
35074 _string_8a_copy_byte:
35075 0x11/imm32/alloc-id:fake:payload
35076
35077 0x9/imm32/size
35078 0x38/8 0x61/a 0x2f/slash 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/dash 0x3e/>
35079 _string_88_copy_byte:
35080 0x11/imm32/alloc-id:fake:payload
35081
35082 0x9/imm32/size
35083 0x38/8 0x38/8 0x2f/slash 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
35084 _string_8d_copy_address:
35085 0x11/imm32/alloc-id:fake:payload
35086
35087 0xf/imm32/size
35088 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
35089 _string_b8_copy_to_eax:
35090 0x11/imm32/alloc-id:fake:payload
35091
35092 0xe/imm32/size
35093 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
35094 _string_b9_copy_to_ecx:
35095 0x11/imm32/alloc-id:fake:payload
35096
35097 0xe/imm32/size
35098 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
35099 _string_ba_copy_to_edx:
35100 0x11/imm32/alloc-id:fake:payload
35101
35102 0xe/imm32/size
35103 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
35104 _string_bb_copy_to_ebx:
35105 0x11/imm32/alloc-id:fake:payload
35106
35107 0xe/imm32/size
35108 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
35109 _string_be_copy_to_esi:
35110 0x11/imm32/alloc-id:fake:payload
35111
35112 0xe/imm32/size
35113 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
35114 _string_bf_copy_to_edi:
35115 0x11/imm32/alloc-id:fake:payload
35116
35117 0xe/imm32/size
35118 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
35119 _string_c7_subop_copy:
35120 0x11/imm32/alloc-id:fake:payload
35121
35122 0xf/imm32/size
35123 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
35124 _string_e9_jump_label:
35125 0x11/imm32/alloc-id:fake:payload
35126
35127 0x7/imm32/size
35128 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
35129 _string_e9_jump_break:
35130 0x11/imm32/alloc-id:fake:payload
35131
35132 0x14/imm32/size
35133 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
35134 _string_e9_jump_loop:
35135 0x11/imm32/alloc-id:fake:payload
35136
35137 0x13/imm32/size
35138 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
35139 _string_f7_subop_negate:
35140 0x11/imm32/alloc-id:fake:payload
35141
35142 0x11/imm32/size
35143 0x66/f 0x37/7 0x20/space 0x33/3 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
35144 _string_f7_subop_not:
35145 0x11/imm32/alloc-id:fake:payload
35146
35147 0xe/imm32/size
35148 0x66/f 0x37/7 0x20/space 0x32/2 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6e/n 0x6f/o 0x74/t
35149 _string_ff_subop_increment:
35150 0x11/imm32/alloc-id:fake:payload
35151
35152 0x14/imm32/size
35153 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
35154 _string_ff_subop_decrement:
35155 0x11/imm32/alloc-id:fake:payload
35156
35157 0x14/imm32/size
35158 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
35159 _string_c1_subop_shift_left:
35160 0x11/imm32/alloc-id:fake:payload
35161
35162 0x15/imm32/size
35163 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x34/4 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x6c/l 0x65/e 0x66/f 0x74/t
35164 _string_c1_subop_shift_right_padding_zeroes:
35165 0x11/imm32/alloc-id:fake:payload
35166
35167 0x25/imm32/size
35168 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x35/5 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x70/p 0x61/a 0x64/d 0x64/d 0x69/i 0x6e/n 0x67/g 0x2d/dash 0x7a/z 0x65/e 0x72/r 0x6f/o 0x65/e 0x73/s
35169 _string_c1_subop_shift_right_preserving_sign:
35170 0x11/imm32/alloc-id:fake:payload
35171
35172 0x26/imm32/size
35173 0x63/c 0x31/1 0x2f/slash 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x20/space 0x37/7 0x2f/slash 0x73/s 0x75/u 0x62/b 0x6f/o 0x70/p 0x2f/slash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t 0x2d/dash 0x70/p 0x72/r 0x65/e 0x73/s 0x65/e 0x72/r 0x76/v 0x69/i 0x6e/n 0x67/g 0x2d/dash 0x73/s 0x69/i 0x67/g 0x6e/n
35174
35175 Single-int-var-in-mem:
35176 0x11/imm32/alloc-id:fake:payload
35177 0x11/imm32/alloc-id:fake
35178 Int-var-in-mem/imm32
35179 0/imm32/next
35180 0/imm32/next
35181
35182 Int-var-in-mem:
35183 0x11/imm32/alloc-id:fake:payload
35184 0/imm32/name
35185 0/imm32/name
35186 0x11/imm32/alloc-id:fake
35187 Type-int/imm32
35188 1/imm32/some-block-depth
35189 1/imm32/some-stack-offset
35190 0/imm32/no-register
35191 0/imm32/no-register
35192
35193
35194 Single-byte-var-in-mem:
35195 0x11/imm32/alloc-id:fake:payload
35196 0x11/imm32/alloc-id:fake
35197 Byte-var-in-mem/imm32
35198 0/imm32/next
35199 0/imm32/next
35200
35201
35202 Byte-var-in-mem:
35203 0x11/imm32/alloc-id:fake:payload
35204 0/imm32/name
35205 0/imm32/name
35206 0x11/imm32/alloc-id:fake
35207 Type-byte/imm32
35208 1/imm32/some-block-depth
35209 1/imm32/some-stack-offset
35210 0/imm32/no-register
35211 0/imm32/no-register
35212
35213 Two-args-int-stack-int-reg:
35214 0x11/imm32/alloc-id:fake:payload
35215 0x11/imm32/alloc-id:fake
35216 Int-var-in-mem/imm32
35217 0x11/imm32/alloc-id:fake
35218 Single-int-var-in-some-register/imm32/next
35219
35220 Two-int-args-in-regs:
35221 0x11/imm32/alloc-id:fake:payload
35222 0x11/imm32/alloc-id:fake
35223 Int-var-in-some-register/imm32
35224 0x11/imm32/alloc-id:fake
35225 Single-int-var-in-some-register/imm32/next
35226
35227
35228 Two-args-byte-stack-byte-reg:
35229 0x11/imm32/alloc-id:fake:payload
35230 0x11/imm32/alloc-id:fake
35231 Byte-var-in-mem/imm32
35232 0x11/imm32/alloc-id:fake
35233 Single-byte-var-in-some-register/imm32/next
35234
35235 Two-args-int-reg-int-stack:
35236 0x11/imm32/alloc-id:fake:payload
35237 0x11/imm32/alloc-id:fake
35238 Int-var-in-some-register/imm32
35239 0x11/imm32/alloc-id:fake
35240 Single-int-var-in-mem/imm32/next
35241
35242 Two-args-int-eax-int-literal:
35243 0x11/imm32/alloc-id:fake:payload
35244 0x11/imm32/alloc-id:fake
35245 Int-var-in-eax/imm32
35246 0x11/imm32/alloc-id:fake
35247 Single-lit-var/imm32/next
35248
35249 Int-var-and-literal:
35250 0x11/imm32/alloc-id:fake:payload
35251 0x11/imm32/alloc-id:fake
35252 Int-var-in-mem/imm32
35253 0x11/imm32/alloc-id:fake
35254 Single-lit-var/imm32/next
35255
35256 Int-var-in-register-and-literal:
35257 0x11/imm32/alloc-id:fake:payload
35258 0x11/imm32/alloc-id:fake
35259 Int-var-in-some-register/imm32
35260 0x11/imm32/alloc-id:fake
35261 Single-lit-var/imm32/next
35262
35263 Two-float-args-in-regs:
35264 0x11/imm32/alloc-id:fake:payload
35265 0x11/imm32/alloc-id:fake
35266 Float-var-in-some-register/imm32
35267 0x11/imm32/alloc-id:fake
35268 Single-float-var-in-some-register/imm32/next
35269
35270 Two-args-float-reg-float-stack:
35271 0x11/imm32/alloc-id:fake:payload
35272 0x11/imm32/alloc-id:fake
35273 Float-var-in-some-register/imm32
35274 0x11/imm32/alloc-id:fake
35275 Single-float-var-in-mem/imm32/next
35276
35277 Two-args-float-stack-float-reg:
35278 0x11/imm32/alloc-id:fake:payload
35279 0x11/imm32/alloc-id:fake
35280 Float-var-in-mem/imm32
35281 0x11/imm32/alloc-id:fake
35282 Single-float-var-in-some-register/imm32/next
35283
35284 Single-int-var-in-some-register:
35285 0x11/imm32/alloc-id:fake:payload
35286 0x11/imm32/alloc-id:fake
35287 Int-var-in-some-register/imm32
35288 0/imm32/next
35289 0/imm32/next
35290
35291 Single-addr-var-in-some-register:
35292 0x11/imm32/alloc-id:fake:payload
35293 0x11/imm32/alloc-id:fake
35294 Addr-var-in-some-register/imm32
35295 0/imm32/next
35296 0/imm32/next
35297
35298 Single-byte-var-in-some-register:
35299 0x11/imm32/alloc-id:fake:payload
35300 0x11/imm32/alloc-id:fake
35301 Byte-var-in-some-register/imm32
35302 0/imm32/next
35303 0/imm32/next
35304
35305 Int-var-in-some-register:
35306 0x11/imm32/alloc-id:fake:payload
35307 0/imm32/name
35308 0/imm32/name
35309 0x11/imm32/alloc-id:fake
35310 Type-int/imm32
35311 1/imm32/some-block-depth
35312 0/imm32/no-stack-offset
35313 0x11/imm32/alloc-id:fake
35314 Any-register/imm32
35315
35316 Any-register:
35317 0x11/imm32/alloc-id:fake:payload
35318 1/imm32/size
35319
35320 2a/asterisk
35321
35322 Addr-var-in-some-register:
35323 0x11/imm32/alloc-id:fake:payload
35324 0/imm32/name
35325 0/imm32/name
35326 0x11/imm32/alloc-id:fake
35327 Type-addr/imm32
35328 1/imm32/some-block-depth
35329 0/imm32/no-stack-offset
35330 0x11/imm32/alloc-id:fake
35331 Any-register/imm32
35332
35333 Byte-var-in-some-register:
35334 0x11/imm32/alloc-id:fake:payload
35335 0/imm32/name
35336 0/imm32/name
35337 0x11/imm32/alloc-id:fake
35338 Type-byte/imm32
35339 1/imm32/some-block-depth
35340 0/imm32/no-stack-offset
35341 0x11/imm32/alloc-id:fake
35342 Any-register/imm32
35343
35344 Single-int-var-in-eax:
35345 0x11/imm32/alloc-id:fake:payload
35346 0x11/imm32/alloc-id:fake
35347 Int-var-in-eax/imm32
35348 0/imm32/next
35349 0/imm32/next
35350
35351 Int-var-in-eax:
35352 0x11/imm32/alloc-id:fake:payload
35353 0/imm32/name
35354 0/imm32/name
35355 0x11/imm32/alloc-id:fake
35356 Type-int/imm32
35357 1/imm32/some-block-depth
35358 0/imm32/no-stack-offset
35359 0x11/imm32/alloc-id:fake
35360 $Mu-register-eax/imm32
35361
35362 Single-int-var-in-ecx:
35363 0x11/imm32/alloc-id:fake:payload
35364 0x11/imm32/alloc-id:fake
35365 Int-var-in-ecx/imm32
35366 0/imm32/next
35367 0/imm32/next
35368
35369 Int-var-in-ecx:
35370 0x11/imm32/alloc-id:fake:payload
35371 0/imm32/name
35372 0/imm32/name
35373 0x11/imm32/alloc-id:fake
35374 Type-int/imm32
35375 1/imm32/some-block-depth
35376 0/imm32/no-stack-offset
35377 0x11/imm32/alloc-id:fake
35378 $Register-ecx/imm32/register
35379
35380 Single-int-var-in-edx:
35381 0x11/imm32/alloc-id:fake:payload
35382 0x11/imm32/alloc-id:fake
35383 Int-var-in-edx/imm32
35384 0/imm32/next
35385 0/imm32/next
35386
35387 Int-var-in-edx:
35388 0x11/imm32/alloc-id:fake:payload
35389 0/imm32/name
35390 0/imm32/name
35391 0x11/imm32/alloc-id:fake
35392 Type-int/imm32
35393 1/imm32/some-block-depth
35394 0/imm32/no-stack-offset
35395 0x11/imm32/alloc-id:fake
35396 $Register-edx/imm32/register
35397
35398 Single-int-var-in-ebx:
35399 0x11/imm32/alloc-id:fake:payload
35400 0x11/imm32/alloc-id:fake
35401 Int-var-in-ebx/imm32
35402 0/imm32/next
35403 0/imm32/next
35404
35405 Int-var-in-ebx:
35406 0x11/imm32/alloc-id:fake:payload
35407 0/imm32/name
35408 0/imm32/name
35409 0x11/imm32/alloc-id:fake
35410 Type-int/imm32
35411 1/imm32/some-block-depth
35412 0/imm32/no-stack-offset
35413 0x11/imm32/alloc-id:fake
35414 $Register-ebx/imm32/register
35415
35416 Single-int-var-in-esi:
35417 0x11/imm32/alloc-id:fake:payload
35418 0x11/imm32/alloc-id:fake
35419 Int-var-in-esi/imm32
35420 0/imm32/next
35421 0/imm32/next
35422
35423 Int-var-in-esi:
35424 0x11/imm32/alloc-id:fake:payload
35425 0/imm32/name
35426 0/imm32/name
35427 0x11/imm32/alloc-id:fake
35428 Type-int/imm32
35429 1/imm32/some-block-depth
35430 0/imm32/no-stack-offset
35431 0x11/imm32/alloc-id:fake
35432 $Register-esi/imm32/register
35433
35434 Single-int-var-in-edi:
35435 0x11/imm32/alloc-id:fake:payload
35436 0x11/imm32/alloc-id:fake
35437 Int-var-in-edi/imm32
35438 0/imm32/next
35439 0/imm32/next
35440
35441 Int-var-in-edi:
35442 0x11/imm32/alloc-id:fake:payload
35443 0/imm32/name
35444 0/imm32/name
35445 0x11/imm32/alloc-id:fake
35446 Type-int/imm32
35447 1/imm32/some-block-depth
35448 0/imm32/no-stack-offset
35449 0x11/imm32/alloc-id:fake
35450 $Register-edi/imm32/register
35451
35452 Single-lit-var:
35453 0x11/imm32/alloc-id:fake:payload
35454 0x11/imm32/alloc-id:fake
35455 Lit-var/imm32
35456 0/imm32/next
35457 0/imm32/next
35458
35459 Lit-var:
35460 0x11/imm32/alloc-id:fake:payload
35461 0/imm32/name
35462 0/imm32/name
35463 0x11/imm32/alloc-id:fake
35464 Type-literal/imm32
35465 1/imm32/some-block-depth
35466 0/imm32/no-stack-offset
35467 0/imm32/no-register
35468 0/imm32/no-register
35469
35470 Single-float-var-in-mem:
35471 0x11/imm32/alloc-id:fake:payload
35472 0x11/imm32/alloc-id:fake
35473 Float-var-in-mem/imm32
35474 0/imm32/next
35475 0/imm32/next
35476
35477 Float-var-in-mem:
35478 0x11/imm32/alloc-id:fake:payload
35479 0/imm32/name
35480 0/imm32/name
35481 0x11/imm32/alloc-id:fake
35482 Type-float/imm32
35483 1/imm32/some-block-depth
35484 1/imm32/some-stack-offset
35485 0/imm32/no-register
35486 0/imm32/no-register
35487
35488 Single-float-var-in-some-register:
35489 0x11/imm32/alloc-id:fake:payload
35490 0x11/imm32/alloc-id:fake
35491 Float-var-in-some-register/imm32
35492 0/imm32/next
35493 0/imm32/next
35494
35495 Float-var-in-some-register:
35496 0x11/imm32/alloc-id:fake:payload
35497 0/imm32/name
35498 0/imm32/name
35499 0x11/imm32/alloc-id:fake
35500 Type-float/imm32
35501 1/imm32/some-block-depth
35502 0/imm32/no-stack-offset
35503 0x11/imm32/alloc-id:fake
35504 Any-register/imm32
35505
35506 Type-int:
35507 0x11/imm32/alloc-id:fake:payload
35508 1/imm32/is-atom
35509 1/imm32/value:int
35510 0/imm32/left:unused
35511 0/imm32/right:null
35512 0/imm32/right:null
35513
35514 Type-literal:
35515 0x11/imm32/alloc-id:fake:payload
35516 1/imm32/is-atom
35517 0/imm32/value:literal
35518 0/imm32/left:unused
35519 0/imm32/right:null
35520 0/imm32/right:null
35521
35522 Type-addr:
35523 0x11/imm32/alloc-id:fake:payload
35524 1/imm32/is-atom
35525 2/imm32/value:addr
35526 0/imm32/left:unused
35527 0/imm32/right:null
35528 0/imm32/right:null
35529
35530 Type-array:
35531 0x11/imm32/alloc-id:fake:payload
35532 1/imm32/is-atom
35533 3/imm32/value:array
35534 0/imm32/left:unused
35535 0/imm32/right:null
35536 0/imm32/right:null
35537
35538 Type-byte:
35539 0x11/imm32/alloc-id:fake:payload
35540 1/imm32/is-atom
35541 8/imm32/value:byte
35542 0/imm32/left:unused
35543 0/imm32/right:null
35544 0/imm32/right:null
35545
35546 Type-float:
35547 0x11/imm32/alloc-id:fake:payload
35548 1/imm32/is-atom
35549 0xf/imm32/value:float
35550 0/imm32/left:unused
35551 0/imm32/right:null
35552 0/imm32/right:null
35553
35554 Addr-type-string:
35555 0/imm32/not-atom
35556 0x11/imm32/alloc-id:fake
35557 Type-addr/imm32/left
35558 0x11/imm32/alloc-id:fake
35559 _Addr-type-string:array/imm32/right
35560 _Addr-type-string:array:
35561 0x11/imm32/alloc-id:fake:payload
35562 0/imm32/not-atom
35563 0x11/imm32/alloc-id:fake
35564 Type-array/imm32/left
35565 0x11/imm32/alloc-id:fake
35566 _Addr-type-string:byte/imm32/right
35567 _Addr-type-string:byte:
35568 0x11/imm32/alloc-id:fake:payload
35569 0/imm32/not-atom
35570 0x11/imm32/alloc-id:fake
35571 Type-byte/imm32/left
35572 0/imm32/right:null
35573 0/imm32/right:null
35574
35575 == code
35576 emit-subx-primitive:
35577
35578 55/push-ebp
35579 89/<- %ebp 4/r32/esp
35580
35581 50/push-eax
35582 51/push-ecx
35583
35584 8b/-> *(ebp+0x10) 1/r32/ecx
35585
35586 (emit-indent *(ebp+8) *Curr-block-depth)
35587 (lookup *(ecx+0x18) *(ecx+0x1c))
35588 (write-buffered *(ebp+8) %eax)
35589
35590 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35591
35592 (emit-subx-rm32 *(ebp+8) *(ecx+0x34) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35593
35594 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
35595
35596 (emit-subx-x32 *(ebp+8) *(ecx+0x38) *(ebp+0xc))
35597
35598 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
35599
35600 (emit-subx-imm8 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
35601
35602 (emit-subx-disp32 *(ebp+8) *(ecx+0x30) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35603 (write-buffered *(ebp+8) Newline)
35604 $emit-subx-primitive:end:
35605
35606 59/pop-to-ecx
35607 58/pop-to-eax
35608
35609 89/<- %esp 5/r32/ebp
35610 5d/pop-to-ebp
35611 c3/return
35612
35613 emit-subx-rm32:
35614
35615 55/push-ebp
35616 89/<- %ebp 4/r32/esp
35617
35618 50/push-eax
35619
35620 81 7/subop/compare *(ebp+0xc) 0/imm32
35621 74/jump-if-= $emit-subx-rm32:end/disp8
35622
35623 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35624 (emit-subx-var-as-rm32 *(ebp+8) %eax)
35625 $emit-subx-rm32:end:
35626
35627 58/pop-to-eax
35628
35629 89/<- %esp 5/r32/ebp
35630 5d/pop-to-ebp
35631 c3/return
35632
35633 get-stmt-operand-from-arg-location:
35634
35635 55/push-ebp
35636 89/<- %ebp 4/r32/esp
35637
35638 51/push-ecx
35639
35640 8b/-> *(ebp+0xc) 0/r32/eax
35641
35642 8b/-> *(ebp+8) 1/r32/ecx
35643
35644 {
35645 3d/compare-eax-and 1/imm32
35646 75/jump-if-!= break/disp8
35647 $get-stmt-operand-from-arg-location:1:
35648 (lookup *(ecx+0xc) *(ecx+0x10))
35649 eb/jump $get-stmt-operand-from-arg-location:end/disp8
35650 }
35651
35652 {
35653 3d/compare-eax-and 2/imm32
35654 75/jump-if-!= break/disp8
35655 $get-stmt-operand-from-arg-location:2:
35656 (lookup *(ecx+0xc) *(ecx+0x10))
35657 (lookup *(eax+8) *(eax+0xc))
35658 eb/jump $get-stmt-operand-from-arg-location:end/disp8
35659 }
35660
35661 {
35662 3d/compare-eax-and 3/imm32
35663 75/jump-if-!= break/disp8
35664 $get-stmt-operand-from-arg-location:3:
35665 (lookup *(ecx+0x14) *(ecx+0x18))
35666 eb/jump $get-stmt-operand-from-arg-location:end/disp8
35667 }
35668
35669 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
35670 $get-stmt-operand-from-arg-location:end:
35671
35672 59/pop-to-ecx
35673
35674 89/<- %esp 5/r32/ebp
35675 5d/pop-to-ebp
35676 c3/return
35677
35678 $get-stmt-operand-from-arg-location:abort:
35679
35680 (write-buffered *(ebp+0x10) "invalid arg-location ")
35681 (write-int32-hex-buffered *(ebp+0x10) %eax)
35682 (write-buffered *(ebp+0x10) Newline)
35683 (flush *(ebp+0x10))
35684 (stop *(ebp+0x14) 1)
35685
35686
35687 emit-subx-r32:
35688
35689 55/push-ebp
35690 89/<- %ebp 4/r32/esp
35691
35692 50/push-eax
35693 51/push-ecx
35694
35695 81 7/subop/compare *(ebp+0xc) 0/imm32
35696 0f 84/jump-if-= $emit-subx-r32:end/disp32
35697
35698 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
35699 (lookup *eax *(eax+4))
35700 (lookup *(eax+0x18) *(eax+0x1c))
35701
35702
35703
35704
35705 (maybe-get Mu-registers %eax 0xc)
35706 (write-buffered *(ebp+8) Space)
35707 (write-int32-hex-buffered *(ebp+8) *eax)
35708 (write-buffered *(ebp+8) "/r32")
35709 $emit-subx-r32:end:
35710
35711 59/pop-to-ecx
35712 58/pop-to-eax
35713
35714 89/<- %esp 5/r32/ebp
35715 5d/pop-to-ebp
35716 c3/return
35717
35718 emit-subx-x32:
35719
35720 55/push-ebp
35721 89/<- %ebp 4/r32/esp
35722
35723 50/push-eax
35724 51/push-ecx
35725
35726 81 7/subop/compare *(ebp+0xc) 0/imm32
35727 0f 84/jump-if-= $emit-subx-x32:end/disp32
35728
35729 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
35730 (lookup *eax *(eax+4))
35731 (lookup *(eax+0x18) *(eax+0x1c))
35732
35733
35734
35735
35736 (maybe-get Mu-registers %eax 0xc)
35737 (write-buffered *(ebp+8) Space)
35738 (write-int32-hex-buffered *(ebp+8) *eax)
35739 (write-buffered *(ebp+8) "/x32")
35740 $emit-subx-x32:end:
35741
35742 59/pop-to-ecx
35743 58/pop-to-eax
35744
35745 89/<- %esp 5/r32/ebp
35746 5d/pop-to-ebp
35747 c3/return
35748
35749 emit-subx-imm32:
35750
35751 55/push-ebp
35752 89/<- %ebp 4/r32/esp
35753
35754 50/push-eax
35755 51/push-ecx
35756
35757 81 7/subop/compare *(ebp+0xc) 0/imm32
35758 0f 84/jump-if-= $emit-subx-imm32:end/disp32
35759
35760 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
35761 (lookup *eax *(eax+4))
35762 (lookup *eax *(eax+4))
35763 (write-buffered *(ebp+8) Space)
35764 (write-buffered *(ebp+8) %eax)
35765 (write-buffered *(ebp+8) "/imm32")
35766 $emit-subx-imm32:end:
35767
35768 59/pop-to-ecx
35769 58/pop-to-eax
35770
35771 89/<- %esp 5/r32/ebp
35772 5d/pop-to-ebp
35773 c3/return
35774
35775 emit-subx-imm8:
35776
35777 55/push-ebp
35778 89/<- %ebp 4/r32/esp
35779
35780 50/push-eax
35781 51/push-ecx
35782
35783 81 7/subop/compare *(ebp+0xc) 0/imm32
35784 0f 84/jump-if-= $emit-subx-imm32:end/disp32
35785
35786 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
35787 (lookup *eax *(eax+4))
35788 (lookup *eax *(eax+4))
35789 (write-buffered *(ebp+8) Space)
35790 (write-buffered *(ebp+8) %eax)
35791 (write-buffered *(ebp+8) "/imm8")
35792 $emit-subx-imm8:end:
35793
35794 59/pop-to-ecx
35795 58/pop-to-eax
35796
35797 89/<- %esp 5/r32/ebp
35798 5d/pop-to-ebp
35799 c3/return
35800
35801 emit-subx-disp32:
35802
35803 55/push-ebp
35804 89/<- %ebp 4/r32/esp
35805
35806 50/push-eax
35807 51/push-ecx
35808
35809 81 7/subop/compare *(ebp+0xc) 0/imm32
35810 0f 84/jump-if-= $emit-subx-disp32:end/disp32
35811
35812 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35813 (lookup *eax *(eax+4))
35814 (lookup *eax *(eax+4))
35815 (write-buffered *(ebp+8) Space)
35816 (write-buffered *(ebp+8) %eax)
35817
35818
35819 8b/-> *(ebp+0x10) 0/r32/eax
35820 (lookup *(eax+4) *(eax+8))
35821 89/<- %ecx 0/r32/eax
35822 {
35823 (string-starts-with? %ecx "break")
35824 3d/compare-eax-and 0/imm32/false
35825 74/jump-if-= break/disp8
35826 (write-buffered *(ebp+8) ":break")
35827 }
35828
35829 {
35830 (string-starts-with? %ecx "loop")
35831 3d/compare-eax-and 0/imm32/false
35832 74/jump-if-= break/disp8
35833 (write-buffered *(ebp+8) ":loop")
35834 }
35835 (write-buffered *(ebp+8) "/disp32")
35836 $emit-subx-disp32:end:
35837
35838 59/pop-to-ecx
35839 58/pop-to-eax
35840
35841 89/<- %esp 5/r32/ebp
35842 5d/pop-to-ebp
35843 c3/return
35844
35845 emit-call:
35846
35847 55/push-ebp
35848 89/<- %ebp 4/r32/esp
35849
35850 50/push-eax
35851 51/push-ecx
35852
35853 (emit-indent *(ebp+8) *Curr-block-depth)
35854 (write-buffered *(ebp+8) "(")
35855
35856 8b/-> *(ebp+0xc) 1/r32/ecx
35857
35858 (lookup *(ecx+4) *(ecx+8))
35859 (write-buffered *(ebp+8) %eax)
35860
35861
35862 (lookup *(ecx+0xc) *(ecx+0x10))
35863 {
35864
35865 3d/compare-eax-and 0/imm32
35866 74/jump-if-= break/disp8
35867
35868 (emit-subx-call-operand *(ebp+8) %eax)
35869
35870 (lookup *(eax+8) *(eax+0xc))
35871 eb/jump loop/disp8
35872 }
35873
35874 (write-buffered *(ebp+8) ")\n")
35875 $emit-call:end:
35876
35877 59/pop-to-ecx
35878 58/pop-to-eax
35879
35880 89/<- %esp 5/r32/ebp
35881 5d/pop-to-ebp
35882 c3/return
35883
35884 emit-subx-call-operand:
35885
35886
35887 55/push-ebp
35888 89/<- %ebp 4/r32/esp
35889
35890 50/push-eax
35891 51/push-ecx
35892 56/push-esi
35893
35894 8b/-> *(ebp+0xc) 1/r32/ecx
35895
35896 (lookup *ecx *(ecx+4))
35897 89/<- %esi 0/r32/eax
35898
35899 {
35900 $emit-subx-call-operand:check-for-register-direct:
35901 81 7/subop/compare *(esi+0x18) 0/imm32
35902 74/jump-if-= break/disp8
35903 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35904 75/jump-if-!= break/disp8
35905 $emit-subx-call-operand:register-direct:
35906 (write-buffered *(ebp+8) " %")
35907 (lookup *(esi+0x18) *(esi+0x1c))
35908 (write-buffered *(ebp+8) %eax)
35909 e9/jump $emit-subx-call-operand:end/disp32
35910 }
35911
35912 {
35913 $emit-subx-call-operand:check-for-register-indirect:
35914 81 7/subop/compare *(esi+0x18) 0/imm32
35915 74/jump-if-= break/disp8
35916 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35917 74/jump-if-= break/disp8
35918 $emit-subx-call-operand:register-indirect:
35919 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
35920 e9/jump $emit-subx-call-operand:end/disp32
35921 }
35922
35923 {
35924 81 7/subop/compare *(esi+0x14) 0/imm32
35925 74/jump-if-= break/disp8
35926 $emit-subx-call-operand:stack:
35927 (emit-subx-call-operand-stack *(ebp+8) %esi)
35928 e9/jump $emit-subx-call-operand:end/disp32
35929 }
35930
35931 {
35932 (lookup *(esi+8) *(esi+0xc))
35933 81 7/subop/compare *(eax+4) 0/imm32
35934 75/jump-if-!= break/disp8
35935 $emit-subx-call-operand:literal:
35936 (write-buffered *(ebp+8) Space)
35937 (lookup *esi *(esi+4))
35938 (write-buffered *(ebp+8) %eax)
35939 e9/jump $emit-subx-call-operand:end/disp32
35940 }
35941
35942 {
35943 (lookup *(esi+8) *(esi+0xc))
35944 81 7/subop/compare *(eax+4) 0x10/imm32
35945 75/jump-if-!= break/disp8
35946 $emit-subx-call-operand:literal-string:
35947 (write-buffered *(ebp+8) Space)
35948 (lookup *esi *(esi+4))
35949 (write-buffered *(ebp+8) %eax)
35950 }
35951 $emit-subx-call-operand:end:
35952
35953 5e/pop-to-esi
35954 59/pop-to-ecx
35955 58/pop-to-eax
35956
35957 89/<- %esp 5/r32/ebp
35958 5d/pop-to-ebp
35959 c3/return
35960
35961 emit-subx-call-operand-register-indirect:
35962
35963 55/push-ebp
35964 89/<- %ebp 4/r32/esp
35965
35966 50/push-eax
35967 51/push-ecx
35968 56/push-esi
35969
35970 8b/-> *(ebp+0xc) 6/r32/esi
35971
35972 (size-of-deref %esi)
35973 89/<- %ecx 0/r32/eax
35974
35975 (lookup *(esi+0x18) *(esi+0x1c))
35976 89/<- %esi 0/r32/eax
35977
35978
35979 b8/copy-to-eax 0/imm32
35980 {
35981 $emit-subx-call-operand-register-indirect:loop:
35982
35983 39/compare %eax 1/r32/ecx
35984 7d/jump-if->= break/disp8
35985
35986 (write-buffered *(ebp+8) " *(")
35987 (write-buffered *(ebp+8) %esi)
35988 (write-buffered *(ebp+8) "+")
35989 (write-int32-hex-buffered *(ebp+8) %eax)
35990 (write-buffered *(ebp+8) ")")
35991
35992 05/add-to-eax 4/imm32
35993
35994 eb/jump loop/disp8
35995 }
35996 $emit-subx-call-operand-register-indirect:end:
35997
35998 5e/pop-to-esi
35999 59/pop-to-ecx
36000 58/pop-to-eax
36001
36002 89/<- %esp 5/r32/ebp
36003 5d/pop-to-ebp
36004 c3/return
36005
36006 emit-subx-call-operand-stack:
36007
36008 55/push-ebp
36009 89/<- %ebp 4/r32/esp
36010
36011 50/push-eax
36012 51/push-ecx
36013 56/push-esi
36014
36015 8b/-> *(ebp+0xc) 6/r32/esi
36016
36017 8b/-> *(esi+0x14) 1/r32/ecx
36018
36019 (size-of %esi)
36020
36021 01/add-to %eax 1/r32/ecx
36022 {
36023 $emit-subx-call-operand-stack:loop:
36024
36025 39/compare %ecx 0/r32/eax
36026 7d/jump-if->= break/disp8
36027
36028 (write-buffered *(ebp+8) " *(ebp+")
36029 (write-int32-hex-buffered *(ebp+8) %ecx)
36030 (write-buffered *(ebp+8) ")")
36031
36032 81 0/subop/add %ecx 4/imm32
36033
36034 eb/jump loop/disp8
36035 }
36036 $emit-subx-call-operand-stack:end:
36037
36038 5e/pop-to-esi
36039 59/pop-to-ecx
36040 58/pop-to-eax
36041
36042 89/<- %esp 5/r32/ebp
36043 5d/pop-to-ebp
36044 c3/return
36045
36046 emit-subx-var-as-rm32:
36047
36048 55/push-ebp
36049 89/<- %ebp 4/r32/esp
36050
36051 50/push-eax
36052 51/push-ecx
36053 56/push-esi
36054
36055 8b/-> *(ebp+0xc) 1/r32/ecx
36056
36057 (lookup *ecx *(ecx+4))
36058 89/<- %esi 0/r32/eax
36059
36060 {
36061 $emit-subx-var-as-rm32:check-for-register-indirect:
36062 81 7/subop/compare *(esi+0x18) 0/imm32
36063 74/jump-if-= break/disp8
36064 81 7/subop/compare *(ecx+0x10) 0/imm32/false
36065 74/jump-if-= break/disp8
36066 $emit-subx-var-as-rm32:register-indirect:
36067 (write-buffered *(ebp+8) " *")
36068 (lookup *(esi+0x18) *(esi+0x1c))
36069 (write-buffered *(ebp+8) %eax)
36070 e9/jump $emit-subx-var-as-rm32:end/disp32
36071 }
36072
36073 {
36074 $emit-subx-var-as-rm32:check-for-register-direct:
36075 81 7/subop/compare *(esi+0x18) 0/imm32
36076 74/jump-if-= break/disp8
36077 81 7/subop/compare *(ecx+0x10) 0/imm32/false
36078 75/jump-if-!= break/disp8
36079 $emit-subx-var-as-rm32:register-direct:
36080 (write-buffered *(ebp+8) " %")
36081 (lookup *(esi+0x18) *(esi+0x1c))
36082 (write-buffered *(ebp+8) %eax)
36083 e9/jump $emit-subx-var-as-rm32:end/disp32
36084 }
36085
36086 {
36087 81 7/subop/compare *(esi+0x14) 0/imm32
36088 74/jump-if-= break/disp8
36089 $emit-subx-var-as-rm32:stack:
36090 (write-buffered *(ebp+8) Space)
36091 (write-buffered *(ebp+8) "*(ebp+")
36092 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
36093 (write-buffered *(ebp+8) ")")
36094 }
36095 $emit-subx-var-as-rm32:end:
36096
36097 5e/pop-to-esi
36098 59/pop-to-ecx
36099 58/pop-to-eax
36100
36101 89/<- %esp 5/r32/ebp
36102 5d/pop-to-ebp
36103 c3/return
36104
36105 find-matching-primitive:
36106
36107 55/push-ebp
36108 89/<- %ebp 4/r32/esp
36109
36110 51/push-ecx
36111
36112 8b/-> *(ebp+8) 1/r32/ecx
36113 {
36114 $find-matching-primitive:loop:
36115
36116 81 7/subop/compare %ecx 0/imm32
36117 74/jump-if-= break/disp8
36118
36119 {
36120 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
36121 3d/compare-eax-and 0/imm32/false
36122 74/jump-if-= break/disp8
36123 89/<- %eax 1/r32/ecx
36124 eb/jump $find-matching-primitive:end/disp8
36125 }
36126 $find-matching-primitive:next-primitive:
36127
36128 (lookup *(ecx+0x3c) *(ecx+0x40))
36129 89/<- %ecx 0/r32/eax
36130
36131 e9/jump loop/disp32
36132 }
36133
36134 b8/copy-to-eax 0/imm32
36135 $find-matching-primitive:end:
36136
36137 59/pop-to-ecx
36138
36139 89/<- %esp 5/r32/ebp
36140 5d/pop-to-ebp
36141 c3/return
36142
36143 mu-stmt-matches-primitive?:
36144
36145
36146
36147
36148
36149
36150 55/push-ebp
36151 89/<- %ebp 4/r32/esp
36152
36153 51/push-ecx
36154 52/push-edx
36155 53/push-ebx
36156 56/push-esi
36157 57/push-edi
36158
36159 8b/-> *(ebp+8) 1/r32/ecx
36160
36161 8b/-> *(ebp+0xc) 2/r32/edx
36162 {
36163 $mu-stmt-matches-primitive?:check-name:
36164
36165
36166 (lookup *(ecx+4) *(ecx+8))
36167 89/<- %esi 0/r32/eax
36168
36169 (lookup *edx *(edx+4))
36170
36171
36172
36173 89/<- %edi 0/r32/eax
36174 (string-equal? %esi %edi)
36175 3d/compare-eax-and 0/imm32/false
36176 75/jump-if-!= break/disp8
36177 b8/copy-to-eax 0/imm32
36178 e9/jump $mu-stmt-matches-primitive?:end/disp32
36179 }
36180
36181 (lookup *(ecx+0xc) *(ecx+0x10))
36182 89/<- %esi 0/r32/eax
36183
36184 (lookup *(edx+8) *(edx+0xc))
36185 89/<- %edi 0/r32/eax
36186 {
36187 $mu-stmt-matches-primitive?:inouts-loop:
36188
36189 {
36190 $mu-stmt-matches-primitive?:check-both-inouts-null:
36191 81 7/subop/compare %esi 0/imm32
36192 75/jump-if-!= break/disp8
36193 $mu-stmt-matches-primitive?:stmt-inout-null:
36194 81 7/subop/compare %edi 0/imm32
36195 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
36196 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
36197
36198 b8/copy-to-eax 0/imm32/false
36199 e9/jump $mu-stmt-matches-primitive?:end/disp32
36200 }
36201
36202 {
36203 $mu-stmt-matches-primitive?:check-prim-inout-null:
36204 81 7/subop/compare %edi 0/imm32
36205 75/jump-if-!= break/disp8
36206 $mu-stmt-matches-primitive?:prim-inout-null:
36207 b8/copy-to-eax 0/imm32/false
36208 e9/jump $mu-stmt-matches-primitive?:end/disp32
36209 }
36210
36211 {
36212 $mu-stmt-matches-primitive?:check-inouts-match:
36213 (lookup *edi *(edi+4))
36214 (operand-matches-primitive? %esi %eax)
36215 3d/compare-eax-and 0/imm32/false
36216 75/jump-if-!= break/disp8
36217 $mu-stmt-matches-primitive?:inouts-match:
36218 b8/copy-to-eax 0/imm32/false
36219 e9/jump $mu-stmt-matches-primitive?:end/disp32
36220 }
36221 $mu-stmt-matches-primitive?:next-inout:
36222
36223 (lookup *(esi+8) *(esi+0xc))
36224 89/<- %esi 0/r32/eax
36225
36226 (lookup *(edi+8) *(edi+0xc))
36227 89/<- %edi 0/r32/eax
36228
36229 e9/jump loop/disp32
36230 }
36231 $mu-stmt-matches-primitive?:check-outputs:
36232
36233 (lookup *(ecx+0x14) *(ecx+0x18))
36234 89/<- %esi 0/r32/eax
36235
36236 (lookup *(edx+0x10) *(edx+0x14))
36237 89/<- %edi 0/r32/eax
36238 {
36239 $mu-stmt-matches-primitive?:outputs-loop:
36240
36241 {
36242 $mu-stmt-matches-primitive?:check-both-outputs-null:
36243 81 7/subop/compare %esi 0/imm32
36244 75/jump-if-!= break/disp8
36245 {
36246 $mu-stmt-matches-primitive?:stmt-output-null:
36247 81 7/subop/compare %edi 0/imm32
36248 75/jump-if-!= break/disp8
36249 $mu-stmt-matches-primitive?:both-outputs-null:
36250
36251 b8/copy-to-eax 1/imm32
36252 e9/jump $mu-stmt-matches-primitive?:end/disp32
36253 }
36254 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
36255
36256 b8/copy-to-eax 0/imm32
36257 e9/jump $mu-stmt-matches-primitive?:end/disp32
36258 }
36259
36260 {
36261 $mu-stmt-matches-primitive?:check-prim-output-null:
36262 81 7/subop/compare %edi 0/imm32
36263 75/jump-if-!= break/disp8
36264 $mu-stmt-matches-primitive?:prim-output-is-null:
36265 b8/copy-to-eax 0/imm32
36266 e9/jump $mu-stmt-matches-primitive?:end/disp32
36267 }
36268
36269 {
36270 $mu-stmt-matches-primitive?:check-outputs-match:
36271 (lookup *edi *(edi+4))
36272 (operand-matches-primitive? %esi %eax)
36273 3d/compare-eax-and 0/imm32/false
36274 75/jump-if-!= break/disp8
36275 $mu-stmt-matches-primitive?:outputs-match:
36276 b8/copy-to-eax 0/imm32
36277 e9/jump $mu-stmt-matches-primitive?:end/disp32
36278 }
36279 $mu-stmt-matches-primitive?:next-output:
36280
36281 (lookup *(esi+8) *(esi+0xc))
36282 89/<- %esi 0/r32/eax
36283
36284 (lookup *(edi+8) *(edi+0xc))
36285 89/<- %edi 0/r32/eax
36286
36287 e9/jump loop/disp32
36288 }
36289 $mu-stmt-matches-primitive?:return-true:
36290 b8/copy-to-eax 1/imm32
36291 $mu-stmt-matches-primitive?:end:
36292
36293 5f/pop-to-edi
36294 5e/pop-to-esi
36295 5b/pop-to-ebx
36296 5a/pop-to-edx
36297 59/pop-to-ecx
36298
36299 89/<- %esp 5/r32/ebp
36300 5d/pop-to-ebp
36301 c3/return
36302
36303 operand-matches-primitive?:
36304
36305 55/push-ebp
36306 89/<- %ebp 4/r32/esp
36307
36308 51/push-ecx
36309 52/push-edx
36310 53/push-ebx
36311 56/push-esi
36312 57/push-edi
36313
36314 8b/-> *(ebp+8) 1/r32/ecx
36315
36316 (lookup *ecx *(ecx+4))
36317 89/<- %esi 0/r32/eax
36318
36319 8b/-> *(ebp+0xc) 7/r32/edi
36320 $operand-matches-primitive?:check-type:
36321
36322
36323 (lookup *(esi+8) *(esi+0xc))
36324 89/<- %ebx 0/r32/eax
36325
36326 {
36327 81 7/subop/compare *(ecx+0x10) 0/imm32/false
36328 74/jump-if-= break/disp8
36329 $operand-matches-primitive?:is-deref:
36330
36331 (lookup *(ebx+0xc) *(ebx+0x10))
36332
36333 81 7/subop/compare *eax 0/imm32/false
36334 {
36335 75/jump-if-!= break/disp8
36336 (lookup *(eax+4) *(eax+8))
36337 }
36338
36339 89/<- %ebx 0/r32/eax
36340 }
36341
36342 (lookup *(edi+8) *(edi+0xc))
36343 (subx-type-category-match? %ebx %eax)
36344 3d/compare-eax-and 0/imm32/false
36345 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
36346 {
36347 $operand-matches-primitive?:check-register:
36348
36349 {
36350 81 7/subop/compare *(edi+0x18) 0/imm32
36351 0f 85/jump-if-!= break/disp32
36352 81 7/subop/compare *(esi+0x18) 0/imm32
36353 74/jump-if-= break/disp8
36354 81 7/subop/compare *(ecx+0x10) 0/imm32/false
36355 74/jump-if-= break/disp8
36356 $operand-matches-primitive?:var-deref-match:
36357 e9/jump $operand-matches-primitive?:return-true/disp32
36358 }
36359
36360 {
36361 81 7/subop/compare *(edi+0x18) 0/imm32
36362 0f 84/jump-if-= break/disp32
36363 81 7/subop/compare *(esi+0x18) 0/imm32
36364 0f 84/jump-if-= break/disp32
36365 81 7/subop/compare *(ecx+0x10) 0/imm32/false
36366 74/jump-if-= break/disp8
36367 $operand-matches-primitive?:var-deref-no-match:
36368 e9/jump $operand-matches-primitive?:return-false/disp32
36369 }
36370
36371 {
36372
36373
36374 (lookup *(esi+0x18) *(esi+0x1c))
36375 89/<- %ebx 0/r32/eax
36376
36377 (lookup *(edi+0x18) *(edi+0x1c))
36378 89/<- %ecx 0/r32/eax
36379
36380 39/compare %ecx 3/r32/ebx
36381 74/jump-if-= break/disp8
36382 $operand-matches-primitive?:var-register-no-match:
36383
36384 81 7/subop/compare %ebx 0/imm32
36385 74/jump-if-= $operand-matches-primitive?:return-false/disp8
36386 81 7/subop/compare %ecx 0/imm32
36387 74/jump-if-= $operand-matches-primitive?:return-false/disp8
36388
36389 (string-equal? %ecx "*")
36390 3d/compare-eax-and 0/imm32/false
36391 75/jump-if-!= break/disp8
36392 $operand-matches-primitive?:wildcard-no-match:
36393
36394 (string-equal? %ecx %ebx)
36395 3d/compare-eax-and 0/imm32/false
36396 74/jump-if-= $operand-matches-primitive?:return-false/disp8
36397 }
36398 }
36399 $operand-matches-primitive?:return-true:
36400 b8/copy-to-eax 1/imm32/true
36401 eb/jump $operand-matches-primitive?:end/disp8
36402 $operand-matches-primitive?:return-false:
36403 b8/copy-to-eax 0/imm32/false
36404 $operand-matches-primitive?:end:
36405
36406 5f/pop-to-edi
36407 5e/pop-to-esi
36408 5b/pop-to-ebx
36409 5a/pop-to-edx
36410 59/pop-to-ecx
36411
36412 89/<- %esp 5/r32/ebp
36413 5d/pop-to-ebp
36414 c3/return
36415
36416 find-matching-function:
36417
36418 55/push-ebp
36419 89/<- %ebp 4/r32/esp
36420
36421 51/push-ecx
36422
36423 8b/-> *(ebp+8) 1/r32/ecx
36424 {
36425
36426 81 7/subop/compare %ecx 0/imm32
36427 74/jump-if-= break/disp8
36428
36429
36430
36431 {
36432 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
36433 3d/compare-eax-and 0/imm32/false
36434 74/jump-if-= break/disp8
36435 89/<- %eax 1/r32/ecx
36436 eb/jump $find-matching-function:end/disp8
36437 }
36438
36439 (lookup *(ecx+0x20) *(ecx+0x24))
36440 89/<- %ecx 0/r32/eax
36441
36442 eb/jump loop/disp8
36443 }
36444
36445 b8/copy-to-eax 0/imm32
36446 $find-matching-function:end:
36447
36448 59/pop-to-ecx
36449
36450 89/<- %esp 5/r32/ebp
36451 5d/pop-to-ebp
36452 c3/return
36453
36454
36455 mu-stmt-matches-function?:
36456
36457 55/push-ebp
36458 89/<- %ebp 4/r32/esp
36459
36460 51/push-ecx
36461
36462
36463 8b/-> *(ebp+8) 0/r32/eax
36464 (lookup *(eax+4) *(eax+8))
36465 89/<- %ecx 0/r32/eax
36466
36467 8b/-> *(ebp+0xc) 0/r32/eax
36468 (lookup *eax *(eax+4))
36469 (string-equal? %eax %ecx)
36470 $mu-stmt-matches-function?:end:
36471
36472 59/pop-to-ecx
36473
36474 89/<- %esp 5/r32/ebp
36475 5d/pop-to-ebp
36476 c3/return
36477
36478
36479
36480 subx-type-category-match?:
36481
36482 55/push-ebp
36483 89/<- %ebp 4/r32/esp
36484
36485 51/push-ecx
36486
36487 (type-category *(ebp+8))
36488 89/<- %ecx 0/r32/eax
36489
36490 (type-category *(ebp+0xc))
36491
36492 39/compare %eax 1/r32/ecx
36493 0f 94/set-byte-if-= %al
36494 25/and-eax-with 0xff/imm32
36495 $subx-type-category-match?:end:
36496
36497 59/pop-to-ecx
36498
36499 89/<- %esp 5/r32/ebp
36500 5d/pop-to-ebp
36501 c3/return
36502
36503 type-category:
36504
36505 55/push-ebp
36506 89/<- %ebp 4/r32/esp
36507
36508 51/push-ecx
36509
36510 (simple-mu-type? *(ebp+8) 0)
36511 89/<- %ecx 0/r32/eax
36512
36513 (simple-mu-type? *(ebp+8) 0x10)
36514 09/or %ecx 0/r32/eax
36515
36516 (simple-mu-type? *(ebp+8) 0xf)
36517
36518 c1/shift 4/subop/left %ecx 1/imm8
36519 09/or %eax 1/r32/ecx
36520 $type-category:end:
36521
36522 59/pop-to-ecx
36523
36524 89/<- %esp 5/r32/ebp
36525 5d/pop-to-ebp
36526 c3/return
36527
36528 simple-mu-type?:
36529
36530 55/push-ebp
36531 89/<- %ebp 4/r32/esp
36532
36533 51/push-ecx
36534
36535 8b/-> *(ebp+0xc) 1/r32/ecx
36536
36537 8b/-> *(ebp+8) 0/r32/eax
36538 39/compare *(eax+4) 1/r32/ecx
36539 0f 94/set-byte-if-= %al
36540 25/and-eax-with 0xff/imm32
36541 $simple-mu-type?:end:
36542
36543 59/pop-to-ecx
36544
36545 89/<- %esp 5/r32/ebp
36546 5d/pop-to-ebp
36547 c3/return
36548
36549 mu-addr-type?:
36550
36551 55/push-ebp
36552 89/<- %ebp 4/r32/esp
36553
36554 8b/-> *(ebp+8) 0/r32/eax
36555
36556 81 7/subop/compare *eax 0/imm32/false
36557 {
36558 75/jump-if-!= break/disp8
36559 (lookup *(eax+4) *(eax+8))
36560 }
36561
36562 81 7/subop/compare *(eax+4) 2/imm32/addr
36563 0f 94/set-byte-if-= %al
36564 25/and-eax-with 0xff/imm32
36565 $mu-addr-type?:end:
36566
36567 89/<- %esp 5/r32/ebp
36568 5d/pop-to-ebp
36569 c3/return
36570
36571 mu-array-type?:
36572
36573 55/push-ebp
36574 89/<- %ebp 4/r32/esp
36575
36576 8b/-> *(ebp+8) 0/r32/eax
36577
36578 81 7/subop/compare *eax 0/imm32/false
36579 {
36580 75/jump-if-!= break/disp8
36581 (lookup *(eax+4) *(eax+8))
36582 }
36583
36584 81 7/subop/compare *(eax+4) 3/imm32/array
36585 0f 94/set-byte-if-= %al
36586 25/and-eax-with 0xff/imm32
36587 $mu-array-type?:end:
36588
36589 89/<- %esp 5/r32/ebp
36590 5d/pop-to-ebp
36591 c3/return
36592
36593 mu-string-type?:
36594
36595 55/push-ebp
36596 89/<- %ebp 4/r32/esp
36597
36598 56/push-esi
36599
36600 8b/-> *(ebp+8) 6/r32/esi
36601
36602 81 7/subop/compare *esi 0/imm32/false
36603 0f 85/jump-if-!= $mu-string-type?:return-false/disp32
36604
36605 (mu-addr-type? %esi)
36606 3d/compare-eax-with 0/imm32/false
36607 0f 84/jump-if-= $mu-string-type?:end/disp32
36608
36609 (lookup *(esi+0xc) *(esi+0x10))
36610 (mu-array-type? %eax)
36611 3d/compare-eax-with 0/imm32/false
36612 74/jump-if-= $mu-string-type?:end/disp8
36613
36614 (lookup *(esi+0xc) *(esi+0x10))
36615 (lookup *(eax+0xc) *(eax+0x10))
36616
36617 81 7/subop/compare *eax 0/imm32/false
36618 75/jump-if-!= $mu-string-type?:return-false/disp8
36619
36620 (lookup *(eax+4) *(eax+8))
36621 (simple-mu-type? %eax 8)
36622 eb/jump $mu-string-type?:end/disp8
36623 $mu-string-type?:return-false:
36624 b8/copy-to-eax 0/imm32/false
36625 $mu-string-type?:end:
36626
36627 5e/pop-to-esi
36628
36629 89/<- %esp 5/r32/ebp
36630 5d/pop-to-ebp
36631 c3/return
36632
36633 mu-stream-type?:
36634
36635 55/push-ebp
36636 89/<- %ebp 4/r32/esp
36637
36638 8b/-> *(ebp+8) 0/r32/eax
36639
36640 81 7/subop/compare *eax 0/imm32/false
36641 {
36642 75/jump-if-!= break/disp8
36643 (lookup *(eax+4) *(eax+8))
36644 }
36645
36646 81 7/subop/compare *(eax+4) 0xb/imm32/stream
36647 0f 94/set-byte-if-= %al
36648 25/and-eax-with 0xff/imm32
36649 $mu-stream-type?:end:
36650
36651 89/<- %esp 5/r32/ebp
36652 5d/pop-to-ebp
36653 c3/return
36654
36655 test-emit-subx-stmt-primitive:
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672 55/push-ebp
36673 89/<- %ebp 4/r32/esp
36674
36675 (clear-stream _test-output-stream)
36676 (clear-stream $_test-output-buffered-file->buffer)
36677
36678 $test-emit-subx-stmt-primitive:initialize-type:
36679
36680 68/push 0/imm32/right:null
36681 68/push 0/imm32/right:null
36682 68/push 0/imm32/left:unused
36683 68/push 1/imm32/value:int
36684 68/push 1/imm32/is-atom?:true
36685 68/push 0x11/imm32/alloc-id:fake:payload
36686 89/<- %ecx 4/r32/esp
36687 $test-emit-subx-stmt-primitive:initialize-var:
36688
36689 68/push 0/imm32/no-register
36690 68/push 0/imm32/no-register
36691 68/push -8/imm32/stack-offset
36692 68/push 1/imm32/block-depth
36693 51/push-ecx/type
36694 68/push 0x11/imm32/alloc-id:fake
36695 68/push 0/imm32/name
36696 68/push 0/imm32/name
36697 68/push 0x11/imm32/alloc-id:fake:payload
36698 89/<- %ecx 4/r32/esp
36699 $test-emit-subx-stmt-primitive:initialize-var-name:
36700
36701 8d/copy-address *(ecx+4) 0/r32/eax
36702 (copy-array Heap "foo" %eax)
36703 $test-emit-subx-stmt-primitive:initialize-stmt-var:
36704
36705 68/push 0/imm32/is-deref:false
36706 68/push 0/imm32/next
36707 68/push 0/imm32/next
36708 51/push-ecx/var-foo
36709 68/push 0x11/imm32/alloc-id:fake
36710 68/push 0x11/imm32/alloc-id:fake:payload
36711 89/<- %ebx 4/r32/esp
36712 $test-emit-subx-stmt-primitive:initialize-stmt:
36713
36714 68/push 0/imm32/no-outputs
36715 68/push 0/imm32/no-outputs
36716 53/push-ebx/inouts
36717 68/push 0x11/imm32/alloc-id:fake
36718 68/push 0/imm32/operation
36719 68/push 0/imm32/operation
36720 68/push 1/imm32/tag
36721 89/<- %esi 4/r32/esp
36722 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
36723
36724 8d/copy-address *(esi+4) 0/r32/eax
36725 (copy-array Heap "increment" %eax)
36726 $test-emit-subx-stmt-primitive:initialize-primitive:
36727
36728 68/push 0/imm32/next
36729 68/push 0/imm32/next
36730 68/push 0/imm32/no-x32
36731 68/push 0/imm32/no-xm32
36732 68/push 0/imm32/no-disp32
36733 68/push 0/imm32/no-imm8
36734 68/push 0/imm32/no-imm32
36735 68/push 0/imm32/no-r32
36736 68/push 1/imm32/rm32-is-first-inout
36737 68/push 0/imm32/subx-name
36738 68/push 0/imm32/subx-name
36739 68/push 0/imm32/no-outputs
36740 68/push 0/imm32/no-outputs
36741 53/push-ebx/inouts
36742 68/push 0x11/imm32/alloc-id:fake
36743 68/push 0/imm32/name
36744 68/push 0/imm32/name
36745 89/<- %ebx 4/r32/esp
36746 $test-emit-subx-stmt-primitive:initialize-primitive-name:
36747
36748 (copy-array Heap "increment" %ebx)
36749 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
36750
36751 8d/copy-address *(ebx+0x18) 0/r32/eax
36752 (copy-array Heap "ff 0/subop/increment" %eax)
36753
36754 c7 0/subop/copy *Curr-block-depth 0/imm32
36755 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
36756 (flush _test-output-buffered-file)
36757 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36763
36764 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
36765
36766 89/<- %esp 5/r32/ebp
36767 5d/pop-to-ebp
36768 c3/return
36769
36770 test-emit-subx-stmt-primitive-register:
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787 55/push-ebp
36788 89/<- %ebp 4/r32/esp
36789
36790 (clear-stream _test-output-stream)
36791 (clear-stream $_test-output-buffered-file->buffer)
36792 $test-emit-subx-stmt-primitive-register:initialize-type:
36793
36794 68/push 0/imm32/right:null
36795 68/push 0/imm32/right:null
36796 68/push 0/imm32/left:unused
36797 68/push 1/imm32/value:int
36798 68/push 1/imm32/is-atom?:true
36799 68/push 0x11/imm32/alloc-id:fake:payload
36800 89/<- %ecx 4/r32/esp
36801 $test-emit-subx-stmt-primitive-register:initialize-var:
36802
36803 68/push 0/imm32/register
36804 68/push 0/imm32/register
36805 68/push 0/imm32/no-stack-offset
36806 68/push 1/imm32/block-depth
36807 51/push-ecx
36808 68/push 0x11/imm32/alloc-id:fake
36809 68/push 0/imm32/name
36810 68/push 0/imm32/name
36811 68/push 0x11/imm32/alloc-id:fake:payload
36812 89/<- %ecx 4/r32/esp
36813 $test-emit-subx-stmt-primitive-register:initialize-var-name:
36814
36815 8d/copy-address *(ecx+4) 0/r32/eax
36816 (copy-array Heap "foo" %eax)
36817 $test-emit-subx-stmt-primitive-register:initialize-var-register:
36818
36819 8d/copy-address *(ecx+0x1c) 0/r32/eax
36820 (copy-array Heap "eax" %eax)
36821 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
36822
36823 68/push 0/imm32/is-deref:false
36824 68/push 0/imm32/next
36825 68/push 0/imm32/next
36826 51/push-ecx/var-foo
36827 68/push 0x11/imm32/alloc-id:fake
36828 68/push 0x11/imm32/alloc-id:fake:payload
36829 89/<- %ebx 4/r32/esp
36830 $test-emit-subx-stmt-primitive-register:initialize-stmt:
36831
36832 53/push-ebx/outputs
36833 68/push 0x11/imm32/alloc-id:fake
36834 68/push 0/imm32/no-inouts
36835 68/push 0/imm32/no-inouts
36836 68/push 0/imm32/operation
36837 68/push 0/imm32/operation
36838 68/push 1/imm32
36839 89/<- %esi 4/r32/esp
36840 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
36841
36842 8d/copy-address *(esi+4) 0/r32/eax
36843 (copy-array Heap "increment" %eax)
36844 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
36845
36846 68/push 0/imm32/register
36847 68/push 0/imm32/register
36848 68/push 0/imm32/no-stack-offset
36849 68/push 1/imm32/block-depth
36850 ff 6/subop/push *(ecx+0x10)
36851 68/push 0x11/imm32/alloc-id:fake
36852 68/push 0/imm32/name
36853 68/push 0/imm32/name
36854 68/push 0x11/imm32/alloc-id:fake:payload
36855 89/<- %ebx 4/r32/esp
36856 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
36857
36858 8d/copy-address *(ebx+4) 0/r32/eax
36859 (copy-array Heap "dummy" %eax)
36860 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
36861
36862 8d/copy-address *(ebx+0x1c) 0/r32/eax
36863 (copy-array Heap "*" %eax)
36864 $test-emit-subx-stmt-primitive-register:initialize-var-list:
36865
36866 68/push 0/imm32/next
36867 68/push 0/imm32/next
36868 53/push-ebx/formal-var
36869 68/push 0x11/imm32/alloc-id:fake
36870 68/push 0x11/imm32/alloc-id:fake:payload
36871 89/<- %ebx 4/r32/esp
36872 $test-emit-subx-stmt-primitive-register:initialize-primitive:
36873
36874 68/push 0/imm32/next
36875 68/push 0/imm32/next
36876 68/push 0/imm32/no-x32
36877 68/push 0/imm32/no-xm32
36878 68/push 0/imm32/no-disp32
36879 68/push 0/imm32/no-imm8
36880 68/push 0/imm32/no-imm32
36881 68/push 0/imm32/no-r32
36882 68/push 3/imm32/rm32-is-first-output
36883 68/push 0/imm32/subx-name
36884 68/push 0/imm32/subx-name
36885 53/push-ebx/outputs
36886 68/push 0x11/imm32/alloc-id:fake
36887 68/push 0/imm32/no-inouts
36888 68/push 0/imm32/no-inouts
36889 68/push 0/imm32/name
36890 68/push 0/imm32/name
36891 89/<- %ebx 4/r32/esp
36892 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
36893
36894 (copy-array Heap "increment" %ebx)
36895 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
36896
36897 8d/copy-address *(ebx+0x18) 0/r32/eax
36898 (copy-array Heap "ff 0/subop/increment" %eax)
36899
36900 c7 0/subop/copy *Curr-block-depth 0/imm32
36901 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
36902 (flush _test-output-buffered-file)
36903 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36909
36910 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
36911
36912 89/<- %esp 5/r32/ebp
36913 5d/pop-to-ebp
36914 c3/return
36915
36916 test-emit-subx-stmt-select-primitive:
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936 55/push-ebp
36937 89/<- %ebp 4/r32/esp
36938
36939 (clear-stream _test-output-stream)
36940 (clear-stream $_test-output-buffered-file->buffer)
36941 $test-emit-subx-stmt-select-primitive:initialize-type:
36942
36943 68/push 0/imm32/right:null
36944 68/push 0/imm32/right:null
36945 68/push 0/imm32/left:unused
36946 68/push 1/imm32/value:int
36947 68/push 1/imm32/is-atom?:true
36948 68/push 0x11/imm32/alloc-id:fake:payload
36949 89/<- %ecx 4/r32/esp
36950 $test-emit-subx-stmt-select-primitive:initialize-var:
36951
36952 68/push 0/imm32/register
36953 68/push 0/imm32/register
36954 68/push 0/imm32/no-stack-offset
36955 68/push 1/imm32/block-depth
36956 51/push-ecx
36957 68/push 0x11/imm32/alloc-id:fake
36958 68/push 0/imm32/name
36959 68/push 0/imm32/name
36960 68/push 0x11/imm32/alloc-id:fake:payload
36961 89/<- %ecx 4/r32/esp
36962 $test-emit-subx-stmt-select-primitive:initialize-var-name:
36963
36964 8d/copy-address *(ecx+4) 0/r32/eax
36965 (copy-array Heap "foo" %eax)
36966 $test-emit-subx-stmt-select-primitive:initialize-var-register:
36967
36968 8d/copy-address *(ecx+0x1c) 0/r32/eax
36969 (copy-array Heap "eax" %eax)
36970 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
36971
36972 68/push 0/imm32/is-deref:false
36973 68/push 0/imm32/next
36974 68/push 0/imm32/next
36975 51/push-ecx/var-foo
36976 68/push 0x11/imm32/alloc-id:fake
36977 68/push 0x11/imm32/alloc-id:fake:payload
36978 89/<- %ebx 4/r32/esp
36979 $test-emit-subx-stmt-select-primitive:initialize-stmt:
36980
36981 53/push-ebx/outputs
36982 68/push 0x11/imm32/alloc-id:fake
36983 68/push 0/imm32/no-inouts
36984 68/push 0/imm32/no-inouts
36985 68/push 0/imm32/operation
36986 68/push 0/imm32/operation
36987 68/push 1/imm32
36988 89/<- %esi 4/r32/esp
36989 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
36990
36991 8d/copy-address *(esi+4) 0/r32/eax
36992 (copy-array Heap "increment" %eax)
36993 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
36994
36995 68/push 0/imm32/register
36996 68/push 0/imm32/register
36997 68/push 0/imm32/no-stack-offset
36998 68/push 1/imm32/block-depth
36999 ff 6/subop/push *(ecx+0x10)
37000 68/push 0x11/imm32/alloc-id:fake
37001 68/push 0/imm32/name
37002 68/push 0/imm32/name
37003 68/push 0x11/imm32/alloc-id:fake:payload
37004 89/<- %ebx 4/r32/esp
37005 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
37006
37007 8d/copy-address *(ebx+4) 0/r32/eax
37008 (copy-array Heap "dummy" %eax)
37009 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
37010
37011 8d/copy-address *(ebx+0x1c) 0/r32/eax
37012 (copy-array Heap "*" %eax)
37013 $test-emit-subx-stmt-select-primitive:initialize-var-list:
37014
37015 68/push 0/imm32/next
37016 68/push 0/imm32/next
37017 53/push-ebx/formal-var
37018 68/push 0x11/imm32/alloc-id:fake
37019 68/push 0x11/imm32/alloc-id:fake:payload
37020 89/<- %ebx 4/r32/esp
37021 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
37022
37023 68/push 0/imm32/next
37024 68/push 0/imm32/next
37025 68/push 0/imm32/no-x32
37026 68/push 0/imm32/no-xm32
37027 68/push 0/imm32/no-disp32
37028 68/push 0/imm32/no-imm8
37029 68/push 0/imm32/no-imm32
37030 68/push 0/imm32/no-r32
37031 68/push 3/imm32/rm32-is-first-output
37032 68/push 0/imm32/subx-name
37033 68/push 0/imm32/subx-name
37034 53/push-ebx/outputs
37035 68/push 0x11/imm32/alloc-id:fake
37036 68/push 0/imm32/no-inouts
37037 68/push 0/imm32/no-inouts
37038 68/push 0/imm32/name
37039 68/push 0/imm32/name
37040 68/push 0x11/imm32/alloc-id:fake:payload
37041 89/<- %edi 4/r32/esp
37042 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
37043
37044 8d/copy-address *(edi+4) 0/r32/eax
37045 (copy-array Heap "increment" %eax)
37046 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
37047
37048 8d/copy-address *(edi+0x1c) 0/r32/eax
37049 (copy-array Heap "ff 0/subop/increment" %eax)
37050 $test-emit-subx-stmt-select-primitive:initialize-primitive:
37051
37052 57/push-edi
37053 68/push 0x11/imm32/alloc-id:fake
37054 68/push 0/imm32/no-x32
37055 68/push 0/imm32/no-xm32
37056 68/push 0/imm32/no-disp32
37057 68/push 0/imm32/no-imm8
37058 68/push 0/imm32/no-imm32
37059 68/push 0/imm32/no-r32
37060 68/push 1/imm32/rm32-is-first-inout
37061 68/push 0/imm32/subx-name
37062 68/push 0/imm32/subx-name
37063 68/push 0/imm32/no-outputs
37064 68/push 0/imm32/no-outputs
37065 53/push-ebx/inouts
37066 68/push 0x11/imm32/alloc-id:fake
37067 68/push 0/imm32/name
37068 68/push 0/imm32/name
37069 89/<- %ebx 4/r32/esp
37070 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
37071
37072 (copy-array Heap "increment" %ebx)
37073 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
37074
37075 8d/copy-address *(ebx+0x18) 0/r32/eax
37076 (copy-array Heap "ff 0/subop/increment" %eax)
37077
37078 c7 0/subop/copy *Curr-block-depth 0/imm32
37079 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
37080 (flush _test-output-buffered-file)
37081 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37087
37088 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
37089
37090 89/<- %esp 5/r32/ebp
37091 5d/pop-to-ebp
37092 c3/return
37093
37094 test-emit-subx-stmt-select-primitive-2:
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114 55/push-ebp
37115 89/<- %ebp 4/r32/esp
37116
37117 (clear-stream _test-output-stream)
37118 (clear-stream $_test-output-buffered-file->buffer)
37119 $test-emit-subx-stmt-select-primitive-2:initialize-type:
37120
37121 68/push 0/imm32/right:null
37122 68/push 0/imm32/right:null
37123 68/push 0/imm32/left:unused
37124 68/push 1/imm32/value:int
37125 68/push 1/imm32/is-atom?:true
37126 68/push 0x11/imm32/alloc-id:fake:payload
37127 89/<- %ecx 4/r32/esp
37128 $test-emit-subx-stmt-select-primitive-2:initialize-var:
37129
37130 68/push 0/imm32/register
37131 68/push 0/imm32/register
37132 68/push 0/imm32/no-stack-offset
37133 68/push 1/imm32/block-depth
37134 51/push-ecx
37135 68/push 0x11/imm32/alloc-id:fake
37136 68/push 0/imm32/name
37137 68/push 0/imm32/name
37138 68/push 0x11/imm32/alloc-id:fake:payload
37139 89/<- %ecx 4/r32/esp
37140 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
37141
37142 8d/copy-address *(ecx+4) 0/r32/eax
37143 (copy-array Heap "foo" %eax)
37144 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
37145
37146 8d/copy-address *(ecx+0x1c) 0/r32/eax
37147 (copy-array Heap "eax" %eax)
37148 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
37149
37150 68/push 0/imm32/is-deref:false
37151 68/push 0/imm32/next
37152 68/push 0/imm32/next
37153 51/push-ecx/var-foo
37154 68/push 0x11/imm32/alloc-id:fake
37155 68/push 0x11/imm32/alloc-id:fake:payload
37156 89/<- %ebx 4/r32/esp
37157 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
37158
37159 68/push 0/imm32/no-outputs
37160 68/push 0/imm32/no-outputs
37161 53/push-ebx/inouts
37162 68/push 0x11/imm32/alloc-id:fake
37163 68/push 0/imm32/operation
37164 68/push 0/imm32/operation
37165 68/push 1/imm32
37166 89/<- %esi 4/r32/esp
37167 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
37168
37169 8d/copy-address *(esi+4) 0/r32/eax
37170 (copy-array Heap "increment" %eax)
37171 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
37172
37173 68/push 0/imm32/register
37174 68/push 0/imm32/register
37175 68/push 0/imm32/no-stack-offset
37176 68/push 1/imm32/block-depth
37177 ff 6/subop/push *(ecx+0x10)
37178 68/push 0x11/imm32/alloc-id:fake
37179 68/push 0/imm32/name
37180 68/push 0/imm32/name
37181 68/push 0x11/imm32/alloc-id:fake:payload
37182 89/<- %ebx 4/r32/esp
37183 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
37184
37185 8d/copy-address *(ebx+4) 0/r32/eax
37186 (copy-array Heap "dummy" %eax)
37187 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
37188
37189 8d/copy-address *(ebx+0x1c) 0/r32/eax
37190 (copy-array Heap "*" %eax)
37191 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
37192
37193 68/push 0/imm32/next
37194 68/push 0/imm32/next
37195 53/push-ebx/formal-var
37196 68/push 0x11/imm32/alloc-id:fake
37197 68/push 0x11/imm32/alloc-id:fake:payload
37198 89/<- %ebx 4/r32/esp
37199 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
37200
37201 68/push 0/imm32/next
37202 68/push 0/imm32/next
37203 68/push 0/imm32/no-x32
37204 68/push 0/imm32/no-xm32
37205 68/push 0/imm32/no-disp32
37206 68/push 0/imm32/no-imm8
37207 68/push 0/imm32/no-imm32
37208 68/push 0/imm32/no-r32
37209 68/push 3/imm32/rm32-is-first-output
37210 68/push 0/imm32/subx-name
37211 68/push 0/imm32/subx-name
37212 53/push-ebx/outputs
37213 68/push 0x11/imm32/alloc-id:fake
37214 68/push 0/imm32/no-inouts
37215 68/push 0/imm32/no-inouts
37216 68/push 0/imm32/name
37217 68/push 0/imm32/name
37218 68/push 0x11/imm32/alloc-id:fake:payload
37219 89/<- %edi 4/r32/esp
37220 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
37221
37222 8d/copy-address *(edi+4) 0/r32/eax
37223 (copy-array Heap "increment" %eax)
37224 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
37225
37226 8d/copy-address *(edi+0x1c) 0/r32/eax
37227 (copy-array Heap "ff 0/subop/increment" %eax)
37228 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
37229
37230 57/push-edi
37231 68/push 0x11/imm32/alloc-id:fake
37232 68/push 0/imm32/no-x32
37233 68/push 0/imm32/no-xm32
37234 68/push 0/imm32/no-disp32
37235 68/push 0/imm32/no-imm8
37236 68/push 0/imm32/no-imm32
37237 68/push 0/imm32/no-r32
37238 68/push 1/imm32/rm32-is-first-inout
37239 68/push 0/imm32/subx-name
37240 68/push 0/imm32/subx-name
37241 68/push 0/imm32/no-outputs
37242 68/push 0/imm32/no-outputs
37243 53/push-ebx/inouts
37244 68/push 0x11/imm32/alloc-id:fake
37245 68/push 0/imm32/name
37246 68/push 0/imm32/name
37247 89/<- %ebx 4/r32/esp
37248 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
37249
37250 (copy-array Heap "increment" %ebx)
37251 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
37252
37253 8d/copy-address *(ebx+0x18) 0/r32/eax
37254 (copy-array Heap "ff 0/subop/increment" %eax)
37255
37256 c7 0/subop/copy *Curr-block-depth 0/imm32
37257 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
37258 (flush _test-output-buffered-file)
37259 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37265
37266 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
37267
37268 89/<- %esp 5/r32/ebp
37269 5d/pop-to-ebp
37270 c3/return
37271
37272 test-increment-register:
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286 55/push-ebp
37287 89/<- %ebp 4/r32/esp
37288
37289 (clear-stream _test-output-stream)
37290 (clear-stream $_test-output-buffered-file->buffer)
37291 $test-increment-register:initialize-type:
37292
37293 68/push 0/imm32/right:null
37294 68/push 0/imm32/right:null
37295 68/push 0/imm32/left:unused
37296 68/push 1/imm32/value:int
37297 68/push 1/imm32/is-atom?:true
37298 68/push 0x11/imm32/alloc-id:fake:payload
37299 89/<- %ecx 4/r32/esp
37300 $test-increment-register:initialize-var:
37301
37302 68/push 0/imm32/register
37303 68/push 0/imm32/register
37304 68/push 0/imm32/no-stack-offset
37305 68/push 1/imm32/block-depth
37306 51/push-ecx
37307 68/push 0x11/imm32/alloc-id:fake
37308 68/push 0/imm32/name
37309 68/push 0/imm32/name
37310 68/push 0x11/imm32/alloc-id:fake:payload
37311 89/<- %ecx 4/r32/esp
37312 $test-increment-register:initialize-var-name:
37313
37314 8d/copy-address *(ecx+4) 0/r32/eax
37315 (copy-array Heap "foo" %eax)
37316 $test-increment-register:initialize-var-register:
37317
37318 8d/copy-address *(ecx+0x1c) 0/r32/eax
37319 (copy-array Heap "eax" %eax)
37320 $test-increment-register:initialize-stmt-var:
37321
37322 68/push 0/imm32/is-deref:false
37323 68/push 0/imm32/next
37324 68/push 0/imm32/next
37325 51/push-ecx/var-foo
37326 68/push 0x11/imm32/alloc-id:fake
37327 68/push 0x11/imm32/alloc-id:fake:payload
37328 89/<- %ebx 4/r32/esp
37329 $test-increment-register:initialize-stmt:
37330
37331 53/push-ebx/outputs
37332 68/push 0x11/imm32/alloc-id:fake
37333 68/push 0/imm32/no-inouts
37334 68/push 0/imm32/no-inouts
37335 68/push 0/imm32/operation
37336 68/push 0/imm32/operation
37337 68/push 1/imm32
37338 89/<- %esi 4/r32/esp
37339 $test-increment-register:initialize-stmt-operation:
37340
37341 8d/copy-address *(esi+4) 0/r32/eax
37342 (copy-array Heap "increment" %eax)
37343
37344 c7 0/subop/copy *Curr-block-depth 0/imm32
37345 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37346 (flush _test-output-buffered-file)
37347 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37353
37354 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
37355
37356 89/<- %esp 5/r32/ebp
37357 5d/pop-to-ebp
37358 c3/return
37359
37360 test-add-reg-to-reg:
37361
37362
37363
37364
37365
37366 55/push-ebp
37367 89/<- %ebp 4/r32/esp
37368
37369 (clear-stream _test-output-stream)
37370 (clear-stream $_test-output-buffered-file->buffer)
37371 $test-add-reg-to-reg:initialize-type:
37372
37373 68/push 0/imm32/right:null
37374 68/push 0/imm32/right:null
37375 68/push 0/imm32/left:unused
37376 68/push 1/imm32/value:int
37377 68/push 1/imm32/is-atom?:true
37378 68/push 0x11/imm32/alloc-id:fake:payload
37379 89/<- %ecx 4/r32/esp
37380 $test-add-reg-to-reg:initialize-var1:
37381
37382 68/push 0/imm32/register
37383 68/push 0/imm32/register
37384 68/push 0/imm32/no-stack-offset
37385 68/push 1/imm32/block-depth
37386 51/push-ecx
37387 68/push 0x11/imm32/alloc-id:fake
37388 68/push 0/imm32/name
37389 68/push 0/imm32/name
37390 68/push 0x11/imm32/alloc-id:fake:payload
37391 89/<- %ecx 4/r32/esp
37392 $test-add-reg-to-reg:initialize-var1-name:
37393
37394 8d/copy-address *(ecx+4) 0/r32/eax
37395 (copy-array Heap "var1" %eax)
37396 $test-add-reg-to-reg:initialize-var1-register:
37397
37398 8d/copy-address *(ecx+0x1c) 0/r32/eax
37399 (copy-array Heap "eax" %eax)
37400 $test-add-reg-to-reg:initialize-var2:
37401
37402 68/push 0/imm32/register
37403 68/push 0/imm32/register
37404 68/push 0/imm32/no-stack-offset
37405 68/push 1/imm32/block-depth
37406 ff 6/subop/push *(ecx+0x10)
37407 68/push 0x11/imm32/alloc-id:fake
37408 68/push 0/imm32/name
37409 68/push 0/imm32/name
37410 68/push 0x11/imm32/alloc-id:fake:payload
37411 89/<- %edx 4/r32/esp
37412 $test-add-reg-to-reg:initialize-var2-name:
37413
37414 8d/copy-address *(edx+4) 0/r32/eax
37415 (copy-array Heap "var2" %eax)
37416 $test-add-reg-to-reg:initialize-var2-register:
37417
37418 8d/copy-address *(edx+0x1c) 0/r32/eax
37419 (copy-array Heap "ecx" %eax)
37420 $test-add-reg-to-reg:initialize-inouts:
37421
37422 68/push 0/imm32/is-deref:false
37423 68/push 0/imm32/next
37424 68/push 0/imm32/next
37425 52/push-edx/var2
37426 68/push 0x11/imm32/alloc-id:fake
37427 68/push 0x11/imm32/alloc-id:fake:payload
37428 89/<- %esi 4/r32/esp
37429 $test-add-reg-to-reg:initialize-outputs:
37430
37431 68/push 0/imm32/is-deref:false
37432 68/push 0/imm32/next
37433 68/push 0/imm32/next
37434 51/push-ecx/var1
37435 68/push 0x11/imm32/alloc-id:fake
37436 68/push 0x11/imm32/alloc-id:fake:payload
37437 89/<- %edi 4/r32/esp
37438 $test-add-reg-to-reg:initialize-stmt:
37439
37440 68/push 0/imm32/next
37441 68/push 0/imm32/next
37442 57/push-edi/outputs
37443 68/push 0x11/imm32/alloc-id:fake
37444 56/push-esi/inouts
37445 68/push 0x11/imm32/alloc-id:fake
37446 68/push 0/imm32/operation
37447 68/push 0/imm32/operation
37448 68/push 1/imm32/tag:stmt1
37449 89/<- %esi 4/r32/esp
37450 $test-add-reg-to-reg:initialize-stmt-operation:
37451
37452 8d/copy-address *(esi+4) 0/r32/eax
37453 (copy-array Heap "add" %eax)
37454
37455 c7 0/subop/copy *Curr-block-depth 0/imm32
37456 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37457 (flush _test-output-buffered-file)
37458 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37464
37465 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
37466
37467 89/<- %esp 5/r32/ebp
37468 5d/pop-to-ebp
37469 c3/return
37470
37471 test-add-reg-to-mem:
37472
37473
37474
37475
37476
37477 55/push-ebp
37478 89/<- %ebp 4/r32/esp
37479
37480 (clear-stream _test-output-stream)
37481 (clear-stream $_test-output-buffered-file->buffer)
37482 $test-add-reg-to-mem:initialize-type:
37483
37484 68/push 0/imm32/right:null
37485 68/push 0/imm32/right:null
37486 68/push 0/imm32/left:unused
37487 68/push 1/imm32/value:int
37488 68/push 1/imm32/is-atom?:true
37489 68/push 0x11/imm32/alloc-id:fake:payload
37490 89/<- %ecx 4/r32/esp
37491 $test-add-reg-to-mem:initialize-var1:
37492
37493 68/push 0/imm32/register
37494 68/push 0/imm32/register
37495 68/push 8/imm32/stack-offset
37496 68/push 1/imm32/block-depth
37497 51/push-ecx
37498 68/push 0x11/imm32/alloc-id:fake
37499 68/push 0/imm32/name
37500 68/push 0/imm32/name
37501 68/push 0x11/imm32/alloc-id:fake:payload
37502 89/<- %ecx 4/r32/esp
37503 $test-add-reg-to-mem:initialize-var1-name:
37504
37505 8d/copy-address *(ecx+4) 0/r32/eax
37506 (copy-array Heap "var1" %eax)
37507 $test-add-reg-to-mem:initialize-var2:
37508
37509 68/push 0/imm32/register
37510 68/push 0/imm32/register
37511 68/push 0/imm32/no-stack-offset
37512 68/push 1/imm32/block-depth
37513 ff 6/subop/push *(ecx+0x10)
37514 68/push 0x11/imm32/alloc-id:fake
37515 68/push 0/imm32/name
37516 68/push 0/imm32/name
37517 68/push 0x11/imm32/alloc-id:fake:payload
37518 89/<- %edx 4/r32/esp
37519 $test-add-reg-to-mem:initialize-var2-name:
37520
37521 8d/copy-address *(edx+4) 0/r32/eax
37522 (copy-array Heap "var2" %eax)
37523 $test-add-reg-to-mem:initialize-var2-register:
37524
37525 8d/copy-address *(edx+0x1c) 0/r32/eax
37526 (copy-array Heap "ecx" %eax)
37527 $test-add-reg-to-mem:initialize-inouts:
37528
37529 68/push 0/imm32/is-deref:false
37530 68/push 0/imm32/next
37531 68/push 0/imm32/next
37532 52/push-edx/var2
37533 68/push 0x11/imm32/alloc-id:fake
37534 68/push 0x11/imm32/alloc-id:fake:payload
37535 89/<- %esi 4/r32/esp
37536
37537 68/push 0/imm32/is-deref:false
37538 56/push-esi/next
37539 68/push 0x11/imm32/alloc-id:fake
37540 51/push-ecx/var1
37541 68/push 0x11/imm32/alloc-id:fake
37542 68/push 0x11/imm32/alloc-id:fake:payload
37543 89/<- %esi 4/r32/esp
37544 $test-add-reg-to-mem:initialize-stmt:
37545
37546 68/push 0/imm32/next
37547 68/push 0/imm32/next
37548 68/push 0/imm32/outputs
37549 68/push 0/imm32/outputs
37550 56/push-esi/inouts
37551 68/push 0x11/imm32/alloc-id:fake
37552 68/push 0/imm32/operation
37553 68/push 0/imm32/operation
37554 68/push 1/imm32/tag:stmt1
37555 89/<- %esi 4/r32/esp
37556 $test-add-reg-to-mem:initialize-stmt-operation:
37557
37558 8d/copy-address *(esi+4) 0/r32/eax
37559 (copy-array Heap "add-to" %eax)
37560
37561 c7 0/subop/copy *Curr-block-depth 0/imm32
37562 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37563 (flush _test-output-buffered-file)
37564 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37570
37571 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
37572
37573 89/<- %esp 5/r32/ebp
37574 5d/pop-to-ebp
37575 c3/return
37576
37577 test-add-mem-to-reg:
37578
37579
37580
37581
37582
37583 55/push-ebp
37584 89/<- %ebp 4/r32/esp
37585
37586 (clear-stream _test-output-stream)
37587 (clear-stream $_test-output-buffered-file->buffer)
37588 $test-add-mem-to-reg:initialize-type:
37589
37590 68/push 0/imm32/right:null
37591 68/push 0/imm32/right:null
37592 68/push 0/imm32/left:unused
37593 68/push 1/imm32/value:int
37594 68/push 1/imm32/is-atom?:true
37595 68/push 0x11/imm32/alloc-id:fake:payload
37596 89/<- %ecx 4/r32/esp
37597 $test-add-mem-to-reg:initialize-var:
37598
37599 68/push 0/imm32/register
37600 68/push 0/imm32/register
37601 68/push 0/imm32/no-stack-offset
37602 68/push 1/imm32/block-depth
37603 51/push-ecx
37604 68/push 0x11/imm32/alloc-id:fake
37605 68/push 0/imm32/name
37606 68/push 0/imm32/name
37607 68/push 0x11/imm32/alloc-id:fake:payload
37608 89/<- %ecx 4/r32/esp
37609 $test-add-mem-to-reg:initialize-var-name:
37610
37611 8d/copy-address *(ecx+4) 0/r32/eax
37612 (copy-array Heap "var1" %eax)
37613 $test-add-mem-to-reg:initialize-var-register:
37614
37615 8d/copy-address *(ecx+0x1c) 0/r32/eax
37616 (copy-array Heap "eax" %eax)
37617 $test-add-mem-to-reg:initialize-var2:
37618
37619 68/push 0/imm32/register
37620 68/push 0/imm32/register
37621 68/push 8/imm32/stack-offset
37622 68/push 1/imm32/block-depth
37623 ff 6/subop/push *(ecx+0x10)
37624 68/push 0x11/imm32/alloc-id:fake
37625 68/push 0/imm32/name
37626 68/push 0/imm32/name
37627 68/push 0x11/imm32/alloc-id:fake:payload
37628 89/<- %edx 4/r32/esp
37629 $test-add-mem-to-reg:initialize-var2-name:
37630
37631 8d/copy-address *(edx+4) 0/r32/eax
37632 (copy-array Heap "var2" %eax)
37633 $test-add-mem-to-reg:initialize-inouts:
37634
37635 68/push 0/imm32/is-deref:false
37636 68/push 0/imm32/next
37637 68/push 0/imm32/next
37638 52/push-edx/var2
37639 68/push 0x11/imm32/alloc-id:fake
37640 68/push 0x11/imm32/alloc-id:fake:payload
37641 89/<- %esi 4/r32/esp
37642 $test-add-mem-to-reg:initialize-outputs:
37643
37644 68/push 0/imm32/is-deref:false
37645 68/push 0/imm32/next
37646 68/push 0/imm32/next
37647 51/push-ecx/var1
37648 68/push 0x11/imm32/alloc-id:fake
37649 68/push 0x11/imm32/alloc-id:fake:payload
37650 89/<- %edi 4/r32/esp
37651 $test-add-mem-to-reg:initialize-stmt:
37652
37653 68/push 0/imm32/next
37654 68/push 0/imm32/next
37655 57/push-edi/outputs
37656 68/push 0x11/imm32/alloc-id:fake
37657 56/push-esi/inouts
37658 68/push 0x11/imm32/alloc-id:fake
37659 68/push 0/imm32/operation
37660 68/push 0/imm32/operation
37661 68/push 1/imm32/tag:stmt1
37662 89/<- %esi 4/r32/esp
37663 $test-add-mem-to-reg:initialize-stmt-operation:
37664
37665 8d/copy-address *(esi+4) 0/r32/eax
37666 (copy-array Heap "add" %eax)
37667
37668 c7 0/subop/copy *Curr-block-depth 0/imm32
37669 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37670 (flush _test-output-buffered-file)
37671 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37677
37678 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
37679
37680 89/<- %esp 5/r32/ebp
37681 5d/pop-to-ebp
37682 c3/return
37683
37684 test-add-literal-to-eax:
37685
37686
37687
37688
37689
37690 55/push-ebp
37691 89/<- %ebp 4/r32/esp
37692
37693 (clear-stream _test-output-stream)
37694 (clear-stream $_test-output-buffered-file->buffer)
37695 $test-add-literal-to-eax:initialize-var-type:
37696
37697 68/push 0/imm32/right:null
37698 68/push 0/imm32/right:null
37699 68/push 0/imm32/left:unused
37700 68/push 1/imm32/value:int
37701 68/push 1/imm32/is-atom?:true
37702 68/push 0x11/imm32/alloc-id:fake:payload
37703 89/<- %ecx 4/r32/esp
37704 $test-add-literal-to-eax:initialize-var:
37705
37706 68/push 0/imm32/register
37707 68/push 0/imm32/register
37708 68/push 0/imm32/no-stack-offset
37709 68/push 1/imm32/block-depth
37710 51/push-ecx
37711 68/push 0x11/imm32/alloc-id:fake
37712 68/push 0/imm32/name
37713 68/push 0/imm32/name
37714 68/push 0x11/imm32/alloc-id:fake:payload
37715 89/<- %ecx 4/r32/esp
37716 $test-add-literal-to-eax:initialize-var-name:
37717
37718 8d/copy-address *(ecx+4) 0/r32/eax
37719 (copy-array Heap "v" %eax)
37720 $test-add-literal-to-eax:initialize-var-register:
37721
37722 8d/copy-address *(ecx+0x1c) 0/r32/eax
37723 (copy-array Heap "eax" %eax)
37724 $test-add-literal-to-eax:initialize-literal-type:
37725
37726 68/push 0/imm32/right:null
37727 68/push 0/imm32/right:null
37728 68/push 0/imm32/left:unused
37729 68/push 0/imm32/value:literal
37730 68/push 1/imm32/is-atom?:true
37731 68/push 0x11/imm32/alloc-id:fake:payload
37732 89/<- %edx 4/r32/esp
37733 $test-add-literal-to-eax:initialize-literal:
37734
37735 68/push 0/imm32/register
37736 68/push 0/imm32/register
37737 68/push 0/imm32/no-stack-offset
37738 68/push 1/imm32/block-depth
37739 52/push-edx
37740 68/push 0x11/imm32/alloc-id:fake
37741 68/push 0/imm32/name
37742 68/push 0/imm32/name
37743 68/push 0x11/imm32/alloc-id:fake:payload
37744 89/<- %edx 4/r32/esp
37745 $test-add-literal-to-eax:initialize-literal-value:
37746
37747 8d/copy-address *(edx+4) 0/r32/eax
37748 (copy-array Heap "0x34" %eax)
37749 $test-add-literal-to-eax:initialize-inouts:
37750
37751 68/push 0/imm32/is-deref:false
37752 68/push 0/imm32/next
37753 68/push 0/imm32/next
37754 52/push-edx/l
37755 68/push 0x11/imm32/alloc-id:fake
37756 68/push 0x11/imm32/alloc-id:fake:payload
37757 89/<- %esi 4/r32/esp
37758 $test-add-literal-to-eax:initialize-outputs:
37759
37760 68/push 0/imm32/is-deref:false
37761 68/push 0/imm32/next
37762 68/push 0/imm32/next
37763 51/push-ecx/v
37764 68/push 0x11/imm32/alloc-id:fake
37765 68/push 0x11/imm32/alloc-id:fake:payload
37766 89/<- %edi 4/r32/esp
37767 $test-add-literal-to-eax:initialize-stmt:
37768
37769 68/push 0/imm32/next
37770 68/push 0/imm32/next
37771 57/push-edi/outputs
37772 68/push 0x11/imm32/alloc-id:fake
37773 56/push-esi/inouts
37774 68/push 0x11/imm32/alloc-id:fake
37775 68/push 0/imm32/operation
37776 68/push 0/imm32/operation
37777 68/push 1/imm32/tag:stmt1
37778 89/<- %esi 4/r32/esp
37779 $test-add-literal-to-eax:initialize-stmt-operation:
37780
37781 8d/copy-address *(esi+4) 0/r32/eax
37782 (copy-array Heap "add" %eax)
37783
37784 c7 0/subop/copy *Curr-block-depth 0/imm32
37785 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37786 (flush _test-output-buffered-file)
37787 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37793
37794 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
37795
37796 89/<- %esp 5/r32/ebp
37797 5d/pop-to-ebp
37798 c3/return
37799
37800 test-add-literal-to-reg:
37801
37802
37803
37804
37805
37806 55/push-ebp
37807 89/<- %ebp 4/r32/esp
37808
37809 (clear-stream _test-output-stream)
37810 (clear-stream $_test-output-buffered-file->buffer)
37811 $test-add-literal-to-reg:initialize-var-type:
37812
37813 68/push 0/imm32/right:null
37814 68/push 0/imm32/right:null
37815 68/push 0/imm32/left:unused
37816 68/push 1/imm32/value:int
37817 68/push 1/imm32/is-atom?:true
37818 68/push 0x11/imm32/alloc-id:fake:payload
37819 89/<- %ecx 4/r32/esp
37820 $test-add-literal-to-reg:initialize-var:
37821
37822 68/push 0/imm32/register
37823 68/push 0/imm32/register
37824 68/push 0/imm32/no-stack-offset
37825 68/push 1/imm32/block-depth
37826 51/push-ecx
37827 68/push 0x11/imm32/alloc-id:fake
37828 68/push 0/imm32/name
37829 68/push 0/imm32/name
37830 68/push 0x11/imm32/alloc-id:fake:payload
37831 89/<- %ecx 4/r32/esp
37832 $test-add-literal-to-reg:initialize-var-name:
37833
37834 8d/copy-address *(ecx+4) 0/r32/eax
37835 (copy-array Heap "v" %eax)
37836 $test-add-literal-to-reg:initialize-var-register:
37837
37838 8d/copy-address *(ecx+0x1c) 0/r32/eax
37839 (copy-array Heap "ecx" %eax)
37840 $test-add-literal-to-reg:initialize-literal-type:
37841
37842 68/push 0/imm32/right:null
37843 68/push 0/imm32/right:null
37844 68/push 0/imm32/left:unused
37845 68/push 0/imm32/value:literal
37846 68/push 1/imm32/is-atom?:true
37847 68/push 0x11/imm32/alloc-id:fake:payload
37848 89/<- %edx 4/r32/esp
37849 $test-add-literal-to-reg:initialize-literal:
37850
37851 68/push 0/imm32/register
37852 68/push 0/imm32/register
37853 68/push 0/imm32/no-stack-offset
37854 68/push 1/imm32/block-depth
37855 52/push-edx
37856 68/push 0x11/imm32/alloc-id:fake
37857 68/push 0/imm32/name
37858 68/push 0/imm32/name
37859 68/push 0x11/imm32/alloc-id:fake:payload
37860 89/<- %edx 4/r32/esp
37861 $test-add-literal-to-reg:initialize-literal-value:
37862
37863 8d/copy-address *(edx+4) 0/r32/eax
37864 (copy-array Heap "0x34" %eax)
37865 $test-add-literal-to-reg:initialize-inouts:
37866
37867 68/push 0/imm32/is-deref:false
37868 68/push 0/imm32/next
37869 68/push 0/imm32/next
37870 52/push-edx/l
37871 68/push 0x11/imm32/alloc-id:fake
37872 68/push 0x11/imm32/alloc-id:fake:payload
37873 89/<- %esi 4/r32/esp
37874 $test-add-literal-to-reg:initialize-outputs:
37875
37876 68/push 0/imm32/is-deref:false
37877 68/push 0/imm32/next
37878 68/push 0/imm32/next
37879 51/push-ecx/v
37880 68/push 0x11/imm32/alloc-id:fake
37881 68/push 0x11/imm32/alloc-id:fake:payload
37882 89/<- %edi 4/r32/esp
37883 $test-add-literal-to-reg:initialize-stmt:
37884
37885 68/push 0/imm32/next
37886 68/push 0/imm32/next
37887 57/push-edi/outputs
37888 68/push 0x11/imm32/alloc-id:fake
37889 56/push-esi/inouts
37890 68/push 0x11/imm32/alloc-id:fake
37891 68/push 0/imm32/operation
37892 68/push 0/imm32/operation
37893 68/push 1/imm32/tag:stmt1
37894 89/<- %esi 4/r32/esp
37895 $test-add-literal-to-reg:initialize-stmt-operation:
37896
37897 8d/copy-address *(esi+4) 0/r32/eax
37898 (copy-array Heap "add" %eax)
37899
37900 c7 0/subop/copy *Curr-block-depth 0/imm32
37901 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37902 (flush _test-output-buffered-file)
37903 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37909
37910 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
37911
37912 89/<- %esp 5/r32/ebp
37913 5d/pop-to-ebp
37914 c3/return
37915
37916 test-add-literal-to-mem:
37917
37918
37919
37920
37921
37922 55/push-ebp
37923 89/<- %ebp 4/r32/esp
37924
37925 (clear-stream _test-output-stream)
37926 (clear-stream $_test-output-buffered-file->buffer)
37927 $test-add-literal-to-mem:initialize-type:
37928
37929 68/push 0/imm32/right:null
37930 68/push 0/imm32/right:null
37931 68/push 0/imm32/left:unused
37932 68/push 1/imm32/value:int
37933 68/push 1/imm32/is-atom?:true
37934 68/push 0x11/imm32/alloc-id:fake:payload
37935 89/<- %ecx 4/r32/esp
37936 $test-add-literal-to-mem:initialize-var1:
37937
37938 68/push 0/imm32/register
37939 68/push 0/imm32/register
37940 68/push 8/imm32/stack-offset
37941 68/push 1/imm32/block-depth
37942 51/push-ecx
37943 68/push 0x11/imm32/alloc-id:fake
37944 68/push 0/imm32/name
37945 68/push 0/imm32/name
37946 68/push 0x11/imm32/alloc-id:fake:payload
37947 89/<- %ecx 4/r32/esp
37948 $test-add-literal-to-mem:initialize-var1-name:
37949
37950 8d/copy-address *(ecx+4) 0/r32/eax
37951 (copy-array Heap "var1" %eax)
37952 $test-add-literal-to-mem:initialize-literal-type:
37953
37954 68/push 0/imm32/right:null
37955 68/push 0/imm32/right:null
37956 68/push 0/imm32/left:unused
37957 68/push 0/imm32/value:literal
37958 68/push 1/imm32/is-atom?:true
37959 68/push 0x11/imm32/alloc-id:fake:payload
37960 89/<- %edx 4/r32/esp
37961 $test-add-literal-to-mem:initialize-literal:
37962
37963 68/push 0/imm32/register
37964 68/push 0/imm32/register
37965 68/push 0/imm32/no-stack-offset
37966 68/push 1/imm32/block-depth
37967 52/push-edx
37968 68/push 0x11/imm32/alloc-id:fake
37969 68/push 0/imm32/name
37970 68/push 0/imm32/name
37971 68/push 0x11/imm32/alloc-id:fake:payload
37972 89/<- %edx 4/r32/esp
37973 $test-add-literal-to-mem:initialize-literal-value:
37974
37975 8d/copy-address *(edx+4) 0/r32/eax
37976 (copy-array Heap "0x34" %eax)
37977 $test-add-literal-to-mem:initialize-inouts:
37978
37979 68/push 0/imm32/is-deref:false
37980 68/push 0/imm32/next
37981 68/push 0/imm32/next
37982 52/push-edx/l
37983 68/push 0x11/imm32/alloc-id:fake
37984 68/push 0x11/imm32/alloc-id:fake:payload
37985 89/<- %esi 4/r32/esp
37986
37987 68/push 0/imm32/is-deref:false
37988 56/push-esi/next
37989 68/push 0x11/imm32/alloc-id:fake
37990 51/push-ecx/var1
37991 68/push 0x11/imm32/alloc-id:fake
37992 68/push 0x11/imm32/alloc-id:fake:payload
37993 89/<- %esi 4/r32/esp
37994 $test-add-literal-to-mem:initialize-stmt:
37995
37996 68/push 0/imm32/next
37997 68/push 0/imm32/next
37998 68/push 0/imm32/outputs
37999 68/push 0/imm32/outputs
38000 56/push-esi/inouts
38001 68/push 0x11/imm32/alloc-id:fake
38002 68/push 0/imm32/operation
38003 68/push 0/imm32/operation
38004 68/push 1/imm32/tag:stmt1
38005 89/<- %esi 4/r32/esp
38006 $test-add-literal-to-mem:initialize-stmt-operation:
38007
38008 8d/copy-address *(esi+4) 0/r32/eax
38009 (copy-array Heap "add-to" %eax)
38010
38011 c7 0/subop/copy *Curr-block-depth 0/imm32
38012 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38013 (flush _test-output-buffered-file)
38014 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38020
38021 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
38022
38023 89/<- %esp 5/r32/ebp
38024 5d/pop-to-ebp
38025 c3/return
38026
38027 test-shift-reg-by-literal:
38028
38029
38030
38031
38032
38033 55/push-ebp
38034 89/<- %ebp 4/r32/esp
38035
38036 (clear-stream _test-output-stream)
38037 (clear-stream $_test-output-buffered-file->buffer)
38038 $test-shift-reg-by-literal:initialize-var-type:
38039
38040 68/push 0/imm32/right:null
38041 68/push 0/imm32/right:null
38042 68/push 0/imm32/left:unused
38043 68/push 1/imm32/value:int
38044 68/push 1/imm32/is-atom?:true
38045 68/push 0x11/imm32/alloc-id:fake:payload
38046 89/<- %ecx 4/r32/esp
38047 $test-shift-reg-by-literal:initialize-var:
38048
38049 68/push 0/imm32/register
38050 68/push 0/imm32/register
38051 68/push 0/imm32/no-stack-offset
38052 68/push 1/imm32/block-depth
38053 51/push-ecx
38054 68/push 0x11/imm32/alloc-id:fake
38055 68/push 0/imm32/name
38056 68/push 0/imm32/name
38057 68/push 0x11/imm32/alloc-id:fake:payload
38058 89/<- %ecx 4/r32/esp
38059 $test-shift-reg-by-literal:initialize-var-name:
38060
38061 8d/copy-address *(ecx+4) 0/r32/eax
38062 (copy-array Heap "v" %eax)
38063 $test-shift-reg-by-literal:initialize-var-register:
38064
38065 8d/copy-address *(ecx+0x1c) 0/r32/eax
38066 (copy-array Heap "ecx" %eax)
38067 $test-shift-reg-by-literal:initialize-literal-type:
38068
38069 68/push 0/imm32/right:null
38070 68/push 0/imm32/right:null
38071 68/push 0/imm32/left:unused
38072 68/push 0/imm32/value:literal
38073 68/push 1/imm32/is-atom?:true
38074 68/push 0x11/imm32/alloc-id:fake:payload
38075 89/<- %edx 4/r32/esp
38076 $test-shift-reg-by-literal:initialize-literal:
38077
38078 68/push 0/imm32/register
38079 68/push 0/imm32/register
38080 68/push 0/imm32/no-stack-offset
38081 68/push 1/imm32/block-depth
38082 52/push-edx
38083 68/push 0x11/imm32/alloc-id:fake
38084 68/push 0/imm32/name
38085 68/push 0/imm32/name
38086 68/push 0x11/imm32/alloc-id:fake:payload
38087 89/<- %edx 4/r32/esp
38088 $test-shift-reg-by-literal:initialize-literal-value:
38089
38090 8d/copy-address *(edx+4) 0/r32/eax
38091 (copy-array Heap "2" %eax)
38092 $test-shift-reg-by-literal:initialize-inouts:
38093
38094 68/push 0/imm32/is-deref:false
38095 68/push 0/imm32/next
38096 68/push 0/imm32/next
38097 52/push-edx/l
38098 68/push 0x11/imm32/alloc-id:fake
38099 68/push 0x11/imm32/alloc-id:fake:payload
38100 89/<- %esi 4/r32/esp
38101 $test-shift-reg-by-literal:initialize-outputs:
38102
38103 68/push 0/imm32/is-deref:false
38104 68/push 0/imm32/next
38105 68/push 0/imm32/next
38106 51/push-ecx/v
38107 68/push 0x11/imm32/alloc-id:fake
38108 68/push 0x11/imm32/alloc-id:fake:payload
38109 89/<- %edi 4/r32/esp
38110 $test-shift-reg-by-literal:initialize-stmt:
38111
38112 68/push 0/imm32/next
38113 68/push 0/imm32/next
38114 57/push-edi/outputs
38115 68/push 0x11/imm32/alloc-id:fake
38116 56/push-esi/inouts
38117 68/push 0x11/imm32/alloc-id:fake
38118 68/push 0/imm32/operation
38119 68/push 0/imm32/operation
38120 68/push 1/imm32/tag:stmt1
38121 89/<- %esi 4/r32/esp
38122 $test-shift-reg-by-literal:initialize-stmt-operation:
38123
38124 8d/copy-address *(esi+4) 0/r32/eax
38125 (copy-array Heap "shift-left" %eax)
38126
38127 c7 0/subop/copy *Curr-block-depth 0/imm32
38128 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38129 (flush _test-output-buffered-file)
38130 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38136
38137 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left %ecx 2/imm8" "F - test-shift-reg-by-literal")
38138
38139 89/<- %esp 5/r32/ebp
38140 5d/pop-to-ebp
38141 c3/return
38142
38143 test-shift-mem-by-literal:
38144
38145
38146
38147
38148
38149 55/push-ebp
38150 89/<- %ebp 4/r32/esp
38151
38152 (clear-stream _test-output-stream)
38153 (clear-stream $_test-output-buffered-file->buffer)
38154 $test-shift-mem-by-literal:initialize-type:
38155
38156 68/push 0/imm32/right:null
38157 68/push 0/imm32/right:null
38158 68/push 0/imm32/left:unused
38159 68/push 1/imm32/value:int
38160 68/push 1/imm32/is-atom?:true
38161 68/push 0x11/imm32/alloc-id:fake:payload
38162 89/<- %ecx 4/r32/esp
38163 $test-shift-mem-by-literal:initialize-var1:
38164
38165 68/push 0/imm32/register
38166 68/push 0/imm32/register
38167 68/push 8/imm32/stack-offset
38168 68/push 1/imm32/block-depth
38169 51/push-ecx
38170 68/push 0x11/imm32/alloc-id:fake
38171 68/push 0/imm32/name
38172 68/push 0/imm32/name
38173 68/push 0x11/imm32/alloc-id:fake:payload
38174 89/<- %ecx 4/r32/esp
38175 $test-shift-mem-by-literal:initialize-var1-name:
38176
38177 8d/copy-address *(ecx+4) 0/r32/eax
38178 (copy-array Heap "var1" %eax)
38179 $test-shift-mem-by-literal:initialize-literal-type:
38180
38181 68/push 0/imm32/right:null
38182 68/push 0/imm32/right:null
38183 68/push 0/imm32/left:unused
38184 68/push 0/imm32/value:literal
38185 68/push 1/imm32/is-atom?:true
38186 68/push 0x11/imm32/alloc-id:fake:payload
38187 89/<- %edx 4/r32/esp
38188 $test-shift-mem-by-literal:initialize-literal:
38189
38190 68/push 0/imm32/register
38191 68/push 0/imm32/register
38192 68/push 0/imm32/no-stack-offset
38193 68/push 1/imm32/block-depth
38194 52/push-edx
38195 68/push 0x11/imm32/alloc-id:fake
38196 68/push 0/imm32/name
38197 68/push 0/imm32/name
38198 68/push 0x11/imm32/alloc-id:fake:payload
38199 89/<- %edx 4/r32/esp
38200 $test-shift-mem-by-literal:initialize-literal-value:
38201
38202 8d/copy-address *(edx+4) 0/r32/eax
38203 (copy-array Heap "3" %eax)
38204 $test-shift-mem-by-literal:initialize-inouts:
38205
38206 68/push 0/imm32/is-deref:false
38207 68/push 0/imm32/next
38208 68/push 0/imm32/next
38209 52/push-edx/l
38210 68/push 0x11/imm32/alloc-id:fake
38211 68/push 0x11/imm32/alloc-id:fake:payload
38212 89/<- %esi 4/r32/esp
38213
38214 68/push 0/imm32/is-deref:false
38215 56/push-esi/next
38216 68/push 0x11/imm32/alloc-id:fake
38217 51/push-ecx/var1
38218 68/push 0x11/imm32/alloc-id:fake
38219 68/push 0x11/imm32/alloc-id:fake:payload
38220 89/<- %esi 4/r32/esp
38221 $test-shift-mem-by-literal:initialize-stmt:
38222
38223 68/push 0/imm32/next
38224 68/push 0/imm32/next
38225 68/push 0/imm32/outputs
38226 68/push 0/imm32/outputs
38227 56/push-esi/inouts
38228 68/push 0x11/imm32/alloc-id:fake
38229 68/push 0/imm32/operation
38230 68/push 0/imm32/operation
38231 68/push 1/imm32/tag:stmt1
38232 89/<- %esi 4/r32/esp
38233 $test-shift-mem-by-literal:initialize-stmt-operation:
38234
38235 8d/copy-address *(esi+4) 0/r32/eax
38236 (copy-array Heap "shift-left" %eax)
38237
38238 c7 0/subop/copy *Curr-block-depth 0/imm32
38239 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38240 (flush _test-output-buffered-file)
38241 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38247
38248 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left *(ebp+0x00000008) 3/imm8" "F - test-shift-mem-by-literal")
38249
38250 89/<- %esp 5/r32/ebp
38251 5d/pop-to-ebp
38252 c3/return
38253
38254 test-compare-reg-with-reg:
38255
38256
38257
38258
38259
38260 55/push-ebp
38261 89/<- %ebp 4/r32/esp
38262
38263 (clear-stream _test-output-stream)
38264 (clear-stream $_test-output-buffered-file->buffer)
38265 $test-compare-reg-with-reg:initialize-type:
38266
38267 68/push 0/imm32/right:null
38268 68/push 0/imm32/right:null
38269 68/push 0/imm32/left:unused
38270 68/push 1/imm32/value:int
38271 68/push 1/imm32/is-atom?:true
38272 68/push 0x11/imm32/alloc-id:fake:payload
38273 89/<- %ecx 4/r32/esp
38274 $test-compare-reg-with-reg:initialize-var1:
38275
38276 68/push 0/imm32/register
38277 68/push 0/imm32/register
38278 68/push 0/imm32/no-stack-offset
38279 68/push 1/imm32/block-depth
38280 51/push-ecx
38281 68/push 0x11/imm32/alloc-id:fake
38282 68/push 0/imm32/name
38283 68/push 0/imm32/name
38284 68/push 0x11/imm32/alloc-id:fake:payload
38285 89/<- %ecx 4/r32/esp
38286 $test-compare-reg-with-reg:initialize-var1-name:
38287
38288 8d/copy-address *(ecx+4) 0/r32/eax
38289 (copy-array Heap "var1" %eax)
38290 $test-compare-reg-with-reg:initialize-var1-register:
38291
38292 8d/copy-address *(ecx+0x1c) 0/r32/eax
38293 (copy-array Heap "ecx" %eax)
38294 $test-compare-reg-with-reg:initialize-var2:
38295
38296 68/push 0/imm32/register
38297 68/push 0/imm32/register
38298 68/push 0/imm32/no-stack-offset
38299 68/push 1/imm32/block-depth
38300 ff 6/subop/push *(ecx+0x10)
38301 68/push 0x11/imm32/alloc-id:fake
38302 68/push 0/imm32/name
38303 68/push 0/imm32/name
38304 68/push 0x11/imm32/alloc-id:fake:payload
38305 89/<- %edx 4/r32/esp
38306 $test-compare-reg-with-reg:initialize-var2-name:
38307
38308 8d/copy-address *(edx+4) 0/r32/eax
38309 (copy-array Heap "var2" %eax)
38310 $test-compare-reg-with-reg:initialize-var2-register:
38311
38312 8d/copy-address *(edx+0x1c) 0/r32/eax
38313 (copy-array Heap "eax" %eax)
38314 $test-compare-reg-with-reg:initialize-inouts:
38315
38316 68/push 0/imm32/is-deref:false
38317 68/push 0/imm32/next
38318 68/push 0/imm32/next
38319 52/push-edx/var2
38320 68/push 0x11/imm32/alloc-id:fake
38321 68/push 0x11/imm32/alloc-id:fake:payload
38322 89/<- %esi 4/r32/esp
38323
38324 68/push 0/imm32/is-deref:false
38325 56/push-esi/next
38326 68/push 0x11/imm32/alloc-id:fake
38327 51/push-ecx/var1
38328 68/push 0x11/imm32/alloc-id:fake
38329 68/push 0x11/imm32/alloc-id:fake:payload
38330 89/<- %esi 4/r32/esp
38331 $test-compare-reg-with-reg:initialize-stmt:
38332
38333 68/push 0/imm32/next
38334 68/push 0/imm32/next
38335 68/push 0/imm32/outputs
38336 68/push 0/imm32/outputs
38337 56/push-esi/inouts
38338 68/push 0x11/imm32/alloc-id:fake
38339 68/push 0/imm32/operation
38340 68/push 0/imm32/operation
38341 68/push 1/imm32/tag:stmt1
38342 89/<- %esi 4/r32/esp
38343 $test-compare-reg-with-reg:initialize-stmt-operation:
38344
38345 8d/copy-address *(esi+4) 0/r32/eax
38346 (copy-array Heap "compare" %eax)
38347
38348 c7 0/subop/copy *Curr-block-depth 0/imm32
38349 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38350 (flush _test-output-buffered-file)
38351 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38357
38358 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
38359
38360 89/<- %esp 5/r32/ebp
38361 5d/pop-to-ebp
38362 c3/return
38363
38364 test-compare-mem-with-reg:
38365
38366
38367
38368
38369
38370 55/push-ebp
38371 89/<- %ebp 4/r32/esp
38372
38373 (clear-stream _test-output-stream)
38374 (clear-stream $_test-output-buffered-file->buffer)
38375 $test-compare-mem-with-reg:initialize-type:
38376
38377 68/push 0/imm32/right:null
38378 68/push 0/imm32/right:null
38379 68/push 0/imm32/left:unused
38380 68/push 1/imm32/value:int
38381 68/push 1/imm32/is-atom?:true
38382 68/push 0x11/imm32/alloc-id:fake:payload
38383 89/<- %ecx 4/r32/esp
38384 $test-compare-mem-with-reg:initialize-var1:
38385
38386 68/push 0/imm32/register
38387 68/push 0/imm32/register
38388 68/push 8/imm32/stack-offset
38389 68/push 1/imm32/block-depth
38390 51/push-ecx
38391 68/push 0x11/imm32/alloc-id:fake
38392 68/push 0/imm32/name
38393 68/push 0/imm32/name
38394 68/push 0x11/imm32/alloc-id:fake:payload
38395 89/<- %ecx 4/r32/esp
38396 $test-compare-mem-with-reg:initialize-var1-name:
38397
38398 8d/copy-address *(ecx+4) 0/r32/eax
38399 (copy-array Heap "var1" %eax)
38400 $test-compare-mem-with-reg:initialize-var2:
38401
38402 68/push 0/imm32/register
38403 68/push 0/imm32/register
38404 68/push 0/imm32/no-stack-offset
38405 68/push 1/imm32/block-depth
38406 ff 6/subop/push *(ecx+0x10)
38407 68/push 0x11/imm32/alloc-id:fake
38408 68/push 0/imm32/name
38409 68/push 0/imm32/name
38410 68/push 0x11/imm32/alloc-id:fake:payload
38411 89/<- %edx 4/r32/esp
38412 $test-compare-mem-with-reg:initialize-var2-name:
38413
38414 8d/copy-address *(edx+4) 0/r32/eax
38415 (copy-array Heap "var2" %eax)
38416 $test-compare-mem-with-reg:initialize-var2-register:
38417
38418 8d/copy-address *(edx+0x1c) 0/r32/eax
38419 (copy-array Heap "eax" %eax)
38420 $test-compare-mem-with-reg:initialize-inouts:
38421
38422 68/push 0/imm32/is-deref:false
38423 68/push 0/imm32/next
38424 68/push 0/imm32/next
38425 52/push-edx/var2
38426 68/push 0x11/imm32/alloc-id:fake
38427 68/push 0x11/imm32/alloc-id:fake:payload
38428 89/<- %esi 4/r32/esp
38429
38430 68/push 0/imm32/is-deref:false
38431 56/push-esi/next
38432 68/push 0x11/imm32/alloc-id:fake
38433 51/push-ecx/var1
38434 68/push 0x11/imm32/alloc-id:fake
38435 68/push 0x11/imm32/alloc-id:fake:payload
38436 89/<- %esi 4/r32/esp
38437 $test-compare-mem-with-reg:initialize-stmt:
38438
38439 68/push 0/imm32/next
38440 68/push 0/imm32/next
38441 68/push 0/imm32/outputs
38442 68/push 0/imm32/outputs
38443 56/push-esi/inouts
38444 68/push 0x11/imm32/alloc-id:fake
38445 68/push 0/imm32/operation
38446 68/push 0/imm32/operation
38447 68/push 1/imm32/tag:stmt1
38448 89/<- %esi 4/r32/esp
38449 $test-compare-mem-with-reg:initialize-stmt-operation:
38450
38451 8d/copy-address *(esi+4) 0/r32/eax
38452 (copy-array Heap "compare" %eax)
38453
38454 c7 0/subop/copy *Curr-block-depth 0/imm32
38455 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38456 (flush _test-output-buffered-file)
38457 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38463
38464 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
38465
38466 89/<- %esp 5/r32/ebp
38467 5d/pop-to-ebp
38468 c3/return
38469
38470 test-compare-reg-with-mem:
38471
38472
38473
38474
38475
38476 55/push-ebp
38477 89/<- %ebp 4/r32/esp
38478
38479 (clear-stream _test-output-stream)
38480 (clear-stream $_test-output-buffered-file->buffer)
38481 $test-compare-reg-with-mem:initialize-type:
38482
38483 68/push 0/imm32/right:null
38484 68/push 0/imm32/right:null
38485 68/push 0/imm32/left:unused
38486 68/push 1/imm32/value:int
38487 68/push 1/imm32/is-atom?:true
38488 68/push 0x11/imm32/alloc-id:fake:payload
38489 89/<- %ecx 4/r32/esp
38490 $test-compare-reg-with-mem:initialize-var1:
38491
38492 68/push 0/imm32/register
38493 68/push 0/imm32/register
38494 68/push 0/imm32/no-stack-offset
38495 68/push 1/imm32/block-depth
38496 51/push-ecx
38497 68/push 0x11/imm32/alloc-id:fake
38498 68/push 0/imm32/name
38499 68/push 0/imm32/name
38500 68/push 0x11/imm32/alloc-id:fake:payload
38501 89/<- %ecx 4/r32/esp
38502 $test-compare-reg-with-mem:initialize-var1-name:
38503
38504 8d/copy-address *(ecx+4) 0/r32/eax
38505 (copy-array Heap "var1" %eax)
38506 $test-compare-reg-with-mem:initialize-var1-register:
38507
38508 8d/copy-address *(ecx+0x1c) 0/r32/eax
38509 (copy-array Heap "eax" %eax)
38510 $test-compare-reg-with-mem:initialize-var2:
38511
38512 68/push 0/imm32/register
38513 68/push 0/imm32/register
38514 68/push 8/imm32/stack-offset
38515 68/push 1/imm32/block-depth
38516 ff 6/subop/push *(ecx+0x10)
38517 68/push 0x11/imm32/alloc-id:fake
38518 68/push 0/imm32/name
38519 68/push 0/imm32/name
38520 68/push 0x11/imm32/alloc-id:fake:payload
38521 89/<- %edx 4/r32/esp
38522 $test-compare-reg-with-mem:initialize-var2-name:
38523
38524 8d/copy-address *(edx+4) 0/r32/eax
38525 (copy-array Heap "var2" %eax)
38526 $test-compare-reg-with-mem:initialize-inouts:
38527
38528 68/push 0/imm32/is-deref:false
38529 68/push 0/imm32/next
38530 68/push 0/imm32/next
38531 52/push-edx/var2
38532 68/push 0x11/imm32/alloc-id:fake
38533 68/push 0x11/imm32/alloc-id:fake:payload
38534 89/<- %esi 4/r32/esp
38535
38536 68/push 0/imm32/is-deref:false
38537 56/push-esi/next
38538 68/push 0x11/imm32/alloc-id:fake
38539 51/push-ecx/var1
38540 68/push 0x11/imm32/alloc-id:fake
38541 68/push 0x11/imm32/alloc-id:fake:payload
38542 89/<- %esi 4/r32/esp
38543 $test-compare-reg-with-mem:initialize-stmt:
38544
38545 68/push 0/imm32/next
38546 68/push 0/imm32/next
38547 68/push 0/imm32/outputs
38548 68/push 0/imm32/outputs
38549 56/push-esi/inouts
38550 68/push 0x11/imm32/alloc-id:fake
38551 68/push 0/imm32/operation
38552 68/push 0/imm32/operation
38553 68/push 1/imm32/tag:stmt1
38554 89/<- %esi 4/r32/esp
38555 $test-compare-reg-with-mem:initialize-stmt-operation:
38556
38557 8d/copy-address *(esi+4) 0/r32/eax
38558 (copy-array Heap "compare" %eax)
38559
38560 c7 0/subop/copy *Curr-block-depth 0/imm32
38561 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38562 (flush _test-output-buffered-file)
38563 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38569
38570 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
38571
38572 89/<- %esp 5/r32/ebp
38573 5d/pop-to-ebp
38574 c3/return
38575
38576 test-compare-mem-with-literal:
38577
38578
38579
38580
38581
38582 55/push-ebp
38583 89/<- %ebp 4/r32/esp
38584
38585 (clear-stream _test-output-stream)
38586 (clear-stream $_test-output-buffered-file->buffer)
38587 $test-compare-mem-with-literal:initialize-type:
38588
38589 68/push 0/imm32/right:null
38590 68/push 0/imm32/right:null
38591 68/push 0/imm32/left:unused
38592 68/push 1/imm32/value:int
38593 68/push 1/imm32/is-atom?:true
38594 68/push 0x11/imm32/alloc-id:fake:payload
38595 89/<- %ecx 4/r32/esp
38596 $test-compare-mem-with-literal:initialize-var1:
38597
38598 68/push 0/imm32/register
38599 68/push 0/imm32/register
38600 68/push 8/imm32/stack-offset
38601 68/push 1/imm32/block-depth
38602 51/push-ecx
38603 68/push 0x11/imm32/alloc-id:fake
38604 68/push 0/imm32/name
38605 68/push 0/imm32/name
38606 68/push 0x11/imm32/alloc-id:fake:payload
38607 89/<- %ecx 4/r32/esp
38608 $test-compare-mem-with-literal:initialize-var1-name:
38609
38610 8d/copy-address *(ecx+4) 0/r32/eax
38611 (copy-array Heap "var1" %eax)
38612 $test-compare-mem-with-literal:initialize-literal-type:
38613
38614 68/push 0/imm32/right:null
38615 68/push 0/imm32/right:null
38616 68/push 0/imm32/left:unused
38617 68/push 0/imm32/value:literal
38618 68/push 1/imm32/is-atom?:true
38619 68/push 0x11/imm32/alloc-id:fake:payload
38620 89/<- %edx 4/r32/esp
38621 $test-compare-mem-with-literal:initialize-literal:
38622
38623 68/push 0/imm32/register
38624 68/push 0/imm32/register
38625 68/push 0/imm32/no-stack-offset
38626 68/push 1/imm32/block-depth
38627 52/push-edx
38628 68/push 0x11/imm32/alloc-id:fake
38629 68/push 0/imm32/name
38630 68/push 0/imm32/name
38631 68/push 0x11/imm32/alloc-id:fake:payload
38632 89/<- %edx 4/r32/esp
38633 $test-compare-mem-with-literal:initialize-literal-value:
38634
38635 8d/copy-address *(edx+4) 0/r32/eax
38636 (copy-array Heap "0x34" %eax)
38637 $test-compare-mem-with-literal:initialize-inouts:
38638
38639 68/push 0/imm32/is-deref:false
38640 68/push 0/imm32/next
38641 68/push 0/imm32/next
38642 52/push-edx/l
38643 68/push 0x11/imm32/alloc-id:fake
38644 68/push 0x11/imm32/alloc-id:fake:payload
38645 89/<- %esi 4/r32/esp
38646
38647 68/push 0/imm32/is-deref:false
38648 56/push-esi/next
38649 68/push 0x11/imm32/alloc-id:fake
38650 51/push-ecx/var1
38651 68/push 0x11/imm32/alloc-id:fake
38652 68/push 0x11/imm32/alloc-id:fake:payload
38653 89/<- %esi 4/r32/esp
38654 $test-compare-mem-with-literal:initialize-stmt:
38655
38656 68/push 0/imm32/next
38657 68/push 0/imm32/next
38658 68/push 0/imm32/outputs
38659 68/push 0/imm32/outputs
38660 56/push-esi/inouts
38661 68/push 0x11/imm32/alloc-id:fake
38662 68/push 0/imm32/operation
38663 68/push 0/imm32/operation
38664 68/push 1/imm32/tag:stmt1
38665 89/<- %esi 4/r32/esp
38666 $test-compare-mem-with-literal:initialize-stmt-operation:
38667
38668 8d/copy-address *(esi+4) 0/r32/eax
38669 (copy-array Heap "compare" %eax)
38670
38671 c7 0/subop/copy *Curr-block-depth 0/imm32
38672 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38673 (flush _test-output-buffered-file)
38674 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38680
38681 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
38682
38683 89/<- %esp 5/r32/ebp
38684 5d/pop-to-ebp
38685 c3/return
38686
38687 test-compare-eax-with-literal:
38688
38689
38690
38691
38692
38693 55/push-ebp
38694 89/<- %ebp 4/r32/esp
38695
38696 (clear-stream _test-output-stream)
38697 (clear-stream $_test-output-buffered-file->buffer)
38698 $test-compare-eax-with-literal:initialize-type:
38699
38700 68/push 0/imm32/right:null
38701 68/push 0/imm32/right:null
38702 68/push 0/imm32/left:unused
38703 68/push 1/imm32/value:int
38704 68/push 1/imm32/is-atom?:true
38705 68/push 0x11/imm32/alloc-id:fake:payload
38706 89/<- %ecx 4/r32/esp
38707 $test-compare-eax-with-literal:initialize-var1:
38708
38709 68/push 0/imm32/register
38710 68/push 0/imm32/register
38711 68/push 0/imm32/no-stack-offset
38712 68/push 1/imm32/block-depth
38713 51/push-ecx
38714 68/push 0x11/imm32/alloc-id:fake
38715 68/push 0/imm32/name
38716 68/push 0/imm32/name
38717 68/push 0x11/imm32/alloc-id:fake:payload
38718 89/<- %ecx 4/r32/esp
38719 $test-compare-eax-with-literal:initialize-var1-name:
38720
38721 8d/copy-address *(ecx+4) 0/r32/eax
38722 (copy-array Heap "var1" %eax)
38723 $test-compare-eax-with-literal:initialize-var1-register:
38724
38725 8d/copy-address *(ecx+0x1c) 0/r32/eax
38726 (copy-array Heap "eax" %eax)
38727 $test-compare-eax-with-literal:initialize-literal-type:
38728
38729 68/push 0/imm32/right:null
38730 68/push 0/imm32/right:null
38731 68/push 0/imm32/left:unused
38732 68/push 0/imm32/value:literal
38733 68/push 1/imm32/is-atom?:true
38734 68/push 0x11/imm32/alloc-id:fake:payload
38735 89/<- %edx 4/r32/esp
38736 $test-compare-eax-with-literal:initialize-literal:
38737
38738 68/push 0/imm32/register
38739 68/push 0/imm32/register
38740 68/push 0/imm32/no-stack-offset
38741 68/push 1/imm32/block-depth
38742 52/push-edx
38743 68/push 0x11/imm32/alloc-id:fake
38744 68/push 0/imm32/name
38745 68/push 0/imm32/name
38746 68/push 0x11/imm32/alloc-id:fake:payload
38747 89/<- %edx 4/r32/esp
38748 $test-compare-eax-with-literal:initialize-literal-value:
38749
38750 8d/copy-address *(edx+4) 0/r32/eax
38751 (copy-array Heap "0x34" %eax)
38752 $test-compare-eax-with-literal:initialize-inouts:
38753
38754 68/push 0/imm32/is-deref:false
38755 68/push 0/imm32/next
38756 68/push 0/imm32/next
38757 52/push-edx/l
38758 68/push 0x11/imm32/alloc-id:fake
38759 68/push 0x11/imm32/alloc-id:fake:payload
38760 89/<- %esi 4/r32/esp
38761
38762 68/push 0/imm32/is-deref:false
38763 56/push-esi/next
38764 68/push 0x11/imm32/alloc-id:fake
38765 51/push-ecx/var1
38766 68/push 0x11/imm32/alloc-id:fake
38767 68/push 0x11/imm32/alloc-id:fake:payload
38768 89/<- %esi 4/r32/esp
38769 $test-compare-eax-with-literal:initialize-stmt:
38770
38771 68/push 0/imm32/next
38772 68/push 0/imm32/next
38773 68/push 0/imm32/outputs
38774 68/push 0/imm32/outputs
38775 56/push-esi/inouts
38776 68/push 0x11/imm32/alloc-id:fake
38777 68/push 0/imm32/operation
38778 68/push 0/imm32/operation
38779 68/push 1/imm32/tag:stmt1
38780 89/<- %esi 4/r32/esp
38781 $test-compare-eax-with-literal:initialize-stmt-operation:
38782
38783 8d/copy-address *(esi+4) 0/r32/eax
38784 (copy-array Heap "compare" %eax)
38785
38786 c7 0/subop/copy *Curr-block-depth 0/imm32
38787 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38788 (flush _test-output-buffered-file)
38789 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38795
38796 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
38797
38798 89/<- %esp 5/r32/ebp
38799 5d/pop-to-ebp
38800 c3/return
38801
38802 test-compare-reg-with-literal:
38803
38804
38805
38806
38807
38808 55/push-ebp
38809 89/<- %ebp 4/r32/esp
38810
38811 (clear-stream _test-output-stream)
38812 (clear-stream $_test-output-buffered-file->buffer)
38813 $test-compare-reg-with-literal:initialize-type:
38814
38815 68/push 0/imm32/right:null
38816 68/push 0/imm32/right:null
38817 68/push 0/imm32/left:unused
38818 68/push 1/imm32/value:int
38819 68/push 1/imm32/is-atom?:true
38820 68/push 0x11/imm32/alloc-id:fake:payload
38821 89/<- %ecx 4/r32/esp
38822 $test-compare-reg-with-literal:initialize-var1:
38823
38824 68/push 0/imm32/register
38825 68/push 0/imm32/register
38826 68/push 0/imm32/no-stack-offset
38827 68/push 1/imm32/block-depth
38828 51/push-ecx
38829 68/push 0x11/imm32/alloc-id:fake
38830 68/push 0/imm32/name
38831 68/push 0/imm32/name
38832 68/push 0x11/imm32/alloc-id:fake:payload
38833 89/<- %ecx 4/r32/esp
38834 $test-compare-reg-with-literal:initialize-var1-name:
38835
38836 8d/copy-address *(ecx+4) 0/r32/eax
38837 (copy-array Heap "var1" %eax)
38838 $test-compare-reg-with-literal:initialize-var1-register:
38839
38840 8d/copy-address *(ecx+0x1c) 0/r32/eax
38841 (copy-array Heap "ecx" %eax)
38842 $test-compare-reg-with-literal:initialize-literal-type:
38843
38844 68/push 0/imm32/right:null
38845 68/push 0/imm32/right:null
38846 68/push 0/imm32/left:unused
38847 68/push 0/imm32/value:literal
38848 68/push 1/imm32/is-atom?:true
38849 68/push 0x11/imm32/alloc-id:fake:payload
38850 89/<- %edx 4/r32/esp
38851 $test-compare-reg-with-literal:initialize-literal:
38852
38853 68/push 0/imm32/register
38854 68/push 0/imm32/register
38855 68/push 0/imm32/no-stack-offset
38856 68/push 1/imm32/block-depth
38857 52/push-edx
38858 68/push 0x11/imm32/alloc-id:fake
38859 68/push 0/imm32/name
38860 68/push 0/imm32/name
38861 68/push 0x11/imm32/alloc-id:fake:payload
38862 89/<- %edx 4/r32/esp
38863 $test-compare-reg-with-literal:initialize-literal-value:
38864
38865 8d/copy-address *(edx+4) 0/r32/eax
38866 (copy-array Heap "0x34" %eax)
38867 $test-compare-reg-with-literal:initialize-inouts:
38868
38869 68/push 0/imm32/is-deref:false
38870 68/push 0/imm32/next
38871 68/push 0/imm32/next
38872 52/push-edx/l
38873 68/push 0x11/imm32/alloc-id:fake
38874 68/push 0x11/imm32/alloc-id:fake:payload
38875 89/<- %esi 4/r32/esp
38876
38877 68/push 0/imm32/is-deref:false
38878 56/push-esi/next
38879 68/push 0x11/imm32/alloc-id:fake
38880 51/push-ecx/var1
38881 68/push 0x11/imm32/alloc-id:fake
38882 68/push 0x11/imm32/alloc-id:fake:payload
38883 89/<- %esi 4/r32/esp
38884 $test-compare-reg-with-literal:initialize-stmt:
38885
38886 68/push 0/imm32/next
38887 68/push 0/imm32/next
38888 68/push 0/imm32/outputs
38889 68/push 0/imm32/outputs
38890 56/push-esi/inouts
38891 68/push 0x11/imm32/alloc-id:fake
38892 68/push 0/imm32/operation
38893 68/push 0/imm32/operation
38894 68/push 1/imm32/tag:stmt1
38895 89/<- %esi 4/r32/esp
38896 $test-compare-reg-with-literal:initialize-stmt-operation:
38897
38898 8d/copy-address *(esi+4) 0/r32/eax
38899 (copy-array Heap "compare" %eax)
38900
38901 c7 0/subop/copy *Curr-block-depth 0/imm32
38902 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38903 (flush _test-output-buffered-file)
38904 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38910
38911 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
38912
38913 89/<- %esp 5/r32/ebp
38914 5d/pop-to-ebp
38915 c3/return
38916
38917 test-emit-subx-stmt-function-call:
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935 55/push-ebp
38936 89/<- %ebp 4/r32/esp
38937
38938 (clear-stream _test-output-stream)
38939 (clear-stream $_test-output-buffered-file->buffer)
38940 $test-emit-subx-function-call:initialize-type:
38941
38942 68/push 0/imm32/right:null
38943 68/push 0/imm32/right:null
38944 68/push 0/imm32/left:unused
38945 68/push 1/imm32/value:int
38946 68/push 1/imm32/is-atom?:true
38947 68/push 0x11/imm32/alloc-id:fake:payload
38948 89/<- %ecx 4/r32/esp
38949 $test-emit-subx-function-call:initialize-var:
38950
38951 68/push 0/imm32/no-register
38952 68/push 0/imm32/no-register
38953 68/push -8/imm32/stack-offset
38954 68/push 1/imm32/block-depth
38955 51/push-ecx/type
38956 68/push 0x11/imm32/alloc-id:fake
38957 68/push 0/imm32/name
38958 68/push 0/imm32/name
38959 68/push 0x11/imm32/alloc-id:fake:payload
38960 89/<- %ecx 4/r32/esp
38961 $test-emit-subx-function-call:initialize-var-name:
38962
38963 8d/copy-address *(ecx+4) 0/r32/eax
38964 (copy-array Heap "foo" %eax)
38965 $test-emit-subx-function-call:initialize-stmt-var:
38966
38967 68/push 0/imm32/is-deref:false
38968 68/push 0/imm32/next
38969 68/push 0/imm32/next
38970 51/push-ecx/var-foo
38971 68/push 0x11/imm32/alloc-id:fake
38972 68/push 0x11/imm32/alloc-id:fake:payload
38973 89/<- %ebx 4/r32/esp
38974 $test-emit-subx-function-call:initialize-stmt:
38975
38976 68/push 0/imm32/no-outputs
38977 68/push 0/imm32/no-outputs
38978 53/push-ebx/inouts
38979 68/push 0x11/imm32/alloc-id:fake
38980 68/push 0/imm32/operation
38981 68/push 0/imm32/operation
38982 68/push 1/imm32/tag
38983 89/<- %esi 4/r32/esp
38984 $test-emit-subx-function-call:initialize-stmt-operation:
38985
38986 8d/copy-address *(esi+4) 0/r32/eax
38987 (copy-array Heap "f" %eax)
38988
38989 c7 0/subop/copy *Curr-block-depth 0/imm32
38990 (emit-subx-stmt _test-output-buffered-file %esi 0 0 Stderr 0)
38991 (flush _test-output-buffered-file)
38992 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38998
38999 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
39000
39001 89/<- %esp 5/r32/ebp
39002 5d/pop-to-ebp
39003 c3/return
39004
39005 test-emit-subx-stmt-function-call-with-literal-arg:
39006
39007
39008
39009
39010
39011
39012 55/push-ebp
39013 89/<- %ebp 4/r32/esp
39014
39015 (clear-stream _test-output-stream)
39016 (clear-stream $_test-output-buffered-file->buffer)
39017 $test-emit-subx-function-call-with-literal-arg:initialize-type:
39018
39019 68/push 0/imm32/right:null
39020 68/push 0/imm32/right:null
39021 68/push 0/imm32/left:unused
39022 68/push 0/imm32/value:literal
39023 68/push 1/imm32/is-atom?:true
39024 68/push 0x11/imm32/alloc-id:fake:payload
39025 89/<- %ecx 4/r32/esp
39026 $test-emit-subx-function-call-with-literal-arg:initialize-var:
39027
39028 68/push 0/imm32/no-register
39029 68/push 0/imm32/no-register
39030 68/push 0/imm32/no-stack-offset
39031 68/push 1/imm32/block-depth
39032 51/push-ecx/type
39033 68/push 0x11/imm32/alloc-id:fake
39034 68/push 0/imm32/name
39035 68/push 0/imm32/name
39036 68/push 0x11/imm32/alloc-id:fake:payload
39037 89/<- %ecx 4/r32/esp
39038 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
39039
39040 8d/copy-address *(ecx+4) 0/r32/eax
39041 (copy-array Heap "0x34" %eax)
39042 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
39043
39044 68/push 0/imm32/is-deref:false
39045 68/push 0/imm32/next
39046 68/push 0/imm32/next
39047 51/push-ecx/var-foo
39048 68/push 0x11/imm32/alloc-id:fake
39049 68/push 0x11/imm32/alloc-id:fake:payload
39050 89/<- %ebx 4/r32/esp
39051 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
39052
39053 68/push 0/imm32/no-outputs
39054 68/push 0/imm32/no-outputs
39055 53/push-ebx/inouts
39056 68/push 0x11/imm32/alloc-id:fake
39057 68/push 0/imm32/operation
39058 68/push 0/imm32/operation
39059 68/push 1/imm32/tag
39060 89/<- %esi 4/r32/esp
39061 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
39062
39063 8d/copy-address *(esi+4) 0/r32/eax
39064 (copy-array Heap "f" %eax)
39065
39066 c7 0/subop/copy *Curr-block-depth 0/imm32
39067 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx 0 Stderr 0)
39068 (flush _test-output-buffered-file)
39069 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
39075
39076 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
39077
39078 89/<- %esp 5/r32/ebp
39079 5d/pop-to-ebp
39080 c3/return
39081
39082 emit-indent:
39083
39084 55/push-ebp
39085 89/<- %ebp 4/r32/esp
39086
39087 50/push-eax
39088
39089 8b/-> *(ebp+0xc) 0/r32/eax
39090 {
39091
39092 3d/compare-eax-with 0/imm32
39093 7e/jump-if-<= break/disp8
39094 (write-buffered *(ebp+8) " ")
39095 48/decrement-eax
39096 eb/jump loop/disp8
39097 }
39098 $emit-indent:end:
39099
39100 58/pop-to-eax
39101
39102 89/<- %esp 5/r32/ebp
39103 5d/pop-to-ebp
39104 c3/return
39105
39106 emit-subx-prologue:
39107
39108 55/push-ebp
39109 89/<- %ebp 4/r32/esp
39110
39111 (write-buffered *(ebp+8) " # . prologue\n")
39112 (write-buffered *(ebp+8) " 55/push-ebp\n")
39113 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
39114 $emit-subx-prologue:end:
39115
39116 89/<- %esp 5/r32/ebp
39117 5d/pop-to-ebp
39118 c3/return
39119
39120 emit-subx-epilogue:
39121
39122 55/push-ebp
39123 89/<- %ebp 4/r32/esp
39124
39125 (write-buffered *(ebp+8) " # . epilogue\n")
39126 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
39127 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
39128 (write-buffered *(ebp+8) " c3/return\n")
39129 $emit-subx-epilogue:end:
39130
39131 89/<- %esp 5/r32/ebp
39132 5d/pop-to-ebp
39133 c3/return