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 "grapheme"/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 81 7/subop/compare *ebp 1/imm32
488 7e/jump-if-<= break/disp8
489
490 (kernel-string-equal? *(ebp+8) "test")
491 3d/compare-eax-and 0/imm32/false
492 74/jump-if-= break/disp8
493
494 (run-tests)
495
496 8b/-> *Num-test-failures 3/r32/ebx
497 eb/jump $mu-main:end/disp8
498 }
499
500 (convert-mu Stdin Stdout Stderr 0)
501 (flush Stdout)
502
503 bb/copy-to-ebx 0/imm32
504 $mu-main:end:
505 e8/call syscall_exit/disp32
506
507 convert-mu:
508
509 55/push-ebp
510 89/<- %ebp 4/r32/esp
511
512 50/push-eax
513
514 c7 0/subop/copy *Next-block-index 1/imm32
515 8b/-> *Primitive-type-ids 0/r32/eax
516 89/<- *Type-id 0/r32/eax
517 c7 0/subop/copy *_Program-functions 0/imm32
518 c7 0/subop/copy *_Program-functions->payload 0/imm32
519 c7 0/subop/copy *_Program-types 0/imm32
520 c7 0/subop/copy *_Program-types->payload 0/imm32
521 c7 0/subop/copy *_Program-signatures 0/imm32
522 c7 0/subop/copy *_Program-signatures->payload 0/imm32
523
524 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
525 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
526
527 (check-mu-types *(ebp+0x10) *(ebp+0x14))
528 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
529 $convert-mu:end:
530
531 58/pop-to-eax
532
533 89/<- %esp 5/r32/ebp
534 5d/pop-to-ebp
535 c3/return
536
537 test-convert-empty-input:
538
539
540 55/push-ebp
541 89/<- %ebp 4/r32/esp
542
543 (clear-stream _test-input-stream)
544 (clear-stream $_test-input-buffered-file->buffer)
545 (clear-stream _test-output-stream)
546 (clear-stream $_test-output-buffered-file->buffer)
547
548 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
549 (flush _test-output-buffered-file)
550 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
551
552 89/<- %esp 5/r32/ebp
553 5d/pop-to-ebp
554 c3/return
555
556 test-convert-function-skeleton:
557
558 55/push-ebp
559 89/<- %ebp 4/r32/esp
560
561 (clear-stream _test-input-stream)
562 (clear-stream $_test-input-buffered-file->buffer)
563 (clear-stream _test-output-stream)
564 (clear-stream $_test-output-buffered-file->buffer)
565
566 (write _test-input-stream "fn foo {\n")
567 (write _test-input-stream "}\n")
568
569 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
570 (flush _test-output-buffered-file)
571 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
577
578 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
579 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
580 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
581 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
582 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
583 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
584 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
585 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
586
587 89/<- %esp 5/r32/ebp
588 5d/pop-to-ebp
589 c3/return
590
591 test-convert-multiple-function-skeletons:
592
593 55/push-ebp
594 89/<- %ebp 4/r32/esp
595
596 (clear-stream _test-input-stream)
597 (clear-stream $_test-input-buffered-file->buffer)
598 (clear-stream _test-output-stream)
599 (clear-stream $_test-output-buffered-file->buffer)
600
601 (write _test-input-stream "fn foo {\n")
602 (write _test-input-stream "}\n")
603 (write _test-input-stream "fn bar {\n")
604 (write _test-input-stream "}\n")
605
606 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
607 (flush _test-output-buffered-file)
608 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
614
615 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
616 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
617 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
618 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
619 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
620 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
621 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
622 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
623
624 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
625 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
626 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
627 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
628 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
629 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
630 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
631 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
632
633 89/<- %esp 5/r32/ebp
634 5d/pop-to-ebp
635 c3/return
636
637 test-convert-function-with-arg:
638
639 55/push-ebp
640 89/<- %ebp 4/r32/esp
641
642 (clear-stream _test-input-stream)
643 (clear-stream $_test-input-buffered-file->buffer)
644 (clear-stream _test-output-stream)
645 (clear-stream $_test-output-buffered-file->buffer)
646
647 (write _test-input-stream "fn foo n: int {\n")
648 (write _test-input-stream "}\n")
649
650 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
651 (flush _test-output-buffered-file)
652 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
658
659 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
660 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
661 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
662 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
663 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
664 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
665 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
666 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
667
668 89/<- %esp 5/r32/ebp
669 5d/pop-to-ebp
670 c3/return
671
672 test-function-with-redefined-name:
673
674 55/push-ebp
675 89/<- %ebp 4/r32/esp
676
677 (clear-stream _test-input-stream)
678 (clear-stream $_test-input-buffered-file->buffer)
679 (clear-stream _test-output-stream)
680 (clear-stream $_test-output-buffered-file->buffer)
681 (clear-stream _test-error-stream)
682 (clear-stream $_test-error-buffered-file->buffer)
683
684 68/push 0/imm32
685 68/push 0/imm32
686 89/<- %edx 4/r32/esp
687 (tailor-exit-descriptor %edx 0x10)
688
689 (write _test-input-stream "fn foo {\n")
690 (write _test-input-stream "}\n")
691 (write _test-input-stream "fn foo {\n")
692 (write _test-input-stream "}\n")
693
694 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
695
696
697 89/<- %edx 4/r32/esp
698 (flush _test-output-buffered-file)
699 (flush _test-error-buffered-file)
700 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
706
707 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name: output should be empty")
708 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name: error message")
709
710 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name: exit status")
711
712 81 0/subop/add %esp 8/imm32
713
714 5d/pop-to-ebp
715 c3/return
716
717 test-function-with-redefined-name-2:
718
719 55/push-ebp
720 89/<- %ebp 4/r32/esp
721
722 (clear-stream _test-input-stream)
723 (clear-stream $_test-input-buffered-file->buffer)
724 (clear-stream _test-output-stream)
725 (clear-stream $_test-output-buffered-file->buffer)
726 (clear-stream _test-error-stream)
727 (clear-stream $_test-error-buffered-file->buffer)
728
729 68/push 0/imm32
730 68/push 0/imm32
731 89/<- %edx 4/r32/esp
732 (tailor-exit-descriptor %edx 0x10)
733
734 (write _test-input-stream "fn foo {\n")
735 (write _test-input-stream "}\n")
736 (write _test-input-stream "sig foo\n")
737
738 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
739
740
741 89/<- %edx 4/r32/esp
742 (flush _test-output-buffered-file)
743 (flush _test-error-buffered-file)
744 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
750
751 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-2: output should be empty")
752 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-2: error message")
753
754 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-2: exit status")
755
756 81 0/subop/add %esp 8/imm32
757
758 5d/pop-to-ebp
759 c3/return
760
761 test-function-with-redefined-name-3:
762
763 55/push-ebp
764 89/<- %ebp 4/r32/esp
765
766 (clear-stream _test-input-stream)
767 (clear-stream $_test-input-buffered-file->buffer)
768 (clear-stream _test-output-stream)
769 (clear-stream $_test-output-buffered-file->buffer)
770 (clear-stream _test-error-stream)
771 (clear-stream $_test-error-buffered-file->buffer)
772
773 68/push 0/imm32
774 68/push 0/imm32
775 89/<- %edx 4/r32/esp
776 (tailor-exit-descriptor %edx 0x10)
777
778 (write _test-input-stream "sig foo\n")
779 (write _test-input-stream "fn foo {\n")
780 (write _test-input-stream "}\n")
781
782 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
783
784
785 89/<- %edx 4/r32/esp
786 (flush _test-output-buffered-file)
787 (flush _test-error-buffered-file)
788 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
794
795 (check-stream-equal _test-output-stream "" "F - test-function-with-redefined-name-3: output should be empty")
796 (check-next-stream-line-equal _test-error-stream "fn foo defined more than once" "F - test-function-with-redefined-name-3: error message")
797
798 (check-ints-equal *(edx+4) 2 "F - test-function-with-redefined-name-3: exit status")
799
800 81 0/subop/add %esp 8/imm32
801
802 5d/pop-to-ebp
803 c3/return
804
805 test-function-with-inout-in-register:
806
807 55/push-ebp
808 89/<- %ebp 4/r32/esp
809
810 (clear-stream _test-input-stream)
811 (clear-stream $_test-input-buffered-file->buffer)
812 (clear-stream _test-output-stream)
813 (clear-stream $_test-output-buffered-file->buffer)
814 (clear-stream _test-error-stream)
815 (clear-stream $_test-error-buffered-file->buffer)
816
817 68/push 0/imm32
818 68/push 0/imm32
819 89/<- %edx 4/r32/esp
820 (tailor-exit-descriptor %edx 0x10)
821
822 (write _test-input-stream "fn foo x/eax: int {\n")
823 (write _test-input-stream "}\n")
824
825 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
826
827
828 89/<- %edx 4/r32/esp
829 (flush _test-output-buffered-file)
830 (flush _test-error-buffered-file)
831 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
837
838 (check-stream-equal _test-output-stream "" "F - test-function-with-inout-in-register: output should be empty")
839 (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")
840
841 (check-ints-equal *(edx+4) 2 "F - test-function-with-inout-in-register: exit status")
842
843 81 0/subop/add %esp 8/imm32
844
845 5d/pop-to-ebp
846 c3/return
847
848 test-function-with-addr-output:
849
850 55/push-ebp
851 89/<- %ebp 4/r32/esp
852
853 (clear-stream _test-input-stream)
854 (clear-stream $_test-input-buffered-file->buffer)
855 (clear-stream _test-output-stream)
856 (clear-stream $_test-output-buffered-file->buffer)
857 (clear-stream _test-error-stream)
858 (clear-stream $_test-error-buffered-file->buffer)
859
860 68/push 0/imm32
861 68/push 0/imm32
862 89/<- %edx 4/r32/esp
863 (tailor-exit-descriptor %edx 0x10)
864
865 (write _test-input-stream "fn foo -> _/eax: (addr int) {\n")
866 (write _test-input-stream "}\n")
867
868 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
869
870
871 89/<- %edx 4/r32/esp
872 (flush _test-output-buffered-file)
873 (flush _test-error-buffered-file)
874 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
880
881 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-output: output should be empty")
882 (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")
883
884 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-output: exit status")
885
886 81 0/subop/add %esp 8/imm32
887
888 5d/pop-to-ebp
889 c3/return
890
891 test-function-with-addr-inout:
892
893 55/push-ebp
894 89/<- %ebp 4/r32/esp
895
896 (clear-stream _test-input-stream)
897 (clear-stream $_test-input-buffered-file->buffer)
898 (clear-stream _test-output-stream)
899 (clear-stream $_test-output-buffered-file->buffer)
900 (clear-stream _test-error-stream)
901 (clear-stream $_test-error-buffered-file->buffer)
902
903 68/push 0/imm32
904 68/push 0/imm32
905 89/<- %edx 4/r32/esp
906 (tailor-exit-descriptor %edx 0x10)
907
908 (write _test-input-stream "fn foo a: (addr addr int) {\n")
909 (write _test-input-stream "}\n")
910
911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
912
913
914 89/<- %edx 4/r32/esp
915 (flush _test-output-buffered-file)
916 (flush _test-error-buffered-file)
917 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
923
924 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout: output should be empty")
925 (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")
926
927 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout: exit status")
928
929 81 0/subop/add %esp 8/imm32
930
931 5d/pop-to-ebp
932 c3/return
933
934 test-function-with-addr-inout-2:
935
936 55/push-ebp
937 89/<- %ebp 4/r32/esp
938
939 (clear-stream _test-input-stream)
940 (clear-stream $_test-input-buffered-file->buffer)
941 (clear-stream _test-output-stream)
942 (clear-stream $_test-output-buffered-file->buffer)
943 (clear-stream _test-error-stream)
944 (clear-stream $_test-error-buffered-file->buffer)
945
946 68/push 0/imm32
947 68/push 0/imm32
948 89/<- %edx 4/r32/esp
949 (tailor-exit-descriptor %edx 0x10)
950
951 (write _test-input-stream "fn foo a: (addr array addr int) {\n")
952 (write _test-input-stream "}\n")
953
954 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
955
956
957 89/<- %edx 4/r32/esp
958 (flush _test-output-buffered-file)
959 (flush _test-error-buffered-file)
960 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
966
967 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-2: output should be empty")
968 (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")
969
970 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-2: exit status")
971
972 81 0/subop/add %esp 8/imm32
973
974 5d/pop-to-ebp
975 c3/return
976
977 test-function-with-addr-inout-3:
978
979 55/push-ebp
980 89/<- %ebp 4/r32/esp
981
982 (clear-stream _test-input-stream)
983 (clear-stream $_test-input-buffered-file->buffer)
984 (clear-stream _test-output-stream)
985 (clear-stream $_test-output-buffered-file->buffer)
986 (clear-stream _test-error-stream)
987 (clear-stream $_test-error-buffered-file->buffer)
988
989 68/push 0/imm32
990 68/push 0/imm32
991 89/<- %edx 4/r32/esp
992 (tailor-exit-descriptor %edx 0x10)
993
994 (write _test-input-stream "fn foo a: (addr array (addr int) 3) {\n")
995 (write _test-input-stream "}\n")
996
997 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
998
999
1000 89/<- %edx 4/r32/esp
1001 (flush _test-output-buffered-file)
1002 (flush _test-error-buffered-file)
1003 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1009
1010 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-3: output should be empty")
1011 (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")
1012
1013 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-3: exit status")
1014
1015 81 0/subop/add %esp 8/imm32
1016
1017 5d/pop-to-ebp
1018 c3/return
1019
1020 test-function-with-addr-inout-4:
1021
1022 55/push-ebp
1023 89/<- %ebp 4/r32/esp
1024
1025 (clear-stream _test-input-stream)
1026 (clear-stream $_test-input-buffered-file->buffer)
1027 (clear-stream _test-output-stream)
1028 (clear-stream $_test-output-buffered-file->buffer)
1029 (clear-stream _test-error-stream)
1030 (clear-stream $_test-error-buffered-file->buffer)
1031
1032 68/push 0/imm32
1033 68/push 0/imm32
1034 89/<- %edx 4/r32/esp
1035 (tailor-exit-descriptor %edx 0x10)
1036
1037 (write _test-input-stream "fn foo a: (array (addr int) 3) {\n")
1038 (write _test-input-stream "}\n")
1039
1040 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1041
1042
1043 89/<- %edx 4/r32/esp
1044 (flush _test-output-buffered-file)
1045 (flush _test-error-buffered-file)
1046 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1052
1053 (check-stream-equal _test-output-stream "" "F - test-function-with-addr-inout-4: output should be empty")
1054 (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")
1055
1056 (check-ints-equal *(edx+4) 2 "F - test-function-with-addr-inout-4: exit status")
1057
1058 81 0/subop/add %esp 8/imm32
1059
1060 5d/pop-to-ebp
1061 c3/return
1062
1063
1064 test-function-main-with-addr-inout:
1065
1066 55/push-ebp
1067 89/<- %ebp 4/r32/esp
1068
1069 (clear-stream _test-input-stream)
1070 (clear-stream $_test-input-buffered-file->buffer)
1071 (clear-stream _test-output-stream)
1072 (clear-stream $_test-output-buffered-file->buffer)
1073
1074 (write _test-input-stream "fn main a: (addr addr int) {\n")
1075 (write _test-input-stream "}\n")
1076
1077 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1078 (flush _test-output-buffered-file)
1079
1080
1081 89/<- %esp 5/r32/ebp
1082 5d/pop-to-ebp
1083 c3/return
1084
1085
1086 test-signature-lookup-with-addr-inout:
1087
1088 55/push-ebp
1089 89/<- %ebp 4/r32/esp
1090
1091 (clear-stream _test-input-stream)
1092 (clear-stream $_test-input-buffered-file->buffer)
1093 (clear-stream _test-output-stream)
1094 (clear-stream $_test-output-buffered-file->buffer)
1095
1096 (write _test-input-stream "sig lookup h: (handle _T) -> _/eax: (addr _T)\n")
1097
1098 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1099 (flush _test-output-buffered-file)
1100
1101
1102 89/<- %esp 5/r32/ebp
1103 5d/pop-to-ebp
1104 c3/return
1105
1106 test-convert-function-with-arg-and-body:
1107
1108 55/push-ebp
1109 89/<- %ebp 4/r32/esp
1110
1111 (clear-stream _test-input-stream)
1112 (clear-stream $_test-input-buffered-file->buffer)
1113 (clear-stream _test-output-stream)
1114 (clear-stream $_test-output-buffered-file->buffer)
1115
1116 (write _test-input-stream "fn foo n: int {\n")
1117 (write _test-input-stream " increment n\n")
1118 (write _test-input-stream "}\n")
1119
1120 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1121 (flush _test-output-buffered-file)
1122 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1128
1129 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
1130 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
1131 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
1132 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
1133 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
1134 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
1135 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
1136 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
1137 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
1138 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
1139 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
1140 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
1141 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
1142
1143 89/<- %esp 5/r32/ebp
1144 5d/pop-to-ebp
1145 c3/return
1146
1147 test-convert-function-distinguishes-args:
1148
1149 55/push-ebp
1150 89/<- %ebp 4/r32/esp
1151
1152 (clear-stream _test-input-stream)
1153 (clear-stream $_test-input-buffered-file->buffer)
1154 (clear-stream _test-output-stream)
1155 (clear-stream $_test-output-buffered-file->buffer)
1156
1157 (write _test-input-stream "fn foo a: int, b: int {\n")
1158 (write _test-input-stream " increment b\n")
1159 (write _test-input-stream "}\n")
1160
1161 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1162 (flush _test-output-buffered-file)
1163 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1169
1170 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
1171 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
1172 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
1173 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
1174 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
1175 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
1176 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
1177 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
1178 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
1179 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
1180 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
1181 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
1182 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
1183
1184 89/<- %esp 5/r32/ebp
1185 5d/pop-to-ebp
1186 c3/return
1187
1188 test-convert-function-with-return-literal:
1189
1190 55/push-ebp
1191 89/<- %ebp 4/r32/esp
1192
1193 (clear-stream _test-input-stream)
1194 (clear-stream $_test-input-buffered-file->buffer)
1195 (clear-stream _test-output-stream)
1196 (clear-stream $_test-output-buffered-file->buffer)
1197
1198 (write _test-input-stream "fn foo -> _/eax: int {\n")
1199 (write _test-input-stream " return 0\n")
1200 (write _test-input-stream "}\n")
1201
1202 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1203 (flush _test-output-buffered-file)
1204 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1210
1211 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-literal/0")
1212 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-literal/1")
1213 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-literal/2")
1214 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-literal/3")
1215 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-literal/4")
1216 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-literal/5")
1217 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-literal/6")
1218 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-literal/7")
1219 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-literal/8")
1220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-literal/9")
1221 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-literal/10")
1222 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-literal/11")
1223 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-literal/12")
1224 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-literal/13")
1225
1226 89/<- %esp 5/r32/ebp
1227 5d/pop-to-ebp
1228 c3/return
1229
1230 test-convert-function-with-return:
1231
1232 55/push-ebp
1233 89/<- %ebp 4/r32/esp
1234
1235 (clear-stream _test-input-stream)
1236 (clear-stream $_test-input-buffered-file->buffer)
1237 (clear-stream _test-output-stream)
1238 (clear-stream $_test-output-buffered-file->buffer)
1239
1240 (write _test-input-stream "fn foo -> _/eax: int {\n")
1241 (write _test-input-stream " var y: int\n")
1242 (write _test-input-stream " return y\n")
1243 (write _test-input-stream "}\n")
1244
1245 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1246 (flush _test-output-buffered-file)
1247 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1253
1254 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
1255 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
1256 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
1257 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1258 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1259 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1260 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1261 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-function-with-return/7")
1262 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1263 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1264 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1265 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1266 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1267 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1268 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1269 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1270
1271 89/<- %esp 5/r32/ebp
1272 5d/pop-to-ebp
1273 c3/return
1274
1275 test-convert-function-with-return-float:
1276
1277 55/push-ebp
1278 89/<- %ebp 4/r32/esp
1279
1280 (clear-stream _test-input-stream)
1281 (clear-stream $_test-input-buffered-file->buffer)
1282 (clear-stream _test-output-stream)
1283 (clear-stream $_test-output-buffered-file->buffer)
1284
1285 (write _test-input-stream "fn foo -> _/xmm0: float {\n")
1286 (write _test-input-stream " var y: float\n")
1287 (write _test-input-stream " return y\n")
1288 (write _test-input-stream "}\n")
1289
1290 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1291 (flush _test-output-buffered-file)
1292 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1298
1299 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
1300 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
1301 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
1302 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
1303 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
1304 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
1305 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
1306 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *(ebp+0xfffffffc) 0x00000000/x32" "F - test-convert-function-with-return/7")
1307 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
1308 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
1309 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
1310 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
1311 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
1312 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
1313 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
1314 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
1315
1316 89/<- %esp 5/r32/ebp
1317 5d/pop-to-ebp
1318 c3/return
1319
1320 test-convert-function-with-return-register:
1321
1322 55/push-ebp
1323 89/<- %ebp 4/r32/esp
1324
1325 (clear-stream _test-input-stream)
1326 (clear-stream $_test-input-buffered-file->buffer)
1327 (clear-stream _test-output-stream)
1328 (clear-stream $_test-output-buffered-file->buffer)
1329
1330 (write _test-input-stream "fn foo -> _/eax: int {\n")
1331 (write _test-input-stream " var y/eax: int <- copy 3\n")
1332 (write _test-input-stream " return y\n")
1333 (write _test-input-stream "}\n")
1334
1335 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1336 (flush _test-output-buffered-file)
1337 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1343
1344 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register/0")
1345 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register/1")
1346 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register/2")
1347 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register/3")
1348 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register/4")
1349 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register/5")
1350 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register/6")
1351 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register/7")
1352 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register/8")
1353 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register/9")
1354 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register/10")
1355 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register/11")
1356 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register/12")
1357 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register/13")
1358 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register/14")
1359 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register/15")
1360 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register/16")
1361
1362 89/<- %esp 5/r32/ebp
1363 5d/pop-to-ebp
1364 c3/return
1365
1366 test-function-with-output-without-register:
1367
1368 55/push-ebp
1369 89/<- %ebp 4/r32/esp
1370
1371 (clear-stream _test-input-stream)
1372 (clear-stream $_test-input-buffered-file->buffer)
1373 (clear-stream _test-output-stream)
1374 (clear-stream $_test-output-buffered-file->buffer)
1375 (clear-stream _test-error-stream)
1376 (clear-stream $_test-error-buffered-file->buffer)
1377
1378 68/push 0/imm32
1379 68/push 0/imm32
1380 89/<- %edx 4/r32/esp
1381 (tailor-exit-descriptor %edx 0x10)
1382
1383 (write _test-input-stream "fn foo -> _: int {\n")
1384 (write _test-input-stream "}\n")
1385
1386 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1387
1388
1389 89/<- %edx 4/r32/esp
1390 (flush _test-output-buffered-file)
1391 (flush _test-error-buffered-file)
1392 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1398
1399 (check-stream-equal _test-output-stream "" "F - test-function-with-output-without-register: output should be empty")
1400 (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")
1401
1402 (check-ints-equal *(edx+4) 2 "F - test-function-with-output-without-register: exit status")
1403
1404 81 0/subop/add %esp 8/imm32
1405
1406 5d/pop-to-ebp
1407 c3/return
1408
1409 test-function-with-outputs-in-conflicting-registers:
1410
1411 55/push-ebp
1412 89/<- %ebp 4/r32/esp
1413
1414 (clear-stream _test-input-stream)
1415 (clear-stream $_test-input-buffered-file->buffer)
1416 (clear-stream _test-output-stream)
1417 (clear-stream $_test-output-buffered-file->buffer)
1418 (clear-stream _test-error-stream)
1419 (clear-stream $_test-error-buffered-file->buffer)
1420
1421 68/push 0/imm32
1422 68/push 0/imm32
1423 89/<- %edx 4/r32/esp
1424 (tailor-exit-descriptor %edx 0x10)
1425
1426 (write _test-input-stream "fn foo -> _/eax: int, _/eax: int {\n")
1427 (write _test-input-stream "}\n")
1428
1429 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1430
1431
1432 89/<- %edx 4/r32/esp
1433 (flush _test-output-buffered-file)
1434 (flush _test-error-buffered-file)
1435 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1441
1442 (check-stream-equal _test-output-stream "" "F - test-function-with-outputs-in-conflicting-registers: output should be empty")
1443 (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")
1444
1445 (check-ints-equal *(edx+4) 2 "F - test-function-with-outputs-in-conflicting-registers: exit status")
1446
1447 81 0/subop/add %esp 8/imm32
1448
1449 5d/pop-to-ebp
1450 c3/return
1451
1452 test-function-with-named-output:
1453
1454 55/push-ebp
1455 89/<- %ebp 4/r32/esp
1456
1457 (clear-stream _test-input-stream)
1458 (clear-stream $_test-input-buffered-file->buffer)
1459 (clear-stream _test-output-stream)
1460 (clear-stream $_test-output-buffered-file->buffer)
1461 (clear-stream _test-error-stream)
1462 (clear-stream $_test-error-buffered-file->buffer)
1463
1464 68/push 0/imm32
1465 68/push 0/imm32
1466 89/<- %edx 4/r32/esp
1467 (tailor-exit-descriptor %edx 0x10)
1468
1469 (write _test-input-stream "fn foo -> x/eax: int {\n")
1470 (write _test-input-stream " return 0\n")
1471 (write _test-input-stream "}\n")
1472
1473 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1474
1475
1476 89/<- %edx 4/r32/esp
1477 (flush _test-output-buffered-file)
1478 (flush _test-error-buffered-file)
1479 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1485
1486 (check-stream-equal _test-output-stream "" "F - test-function-with-named-output: output should be empty")
1487 (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")
1488
1489 (check-ints-equal *(edx+4) 2 "F - test-function-with-named-output: exit status")
1490
1491 81 0/subop/add %esp 8/imm32
1492
1493 5d/pop-to-ebp
1494 c3/return
1495
1496 test-return-with-wrong-type:
1497
1498 55/push-ebp
1499 89/<- %ebp 4/r32/esp
1500
1501 (clear-stream _test-input-stream)
1502 (clear-stream $_test-input-buffered-file->buffer)
1503 (clear-stream _test-output-stream)
1504 (clear-stream $_test-output-buffered-file->buffer)
1505 (clear-stream _test-error-stream)
1506 (clear-stream $_test-error-buffered-file->buffer)
1507
1508 68/push 0/imm32
1509 68/push 0/imm32
1510 89/<- %edx 4/r32/esp
1511 (tailor-exit-descriptor %edx 0x10)
1512
1513 (write _test-input-stream "fn foo -> _/eax: int {\n")
1514 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1515 (write _test-input-stream " return x\n")
1516 (write _test-input-stream "}\n")
1517
1518 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1519
1520
1521 89/<- %edx 4/r32/esp
1522 (flush _test-output-buffered-file)
1523 (flush _test-error-buffered-file)
1524 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1530
1531 (check-stream-equal _test-output-stream "" "F - test-return-with-wrong-type: output should be empty")
1532 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' has the wrong type" "F - test-return-with-wrong-type: error message")
1533
1534 (check-ints-equal *(edx+4) 2 "F - test-return-with-wrong-type: exit status")
1535
1536 81 0/subop/add %esp 8/imm32
1537
1538 5d/pop-to-ebp
1539 c3/return
1540
1541 test-missing-return:
1542
1543 55/push-ebp
1544 89/<- %ebp 4/r32/esp
1545
1546 (clear-stream _test-input-stream)
1547 (clear-stream $_test-input-buffered-file->buffer)
1548 (clear-stream _test-output-stream)
1549 (clear-stream $_test-output-buffered-file->buffer)
1550 (clear-stream _test-error-stream)
1551 (clear-stream $_test-error-buffered-file->buffer)
1552
1553 68/push 0/imm32
1554 68/push 0/imm32
1555 89/<- %edx 4/r32/esp
1556 (tailor-exit-descriptor %edx 0x10)
1557
1558 (write _test-input-stream "fn foo -> _/eax: int {\n")
1559 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
1560 (write _test-input-stream "}\n")
1561
1562 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1563
1564
1565 89/<- %edx 4/r32/esp
1566 (flush _test-output-buffered-file)
1567 (flush _test-error-buffered-file)
1568 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1574
1575 (check-stream-equal _test-output-stream "" "F - test-missing-return: output should be empty")
1576 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return: error message")
1577
1578 (check-ints-equal *(edx+4) 2 "F - test-missing-return: exit status")
1579
1580 81 0/subop/add %esp 8/imm32
1581
1582 5d/pop-to-ebp
1583 c3/return
1584
1585 test-missing-return-2:
1586
1587 55/push-ebp
1588 89/<- %ebp 4/r32/esp
1589
1590 (clear-stream _test-input-stream)
1591 (clear-stream $_test-input-buffered-file->buffer)
1592 (clear-stream _test-output-stream)
1593 (clear-stream $_test-output-buffered-file->buffer)
1594 (clear-stream _test-error-stream)
1595 (clear-stream $_test-error-buffered-file->buffer)
1596
1597 68/push 0/imm32
1598 68/push 0/imm32
1599 89/<- %edx 4/r32/esp
1600 (tailor-exit-descriptor %edx 0x10)
1601
1602 (write _test-input-stream "fn foo -> _/eax: int {\n")
1603 (write _test-input-stream "}\n")
1604
1605 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1606
1607
1608 89/<- %edx 4/r32/esp
1609 (flush _test-output-buffered-file)
1610 (flush _test-error-buffered-file)
1611 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1617
1618 (check-stream-equal _test-output-stream "" "F - test-missing-return-2: output should be empty")
1619 (check-next-stream-line-equal _test-error-stream "fn foo: final statement should be a 'return'" "F - test-missing-return-2: error message")
1620
1621 (check-ints-equal *(edx+4) 2 "F - test-missing-return-2: exit status")
1622
1623 81 0/subop/add %esp 8/imm32
1624
1625 5d/pop-to-ebp
1626 c3/return
1627
1628 test-early-exit-without-return:
1629
1630 55/push-ebp
1631 89/<- %ebp 4/r32/esp
1632
1633 (clear-stream _test-input-stream)
1634 (clear-stream $_test-input-buffered-file->buffer)
1635 (clear-stream _test-output-stream)
1636 (clear-stream $_test-output-buffered-file->buffer)
1637 (clear-stream _test-error-stream)
1638 (clear-stream $_test-error-buffered-file->buffer)
1639
1640 68/push 0/imm32
1641 68/push 0/imm32
1642 89/<- %edx 4/r32/esp
1643 (tailor-exit-descriptor %edx 0x10)
1644
1645 (write _test-input-stream "fn foo -> _/eax: int {\n")
1646 (write _test-input-stream " break\n")
1647 (write _test-input-stream " return 0\n")
1648 (write _test-input-stream "}\n")
1649
1650 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1651
1652
1653 89/<- %edx 4/r32/esp
1654 (flush _test-output-buffered-file)
1655 (flush _test-error-buffered-file)
1656 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1662
1663 (check-stream-equal _test-output-stream "" "F - test-early-exit-without-return: output should be empty")
1664 (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")
1665
1666 (check-ints-equal *(edx+4) 2 "F - test-early-exit-without-return: exit status")
1667
1668 81 0/subop/add %esp 8/imm32
1669
1670 5d/pop-to-ebp
1671 c3/return
1672
1673 test-return-with-too-few-inouts:
1674
1675 55/push-ebp
1676 89/<- %ebp 4/r32/esp
1677
1678 (clear-stream _test-input-stream)
1679 (clear-stream $_test-input-buffered-file->buffer)
1680 (clear-stream _test-output-stream)
1681 (clear-stream $_test-output-buffered-file->buffer)
1682 (clear-stream _test-error-stream)
1683 (clear-stream $_test-error-buffered-file->buffer)
1684
1685 68/push 0/imm32
1686 68/push 0/imm32
1687 89/<- %edx 4/r32/esp
1688 (tailor-exit-descriptor %edx 0x10)
1689
1690 (write _test-input-stream "fn foo -> _/eax: int {\n")
1691 (write _test-input-stream " return\n")
1692 (write _test-input-stream "}\n")
1693
1694 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1695
1696
1697 89/<- %edx 4/r32/esp
1698 (flush _test-output-buffered-file)
1699 (flush _test-error-buffered-file)
1700 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1706
1707 (check-stream-equal _test-output-stream "" "F - test-return-with-too-few-inouts: output should be empty")
1708 (check-next-stream-line-equal _test-error-stream "fn foo: return: too few inouts" "F - test-return-with-too-few-inouts: error message")
1709
1710 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-few-inouts: exit status")
1711
1712 81 0/subop/add %esp 8/imm32
1713
1714 5d/pop-to-ebp
1715 c3/return
1716
1717 test-return-with-too-many-inouts:
1718
1719 55/push-ebp
1720 89/<- %ebp 4/r32/esp
1721
1722 (clear-stream _test-input-stream)
1723 (clear-stream $_test-input-buffered-file->buffer)
1724 (clear-stream _test-output-stream)
1725 (clear-stream $_test-output-buffered-file->buffer)
1726 (clear-stream _test-error-stream)
1727 (clear-stream $_test-error-buffered-file->buffer)
1728
1729 68/push 0/imm32
1730 68/push 0/imm32
1731 89/<- %edx 4/r32/esp
1732 (tailor-exit-descriptor %edx 0x10)
1733
1734 (write _test-input-stream "fn foo -> _/eax: int {\n")
1735 (write _test-input-stream " return 0, 0\n")
1736 (write _test-input-stream "}\n")
1737
1738 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1739
1740
1741 89/<- %edx 4/r32/esp
1742 (flush _test-output-buffered-file)
1743 (flush _test-error-buffered-file)
1744 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1750
1751 (check-stream-equal _test-output-stream "" "F - test-return-with-too-many-inouts: output should be empty")
1752 (check-next-stream-line-equal _test-error-stream "fn foo: return: too many inouts" "F - test-return-with-too-many-inouts: error message")
1753
1754 (check-ints-equal *(edx+4) 2 "F - test-return-with-too-many-inouts: exit status")
1755
1756 81 0/subop/add %esp 8/imm32
1757
1758 5d/pop-to-ebp
1759 c3/return
1760
1761 test-return-unavailable-value:
1762
1763 55/push-ebp
1764 89/<- %ebp 4/r32/esp
1765
1766 (clear-stream _test-input-stream)
1767 (clear-stream $_test-input-buffered-file->buffer)
1768 (clear-stream _test-output-stream)
1769 (clear-stream $_test-output-buffered-file->buffer)
1770 (clear-stream _test-error-stream)
1771 (clear-stream $_test-error-buffered-file->buffer)
1772
1773 68/push 0/imm32
1774 68/push 0/imm32
1775 89/<- %edx 4/r32/esp
1776 (tailor-exit-descriptor %edx 0x10)
1777
1778 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1779 (write _test-input-stream " var x/eax: int <- copy 0\n")
1780 (write _test-input-stream " var y/ecx: int <- copy 0\n")
1781 (write _test-input-stream " return y, x\n")
1782 (write _test-input-stream "}\n")
1783
1784 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1785
1786
1787 89/<- %edx 4/r32/esp
1788 (flush _test-output-buffered-file)
1789 (flush _test-error-buffered-file)
1790 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1796
1797 (check-stream-equal _test-output-stream "" "F - test-return-unavailable-value: output should be empty")
1798 (check-next-stream-line-equal _test-error-stream "fn foo: return: 'x' is no longer available" "F - test-return-unavailable-value: error message")
1799
1800 (check-ints-equal *(edx+4) 2 "F - test-return-unavailable-value: exit status")
1801
1802 81 0/subop/add %esp 8/imm32
1803
1804 5d/pop-to-ebp
1805 c3/return
1806
1807 test-return-literal-to-float:
1808
1809 55/push-ebp
1810 89/<- %ebp 4/r32/esp
1811
1812 (clear-stream _test-input-stream)
1813 (clear-stream $_test-input-buffered-file->buffer)
1814 (clear-stream _test-output-stream)
1815 (clear-stream $_test-output-buffered-file->buffer)
1816 (clear-stream _test-error-stream)
1817 (clear-stream $_test-error-buffered-file->buffer)
1818
1819 68/push 0/imm32
1820 68/push 0/imm32
1821 89/<- %edx 4/r32/esp
1822 (tailor-exit-descriptor %edx 0x10)
1823
1824 (write _test-input-stream "fn foo -> _/xmm0: float {\n")
1825 (write _test-input-stream " return 0\n")
1826 (write _test-input-stream "}\n")
1827
1828 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1829
1830
1831 89/<- %edx 4/r32/esp
1832 (flush _test-output-buffered-file)
1833 (flush _test-error-buffered-file)
1834 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1840
1841 (check-stream-equal _test-output-stream "" "F - test-return-literal-to-float: output should be empty")
1842 (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")
1843
1844 (check-ints-equal *(edx+4) 2 "F - test-return-literal-to-float: exit status")
1845
1846 81 0/subop/add %esp 8/imm32
1847
1848 5d/pop-to-ebp
1849 c3/return
1850
1851 test-convert-return-with-duplicate-values:
1852
1853 55/push-ebp
1854 89/<- %ebp 4/r32/esp
1855
1856 (clear-stream _test-input-stream)
1857 (clear-stream $_test-input-buffered-file->buffer)
1858 (clear-stream _test-output-stream)
1859 (clear-stream $_test-output-buffered-file->buffer)
1860
1861 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1862 (write _test-input-stream " var x/eax: int <- copy 0x34\n")
1863 (write _test-input-stream " return x, x\n")
1864 (write _test-input-stream "}\n")
1865
1866 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1867 (flush _test-output-buffered-file)
1868 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1874
1875 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values/0")
1876 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values/1")
1877 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values/2")
1878 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values/3")
1879 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values/4")
1880 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values/5")
1881 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-return-with-duplicate-values/6")
1882 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0x34/imm32" "F - test-convert-return-with-duplicate-values/7")
1883 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-return-with-duplicate-values/8")
1884 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000001/r32" "F - test-convert-return-with-duplicate-values/9")
1885 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values/10")
1886 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values/11")
1887 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values/12")
1888 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values/13")
1889 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values/14")
1890 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values/15")
1891 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values/16")
1892 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values/17")
1893
1894 89/<- %esp 5/r32/ebp
1895 5d/pop-to-ebp
1896 c3/return
1897
1898 test-convert-return-with-duplicate-values-2:
1899
1900 55/push-ebp
1901 89/<- %ebp 4/r32/esp
1902
1903 (clear-stream _test-input-stream)
1904 (clear-stream $_test-input-buffered-file->buffer)
1905 (clear-stream _test-output-stream)
1906 (clear-stream $_test-output-buffered-file->buffer)
1907
1908 (write _test-input-stream "fn foo -> _/eax: int, _/ecx: int {\n")
1909 (write _test-input-stream " var x/ecx: int <- copy 0x34\n")
1910 (write _test-input-stream " return x, x\n")
1911 (write _test-input-stream "}\n")
1912
1913 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1914 (flush _test-output-buffered-file)
1915 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
1921
1922 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-return-with-duplicate-values-2/0")
1923 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-return-with-duplicate-values-2/1")
1924 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-return-with-duplicate-values-2/2")
1925 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-return-with-duplicate-values-2/3")
1926 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-return-with-duplicate-values-2/4")
1927 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-return-with-duplicate-values-2/5")
1928 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-return-with-duplicate-values-2/6")
1929 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0x34/imm32" "F - test-convert-return-with-duplicate-values-2/7")
1930 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-return-with-duplicate-values-2/8")
1931 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000001/r32" "F - test-convert-return-with-duplicate-values-2/9")
1932 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-return-with-duplicate-values-2/10")
1933 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-return-with-duplicate-values-2/11")
1934 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-return-with-duplicate-values-2/12")
1935 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-return-with-duplicate-values-2/13")
1936 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-return-with-duplicate-values-2/14")
1937 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-return-with-duplicate-values-2/15")
1938 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-return-with-duplicate-values-2/16")
1939 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-return-with-duplicate-values-2/17")
1940
1941 89/<- %esp 5/r32/ebp
1942 5d/pop-to-ebp
1943 c3/return
1944
1945 test-stmt-with-unknown-var:
1946
1947 55/push-ebp
1948 89/<- %ebp 4/r32/esp
1949
1950 (clear-stream _test-input-stream)
1951 (clear-stream $_test-input-buffered-file->buffer)
1952 (clear-stream _test-output-stream)
1953 (clear-stream $_test-output-buffered-file->buffer)
1954 (clear-stream _test-error-stream)
1955 (clear-stream $_test-error-buffered-file->buffer)
1956
1957 68/push 0/imm32
1958 68/push 0/imm32
1959 89/<- %edx 4/r32/esp
1960 (tailor-exit-descriptor %edx 0x10)
1961
1962 (write _test-input-stream "fn foo {\n")
1963 (write _test-input-stream " x <- copy 0x34\n")
1964 (write _test-input-stream "}\n")
1965
1966 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1967
1968
1969 89/<- %edx 4/r32/esp
1970 (flush _test-output-buffered-file)
1971 (flush _test-error-buffered-file)
1972 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
1978
1979 (check-stream-equal _test-output-stream "" "F - test-stmt-with-unknown-var: output should be empty")
1980 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-stmt-with-unknown-var: error message")
1981
1982 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-unknown-var: exit status")
1983
1984 81 0/subop/add %esp 8/imm32
1985
1986 5d/pop-to-ebp
1987 c3/return
1988
1989 test-stmt-with-invalid-identifier:
1990
1991 55/push-ebp
1992 89/<- %ebp 4/r32/esp
1993
1994 (clear-stream _test-input-stream)
1995 (clear-stream $_test-input-buffered-file->buffer)
1996 (clear-stream _test-output-stream)
1997 (clear-stream $_test-output-buffered-file->buffer)
1998 (clear-stream _test-error-stream)
1999 (clear-stream $_test-error-buffered-file->buffer)
2000
2001 68/push 0/imm32
2002 68/push 0/imm32
2003 89/<- %edx 4/r32/esp
2004 (tailor-exit-descriptor %edx 0x10)
2005
2006 (write _test-input-stream "fn foo {\n")
2007 (write _test-input-stream " 1 <- copy 0x34\n")
2008 (write _test-input-stream "}\n")
2009
2010 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2011
2012
2013 89/<- %edx 4/r32/esp
2014 (flush _test-output-buffered-file)
2015 (flush _test-error-buffered-file)
2016 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2022
2023 (check-stream-equal _test-output-stream "" "F - test-stmt-with-invalid-identifier: output should be empty")
2024 (check-next-stream-line-equal _test-error-stream "fn foo: invalid identifier '1'" "F - test-stmt-with-invalid-identifier: error message")
2025
2026 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-invalid-identifier: exit status")
2027
2028 81 0/subop/add %esp 8/imm32
2029
2030 5d/pop-to-ebp
2031 c3/return
2032
2033 test-stmt-with-deref-var:
2034
2035 55/push-ebp
2036 89/<- %ebp 4/r32/esp
2037
2038 (clear-stream _test-input-stream)
2039 (clear-stream $_test-input-buffered-file->buffer)
2040 (clear-stream _test-output-stream)
2041 (clear-stream $_test-output-buffered-file->buffer)
2042 (clear-stream _test-error-stream)
2043 (clear-stream $_test-error-buffered-file->buffer)
2044
2045 68/push 0/imm32
2046 68/push 0/imm32
2047 89/<- %edx 4/r32/esp
2048 (tailor-exit-descriptor %edx 0x10)
2049
2050 (write _test-input-stream "fn foo {\n")
2051 (write _test-input-stream " *x <- copy 0x34\n")
2052 (write _test-input-stream "}\n")
2053
2054 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2055
2056
2057 89/<- %edx 4/r32/esp
2058 (flush _test-output-buffered-file)
2059 (flush _test-error-buffered-file)
2060 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2066
2067 (check-stream-equal _test-output-stream "" "F - test-stmt-with-deref-var: output should be empty")
2068 (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")
2069
2070 (check-ints-equal *(edx+4) 2 "F - test-stmt-with-deref-var: exit status")
2071
2072 81 0/subop/add %esp 8/imm32
2073
2074 5d/pop-to-ebp
2075 c3/return
2076
2077 test-convert-function-with-literal-arg:
2078
2079 55/push-ebp
2080 89/<- %ebp 4/r32/esp
2081
2082 (clear-stream _test-input-stream)
2083 (clear-stream $_test-input-buffered-file->buffer)
2084 (clear-stream _test-output-stream)
2085 (clear-stream $_test-output-buffered-file->buffer)
2086
2087 (write _test-input-stream "fn foo a: int, b: int -> _/eax: int {\n")
2088 (write _test-input-stream " var result/eax: int <- copy a\n")
2089 (write _test-input-stream " result <- add 1\n")
2090 (write _test-input-stream " return result\n")
2091 (write _test-input-stream "}\n")
2092
2093 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2094 (flush _test-output-buffered-file)
2095 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2101
2102 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
2103 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
2104 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
2105 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
2106 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
2107 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
2108 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-literal-arg/6")
2109 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/7")
2110 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/8")
2111 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-literal-arg/9")
2112 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg/10")
2113 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg/11")
2114 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/12")
2115 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/13")
2116 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/14")
2117 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/15")
2118 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/16")
2119 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/17")
2120
2121 89/<- %esp 5/r32/ebp
2122 5d/pop-to-ebp
2123 c3/return
2124
2125 test-convert-function-with-literal-arg-2:
2126
2127 55/push-ebp
2128 89/<- %ebp 4/r32/esp
2129
2130 (clear-stream _test-input-stream)
2131 (clear-stream $_test-input-buffered-file->buffer)
2132 (clear-stream _test-output-stream)
2133 (clear-stream $_test-output-buffered-file->buffer)
2134
2135 (write _test-input-stream "fn foo a: int, b: int -> _/ebx: int {\n")
2136 (write _test-input-stream " var result/ebx: int <- copy a\n")
2137 (write _test-input-stream " result <- add 1\n")
2138 (write _test-input-stream " return result\n")
2139 (write _test-input-stream "}\n")
2140
2141 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2142 (flush _test-output-buffered-file)
2143 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2149
2150 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
2151 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
2152 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
2153 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
2154 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
2155 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
2156 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-with-literal-arg-2/6")
2157 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/7")
2158 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/8")
2159 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/9")
2160 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg-2/10")
2161 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg-2/11")
2162 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/12")
2163 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/13")
2164 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/14")
2165 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/15")
2166 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/16")
2167 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/17")
2168
2169 89/<- %esp 5/r32/ebp
2170 5d/pop-to-ebp
2171 c3/return
2172
2173 test-convert-function-call-with-literal-arg:
2174
2175 55/push-ebp
2176 89/<- %ebp 4/r32/esp
2177
2178 (clear-stream _test-input-stream)
2179 (clear-stream $_test-input-buffered-file->buffer)
2180 (clear-stream _test-output-stream)
2181 (clear-stream $_test-output-buffered-file->buffer)
2182
2183 (write _test-input-stream "fn main -> _/ebx: int {\n")
2184 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2185 (write _test-input-stream " return result\n")
2186 (write _test-input-stream "}\n")
2187 (write _test-input-stream "fn do-add a: int, b: int -> _/eax: int {\n")
2188 (write _test-input-stream " var result/eax: int <- copy a\n")
2189 (write _test-input-stream " result <- add b\n")
2190 (write _test-input-stream " return result\n")
2191 (write _test-input-stream "}\n")
2192
2193 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2194 (flush _test-output-buffered-file)
2195 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2201
2202 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
2203 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
2204 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
2205 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
2206 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
2207 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
2208 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2209 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/7")
2210 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2211 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2212 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2213 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/11")
2214 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/12")
2215 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/13")
2216 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/14")
2217 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/15")
2218 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/16")
2219 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/17")
2220 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/18")
2221 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/19")
2222 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/20")
2223 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/21")
2224 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/22")
2225 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/23")
2226 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/24")
2227 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/25")
2228 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/26")
2229 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
2230 (check-next-stream-line-equal _test-output-stream " e9/jump $do-add:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/28")
2231 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/29")
2232 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/30")
2233 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/31")
2234 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/32")
2235 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/33")
2236 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/34")
2237
2238 89/<- %esp 5/r32/ebp
2239 5d/pop-to-ebp
2240 c3/return
2241
2242 test-convert-function-call-with-literal-string-arg:
2243
2244 55/push-ebp
2245 89/<- %ebp 4/r32/esp
2246
2247 (clear-stream _test-input-stream)
2248 (clear-stream $_test-input-buffered-file->buffer)
2249 (clear-stream _test-output-stream)
2250 (clear-stream $_test-output-buffered-file->buffer)
2251
2252 (write _test-input-stream "fn foo {\n")
2253 (write _test-input-stream " string-func \"abc\"\n")
2254 (write _test-input-stream "}\n")
2255 (write _test-input-stream "sig string-func in: (addr array byte)\n")
2256
2257 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2258
2259
2260
2261 89/<- %esp 5/r32/ebp
2262 5d/pop-to-ebp
2263 c3/return
2264
2265 test-convert-function-call-with-null-addr:
2266
2267 55/push-ebp
2268 89/<- %ebp 4/r32/esp
2269
2270 (clear-stream _test-input-stream)
2271 (clear-stream $_test-input-buffered-file->buffer)
2272 (clear-stream _test-output-stream)
2273 (clear-stream $_test-output-buffered-file->buffer)
2274
2275 (write _test-input-stream "fn foo {\n")
2276 (write _test-input-stream " bar 0\n")
2277 (write _test-input-stream "}\n")
2278 (write _test-input-stream "sig bar in: (addr int)\n")
2279
2280 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2281
2282
2283
2284 89/<- %esp 5/r32/ebp
2285 5d/pop-to-ebp
2286 c3/return
2287
2288 test-convert-function-call-with-signature:
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 main -> _/ebx: int {\n")
2299 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
2300 (write _test-input-stream " return result\n")
2301 (write _test-input-stream "}\n")
2302 (write _test-input-stream "sig do-add a: int, b: int -> _/eax: int\n")
2303
2304 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2305 (flush _test-output-buffered-file)
2306 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2312
2313 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
2314 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
2315 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
2316 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
2317 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
2318 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
2319 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
2320 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
2321 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
2322 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
2323 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
2324 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
2325 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
2326 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
2327 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
2328 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
2329 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
2330
2331 89/<- %esp 5/r32/ebp
2332 5d/pop-to-ebp
2333 c3/return
2334
2335 test-convert-function-with-local-var-in-mem:
2336
2337 55/push-ebp
2338 89/<- %ebp 4/r32/esp
2339
2340 (clear-stream _test-input-stream)
2341 (clear-stream $_test-input-buffered-file->buffer)
2342 (clear-stream _test-output-stream)
2343 (clear-stream $_test-output-buffered-file->buffer)
2344
2345 (write _test-input-stream "fn foo {\n")
2346 (write _test-input-stream " var x: int\n")
2347 (write _test-input-stream " increment x\n")
2348 (write _test-input-stream "}\n")
2349
2350 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2351 (flush _test-output-buffered-file)
2352 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2358
2359 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
2360 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
2361 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
2362 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
2363 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
2364 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
2365 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
2366 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
2367 (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")
2368 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
2369 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
2370 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
2371 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
2372 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
2373 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
2374
2375 89/<- %esp 5/r32/ebp
2376 5d/pop-to-ebp
2377 c3/return
2378
2379 test-convert-invalid-literal:
2380
2381 55/push-ebp
2382 89/<- %ebp 4/r32/esp
2383
2384 (clear-stream _test-input-stream)
2385 (clear-stream $_test-input-buffered-file->buffer)
2386 (clear-stream _test-output-stream)
2387 (clear-stream $_test-output-buffered-file->buffer)
2388 (clear-stream _test-error-stream)
2389 (clear-stream $_test-error-buffered-file->buffer)
2390
2391 68/push 0/imm32
2392 68/push 0/imm32
2393 89/<- %edx 4/r32/esp
2394 (tailor-exit-descriptor %edx 0x10)
2395
2396 (write _test-input-stream "fn foo {\n")
2397 (write _test-input-stream " increment 1n\n")
2398 (write _test-input-stream "}\n")
2399
2400 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2401
2402
2403 89/<- %edx 4/r32/esp
2404 (flush _test-output-buffered-file)
2405 (flush _test-error-buffered-file)
2406 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2412
2413 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-literal: output should be empty")
2414 (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")
2415
2416 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-literal: exit status")
2417
2418 81 0/subop/add %esp 8/imm32
2419
2420 5d/pop-to-ebp
2421 c3/return
2422
2423 test-convert-valid-literal-with-metadata:
2424
2425 55/push-ebp
2426 89/<- %ebp 4/r32/esp
2427
2428 (clear-stream _test-input-stream)
2429 (clear-stream $_test-input-buffered-file->buffer)
2430 (clear-stream _test-output-stream)
2431 (clear-stream $_test-output-buffered-file->buffer)
2432
2433 (write _test-input-stream "fn foo {\n")
2434 (write _test-input-stream " var x/eax: int <- copy 1/abc\n")
2435 (write _test-input-stream "}\n")
2436
2437 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2438 (flush _test-output-buffered-file)
2439 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2445
2446
2447 89/<- %esp 5/r32/ebp
2448 5d/pop-to-ebp
2449 c3/return
2450
2451 test-local-var-in-mem-has-no-initializer:
2452
2453 55/push-ebp
2454 89/<- %ebp 4/r32/esp
2455
2456 (clear-stream _test-input-stream)
2457 (clear-stream $_test-input-buffered-file->buffer)
2458 (clear-stream _test-output-stream)
2459 (clear-stream $_test-output-buffered-file->buffer)
2460 (clear-stream _test-error-stream)
2461 (clear-stream $_test-error-buffered-file->buffer)
2462
2463 68/push 0/imm32
2464 68/push 0/imm32
2465 89/<- %edx 4/r32/esp
2466 (tailor-exit-descriptor %edx 0x10)
2467
2468 (write _test-input-stream "fn foo {\n")
2469 (write _test-input-stream " var x: int <- copy 0\n")
2470 (write _test-input-stream " increment x\n")
2471 (write _test-input-stream "}\n")
2472
2473 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2474
2475
2476 89/<- %edx 4/r32/esp
2477 (flush _test-output-buffered-file)
2478 (flush _test-error-buffered-file)
2479 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2485
2486 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
2487 (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")
2488
2489 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
2490
2491 81 0/subop/add %esp 8/imm32
2492
2493 5d/pop-to-ebp
2494 c3/return
2495
2496 test-convert-function-with-local-var-with-compound-type-in-mem:
2497
2498 55/push-ebp
2499 89/<- %ebp 4/r32/esp
2500
2501 (clear-stream _test-input-stream)
2502 (clear-stream $_test-input-buffered-file->buffer)
2503 (clear-stream _test-output-stream)
2504 (clear-stream $_test-output-buffered-file->buffer)
2505
2506 (write _test-input-stream "fn foo {\n")
2507 (write _test-input-stream " var x: (addr int)\n")
2508 (write _test-input-stream " copy-to x, 0\n")
2509 (write _test-input-stream "}\n")
2510
2511 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2512 (flush _test-output-buffered-file)
2513 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2519
2520 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
2521 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
2522 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
2523 (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")
2524 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
2525 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
2526 (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")
2527 (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")
2528 (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")
2529 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
2530 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
2531 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
2532 (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")
2533 (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")
2534 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
2535
2536 89/<- %esp 5/r32/ebp
2537 5d/pop-to-ebp
2538 c3/return
2539
2540 test-convert-function-with-local-var-in-reg:
2541
2542 55/push-ebp
2543 89/<- %ebp 4/r32/esp
2544
2545 (clear-stream _test-input-stream)
2546 (clear-stream $_test-input-buffered-file->buffer)
2547 (clear-stream _test-output-stream)
2548 (clear-stream $_test-output-buffered-file->buffer)
2549
2550 (write _test-input-stream "fn foo {\n")
2551 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2552 (write _test-input-stream " x <- increment\n")
2553 (write _test-input-stream "}\n")
2554
2555 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2556 (flush _test-output-buffered-file)
2557 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2563
2564 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
2565 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
2566 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
2567 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
2568 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
2569 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
2570 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
2571 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
2572 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
2573 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
2574 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
2575 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
2576 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
2577 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
2578 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
2579 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
2580
2581 89/<- %esp 5/r32/ebp
2582 5d/pop-to-ebp
2583 c3/return
2584
2585 test-convert-function-with-local-var-in-same-reg:
2586
2587 55/push-ebp
2588 89/<- %ebp 4/r32/esp
2589
2590 (clear-stream _test-input-stream)
2591 (clear-stream $_test-input-buffered-file->buffer)
2592 (clear-stream _test-output-stream)
2593 (clear-stream $_test-output-buffered-file->buffer)
2594
2595 (write _test-input-stream "fn foo {\n")
2596 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2597 (write _test-input-stream " var y/ecx: int <- copy x\n")
2598 (write _test-input-stream "}\n")
2599
2600 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2601 (flush _test-output-buffered-file)
2602 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2608
2609 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-same-reg/0")
2610 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-same-reg/1")
2611 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-same-reg/2")
2612 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-same-reg/3")
2613 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-same-reg/4")
2614 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-same-reg/5")
2615 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-same-reg/6")
2616 (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")
2617
2618 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-same-reg/8")
2619 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-same-reg/9")
2620 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-same-reg/10")
2621 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-same-reg/11")
2622 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-same-reg/12")
2623 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-same-reg/13")
2624 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-same-reg/14")
2625
2626 89/<- %esp 5/r32/ebp
2627 5d/pop-to-ebp
2628 c3/return
2629
2630 test-convert-function-with-local-var-in-same-reg-dereferenced:
2631
2632 55/push-ebp
2633 89/<- %ebp 4/r32/esp
2634
2635 (clear-stream _test-input-stream)
2636 (clear-stream $_test-input-buffered-file->buffer)
2637 (clear-stream _test-output-stream)
2638 (clear-stream $_test-output-buffered-file->buffer)
2639
2640 (write _test-input-stream "fn foo {\n")
2641 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
2642 (write _test-input-stream " var y/ecx: int <- copy *x\n")
2643 (write _test-input-stream "}\n")
2644
2645 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2646 (flush _test-output-buffered-file)
2647 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2653
2654 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/0")
2655 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/1")
2656 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/2")
2657 (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")
2658 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/4")
2659 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/5")
2660 (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")
2661 (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")
2662 (check-next-stream-line-equal _test-output-stream " 8b/-> *ecx 0x00000001/r32" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/8")
2663 (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")
2664 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/10")
2665 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/11")
2666 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/12")
2667 (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")
2668 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/14")
2669 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-same-reg-dereferenced/15")
2670
2671 89/<- %esp 5/r32/ebp
2672 5d/pop-to-ebp
2673 c3/return
2674
2675 test-float-var-in-wrong-register:
2676
2677 55/push-ebp
2678 89/<- %ebp 4/r32/esp
2679
2680 (clear-stream _test-input-stream)
2681 (clear-stream $_test-input-buffered-file->buffer)
2682 (clear-stream _test-output-stream)
2683 (clear-stream $_test-output-buffered-file->buffer)
2684 (clear-stream _test-error-stream)
2685 (clear-stream $_test-error-buffered-file->buffer)
2686
2687 68/push 0/imm32
2688 68/push 0/imm32
2689 89/<- %edx 4/r32/esp
2690 (tailor-exit-descriptor %edx 0x10)
2691
2692 (write _test-input-stream "fn foo {\n")
2693 (write _test-input-stream " var x/eax: int <- copy 0\n")
2694 (write _test-input-stream " var y/eax: float <- convert x\n")
2695 (write _test-input-stream "}\n")
2696
2697 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2698
2699
2700 89/<- %edx 4/r32/esp
2701 (flush _test-output-buffered-file)
2702 (flush _test-error-buffered-file)
2703 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2709
2710 (check-stream-equal _test-output-stream "" "F - test-float-var-in-wrong-register: output should be empty")
2711 (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")
2712
2713 (check-ints-equal *(edx+4) 2 "F - test-float-var-in-wrong-register: exit status")
2714
2715 81 0/subop/add %esp 8/imm32
2716
2717 5d/pop-to-ebp
2718 c3/return
2719
2720 test-non-float-var-in-wrong-register:
2721
2722 55/push-ebp
2723 89/<- %ebp 4/r32/esp
2724
2725 (clear-stream _test-input-stream)
2726 (clear-stream $_test-input-buffered-file->buffer)
2727 (clear-stream _test-output-stream)
2728 (clear-stream $_test-output-buffered-file->buffer)
2729 (clear-stream _test-error-stream)
2730 (clear-stream $_test-error-buffered-file->buffer)
2731
2732 68/push 0/imm32
2733 68/push 0/imm32
2734 89/<- %edx 4/r32/esp
2735 (tailor-exit-descriptor %edx 0x10)
2736
2737 (write _test-input-stream "fn foo {\n")
2738 (write _test-input-stream " var x/xmm5: int <- copy 0\n")
2739 (write _test-input-stream "}\n")
2740
2741 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2742
2743
2744 89/<- %edx 4/r32/esp
2745 (flush _test-output-buffered-file)
2746 (flush _test-error-buffered-file)
2747 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2753
2754 (check-stream-equal _test-output-stream "" "F - test-non-float-var-in-wrong-register: output should be empty")
2755 (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")
2756
2757 (check-ints-equal *(edx+4) 2 "F - test-non-float-var-in-wrong-register: exit status")
2758
2759 81 0/subop/add %esp 8/imm32
2760
2761 5d/pop-to-ebp
2762 c3/return
2763
2764 test-convert-function-with-allocate:
2765
2766 55/push-ebp
2767 89/<- %ebp 4/r32/esp
2768
2769 (clear-stream _test-input-stream)
2770 (clear-stream $_test-input-buffered-file->buffer)
2771 (clear-stream _test-output-stream)
2772 (clear-stream $_test-output-buffered-file->buffer)
2773
2774 (write _test-input-stream "fn foo {\n")
2775 (write _test-input-stream " var x/ecx: (addr handle int) <- copy 0\n")
2776 (write _test-input-stream " allocate x\n")
2777 (write _test-input-stream "}\n")
2778
2779 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2780 (flush _test-output-buffered-file)
2781 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2787
2788 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-allocate/0")
2789 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-allocate/1")
2790 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-allocate/2")
2791 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-allocate/3")
2792 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-allocate/4")
2793 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-allocate/5")
2794 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-allocate/6")
2795 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-allocate/7")
2796 (check-next-stream-line-equal _test-output-stream " (allocate Heap 0x00000004 %ecx)" "F - test-convert-function-with-allocate/8")
2797 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-allocate/9")
2798 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-allocate/10")
2799 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-allocate/11")
2800 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-allocate/12")
2801 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-allocate/13")
2802 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-allocate/14")
2803 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-allocate/15")
2804
2805 89/<- %esp 5/r32/ebp
2806 5d/pop-to-ebp
2807 c3/return
2808
2809 test-initializer-in-hex:
2810
2811 55/push-ebp
2812 89/<- %ebp 4/r32/esp
2813
2814 (clear-stream _test-input-stream)
2815 (clear-stream $_test-input-buffered-file->buffer)
2816 (clear-stream _test-output-stream)
2817 (clear-stream $_test-output-buffered-file->buffer)
2818 (clear-stream _test-error-stream)
2819 (clear-stream $_test-error-buffered-file->buffer)
2820
2821 68/push 0/imm32
2822 68/push 0/imm32
2823 89/<- %edx 4/r32/esp
2824 (tailor-exit-descriptor %edx 0x10)
2825
2826 (write _test-input-stream "fn foo {\n")
2827 (write _test-input-stream " var x/ecx: int <- copy 10\n")
2828 (write _test-input-stream "}\n")
2829
2830 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2831
2832
2833 89/<- %edx 4/r32/esp
2834 (flush _test-output-buffered-file)
2835 (flush _test-error-buffered-file)
2836 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2842
2843 (check-stream-equal _test-output-stream "" "F - test-initializer-in-hex: output should be empty")
2844 (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")
2845
2846 (check-ints-equal *(edx+4) 2 "F - test-initializer-in-hex: exit status")
2847
2848 81 0/subop/add %esp 8/imm32
2849
2850 5d/pop-to-ebp
2851 c3/return
2852
2853 test-convert-function-with-second-local-var-in-same-reg:
2854
2855 55/push-ebp
2856 89/<- %ebp 4/r32/esp
2857
2858 (clear-stream _test-input-stream)
2859 (clear-stream $_test-input-buffered-file->buffer)
2860 (clear-stream _test-output-stream)
2861 (clear-stream $_test-output-buffered-file->buffer)
2862
2863 (write _test-input-stream "fn foo {\n")
2864 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2865 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2866 (write _test-input-stream " y <- increment\n")
2867 (write _test-input-stream "}\n")
2868
2869 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2870 (flush _test-output-buffered-file)
2871 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
2877
2878 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
2879 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
2880 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
2881 (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")
2882 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
2883 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
2884 (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")
2885 (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")
2886 (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")
2887 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
2888 (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")
2889 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
2890 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
2891 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
2892 (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")
2893 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
2894 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
2895
2896 89/<- %esp 5/r32/ebp
2897 5d/pop-to-ebp
2898 c3/return
2899
2900 test-read-clobbered-reg-var:
2901
2902 55/push-ebp
2903 89/<- %ebp 4/r32/esp
2904
2905 (clear-stream _test-input-stream)
2906 (clear-stream $_test-input-buffered-file->buffer)
2907 (clear-stream _test-output-stream)
2908 (clear-stream $_test-output-buffered-file->buffer)
2909 (clear-stream _test-error-stream)
2910 (clear-stream $_test-error-buffered-file->buffer)
2911
2912 68/push 0/imm32
2913 68/push 0/imm32
2914 89/<- %edx 4/r32/esp
2915 (tailor-exit-descriptor %edx 0x10)
2916
2917 (write _test-input-stream "fn foo {\n")
2918 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2919 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2920 (write _test-input-stream " x <- increment\n")
2921 (write _test-input-stream "}\n")
2922
2923 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2924
2925
2926 89/<- %edx 4/r32/esp
2927 (flush _test-output-buffered-file)
2928 (flush _test-error-buffered-file)
2929 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2935
2936 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
2937 (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")
2938
2939 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
2940
2941 81 0/subop/add %esp 8/imm32
2942
2943 5d/pop-to-ebp
2944 c3/return
2945
2946 test-overlapping-int-fp-registers:
2947
2948 55/push-ebp
2949 89/<- %ebp 4/r32/esp
2950
2951 (clear-stream _test-input-stream)
2952 (clear-stream $_test-input-buffered-file->buffer)
2953 (clear-stream _test-output-stream)
2954 (clear-stream $_test-output-buffered-file->buffer)
2955 (clear-stream _test-error-stream)
2956 (clear-stream $_test-error-buffered-file->buffer)
2957
2958 68/push 0/imm32
2959 68/push 0/imm32
2960 89/<- %edx 4/r32/esp
2961 (tailor-exit-descriptor %edx 0x10)
2962
2963 (write _test-input-stream "fn foo {\n")
2964 (write _test-input-stream " var x/eax: int <- copy 3\n")
2965 (write _test-input-stream " var y/xmm0: float <- convert x\n")
2966 (write _test-input-stream " x <- increment\n")
2967 (write _test-input-stream "}\n")
2968
2969 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2970
2971
2972 89/<- %edx 4/r32/esp
2973 (flush _test-output-buffered-file)
2974 (flush _test-error-buffered-file)
2975 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
2981
2982 (check-next-stream-line-equal _test-error-stream "" "F - test-overlapping-int-fp-registers: error message")
2983
2984
2985 81 0/subop/add %esp 8/imm32
2986
2987 5d/pop-to-ebp
2988 c3/return
2989
2990 test-convert-function-call:
2991
2992 55/push-ebp
2993 89/<- %ebp 4/r32/esp
2994
2995 (clear-stream _test-input-stream)
2996 (clear-stream $_test-input-buffered-file->buffer)
2997 (clear-stream _test-output-stream)
2998 (clear-stream $_test-output-buffered-file->buffer)
2999
3000 (write _test-input-stream "fn main -> _/ebx: int {\n")
3001 (write _test-input-stream " var result/ebx: int <- foo\n")
3002 (write _test-input-stream " return result\n")
3003 (write _test-input-stream "}\n")
3004 (write _test-input-stream "fn foo -> _/ebx: int {\n")
3005 (write _test-input-stream " var result/ebx: int <- copy 3\n")
3006 (write _test-input-stream " return result\n")
3007 (write _test-input-stream "}\n")
3008
3009 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3010 (flush _test-output-buffered-file)
3011 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3017
3018 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
3019 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
3020 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
3021 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
3022 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
3023 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
3024 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
3025 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
3026 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
3027 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
3028 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
3029 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
3030 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
3031 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
3032 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
3033 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
3034 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
3035 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
3036 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
3037 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
3038 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
3039 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
3040 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
3041 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
3042 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
3043 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
3044 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
3045 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
3046 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
3047 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
3048 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
3049 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
3050 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
3051 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
3052
3053 89/<- %esp 5/r32/ebp
3054 5d/pop-to-ebp
3055 c3/return
3056
3057 test-convert-function-call-with-inout-with-compound-type:
3058
3059 55/push-ebp
3060 89/<- %ebp 4/r32/esp
3061
3062 (clear-stream _test-input-stream)
3063 (clear-stream $_test-input-buffered-file->buffer)
3064 (clear-stream _test-output-stream)
3065 (clear-stream $_test-output-buffered-file->buffer)
3066
3067 (write _test-input-stream "fn f {\n")
3068 (write _test-input-stream " var x: (addr int)\n")
3069 (write _test-input-stream " g x\n")
3070 (write _test-input-stream "}\n")
3071 (write _test-input-stream "fn g a: (addr int) {\n")
3072 (write _test-input-stream "}\n")
3073
3074 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3075 (flush _test-output-buffered-file)
3076 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3082
3083 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-inout-with-compound-type/0")
3084 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/1")
3085 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/2")
3086 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/3")
3087 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-inout-with-compound-type/4")
3088 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-inout-with-compound-type/5")
3089 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-inout-with-compound-type/6")
3090 (check-next-stream-line-equal _test-output-stream " (g *(ebp+0xfffffffc))" "F - test-convert-function-call-with-inout-with-compound-type/7")
3091 (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")
3092 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-inout-with-compound-type/9")
3093 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-inout-with-compound-type/10")
3094 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/11")
3095 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/12")
3096 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/13")
3097 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/14")
3098 (check-next-stream-line-equal _test-output-stream "g:" "F - test-convert-function-call-with-inout-with-compound-type/15")
3099 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/16")
3100 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/17")
3101 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/18")
3102 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/19")
3103 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/20")
3104 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/21")
3105 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/22")
3106
3107 89/<- %esp 5/r32/ebp
3108 5d/pop-to-ebp
3109 c3/return
3110
3111 test-convert-function-call-with-inout-with-type-parameter:
3112
3113 55/push-ebp
3114 89/<- %ebp 4/r32/esp
3115
3116 (clear-stream _test-input-stream)
3117 (clear-stream $_test-input-buffered-file->buffer)
3118 (clear-stream _test-output-stream)
3119 (clear-stream $_test-output-buffered-file->buffer)
3120 (clear-stream _test-error-stream)
3121 (clear-stream $_test-error-buffered-file->buffer)
3122
3123 68/push 0/imm32
3124 68/push 0/imm32
3125 89/<- %edx 4/r32/esp
3126 (tailor-exit-descriptor %edx 0x10)
3127
3128 (write _test-input-stream "fn f {\n")
3129 (write _test-input-stream " var x: (addr int)\n")
3130 (write _test-input-stream " g x\n")
3131 (write _test-input-stream "}\n")
3132 (write _test-input-stream "fn g a: (addr _) {\n")
3133 (write _test-input-stream "}\n")
3134
3135 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3136
3137
3138 89/<- %edx 4/r32/esp
3139 (flush _test-output-buffered-file)
3140 (flush _test-error-buffered-file)
3141 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3147
3148 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-type-parameter: error stream should be empty")
3149
3150
3151 81 0/subop/add %esp 8/imm32
3152
3153 5d/pop-to-ebp
3154 c3/return
3155
3156 test-convert-function-call-with-incorrect-inout-type:
3157
3158 55/push-ebp
3159 89/<- %ebp 4/r32/esp
3160
3161 (clear-stream _test-input-stream)
3162 (clear-stream $_test-input-buffered-file->buffer)
3163 (clear-stream _test-output-stream)
3164 (clear-stream $_test-output-buffered-file->buffer)
3165 (clear-stream _test-error-stream)
3166 (clear-stream $_test-error-buffered-file->buffer)
3167
3168 68/push 0/imm32
3169 68/push 0/imm32
3170 89/<- %edx 4/r32/esp
3171 (tailor-exit-descriptor %edx 0x10)
3172
3173 (write _test-input-stream "fn f {\n")
3174 (write _test-input-stream " var x: int\n")
3175 (write _test-input-stream " g x\n")
3176 (write _test-input-stream "}\n")
3177 (write _test-input-stream "fn g a: foo {\n")
3178 (write _test-input-stream "}\n")
3179
3180 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3181
3182
3183 89/<- %edx 4/r32/esp
3184 (flush _test-output-buffered-file)
3185 (flush _test-error-buffered-file)
3186 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3192
3193 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
3194 (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")
3195
3196 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
3197
3198 81 0/subop/add %esp 8/imm32
3199 5d/pop-to-ebp
3200 c3/return
3201
3202 test-convert-function-call-with-inout-with-incorrect-compound-type:
3203
3204 55/push-ebp
3205 89/<- %ebp 4/r32/esp
3206
3207 (clear-stream _test-input-stream)
3208 (clear-stream $_test-input-buffered-file->buffer)
3209 (clear-stream _test-output-stream)
3210 (clear-stream $_test-output-buffered-file->buffer)
3211 (clear-stream _test-error-stream)
3212 (clear-stream $_test-error-buffered-file->buffer)
3213
3214 68/push 0/imm32
3215 68/push 0/imm32
3216 89/<- %edx 4/r32/esp
3217 (tailor-exit-descriptor %edx 0x10)
3218
3219 (write _test-input-stream "fn f {\n")
3220 (write _test-input-stream " var x: (addr int)\n")
3221 (write _test-input-stream " g x\n")
3222 (write _test-input-stream "}\n")
3223 (write _test-input-stream "fn g a: (addr bool) {\n")
3224 (write _test-input-stream "}\n")
3225
3226 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3227
3228
3229 89/<- %edx 4/r32/esp
3230 (flush _test-output-buffered-file)
3231 (flush _test-error-buffered-file)
3232 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3238
3239 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: output should be empty")
3240 (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")
3241
3242 81 0/subop/add %esp 8/imm32
3243
3244 5d/pop-to-ebp
3245 c3/return
3246
3247 test-convert-function-call-with-inout-with-multiple-type-parameters:
3248
3249 55/push-ebp
3250 89/<- %ebp 4/r32/esp
3251
3252 (clear-stream _test-input-stream)
3253 (clear-stream $_test-input-buffered-file->buffer)
3254 (clear-stream _test-output-stream)
3255 (clear-stream $_test-output-buffered-file->buffer)
3256 (clear-stream _test-error-stream)
3257 (clear-stream $_test-error-buffered-file->buffer)
3258
3259 68/push 0/imm32
3260 68/push 0/imm32
3261 89/<- %edx 4/r32/esp
3262 (tailor-exit-descriptor %edx 0x10)
3263
3264 (write _test-input-stream "fn f {\n")
3265 (write _test-input-stream " var x: (addr int)\n")
3266 (write _test-input-stream " var y: (addr int)\n")
3267 (write _test-input-stream " g x, y\n")
3268 (write _test-input-stream "}\n")
3269 (write _test-input-stream "fn g a: (addr _), b: (addr _) {\n")
3270 (write _test-input-stream "}\n")
3271
3272 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3273
3274
3275 89/<- %edx 4/r32/esp
3276 (flush _test-output-buffered-file)
3277 (flush _test-error-buffered-file)
3278 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3284
3285 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-multiple-type-parameters: error stream should be empty")
3286
3287
3288 81 0/subop/add %esp 8/imm32
3289
3290 5d/pop-to-ebp
3291 c3/return
3292
3293 test-type-parameter-matches-rest-of-type:
3294
3295 55/push-ebp
3296 89/<- %ebp 4/r32/esp
3297
3298 (clear-stream _test-input-stream)
3299 (clear-stream $_test-input-buffered-file->buffer)
3300 (clear-stream _test-output-stream)
3301 (clear-stream $_test-output-buffered-file->buffer)
3302 (clear-stream _test-error-stream)
3303 (clear-stream $_test-error-buffered-file->buffer)
3304
3305 68/push 0/imm32
3306 68/push 0/imm32
3307 89/<- %edx 4/r32/esp
3308 (tailor-exit-descriptor %edx 0x10)
3309
3310 (write _test-input-stream "fn f {\n")
3311 (write _test-input-stream " var x: (addr array int)\n")
3312 (write _test-input-stream " g x\n")
3313 (write _test-input-stream "}\n")
3314 (write _test-input-stream "fn g a: (addr _) {\n")
3315 (write _test-input-stream "}\n")
3316
3317 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3318
3319
3320 89/<- %edx 4/r32/esp
3321 (flush _test-output-buffered-file)
3322 (flush _test-error-buffered-file)
3323 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3329
3330 (check-stream-equal _test-error-stream "" "F - test-type-parameter-matches-rest-of-type: error stream should be empty")
3331
3332
3333 81 0/subop/add %esp 8/imm32
3334
3335 5d/pop-to-ebp
3336 c3/return
3337
3338 test-convert-function-call-with-inout-with-incompatible-type-parameters:
3339
3340 55/push-ebp
3341 89/<- %ebp 4/r32/esp
3342
3343 (clear-stream _test-input-stream)
3344 (clear-stream $_test-input-buffered-file->buffer)
3345 (clear-stream _test-output-stream)
3346 (clear-stream $_test-output-buffered-file->buffer)
3347 (clear-stream _test-error-stream)
3348 (clear-stream $_test-error-buffered-file->buffer)
3349
3350 68/push 0/imm32
3351 68/push 0/imm32
3352 89/<- %edx 4/r32/esp
3353 (tailor-exit-descriptor %edx 0x10)
3354
3355 (write _test-input-stream "fn f {\n")
3356 (write _test-input-stream " var x: (addr int)\n")
3357 (write _test-input-stream " var y: (addr boolean)\n")
3358 (write _test-input-stream " g x, y\n")
3359 (write _test-input-stream "}\n")
3360 (write _test-input-stream "fn g a: (addr _T), b: (addr _T) {\n")
3361 (write _test-input-stream "}\n")
3362
3363 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3364
3365
3366 89/<- %edx 4/r32/esp
3367 (flush _test-output-buffered-file)
3368 (flush _test-error-buffered-file)
3369 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3375
3376 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: output should be empty")
3377 (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")
3378
3379 81 0/subop/add %esp 8/imm32
3380
3381 5d/pop-to-ebp
3382 c3/return
3383
3384 test-convert-function-call-with-too-few-inouts:
3385
3386 55/push-ebp
3387 89/<- %ebp 4/r32/esp
3388
3389 (clear-stream _test-input-stream)
3390 (clear-stream $_test-input-buffered-file->buffer)
3391 (clear-stream _test-output-stream)
3392 (clear-stream $_test-output-buffered-file->buffer)
3393 (clear-stream _test-error-stream)
3394 (clear-stream $_test-error-buffered-file->buffer)
3395
3396 68/push 0/imm32
3397 68/push 0/imm32
3398 89/<- %edx 4/r32/esp
3399 (tailor-exit-descriptor %edx 0x10)
3400
3401 (write _test-input-stream "fn f {\n")
3402 (write _test-input-stream " g\n")
3403 (write _test-input-stream "}\n")
3404 (write _test-input-stream "fn g a: int {\n")
3405 (write _test-input-stream "}\n")
3406
3407 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3408
3409
3410 89/<- %edx 4/r32/esp
3411 (flush _test-output-buffered-file)
3412 (flush _test-error-buffered-file)
3413 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3419
3420 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
3421 (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")
3422
3423 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
3424
3425 81 0/subop/add %esp 8/imm32
3426 5d/pop-to-ebp
3427 c3/return
3428
3429 test-convert-function-call-with-too-many-inouts:
3430
3431 55/push-ebp
3432 89/<- %ebp 4/r32/esp
3433
3434 (clear-stream _test-input-stream)
3435 (clear-stream $_test-input-buffered-file->buffer)
3436 (clear-stream _test-output-stream)
3437 (clear-stream $_test-output-buffered-file->buffer)
3438 (clear-stream _test-error-stream)
3439 (clear-stream $_test-error-buffered-file->buffer)
3440
3441 68/push 0/imm32
3442 68/push 0/imm32
3443 89/<- %edx 4/r32/esp
3444 (tailor-exit-descriptor %edx 0x10)
3445
3446 (write _test-input-stream "fn f {\n")
3447 (write _test-input-stream " var x: int\n")
3448 (write _test-input-stream " g x\n")
3449 (write _test-input-stream "}\n")
3450 (write _test-input-stream "fn g {\n")
3451 (write _test-input-stream "}\n")
3452
3453 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3454
3455
3456 89/<- %edx 4/r32/esp
3457 (flush _test-output-buffered-file)
3458 (flush _test-error-buffered-file)
3459 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3465
3466 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
3467 (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")
3468
3469 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
3470
3471 81 0/subop/add %esp 8/imm32
3472 5d/pop-to-ebp
3473 c3/return
3474
3475 test-convert-function-call-with-incorrect-output-type:
3476
3477 55/push-ebp
3478 89/<- %ebp 4/r32/esp
3479
3480 (clear-stream _test-input-stream)
3481 (clear-stream $_test-input-buffered-file->buffer)
3482 (clear-stream _test-output-stream)
3483 (clear-stream $_test-output-buffered-file->buffer)
3484 (clear-stream _test-error-stream)
3485 (clear-stream $_test-error-buffered-file->buffer)
3486
3487 68/push 0/imm32
3488 68/push 0/imm32
3489 89/<- %edx 4/r32/esp
3490 (tailor-exit-descriptor %edx 0x10)
3491
3492 (write _test-input-stream "fn f {\n")
3493 (write _test-input-stream " var x/eax: int <- g\n")
3494 (write _test-input-stream "}\n")
3495 (write _test-input-stream "fn g -> _/eax: foo {\n")
3496 (write _test-input-stream "}\n")
3497
3498 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3499
3500
3501 89/<- %edx 4/r32/esp
3502 (flush _test-output-buffered-file)
3503 (flush _test-error-buffered-file)
3504 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3510
3511 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
3512 (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")
3513
3514 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
3515
3516 81 0/subop/add %esp 8/imm32
3517 5d/pop-to-ebp
3518 c3/return
3519
3520 test-convert-function-call-with-too-few-outputs:
3521
3522 55/push-ebp
3523 89/<- %ebp 4/r32/esp
3524
3525 (clear-stream _test-input-stream)
3526 (clear-stream $_test-input-buffered-file->buffer)
3527 (clear-stream _test-output-stream)
3528 (clear-stream $_test-output-buffered-file->buffer)
3529 (clear-stream _test-error-stream)
3530 (clear-stream $_test-error-buffered-file->buffer)
3531
3532 68/push 0/imm32
3533 68/push 0/imm32
3534 89/<- %edx 4/r32/esp
3535 (tailor-exit-descriptor %edx 0x10)
3536
3537 (write _test-input-stream "fn f {\n")
3538 (write _test-input-stream " g\n")
3539 (write _test-input-stream "}\n")
3540 (write _test-input-stream "fn g -> _/eax: int {\n")
3541 (write _test-input-stream "}\n")
3542
3543 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3544
3545
3546 89/<- %edx 4/r32/esp
3547 (flush _test-output-buffered-file)
3548 (flush _test-error-buffered-file)
3549 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3555
3556 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
3557 (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")
3558
3559 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
3560
3561 81 0/subop/add %esp 8/imm32
3562 5d/pop-to-ebp
3563 c3/return
3564
3565 test-convert-function-call-with-too-many-outputs:
3566
3567 55/push-ebp
3568 89/<- %ebp 4/r32/esp
3569
3570 (clear-stream _test-input-stream)
3571 (clear-stream $_test-input-buffered-file->buffer)
3572 (clear-stream _test-output-stream)
3573 (clear-stream $_test-output-buffered-file->buffer)
3574 (clear-stream _test-error-stream)
3575 (clear-stream $_test-error-buffered-file->buffer)
3576
3577 68/push 0/imm32
3578 68/push 0/imm32
3579 89/<- %edx 4/r32/esp
3580 (tailor-exit-descriptor %edx 0x10)
3581
3582 (write _test-input-stream "fn f {\n")
3583 (write _test-input-stream " var x/eax: int <- g\n")
3584 (write _test-input-stream "}\n")
3585 (write _test-input-stream "fn g {\n")
3586 (write _test-input-stream "}\n")
3587
3588 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3589
3590
3591 89/<- %edx 4/r32/esp
3592 (flush _test-output-buffered-file)
3593 (flush _test-error-buffered-file)
3594 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3600
3601 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
3602 (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")
3603
3604 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
3605
3606 81 0/subop/add %esp 8/imm32
3607 5d/pop-to-ebp
3608 c3/return
3609
3610 test-convert-function-call-with-missing-output-register:
3611
3612 55/push-ebp
3613 89/<- %ebp 4/r32/esp
3614
3615 (clear-stream _test-input-stream)
3616 (clear-stream $_test-input-buffered-file->buffer)
3617 (clear-stream _test-output-stream)
3618 (clear-stream $_test-output-buffered-file->buffer)
3619 (clear-stream _test-error-stream)
3620 (clear-stream $_test-error-buffered-file->buffer)
3621
3622 68/push 0/imm32
3623 68/push 0/imm32
3624 89/<- %edx 4/r32/esp
3625 (tailor-exit-descriptor %edx 0x10)
3626
3627 (write _test-input-stream "fn f {\n")
3628 (write _test-input-stream " var x: int\n")
3629 (write _test-input-stream " x <- g\n")
3630 (write _test-input-stream "}\n")
3631 (write _test-input-stream "fn g -> _/eax: int {\n")
3632 (write _test-input-stream "}\n")
3633
3634 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3635
3636
3637 89/<- %edx 4/r32/esp
3638 (flush _test-output-buffered-file)
3639 (flush _test-error-buffered-file)
3640 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3646
3647 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-missing-output-register: output should be empty")
3648 (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")
3649
3650 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-missing-output-register: exit status")
3651
3652 81 0/subop/add %esp 8/imm32
3653 5d/pop-to-ebp
3654 c3/return
3655
3656 test-convert-function-call-with-incorrect-output-register:
3657
3658 55/push-ebp
3659 89/<- %ebp 4/r32/esp
3660
3661 (clear-stream _test-input-stream)
3662 (clear-stream $_test-input-buffered-file->buffer)
3663 (clear-stream _test-output-stream)
3664 (clear-stream $_test-output-buffered-file->buffer)
3665 (clear-stream _test-error-stream)
3666 (clear-stream $_test-error-buffered-file->buffer)
3667
3668 68/push 0/imm32
3669 68/push 0/imm32
3670 89/<- %edx 4/r32/esp
3671 (tailor-exit-descriptor %edx 0x10)
3672
3673 (write _test-input-stream "fn f {\n")
3674 (write _test-input-stream " var x/ecx: int <- g\n")
3675 (write _test-input-stream "}\n")
3676 (write _test-input-stream "fn g -> _/eax: int {\n")
3677 (write _test-input-stream "}\n")
3678
3679 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3680
3681
3682 89/<- %edx 4/r32/esp
3683 (flush _test-output-buffered-file)
3684 (flush _test-error-buffered-file)
3685 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3691
3692 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
3693 (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")
3694
3695 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
3696
3697 81 0/subop/add %esp 8/imm32
3698 5d/pop-to-ebp
3699 c3/return
3700
3701 test-convert-function-with-local-var-dereferenced:
3702
3703 55/push-ebp
3704 89/<- %ebp 4/r32/esp
3705
3706 (clear-stream _test-input-stream)
3707 (clear-stream $_test-input-buffered-file->buffer)
3708 (clear-stream _test-output-stream)
3709 (clear-stream $_test-output-buffered-file->buffer)
3710
3711 (write _test-input-stream "fn foo {\n")
3712 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
3713 (write _test-input-stream " increment *x\n")
3714 (write _test-input-stream "}\n")
3715
3716 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3717 (flush _test-output-buffered-file)
3718 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3724
3725 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
3726 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
3727 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
3728 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
3729 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
3730 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
3731 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
3732 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
3733 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
3734 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
3735 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
3736 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
3737 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
3738 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
3739 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
3740 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
3741
3742 89/<- %esp 5/r32/ebp
3743 5d/pop-to-ebp
3744 c3/return
3745
3746 test-dereference-of-var-on-stack:
3747
3748 55/push-ebp
3749 89/<- %ebp 4/r32/esp
3750
3751 (clear-stream _test-input-stream)
3752 (clear-stream $_test-input-buffered-file->buffer)
3753 (clear-stream _test-output-stream)
3754 (clear-stream $_test-output-buffered-file->buffer)
3755 (clear-stream _test-error-stream)
3756 (clear-stream $_test-error-buffered-file->buffer)
3757
3758 68/push 0/imm32
3759 68/push 0/imm32
3760 89/<- %edx 4/r32/esp
3761 (tailor-exit-descriptor %edx 0x10)
3762
3763 (write _test-input-stream "fn foo {\n")
3764 (write _test-input-stream " var x: (addr int)\n")
3765 (write _test-input-stream " increment *x\n")
3766 (write _test-input-stream "}\n")
3767
3768 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3769
3770
3771 89/<- %edx 4/r32/esp
3772 (flush _test-output-buffered-file)
3773 (flush _test-error-buffered-file)
3774 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3780
3781 (check-stream-equal _test-output-stream "" "F - test-dereference-of-var-on-stack: output should be empty")
3782 (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")
3783
3784 (check-ints-equal *(edx+4) 2 "F - test-dereference-of-var-on-stack: exit status")
3785
3786 81 0/subop/add %esp 8/imm32
3787
3788 5d/pop-to-ebp
3789 c3/return
3790
3791 test-convert-function-with-byte-operations:
3792
3793 55/push-ebp
3794 89/<- %ebp 4/r32/esp
3795
3796 (clear-stream _test-input-stream)
3797 (clear-stream $_test-input-buffered-file->buffer)
3798 (clear-stream _test-output-stream)
3799 (clear-stream $_test-output-buffered-file->buffer)
3800
3801 (write _test-input-stream "fn foo {\n")
3802 (write _test-input-stream " var x/eax: byte <- copy 0\n")
3803 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
3804 (write _test-input-stream " y <- copy-byte x\n")
3805 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
3806 (write _test-input-stream " y <- copy-byte *z\n")
3807 (write _test-input-stream " copy-byte-to *z, x\n")
3808 (write _test-input-stream "}\n")
3809
3810 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3811 (flush _test-output-buffered-file)
3812 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3818
3819 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
3820 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
3821 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
3822 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
3823 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
3824 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
3825 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
3826 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
3827 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
3828 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
3829 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
3830 (check-next-stream-line-equal _test-output-stream " 81 4/subop/and %ecx 0xff/imm32" "F - test-convert-function-with-byte-operations/11")
3831 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/12")
3832 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/13")
3833 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/14")
3834 (check-next-stream-line-equal _test-output-stream " 81 4/subop/and %ecx 0xff/imm32" "F - test-convert-function-with-byte-operations/15")
3835 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/16")
3836 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/17")
3837 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/18")
3838 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/19")
3839 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/20")
3840 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/21")
3841 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/22")
3842 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/23")
3843 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/24")
3844 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/25")
3845
3846 89/<- %esp 5/r32/ebp
3847 5d/pop-to-ebp
3848 c3/return
3849
3850
3851 test-byte-values-on-stack:
3852
3853 55/push-ebp
3854 89/<- %ebp 4/r32/esp
3855
3856 (clear-stream _test-input-stream)
3857 (clear-stream $_test-input-buffered-file->buffer)
3858 (clear-stream _test-output-stream)
3859 (clear-stream $_test-output-buffered-file->buffer)
3860 (clear-stream _test-error-stream)
3861 (clear-stream $_test-error-buffered-file->buffer)
3862
3863 68/push 0/imm32
3864 68/push 0/imm32
3865 89/<- %edx 4/r32/esp
3866 (tailor-exit-descriptor %edx 0x10)
3867
3868 (write _test-input-stream "fn foo {\n")
3869 (write _test-input-stream " var x: byte\n")
3870 (write _test-input-stream "}\n")
3871
3872 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3873
3874
3875 89/<- %edx 4/r32/esp
3876 (flush _test-output-buffered-file)
3877 (flush _test-error-buffered-file)
3878 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3884
3885 (check-stream-equal _test-output-stream "" "F - test-byte-values-on-stack: output should be empty")
3886 (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")
3887
3888 (check-ints-equal *(edx+4) 2 "F - test-byte-values-on-stack: exit status")
3889
3890 81 0/subop/add %esp 8/imm32
3891
3892 5d/pop-to-ebp
3893 c3/return
3894
3895
3896 test-byte-values-in-unsupported-registers:
3897
3898 55/push-ebp
3899 89/<- %ebp 4/r32/esp
3900
3901 (clear-stream _test-input-stream)
3902 (clear-stream $_test-input-buffered-file->buffer)
3903 (clear-stream _test-output-stream)
3904 (clear-stream $_test-output-buffered-file->buffer)
3905 (clear-stream _test-error-stream)
3906 (clear-stream $_test-error-buffered-file->buffer)
3907
3908 68/push 0/imm32
3909 68/push 0/imm32
3910 89/<- %edx 4/r32/esp
3911 (tailor-exit-descriptor %edx 0x10)
3912
3913 (write _test-input-stream "fn foo {\n")
3914 (write _test-input-stream " var x/esi: byte <- copy 0\n")
3915 (write _test-input-stream "}\n")
3916
3917 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
3918
3919
3920 89/<- %edx 4/r32/esp
3921 (flush _test-output-buffered-file)
3922 (flush _test-error-buffered-file)
3923 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
3929
3930 (check-stream-equal _test-output-stream "" "F - test-byte-values-in-unsupported-registers: output should be empty")
3931 (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")
3932
3933 (check-ints-equal *(edx+4) 2 "F - test-byte-values-in-unsupported-registers: exit status")
3934
3935 81 0/subop/add %esp 8/imm32
3936
3937 5d/pop-to-ebp
3938 c3/return
3939
3940
3941 test-copy-byte-var-from-fn-arg:
3942
3943 55/push-ebp
3944 89/<- %ebp 4/r32/esp
3945
3946 (clear-stream _test-input-stream)
3947 (clear-stream $_test-input-buffered-file->buffer)
3948 (clear-stream _test-output-stream)
3949 (clear-stream $_test-output-buffered-file->buffer)
3950
3951 (write _test-input-stream "fn foo x: byte, y: int {\n")
3952 (write _test-input-stream " var a/eax: byte <- copy x\n")
3953 (write _test-input-stream " var b/eax: int <- copy y\n")
3954 (write _test-input-stream "}\n")
3955
3956 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3957 (flush _test-output-buffered-file)
3958 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
3964
3965 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
3966 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
3967 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
3968 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
3969 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
3970 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
3971 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
3972 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
3973 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
3974 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
3975 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
3976 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
3977 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
3978 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
3979 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
3980 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
3981
3982 89/<- %esp 5/r32/ebp
3983 5d/pop-to-ebp
3984 c3/return
3985
3986 test-convert-compare-register-with-literal:
3987
3988 55/push-ebp
3989 89/<- %ebp 4/r32/esp
3990
3991 (clear-stream _test-input-stream)
3992 (clear-stream $_test-input-buffered-file->buffer)
3993 (clear-stream _test-output-stream)
3994 (clear-stream $_test-output-buffered-file->buffer)
3995
3996 (write _test-input-stream "fn foo {\n")
3997 (write _test-input-stream " var x/ecx: int <- copy 0\n")
3998 (write _test-input-stream " compare x, 0\n")
3999 (write _test-input-stream "}\n")
4000
4001 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4002 (flush _test-output-buffered-file)
4003 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4009
4010 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
4011 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
4012 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
4013 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
4014 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
4015 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
4016 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
4017 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
4018 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
4019 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
4020 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
4021 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
4022 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
4023 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
4024 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
4025 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
4026
4027 89/<- %esp 5/r32/ebp
4028 5d/pop-to-ebp
4029 c3/return
4030
4031 test-convert-compare-byte-with-literal:
4032
4033 55/push-ebp
4034 89/<- %ebp 4/r32/esp
4035
4036 (clear-stream _test-input-stream)
4037 (clear-stream $_test-input-buffered-file->buffer)
4038 (clear-stream _test-output-stream)
4039 (clear-stream $_test-output-buffered-file->buffer)
4040
4041 (write _test-input-stream "fn foo {\n")
4042 (write _test-input-stream " var x/ecx: byte <- copy 0\n")
4043 (write _test-input-stream " compare x, 0\n")
4044 (write _test-input-stream "}\n")
4045
4046 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4047 (flush _test-output-buffered-file)
4048 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4054
4055
4056 89/<- %esp 5/r32/ebp
4057 5d/pop-to-ebp
4058 c3/return
4059
4060 test-unknown-variable:
4061
4062 55/push-ebp
4063 89/<- %ebp 4/r32/esp
4064
4065 (clear-stream _test-input-stream)
4066 (clear-stream $_test-input-buffered-file->buffer)
4067 (clear-stream _test-output-stream)
4068 (clear-stream $_test-output-buffered-file->buffer)
4069 (clear-stream _test-error-stream)
4070 (clear-stream $_test-error-buffered-file->buffer)
4071
4072 68/push 0/imm32
4073 68/push 0/imm32
4074 89/<- %edx 4/r32/esp
4075 (tailor-exit-descriptor %edx 0x10)
4076
4077 (write _test-input-stream "fn foo {\n")
4078 (write _test-input-stream " compare x, 0\n")
4079 (write _test-input-stream "}\n")
4080
4081 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4082
4083
4084 89/<- %edx 4/r32/esp
4085 (flush _test-output-buffered-file)
4086 (flush _test-error-buffered-file)
4087 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4093
4094 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
4095 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
4096
4097 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
4098
4099 81 0/subop/add %esp 8/imm32
4100
4101 5d/pop-to-ebp
4102 c3/return
4103
4104 test-convert-function-with-local-var-in-block:
4105
4106 55/push-ebp
4107 89/<- %ebp 4/r32/esp
4108
4109 (clear-stream _test-input-stream)
4110 (clear-stream $_test-input-buffered-file->buffer)
4111 (clear-stream _test-output-stream)
4112 (clear-stream $_test-output-buffered-file->buffer)
4113
4114 (write _test-input-stream "fn foo {\n")
4115 (write _test-input-stream " {\n")
4116 (write _test-input-stream " var x: int\n")
4117 (write _test-input-stream " increment x\n")
4118 (write _test-input-stream " }\n")
4119 (write _test-input-stream "}\n")
4120
4121 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4122 (flush _test-output-buffered-file)
4123 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4129
4130 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
4131 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
4132 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
4133 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
4134 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
4135 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
4136 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
4137 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
4138 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
4139 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
4140 (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")
4141 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
4142 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
4143 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
4144 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
4145 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
4146 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
4147 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
4148 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
4149
4150 89/<- %esp 5/r32/ebp
4151 5d/pop-to-ebp
4152 c3/return
4153
4154 test-convert-function-with-local-var-in-mem-after-block:
4155
4156 55/push-ebp
4157 89/<- %ebp 4/r32/esp
4158
4159 (clear-stream _test-input-stream)
4160 (clear-stream $_test-input-buffered-file->buffer)
4161 (clear-stream _test-output-stream)
4162 (clear-stream $_test-output-buffered-file->buffer)
4163
4164 (write _test-input-stream "fn foo {\n")
4165 (write _test-input-stream " {\n")
4166 (write _test-input-stream " var y: int\n")
4167 (write _test-input-stream " }\n")
4168 (write _test-input-stream " var x: int\n")
4169 (write _test-input-stream " increment x\n")
4170 (write _test-input-stream "}\n")
4171
4172 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4173 (flush _test-output-buffered-file)
4174 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4180
4181 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem-after-block/0")
4182 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem-after-block/1")
4183 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/2")
4184 (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")
4185 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/4")
4186 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/5")
4187 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/6")
4188 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/7")
4189 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/8")
4190 (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")
4191 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/10")
4192 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-mem-after-block/11")
4193 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/12")
4194 (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")
4195 (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")
4196 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/15")
4197 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem-after-block/16")
4198 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem-after-block/17")
4199 (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")
4200 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/19")
4201 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem-after-block/20")
4202
4203 89/<- %esp 5/r32/ebp
4204 5d/pop-to-ebp
4205 c3/return
4206
4207 test-convert-function-with-local-var-in-named-block:
4208
4209 55/push-ebp
4210 89/<- %ebp 4/r32/esp
4211
4212 (clear-stream _test-input-stream)
4213 (clear-stream $_test-input-buffered-file->buffer)
4214 (clear-stream _test-output-stream)
4215 (clear-stream $_test-output-buffered-file->buffer)
4216
4217 (write _test-input-stream "fn foo {\n")
4218 (write _test-input-stream " $bar: {\n")
4219 (write _test-input-stream " var x: int\n")
4220 (write _test-input-stream " increment x\n")
4221 (write _test-input-stream " }\n")
4222 (write _test-input-stream "}\n")
4223
4224 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4225 (flush _test-output-buffered-file)
4226 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4232
4233 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
4234 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
4235 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
4236 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
4237 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
4238 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
4239 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
4240 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
4241 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
4242 (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")
4243 (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")
4244 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
4245 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
4246 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
4247 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
4248 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
4249 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
4250 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
4251 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
4252
4253 89/<- %esp 5/r32/ebp
4254 5d/pop-to-ebp
4255 c3/return
4256
4257 test-unknown-variable-in-named-block:
4258
4259 55/push-ebp
4260 89/<- %ebp 4/r32/esp
4261
4262 (clear-stream _test-input-stream)
4263 (clear-stream $_test-input-buffered-file->buffer)
4264 (clear-stream _test-output-stream)
4265 (clear-stream $_test-output-buffered-file->buffer)
4266 (clear-stream _test-error-stream)
4267 (clear-stream $_test-error-buffered-file->buffer)
4268
4269 68/push 0/imm32
4270 68/push 0/imm32
4271 89/<- %edx 4/r32/esp
4272 (tailor-exit-descriptor %edx 0x10)
4273
4274 (write _test-input-stream "fn foo {\n")
4275 (write _test-input-stream " $a: {\n")
4276 (write _test-input-stream " compare x, 0\n")
4277 (write _test-input-stream " }\n")
4278 (write _test-input-stream "}\n")
4279
4280 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4281
4282
4283 89/<- %edx 4/r32/esp
4284 (flush _test-output-buffered-file)
4285 (flush _test-error-buffered-file)
4286 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
4292
4293 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
4294 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
4295
4296 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
4297
4298 81 0/subop/add %esp 8/imm32
4299
4300 5d/pop-to-ebp
4301 c3/return
4302
4303 test-always-shadow-outermost-reg-vars-in-function:
4304
4305 55/push-ebp
4306 89/<- %ebp 4/r32/esp
4307
4308 (clear-stream _test-input-stream)
4309 (clear-stream $_test-input-buffered-file->buffer)
4310 (clear-stream _test-output-stream)
4311 (clear-stream $_test-output-buffered-file->buffer)
4312
4313 (write _test-input-stream "fn foo {\n")
4314 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4315 (write _test-input-stream "}\n")
4316
4317 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4318 (flush _test-output-buffered-file)
4319 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4325
4326 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
4327 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
4328 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
4329 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
4330 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
4331 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
4332 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
4333 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
4334 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
4335 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
4336 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
4337 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
4338 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
4339 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
4340 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
4341
4342 89/<- %esp 5/r32/ebp
4343 5d/pop-to-ebp
4344 c3/return
4345
4346 test-shadow-local:
4347
4348 55/push-ebp
4349 89/<- %ebp 4/r32/esp
4350
4351 (clear-stream _test-input-stream)
4352 (clear-stream $_test-input-buffered-file->buffer)
4353 (clear-stream _test-output-stream)
4354 (clear-stream $_test-output-buffered-file->buffer)
4355
4356 (write _test-input-stream "fn foo {\n")
4357 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4358 (write _test-input-stream " {\n")
4359 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4360 (write _test-input-stream " }\n")
4361 (write _test-input-stream " x <- increment\n")
4362 (write _test-input-stream "}\n")
4363
4364 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4365 (flush _test-output-buffered-file)
4366 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4372
4373 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-local/0")
4374 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-local/1")
4375 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-local/2")
4376 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-local/3")
4377 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/4")
4378 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-local/5")
4379 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/6")
4380 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-local/7")
4381 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/8")
4382 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-local/9")
4383 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/10")
4384 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-local/11")
4385 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/12")
4386 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/13")
4387 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-local/14")
4388 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-local/15")
4389 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/16")
4390 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/17")
4391 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-local/18")
4392 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-local/19")
4393 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-local/20")
4394 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-local/21")
4395 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-local/22")
4396
4397 89/<- %esp 5/r32/ebp
4398 5d/pop-to-ebp
4399 c3/return
4400
4401 test-shadow-name:
4402
4403 55/push-ebp
4404 89/<- %ebp 4/r32/esp
4405
4406 (clear-stream _test-input-stream)
4407 (clear-stream $_test-input-buffered-file->buffer)
4408 (clear-stream _test-output-stream)
4409 (clear-stream $_test-output-buffered-file->buffer)
4410
4411 (write _test-input-stream "fn foo {\n")
4412 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4413 (write _test-input-stream " {\n")
4414 (write _test-input-stream " var x/edx: int <- copy 4\n")
4415 (write _test-input-stream " }\n")
4416 (write _test-input-stream " x <- increment\n")
4417 (write _test-input-stream "}\n")
4418
4419 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4420 (flush _test-output-buffered-file)
4421 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4427
4428 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
4429 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
4430 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
4431 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
4432 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
4433 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
4434 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
4435 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
4436 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
4437 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
4438 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
4439 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
4440 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
4441 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
4442 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
4443 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
4444 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
4445 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
4446 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
4447 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
4448 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
4449 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
4450 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
4451
4452 89/<- %esp 5/r32/ebp
4453 5d/pop-to-ebp
4454 c3/return
4455
4456 test-shadow-name-2:
4457
4458 55/push-ebp
4459 89/<- %ebp 4/r32/esp
4460
4461 (clear-stream _test-input-stream)
4462 (clear-stream $_test-input-buffered-file->buffer)
4463 (clear-stream _test-output-stream)
4464 (clear-stream $_test-output-buffered-file->buffer)
4465
4466 (write _test-input-stream "fn foo {\n")
4467 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4468 (write _test-input-stream " {\n")
4469 (write _test-input-stream " var x/edx: int <- copy 4\n")
4470 (write _test-input-stream " var y/ecx: int <- copy 5\n")
4471 (write _test-input-stream " }\n")
4472 (write _test-input-stream " x <- increment\n")
4473 (write _test-input-stream "}\n")
4474
4475 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4476 (flush _test-output-buffered-file)
4477 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4483
4484 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name-2/0")
4485 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
4486 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
4487 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
4488 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
4489 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
4490 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
4491 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
4492 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
4493 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
4494 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
4495 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
4496 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
4497 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
4498 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
4499 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
4500 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
4501 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
4502 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
4503 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
4504 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
4505 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
4506 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
4507 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
4508 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
4509 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
4510
4511 89/<- %esp 5/r32/ebp
4512 5d/pop-to-ebp
4513 c3/return
4514
4515 test-do-not-spill-same-register-in-block:
4516
4517 55/push-ebp
4518 89/<- %ebp 4/r32/esp
4519
4520 (clear-stream _test-input-stream)
4521 (clear-stream $_test-input-buffered-file->buffer)
4522 (clear-stream _test-output-stream)
4523 (clear-stream $_test-output-buffered-file->buffer)
4524
4525 (write _test-input-stream "fn foo {\n")
4526 (write _test-input-stream " var x/ecx: int <- copy 3\n")
4527 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4528 (write _test-input-stream " y <- increment\n")
4529 (write _test-input-stream "}\n")
4530
4531 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4532 (flush _test-output-buffered-file)
4533 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4539
4540 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
4541 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
4542 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
4543 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
4544 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
4545 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
4546 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
4547 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
4548 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
4549 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
4550 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
4551 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
4552 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
4553 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
4554 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
4555 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
4556 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
4557
4558 89/<- %esp 5/r32/ebp
4559 5d/pop-to-ebp
4560 c3/return
4561
4562 test-spill-different-register-in-block:
4563
4564 55/push-ebp
4565 89/<- %ebp 4/r32/esp
4566
4567 (clear-stream _test-input-stream)
4568 (clear-stream $_test-input-buffered-file->buffer)
4569 (clear-stream _test-output-stream)
4570 (clear-stream $_test-output-buffered-file->buffer)
4571
4572 (write _test-input-stream "fn foo {\n")
4573 (write _test-input-stream " var x/eax: int <- copy 3\n")
4574 (write _test-input-stream " var y/ecx: int <- copy 4\n")
4575 (write _test-input-stream " y <- increment\n")
4576 (write _test-input-stream "}\n")
4577
4578 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4579 (flush _test-output-buffered-file)
4580 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4586
4587 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
4588 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
4589 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
4590 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
4591 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
4592 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
4593 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
4594 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
4595 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
4596 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
4597 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
4598 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
4599 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
4600 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
4601 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
4602 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
4603 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
4604 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
4605 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
4606
4607 89/<- %esp 5/r32/ebp
4608 5d/pop-to-ebp
4609 c3/return
4610
4611 test-convert-function-with-branches-in-block:
4612
4613 55/push-ebp
4614 89/<- %ebp 4/r32/esp
4615
4616 (clear-stream _test-input-stream)
4617 (clear-stream $_test-input-buffered-file->buffer)
4618 (clear-stream _test-output-stream)
4619 (clear-stream $_test-output-buffered-file->buffer)
4620
4621 (write _test-input-stream "fn foo x: int {\n")
4622 (write _test-input-stream " {\n")
4623 (write _test-input-stream " break-if->=\n")
4624 (write _test-input-stream " loop-if-addr<\n")
4625 (write _test-input-stream " increment x\n")
4626 (write _test-input-stream " loop\n")
4627 (write _test-input-stream " }\n")
4628 (write _test-input-stream "}\n")
4629
4630 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4631 (flush _test-output-buffered-file)
4632 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4638
4639 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4640 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4641 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4642 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4643 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4644 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4645 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4646 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4647 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4648 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4649 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4650 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4651 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4652 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4653 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4654 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4655 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4656 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4657 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4658 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4659 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4660 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4661 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4662 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4663 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4664 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4665
4666 89/<- %esp 5/r32/ebp
4667 5d/pop-to-ebp
4668 c3/return
4669
4670 test-convert-function-with-branches-in-block-2:
4671
4672 55/push-ebp
4673 89/<- %ebp 4/r32/esp
4674
4675 (clear-stream _test-input-stream)
4676 (clear-stream $_test-input-buffered-file->buffer)
4677 (clear-stream _test-output-stream)
4678 (clear-stream $_test-output-buffered-file->buffer)
4679
4680 (write _test-input-stream "fn foo x: int {\n")
4681 (write _test-input-stream " {\n")
4682 (write _test-input-stream " break-if->=\n")
4683 (write _test-input-stream " loop-if-float<\n")
4684 (write _test-input-stream " increment x\n")
4685 (write _test-input-stream " loop\n")
4686 (write _test-input-stream " }\n")
4687 (write _test-input-stream "}\n")
4688
4689 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4690 (flush _test-output-buffered-file)
4691 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4697
4698 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
4699 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
4700 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
4701 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
4702 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
4703 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
4704 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
4705 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
4706 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
4707 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
4708 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
4709 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
4710 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
4711 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
4712 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
4713 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
4714 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
4715 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
4716 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
4717 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
4718 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
4719 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
4720 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
4721 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
4722 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
4723 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
4724
4725 89/<- %esp 5/r32/ebp
4726 5d/pop-to-ebp
4727 c3/return
4728
4729 test-convert-function-with-branches-in-named-block:
4730
4731 55/push-ebp
4732 89/<- %ebp 4/r32/esp
4733
4734 (clear-stream _test-input-stream)
4735 (clear-stream $_test-input-buffered-file->buffer)
4736 (clear-stream _test-output-stream)
4737 (clear-stream $_test-output-buffered-file->buffer)
4738
4739 (write _test-input-stream "fn foo x: int {\n")
4740 (write _test-input-stream " $bar: {\n")
4741 (write _test-input-stream " break-if->= $bar\n")
4742 (write _test-input-stream " loop-if-addr< $bar\n")
4743 (write _test-input-stream " increment x\n")
4744 (write _test-input-stream " loop\n")
4745 (write _test-input-stream " }\n")
4746 (write _test-input-stream "}\n")
4747
4748 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4749 (flush _test-output-buffered-file)
4750 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4756
4757 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
4758 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
4759 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
4760 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
4761 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
4762 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
4763 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
4764 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
4765 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
4766 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
4767 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
4768 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
4769 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
4770 (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")
4771 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
4772 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
4773 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
4774 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
4775 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
4776 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
4777 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
4778 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
4779 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
4780 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
4781 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
4782 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
4783
4784 89/<- %esp 5/r32/ebp
4785 5d/pop-to-ebp
4786 c3/return
4787
4788 test-convert-function-with-var-in-nested-block:
4789
4790 55/push-ebp
4791 89/<- %ebp 4/r32/esp
4792
4793 (clear-stream _test-input-stream)
4794 (clear-stream $_test-input-buffered-file->buffer)
4795 (clear-stream _test-output-stream)
4796 (clear-stream $_test-output-buffered-file->buffer)
4797
4798 (write _test-input-stream "fn foo x: int {\n")
4799 (write _test-input-stream " {\n")
4800 (write _test-input-stream " {\n")
4801 (write _test-input-stream " var x: int\n")
4802 (write _test-input-stream " increment x\n")
4803 (write _test-input-stream " }\n")
4804 (write _test-input-stream " }\n")
4805 (write _test-input-stream "}\n")
4806
4807 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4808 (flush _test-output-buffered-file)
4809 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4815
4816 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
4817 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
4818 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
4819 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
4820 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
4821 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
4822 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
4823 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
4824 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
4825 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
4826 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
4827 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
4828 (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")
4829 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
4830 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
4831 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
4832 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
4833 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
4834 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
4835 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
4836 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
4837 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
4838 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
4839
4840 89/<- %esp 5/r32/ebp
4841 5d/pop-to-ebp
4842 c3/return
4843
4844 test-convert-function-with-multiple-vars-in-nested-blocks:
4845
4846 55/push-ebp
4847 89/<- %ebp 4/r32/esp
4848
4849 (clear-stream _test-input-stream)
4850 (clear-stream $_test-input-buffered-file->buffer)
4851 (clear-stream _test-output-stream)
4852 (clear-stream $_test-output-buffered-file->buffer)
4853
4854 (write _test-input-stream "fn foo x: int {\n")
4855 (write _test-input-stream " {\n")
4856 (write _test-input-stream " var x/eax: int <- copy 0\n")
4857 (write _test-input-stream " {\n")
4858 (write _test-input-stream " var y: int\n")
4859 (write _test-input-stream " x <- add y\n")
4860 (write _test-input-stream " }\n")
4861 (write _test-input-stream " }\n")
4862 (write _test-input-stream "}\n")
4863
4864 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4865 (flush _test-output-buffered-file)
4866 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4872
4873 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
4874 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
4875 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
4876 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
4877 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
4878 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
4879 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
4880 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
4881 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
4882 (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")
4883 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
4884 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
4885 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
4886 (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")
4887 (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")
4888 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
4889 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
4890 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
4891 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
4892 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
4893 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
4894 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
4895 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
4896 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
4897 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
4898 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
4899
4900 89/<- %esp 5/r32/ebp
4901 5d/pop-to-ebp
4902 c3/return
4903
4904 test-convert-function-with-branches-and-local-vars:
4905
4906
4907
4908
4909 55/push-ebp
4910 89/<- %ebp 4/r32/esp
4911
4912 (clear-stream _test-input-stream)
4913 (clear-stream $_test-input-buffered-file->buffer)
4914 (clear-stream _test-output-stream)
4915 (clear-stream $_test-output-buffered-file->buffer)
4916
4917 (write _test-input-stream "fn foo {\n")
4918 (write _test-input-stream " {\n")
4919 (write _test-input-stream " var x: int\n")
4920 (write _test-input-stream " break-if->=\n")
4921 (write _test-input-stream " increment x\n")
4922 (write _test-input-stream " }\n")
4923 (write _test-input-stream "}\n")
4924
4925 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4926 (flush _test-output-buffered-file)
4927 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4933
4934 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
4935 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
4936 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
4937 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
4938 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
4939 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
4940 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
4941 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
4942 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
4943 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
4944 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
4945 (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")
4946 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
4947 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
4948 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
4949 (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")
4950 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
4951 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
4952 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
4953 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
4954 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
4955 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
4956 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
4957 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
4958
4959 89/<- %esp 5/r32/ebp
4960 5d/pop-to-ebp
4961 c3/return
4962
4963 test-convert-function-with-conditional-loops-and-local-vars:
4964
4965
4966
4967
4968 55/push-ebp
4969 89/<- %ebp 4/r32/esp
4970
4971 (clear-stream _test-input-stream)
4972 (clear-stream $_test-input-buffered-file->buffer)
4973 (clear-stream _test-output-stream)
4974 (clear-stream $_test-output-buffered-file->buffer)
4975
4976 (write _test-input-stream "fn foo {\n")
4977 (write _test-input-stream " {\n")
4978 (write _test-input-stream " var x: int\n")
4979 (write _test-input-stream " loop-if->=\n")
4980 (write _test-input-stream " increment x\n")
4981 (write _test-input-stream " }\n")
4982 (write _test-input-stream "}\n")
4983
4984 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4985 (flush _test-output-buffered-file)
4986 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
4992
4993 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
4994 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
4995 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
4996 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
4997 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
4998 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
4999 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
5000 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
5001 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
5002 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
5003 (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")
5004 (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")
5005 (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")
5006 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
5007 (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")
5008 (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")
5009 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
5010 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
5011 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
5012 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
5013 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
5014 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
5015 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
5016 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
5017
5018 89/<- %esp 5/r32/ebp
5019 5d/pop-to-ebp
5020 c3/return
5021
5022 test-convert-function-with-unconditional-loops-and-local-vars:
5023
5024
5025
5026
5027 55/push-ebp
5028 89/<- %ebp 4/r32/esp
5029
5030 (clear-stream _test-input-stream)
5031 (clear-stream $_test-input-buffered-file->buffer)
5032 (clear-stream _test-output-stream)
5033 (clear-stream $_test-output-buffered-file->buffer)
5034
5035 (write _test-input-stream "fn foo {\n")
5036 (write _test-input-stream " {\n")
5037 (write _test-input-stream " var x: int\n")
5038 (write _test-input-stream " loop\n")
5039 (write _test-input-stream " increment x\n")
5040 (write _test-input-stream " }\n")
5041 (write _test-input-stream "}\n")
5042
5043 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5044 (flush _test-output-buffered-file)
5045 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5051
5052 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
5053 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
5054 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
5055 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
5056 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
5057 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
5058 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
5059 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
5060 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
5061 (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")
5062 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
5063
5064 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
5065 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
5066 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
5067 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
5068 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
5069 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
5070 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
5071 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
5072
5073 89/<- %esp 5/r32/ebp
5074 5d/pop-to-ebp
5075 c3/return
5076
5077 test-convert-function-with-branches-and-loops-and-local-vars:
5078
5079 55/push-ebp
5080 89/<- %ebp 4/r32/esp
5081
5082 (clear-stream _test-input-stream)
5083 (clear-stream $_test-input-buffered-file->buffer)
5084 (clear-stream _test-output-stream)
5085 (clear-stream $_test-output-buffered-file->buffer)
5086
5087 (write _test-input-stream "fn foo {\n")
5088 (write _test-input-stream " {\n")
5089 (write _test-input-stream " var x: int\n")
5090 (write _test-input-stream " break-if->=\n")
5091 (write _test-input-stream " increment x\n")
5092 (write _test-input-stream " loop\n")
5093 (write _test-input-stream " }\n")
5094 (write _test-input-stream "}\n")
5095
5096 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5097 (flush _test-output-buffered-file)
5098 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5104
5105 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
5106 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
5107 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
5108 (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")
5109 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
5110 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
5111 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
5112 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
5113 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
5114 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
5115 (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")
5116 (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")
5117 (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")
5118 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
5119 (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")
5120 (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")
5121 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
5122 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
5123 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
5124 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
5125 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
5126 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
5127 (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")
5128 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
5129 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
5130
5131 89/<- %esp 5/r32/ebp
5132 5d/pop-to-ebp
5133 c3/return
5134
5135 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
5136
5137 55/push-ebp
5138 89/<- %ebp 4/r32/esp
5139
5140 (clear-stream _test-input-stream)
5141 (clear-stream $_test-input-buffered-file->buffer)
5142 (clear-stream _test-output-stream)
5143 (clear-stream $_test-output-buffered-file->buffer)
5144
5145 (write _test-input-stream "fn foo {\n")
5146 (write _test-input-stream " a: {\n")
5147 (write _test-input-stream " var x: int\n")
5148 (write _test-input-stream " {\n")
5149 (write _test-input-stream " var y: int\n")
5150 (write _test-input-stream " break-if->= a\n")
5151 (write _test-input-stream " increment x\n")
5152 (write _test-input-stream " loop\n")
5153 (write _test-input-stream " }\n")
5154 (write _test-input-stream " }\n")
5155 (write _test-input-stream "}\n")
5156
5157 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5158 (flush _test-output-buffered-file)
5159 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5165
5166 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
5167 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
5168 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
5169 (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")
5170 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
5171 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
5172 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
5173 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
5174 (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")
5175 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
5176 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
5177 (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")
5178 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
5179 (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")
5180 (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")
5181 (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")
5182 (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")
5183 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
5184 (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")
5185 (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")
5186 (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")
5187 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
5188 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
5189 (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")
5190 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
5191 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
5192 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
5193 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
5194 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
5195 (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")
5196 (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")
5197 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
5198
5199 89/<- %esp 5/r32/ebp
5200 5d/pop-to-ebp
5201 c3/return
5202
5203 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
5204
5205 55/push-ebp
5206 89/<- %ebp 4/r32/esp
5207
5208 (clear-stream _test-input-stream)
5209 (clear-stream $_test-input-buffered-file->buffer)
5210 (clear-stream _test-output-stream)
5211 (clear-stream $_test-output-buffered-file->buffer)
5212
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 " break-if->= a\n")
5219 (write _test-input-stream " }\n")
5220 (write _test-input-stream " }\n")
5221 (write _test-input-stream "}\n")
5222
5223 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5224 (flush _test-output-buffered-file)
5225 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5231
5232 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
5233 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
5234 (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")
5235 (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")
5236 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
5237 (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")
5238 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
5239 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
5240 (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")
5241 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
5242 (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")
5243 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
5244 (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")
5245 (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")
5246 (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")
5247 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
5248 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
5249 (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")
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-2/18")
5251 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
5252 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
5253 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
5254 (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")
5255 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
5256 (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")
5257 (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")
5258 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
5259
5260 89/<- %esp 5/r32/ebp
5261 5d/pop-to-ebp
5262 c3/return
5263
5264 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
5265
5266 55/push-ebp
5267 89/<- %ebp 4/r32/esp
5268
5269 (clear-stream _test-input-stream)
5270 (clear-stream $_test-input-buffered-file->buffer)
5271 (clear-stream _test-output-stream)
5272 (clear-stream $_test-output-buffered-file->buffer)
5273
5274
5275 (write _test-input-stream "fn foo {\n")
5276 (write _test-input-stream " a: {\n")
5277 (write _test-input-stream " var x: int\n")
5278 (write _test-input-stream " {\n")
5279 (write _test-input-stream " break a\n")
5280 (write _test-input-stream " }\n")
5281 (write _test-input-stream " }\n")
5282 (write _test-input-stream "}\n")
5283
5284 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5285 (flush _test-output-buffered-file)
5286 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5292
5293 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
5294 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
5295 (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")
5296 (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")
5297 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
5298 (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")
5299 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
5300 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
5301 (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")
5302 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
5303 (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")
5304 (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")
5305 (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")
5306 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
5307 (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")
5308 (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")
5309 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
5310 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
5311 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
5312 (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")
5313 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
5314 (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")
5315 (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")
5316 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
5317
5318 89/<- %esp 5/r32/ebp
5319 5d/pop-to-ebp
5320 c3/return
5321
5322 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
5323
5324 55/push-ebp
5325 89/<- %ebp 4/r32/esp
5326
5327 (clear-stream _test-input-stream)
5328 (clear-stream $_test-input-buffered-file->buffer)
5329 (clear-stream _test-output-stream)
5330 (clear-stream $_test-output-buffered-file->buffer)
5331
5332 (write _test-input-stream "fn foo {\n")
5333 (write _test-input-stream " a: {\n")
5334 (write _test-input-stream " var x/esi: int <- copy 0\n")
5335 (write _test-input-stream " {\n")
5336 (write _test-input-stream " break a\n")
5337 (write _test-input-stream " }\n")
5338 (write _test-input-stream " }\n")
5339 (write _test-input-stream "}\n")
5340
5341 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5342 (flush _test-output-buffered-file)
5343 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5349
5350 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
5351 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
5352 (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")
5353 (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")
5354 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
5355 (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")
5356 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
5357 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
5358 (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")
5359 (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")
5360 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
5361 (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")
5362 (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")
5363 (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")
5364 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
5365 (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")
5366 (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")
5367 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
5368 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
5369 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
5370 (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")
5371 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
5372 (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")
5373 (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")
5374 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
5375
5376 89/<- %esp 5/r32/ebp
5377 5d/pop-to-ebp
5378 c3/return
5379
5380 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
5381
5382 55/push-ebp
5383 89/<- %ebp 4/r32/esp
5384
5385 (clear-stream _test-input-stream)
5386 (clear-stream $_test-input-buffered-file->buffer)
5387 (clear-stream _test-output-stream)
5388 (clear-stream $_test-output-buffered-file->buffer)
5389
5390 (write _test-input-stream "fn foo {\n")
5391 (write _test-input-stream " a: {\n")
5392 (write _test-input-stream " var x: int\n")
5393 (write _test-input-stream " {\n")
5394 (write _test-input-stream " var y: int\n")
5395 (write _test-input-stream " break a\n")
5396 (write _test-input-stream " increment x\n")
5397 (write _test-input-stream " }\n")
5398 (write _test-input-stream " }\n")
5399 (write _test-input-stream "}\n")
5400
5401 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5402 (flush _test-output-buffered-file)
5403 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5409
5410 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
5411 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
5412 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
5413 (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")
5414 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
5415 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
5416 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
5417 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
5418 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
5419 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
5420 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
5421 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
5422 (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")
5423 (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")
5424 (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")
5425 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
5426 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
5427 (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")
5428 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
5429 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
5430 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
5431 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
5432 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
5433 (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")
5434 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
5435 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
5436
5437 89/<- %esp 5/r32/ebp
5438 5d/pop-to-ebp
5439 c3/return
5440
5441 test-convert-function-with-unconditional-break-and-local-vars:
5442
5443 55/push-ebp
5444 89/<- %ebp 4/r32/esp
5445
5446 (clear-stream _test-input-stream)
5447 (clear-stream $_test-input-buffered-file->buffer)
5448 (clear-stream _test-output-stream)
5449 (clear-stream $_test-output-buffered-file->buffer)
5450
5451 (write _test-input-stream "fn foo {\n")
5452 (write _test-input-stream " {\n")
5453 (write _test-input-stream " var x: int\n")
5454 (write _test-input-stream " {\n")
5455 (write _test-input-stream " var y: int\n")
5456 (write _test-input-stream " break\n")
5457 (write _test-input-stream " increment x\n")
5458 (write _test-input-stream " }\n")
5459 (write _test-input-stream " }\n")
5460 (write _test-input-stream "}\n")
5461
5462 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5463 (flush _test-output-buffered-file)
5464 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5470
5471 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
5472 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
5473 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
5474 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
5475 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
5476 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
5477 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
5478 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
5479 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
5480 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
5481 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
5482 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
5483 (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")
5484 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
5485 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
5486 (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")
5487 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
5488 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
5489 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
5490 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
5491 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
5492 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
5493 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
5494 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
5495
5496 89/<- %esp 5/r32/ebp
5497 5d/pop-to-ebp
5498 c3/return
5499
5500 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
5501
5502 55/push-ebp
5503 89/<- %ebp 4/r32/esp
5504
5505 (clear-stream _test-input-stream)
5506 (clear-stream $_test-input-buffered-file->buffer)
5507 (clear-stream _test-output-stream)
5508 (clear-stream $_test-output-buffered-file->buffer)
5509
5510 (write _test-input-stream "fn foo {\n")
5511 (write _test-input-stream " a: {\n")
5512 (write _test-input-stream " var x: int\n")
5513 (write _test-input-stream " {\n")
5514 (write _test-input-stream " var y: int\n")
5515 (write _test-input-stream " loop a\n")
5516 (write _test-input-stream " increment x\n")
5517 (write _test-input-stream " }\n")
5518 (write _test-input-stream " }\n")
5519 (write _test-input-stream "}\n")
5520
5521 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5522 (flush _test-output-buffered-file)
5523 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5529
5530 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
5531 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
5532 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
5533 (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")
5534 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
5535 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
5536 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
5537 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
5538 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
5539 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
5540 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
5541 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
5542 (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")
5543 (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")
5544 (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")
5545 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
5546 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
5547 (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")
5548 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
5549 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
5550 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
5551 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
5552 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
5553 (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")
5554 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
5555 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
5556
5557 89/<- %esp 5/r32/ebp
5558 5d/pop-to-ebp
5559 c3/return
5560
5561 test-convert-function-with-local-array-var-in-mem:
5562
5563 55/push-ebp
5564 89/<- %ebp 4/r32/esp
5565
5566 (clear-stream _test-input-stream)
5567 (clear-stream $_test-input-buffered-file->buffer)
5568 (clear-stream _test-output-stream)
5569 (clear-stream $_test-output-buffered-file->buffer)
5570
5571 (write _test-input-stream "fn foo {\n")
5572 (write _test-input-stream " var x: (array int 3)\n")
5573 (write _test-input-stream "}\n")
5574
5575 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5576 (flush _test-output-buffered-file)
5577 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5583
5584 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
5585 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
5586 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
5587 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
5588 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
5589 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
5590
5591 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
5592 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
5593
5594 (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")
5595
5596 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
5597 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
5598 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
5599 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
5600 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
5601 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
5602
5603 89/<- %esp 5/r32/ebp
5604 5d/pop-to-ebp
5605 c3/return
5606
5607 test-array-size-in-hex:
5608
5609 55/push-ebp
5610 89/<- %ebp 4/r32/esp
5611
5612 (clear-stream _test-input-stream)
5613 (clear-stream $_test-input-buffered-file->buffer)
5614 (clear-stream _test-output-stream)
5615 (clear-stream $_test-output-buffered-file->buffer)
5616 (clear-stream _test-error-stream)
5617 (clear-stream $_test-error-buffered-file->buffer)
5618
5619 68/push 0/imm32
5620 68/push 0/imm32
5621 89/<- %edx 4/r32/esp
5622 (tailor-exit-descriptor %edx 0x10)
5623
5624 (write _test-input-stream "fn foo {\n")
5625 (write _test-input-stream " var x: (array int 10)\n")
5626 (write _test-input-stream "}\n")
5627
5628 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5629
5630
5631 89/<- %edx 4/r32/esp
5632 (flush _test-output-buffered-file)
5633 (flush _test-error-buffered-file)
5634 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
5640
5641 (check-stream-equal _test-output-stream "" "F - test-array-size-in-hex: output should be empty")
5642 (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")
5643
5644 (check-ints-equal *(edx+4) 2 "F - test-array-size-in-hex: exit status")
5645
5646 81 0/subop/add %esp 8/imm32
5647
5648 5d/pop-to-ebp
5649 c3/return
5650
5651 test-array-size-with-metadata:
5652
5653 55/push-ebp
5654 89/<- %ebp 4/r32/esp
5655
5656 (clear-stream _test-input-stream)
5657 (clear-stream $_test-input-buffered-file->buffer)
5658 (clear-stream _test-output-stream)
5659 (clear-stream $_test-output-buffered-file->buffer)
5660
5661 (write _test-input-stream "fn foo {\n")
5662 (write _test-input-stream " var x: (array int 3/bar)\n")
5663 (write _test-input-stream "}\n")
5664
5665 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5666 (flush _test-output-buffered-file)
5667 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5673
5674
5675 89/<- %esp 5/r32/ebp
5676 5d/pop-to-ebp
5677 c3/return
5678
5679 test-convert-function-with-populate:
5680
5681 55/push-ebp
5682 89/<- %ebp 4/r32/esp
5683
5684 (clear-stream _test-input-stream)
5685 (clear-stream $_test-input-buffered-file->buffer)
5686 (clear-stream _test-output-stream)
5687 (clear-stream $_test-output-buffered-file->buffer)
5688
5689 (write _test-input-stream "fn foo {\n")
5690 (write _test-input-stream " var x/ecx: (addr handle array int) <- copy 0\n")
5691 (write _test-input-stream " populate x, 7\n")
5692 (write _test-input-stream "}\n")
5693
5694 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5695 (flush _test-output-buffered-file)
5696 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5702
5703 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-populate/0")
5704 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-populate/1")
5705 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-populate/2")
5706 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-populate/3")
5707 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-populate/4")
5708 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-populate/5")
5709 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-populate/6")
5710 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-populate/7")
5711 (check-next-stream-line-equal _test-output-stream " (allocate-array2 Heap 0x00000004 7 %ecx)" "F - test-convert-function-with-populate/8")
5712 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-populate/9")
5713 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-populate/10")
5714 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-populate/11")
5715 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-populate/12")
5716 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-populate/13")
5717 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-populate/14")
5718 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-populate/15")
5719
5720 89/<- %esp 5/r32/ebp
5721 5d/pop-to-ebp
5722 c3/return
5723
5724
5725 test-convert-function-with-local-array-of-bytes-in-mem:
5726
5727 55/push-ebp
5728 89/<- %ebp 4/r32/esp
5729
5730 (clear-stream _test-input-stream)
5731 (clear-stream $_test-input-buffered-file->buffer)
5732 (clear-stream _test-output-stream)
5733 (clear-stream $_test-output-buffered-file->buffer)
5734
5735 (write _test-input-stream "fn foo {\n")
5736 (write _test-input-stream " var x: (array byte 3)\n")
5737 (write _test-input-stream "}\n")
5738
5739 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5740 (flush _test-output-buffered-file)
5741 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5747
5748 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
5749 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
5750 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
5751 (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")
5752 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
5753 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
5754
5755 (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")
5756 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
5757
5758 (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")
5759
5760 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
5761 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
5762 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
5763 (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")
5764 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
5765 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
5766
5767 89/<- %esp 5/r32/ebp
5768 5d/pop-to-ebp
5769 c3/return
5770
5771 test-convert-address:
5772
5773 55/push-ebp
5774 89/<- %ebp 4/r32/esp
5775
5776 (clear-stream _test-input-stream)
5777 (clear-stream $_test-input-buffered-file->buffer)
5778 (clear-stream _test-output-stream)
5779 (clear-stream $_test-output-buffered-file->buffer)
5780
5781 (write _test-input-stream "fn foo {\n")
5782 (write _test-input-stream " var a: int\n")
5783 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
5784 (write _test-input-stream "}\n")
5785
5786 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5787 (flush _test-output-buffered-file)
5788 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5794
5795 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
5796 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
5797 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
5798 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
5799 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
5800 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
5801 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
5802 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
5803 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
5804 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
5805 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
5806 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
5807 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
5808 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
5809 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
5810 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
5811 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
5812
5813 89/<- %esp 5/r32/ebp
5814 5d/pop-to-ebp
5815 c3/return
5816
5817 test-convert-floating-point-convert:
5818
5819 55/push-ebp
5820 89/<- %ebp 4/r32/esp
5821
5822 (clear-stream _test-input-stream)
5823 (clear-stream $_test-input-buffered-file->buffer)
5824 (clear-stream _test-output-stream)
5825 (clear-stream $_test-output-buffered-file->buffer)
5826
5827 (write _test-input-stream "fn foo {\n")
5828 (write _test-input-stream " var a/eax: int <- copy 0\n")
5829 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5830 (write _test-input-stream "}\n")
5831
5832 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5833 (flush _test-output-buffered-file)
5834 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5840
5841 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert/0")
5842 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert/1")
5843 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert/2")
5844 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert/3")
5845 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert/4")
5846 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert/5")
5847 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert/6")
5848 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert/7")
5849 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert/8")
5850 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert/9")
5851 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert/10")
5852 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert/11")
5853 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert/12")
5854 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert/13")
5855 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert/14")
5856 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert/15")
5857 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert/16")
5858 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert/17")
5859 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert/18")
5860 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert/19")
5861
5862 89/<- %esp 5/r32/ebp
5863 5d/pop-to-ebp
5864 c3/return
5865
5866 test-convert-floating-point-convert-2:
5867
5868 55/push-ebp
5869 89/<- %ebp 4/r32/esp
5870
5871 (clear-stream _test-input-stream)
5872 (clear-stream $_test-input-buffered-file->buffer)
5873 (clear-stream _test-output-stream)
5874 (clear-stream $_test-output-buffered-file->buffer)
5875
5876 (write _test-input-stream "fn foo {\n")
5877 (write _test-input-stream " var a/eax: int <- copy 0\n")
5878 (write _test-input-stream " var b/xmm1: float <- convert a\n")
5879 (write _test-input-stream " a <- convert b\n")
5880 (write _test-input-stream "}\n")
5881
5882 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5883 (flush _test-output-buffered-file)
5884 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5890
5891 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert-2/0")
5892 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert-2/1")
5893 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert-2/2")
5894 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert-2/3")
5895 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert-2/4")
5896 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert-2/5")
5897 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert-2/6")
5898 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert-2/7")
5899 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert-2/8")
5900 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert-2/9")
5901 (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")
5902 (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")
5903 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert-2/12")
5904 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert-2/13")
5905 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert-2/14")
5906 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert-2/15")
5907 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert-2/16")
5908 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert-2/17")
5909 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert-2/18")
5910 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert-2/19")
5911 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert-2/20")
5912
5913 89/<- %esp 5/r32/ebp
5914 5d/pop-to-ebp
5915 c3/return
5916
5917 test-convert-floating-point-operation:
5918
5919 55/push-ebp
5920 89/<- %ebp 4/r32/esp
5921
5922 (clear-stream _test-input-stream)
5923 (clear-stream $_test-input-buffered-file->buffer)
5924 (clear-stream _test-output-stream)
5925 (clear-stream $_test-output-buffered-file->buffer)
5926
5927 (write _test-input-stream "fn f {\n")
5928 (write _test-input-stream " var m: float\n")
5929 (write _test-input-stream " var x/xmm1: float <- copy m\n")
5930 (write _test-input-stream " var y/xmm5: float <- copy m\n")
5931 (write _test-input-stream " x <- copy y\n")
5932 (write _test-input-stream " copy-to m, y\n")
5933 (write _test-input-stream " x <- add y\n")
5934 (write _test-input-stream " x <- add m\n")
5935 (write _test-input-stream " x <- subtract y\n")
5936 (write _test-input-stream " x <- subtract m\n")
5937 (write _test-input-stream " x <- multiply y\n")
5938 (write _test-input-stream " x <- multiply m\n")
5939 (write _test-input-stream " x <- divide y\n")
5940 (write _test-input-stream " x <- divide m\n")
5941 (write _test-input-stream " x <- reciprocal y\n")
5942 (write _test-input-stream " x <- reciprocal m\n")
5943 (write _test-input-stream " x <- square-root y\n")
5944 (write _test-input-stream " x <- square-root m\n")
5945 (write _test-input-stream " x <- inverse-square-root y\n")
5946 (write _test-input-stream " x <- inverse-square-root m\n")
5947 (write _test-input-stream " x <- max y\n")
5948 (write _test-input-stream " x <- max m\n")
5949 (write _test-input-stream " x <- min y\n")
5950 (write _test-input-stream " x <- min m\n")
5951 (write _test-input-stream " compare x, y\n")
5952 (write _test-input-stream " compare x, m\n")
5953 (write _test-input-stream "}\n")
5954
5955 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5956 (flush _test-output-buffered-file)
5957 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
5963
5964 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-operation/0")
5965 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-operation/1")
5966 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-operation/2")
5967 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-operation/3")
5968 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-operation/4")
5969 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-operation/5")
5970 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-operation/6")
5971 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/7")
5972 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-operation/8")
5973 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/9")
5974 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/10")
5975 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 5/x32" "F - test-convert-floating-point-operation/11")
5976 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/12")
5977 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/13")
5978 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/14")
5979 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/15")
5980 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/16")
5981 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/17")
5982 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/18")
5983 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/19")
5984 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/20")
5985 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/21")
5986 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/22")
5987 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/23")
5988 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/24")
5989 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/25")
5990 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/26")
5991 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/27")
5992 (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")
5993 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/29")
5994 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/30")
5995 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/31")
5996 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/32")
5997 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/33")
5998 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/34")
5999 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 5/x32" "F - test-convert-floating-point-operation/35")
6000 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/36")
6001 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-operation/37")
6002 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/38")
6003 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-operation/39")
6004 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-operation/40")
6005 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-operation/41")
6006 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-operation/42")
6007 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-operation/43")
6008 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-operation/44")
6009 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-operation/45")
6010
6011 89/<- %esp 5/r32/ebp
6012 5d/pop-to-ebp
6013 c3/return
6014
6015 test-convert-floating-point-dereferenced:
6016
6017 55/push-ebp
6018 89/<- %ebp 4/r32/esp
6019
6020 (clear-stream _test-input-stream)
6021 (clear-stream $_test-input-buffered-file->buffer)
6022 (clear-stream _test-output-stream)
6023 (clear-stream $_test-output-buffered-file->buffer)
6024
6025 (write _test-input-stream "fn f {\n")
6026 (write _test-input-stream " var m: float\n")
6027 (write _test-input-stream " var x/xmm1: float <- copy m\n")
6028 (write _test-input-stream " var y/eax: (addr float) <- copy 0\n")
6029 (write _test-input-stream " x <- multiply *y\n")
6030 (write _test-input-stream "}\n")
6031
6032 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6033 (flush _test-output-buffered-file)
6034 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6040
6041 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-dereferenced/0")
6042 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-dereferenced/1")
6043 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-dereferenced/2")
6044 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-dereferenced/3")
6045 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-dereferenced/4")
6046 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-dereferenced/5")
6047 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-dereferenced/6")
6048 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-dereferenced/7")
6049 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-dereferenced/8")
6050 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-dereferenced/9")
6051 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-dereferenced/10")
6052 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-dereferenced/11")
6053 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *eax 0x00000001/x32" "F - test-convert-floating-point-dereferenced/12")
6054 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-dereferenced/13")
6055 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-dereferenced/14")
6056 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
6057 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-dereferenced/16")
6058 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-dereferenced/17")
6059 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-dereferenced/18")
6060 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-dereferenced/19")
6061 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-dereferenced/20")
6062 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-dereferenced/21")
6063 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-dereferenced/22")
6064
6065 89/<- %esp 5/r32/ebp
6066 5d/pop-to-ebp
6067 c3/return
6068
6069 test-convert-length-of-array:
6070
6071 55/push-ebp
6072 89/<- %ebp 4/r32/esp
6073
6074 (clear-stream _test-input-stream)
6075 (clear-stream $_test-input-buffered-file->buffer)
6076 (clear-stream _test-output-stream)
6077 (clear-stream $_test-output-buffered-file->buffer)
6078
6079 (write _test-input-stream "fn foo a: (addr array int) {\n")
6080 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
6081 (write _test-input-stream " var c/eax: int <- length b\n")
6082 (write _test-input-stream "}\n")
6083
6084 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6085 (flush _test-output-buffered-file)
6086 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6092
6093 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
6094 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
6095 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
6096 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
6097 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
6098 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
6099 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
6100 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
6101 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
6102 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
6103 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
6104 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
6105 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
6106 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
6107 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
6108 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
6109 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
6110
6111 89/<- %esp 5/r32/ebp
6112 5d/pop-to-ebp
6113 c3/return
6114
6115
6116 test-convert-length-of-array-of-bytes:
6117
6118 55/push-ebp
6119 89/<- %ebp 4/r32/esp
6120
6121 (clear-stream _test-input-stream)
6122 (clear-stream $_test-input-buffered-file->buffer)
6123 (clear-stream _test-output-stream)
6124 (clear-stream $_test-output-buffered-file->buffer)
6125
6126 (write _test-input-stream "fn foo a: (addr array byte) {\n")
6127 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
6128 (write _test-input-stream " var c/eax: int <- length b\n")
6129 (write _test-input-stream "}\n")
6130
6131 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6132 (flush _test-output-buffered-file)
6133 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6139
6140 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
6141 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
6142 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
6143 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
6144 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
6145 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
6146 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
6147 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
6148 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
6149 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
6150 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
6151 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
6152 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
6153 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
6154 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
6155 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
6156
6157 89/<- %esp 5/r32/ebp
6158 5d/pop-to-ebp
6159 c3/return
6160
6161 test-convert-length-of-array-on-stack:
6162
6163 55/push-ebp
6164 89/<- %ebp 4/r32/esp
6165
6166 (clear-stream _test-input-stream)
6167 (clear-stream $_test-input-buffered-file->buffer)
6168 (clear-stream _test-output-stream)
6169 (clear-stream $_test-output-buffered-file->buffer)
6170
6171 (write _test-input-stream "fn foo {\n")
6172 (write _test-input-stream " var a: (array int 3)\n")
6173 (write _test-input-stream " var b/eax: int <- length a\n")
6174 (write _test-input-stream "}\n")
6175
6176 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6177 (flush _test-output-buffered-file)
6178 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6184
6185 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
6186 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
6187 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
6188 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
6189 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
6190 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
6191
6192 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
6193 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
6194 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
6195 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
6196 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
6197 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
6198 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
6199 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
6200 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
6201 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
6202 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
6203 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
6204 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
6205
6206 89/<- %esp 5/r32/ebp
6207 5d/pop-to-ebp
6208 c3/return
6209
6210 test-reg-var-def-with-read-of-same-register:
6211
6212 55/push-ebp
6213 89/<- %ebp 4/r32/esp
6214
6215 (clear-stream _test-input-stream)
6216 (clear-stream $_test-input-buffered-file->buffer)
6217 (clear-stream _test-output-stream)
6218 (clear-stream $_test-output-buffered-file->buffer)
6219 (clear-stream _test-error-stream)
6220 (clear-stream $_test-error-buffered-file->buffer)
6221
6222 68/push 0/imm32
6223 68/push 0/imm32
6224 89/<- %edx 4/r32/esp
6225 (tailor-exit-descriptor %edx 0x10)
6226
6227 (write _test-input-stream "fn foo {\n")
6228 (write _test-input-stream " var x/eax: int <- copy 3\n")
6229 (write _test-input-stream " var y/eax: int <- add x\n")
6230 (write _test-input-stream "}\n")
6231
6232 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6233
6234
6235 89/<- %edx 4/r32/esp
6236 (flush _test-output-buffered-file)
6237 (flush _test-error-buffered-file)
6238 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6244 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
6250 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
6251
6252 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
6253 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
6254 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
6255 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
6256 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
6257 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
6258 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
6259 (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")
6260 (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")
6261 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/9")
6262 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/10")
6263 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/11")
6264 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/12")
6265 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/13")
6266 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/14")
6267 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/15")
6268
6269 81 0/subop/add %esp 8/imm32
6270
6271 5d/pop-to-ebp
6272 c3/return
6273
6274 test-convert-index-into-array:
6275
6276 55/push-ebp
6277 89/<- %ebp 4/r32/esp
6278
6279 (clear-stream _test-input-stream)
6280 (clear-stream $_test-input-buffered-file->buffer)
6281 (clear-stream _test-output-stream)
6282 (clear-stream $_test-output-buffered-file->buffer)
6283
6284 (write _test-input-stream "fn foo {\n")
6285 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6286 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6287 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
6288 (write _test-input-stream "}\n")
6289
6290 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6291 (flush _test-output-buffered-file)
6292 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6298
6299 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
6300 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
6301 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
6302 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
6303 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
6304 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
6305 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
6306 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
6307 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
6308 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
6309 (check-next-stream-line-equal _test-output-stream " (__check-mu-array-bounds %ecx 0x00000004 *eax \"foo\" \"arr\")" "F - test-convert-index-into-array/10")
6310 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/11")
6311 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/12")
6312 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/13")
6313 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/14")
6314 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/15")
6315 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/16")
6316 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/17")
6317 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/18")
6318 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/19")
6319
6320 89/<- %esp 5/r32/ebp
6321 5d/pop-to-ebp
6322 c3/return
6323
6324 test-convert-index-into-array-of-bytes:
6325
6326 55/push-ebp
6327 89/<- %ebp 4/r32/esp
6328
6329 (clear-stream _test-input-stream)
6330 (clear-stream $_test-input-buffered-file->buffer)
6331 (clear-stream _test-output-stream)
6332 (clear-stream $_test-output-buffered-file->buffer)
6333
6334 (write _test-input-stream "fn foo {\n")
6335 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6336 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6337 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
6338 (write _test-input-stream "}\n")
6339
6340 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6341 (flush _test-output-buffered-file)
6342 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6348
6349 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
6350 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
6351 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
6352 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
6353 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
6354 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
6355 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
6356 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
6357 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
6358 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
6359 (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")
6360 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000000 + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes/11")
6361 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/12")
6362 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/13")
6363 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/14")
6364 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/15")
6365 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/16")
6366 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/17")
6367 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/18")
6368 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/19")
6369
6370 89/<- %esp 5/r32/ebp
6371 5d/pop-to-ebp
6372 c3/return
6373
6374 test-convert-index-into-array-with-literal:
6375
6376 55/push-ebp
6377 89/<- %ebp 4/r32/esp
6378
6379 (clear-stream _test-input-stream)
6380 (clear-stream $_test-input-buffered-file->buffer)
6381 (clear-stream _test-output-stream)
6382 (clear-stream $_test-output-buffered-file->buffer)
6383
6384 (write _test-input-stream "fn foo {\n")
6385 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6386 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6387 (write _test-input-stream "}\n")
6388
6389 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6390 (flush _test-output-buffered-file)
6391 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6397
6398 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
6399 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
6400 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
6401 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
6402 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
6403 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
6404 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
6405 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
6406 (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")
6407
6408 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/9")
6409 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/10")
6410 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/11")
6411 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/12")
6412 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/13")
6413 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/14")
6414 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/15")
6415 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/16")
6416
6417 89/<- %esp 5/r32/ebp
6418 5d/pop-to-ebp
6419 c3/return
6420
6421 test-convert-index-into-array-of-bytes-with-literal:
6422
6423 55/push-ebp
6424 89/<- %ebp 4/r32/esp
6425
6426 (clear-stream _test-input-stream)
6427 (clear-stream $_test-input-buffered-file->buffer)
6428 (clear-stream _test-output-stream)
6429 (clear-stream $_test-output-buffered-file->buffer)
6430
6431 (write _test-input-stream "fn foo {\n")
6432 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6433 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6434 (write _test-input-stream "}\n")
6435
6436 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6437 (flush _test-output-buffered-file)
6438 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6444
6445 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
6446 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
6447 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
6448 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
6449 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
6450 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
6451 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
6452 (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")
6453 (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")
6454
6455 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000006) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-with-literal/8")
6456 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
6457 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
6458 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
6459 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
6460 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
6461 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
6462 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
6463
6464 89/<- %esp 5/r32/ebp
6465 5d/pop-to-ebp
6466 c3/return
6467
6468 test-convert-index-into-array-on-stack:
6469
6470 55/push-ebp
6471 89/<- %ebp 4/r32/esp
6472
6473 (clear-stream _test-input-stream)
6474 (clear-stream $_test-input-buffered-file->buffer)
6475 (clear-stream _test-output-stream)
6476 (clear-stream $_test-output-buffered-file->buffer)
6477
6478 (write _test-input-stream "fn foo {\n")
6479 (write _test-input-stream " var arr: (array int 3)\n")
6480 (write _test-input-stream " var idx/eax: int <- copy 2\n")
6481 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
6482 (write _test-input-stream "}\n")
6483
6484 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6485 (flush _test-output-buffered-file)
6486 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6492
6493 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
6494 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
6495 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
6496 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
6497 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
6498 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
6499
6500 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
6501 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
6502
6503 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
6504 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
6505 (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")
6506
6507 (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")
6508
6509 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/12")
6510
6511 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/13")
6512
6513 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/14")
6514 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/15")
6515 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/16")
6516 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/17")
6517 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/18")
6518 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/19")
6519
6520 89/<- %esp 5/r32/ebp
6521 5d/pop-to-ebp
6522 c3/return
6523
6524 test-convert-index-into-array-on-stack-with-literal:
6525
6526 55/push-ebp
6527 89/<- %ebp 4/r32/esp
6528
6529 (clear-stream _test-input-stream)
6530 (clear-stream $_test-input-buffered-file->buffer)
6531 (clear-stream _test-output-stream)
6532 (clear-stream $_test-output-buffered-file->buffer)
6533
6534 (write _test-input-stream "fn foo {\n")
6535 (write _test-input-stream " var arr: (array int 3)\n")
6536 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
6537 (write _test-input-stream "}\n")
6538
6539 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6540 (flush _test-output-buffered-file)
6541 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6547
6548 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
6549 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
6550 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
6551 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
6552 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
6553 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
6554
6555 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
6556 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
6557
6558 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
6559 (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")
6560
6561 (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")
6562
6563 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/11")
6564
6565 (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")
6566
6567 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/13")
6568 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/14")
6569 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/15")
6570 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
6571 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/17")
6572 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/18")
6573
6574 89/<- %esp 5/r32/ebp
6575 5d/pop-to-ebp
6576 c3/return
6577
6578 test-convert-index-into-array-of-bytes-on-stack-with-literal:
6579
6580 55/push-ebp
6581 89/<- %ebp 4/r32/esp
6582
6583 (clear-stream _test-input-stream)
6584 (clear-stream $_test-input-buffered-file->buffer)
6585 (clear-stream _test-output-stream)
6586 (clear-stream $_test-output-buffered-file->buffer)
6587
6588 (write _test-input-stream "fn foo {\n")
6589 (write _test-input-stream " var arr: (array byte 3)\n")
6590 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
6591 (write _test-input-stream "}\n")
6592
6593 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6594 (flush _test-output-buffered-file)
6595 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6601
6602 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
6603 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
6604 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
6605 (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")
6606 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
6607 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
6608
6609 (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")
6610 (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")
6611
6612 (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")
6613 (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")
6614
6615 (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")
6616
6617 (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")
6618
6619 (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")
6620
6621 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
6622 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
6623 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
6624 (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")
6625 (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")
6626 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/18")
6627
6628 89/<- %esp 5/r32/ebp
6629 5d/pop-to-ebp
6630 c3/return
6631
6632 test-convert-index-into-array-using-offset:
6633
6634 55/push-ebp
6635 89/<- %ebp 4/r32/esp
6636
6637 (clear-stream _test-input-stream)
6638 (clear-stream $_test-input-buffered-file->buffer)
6639 (clear-stream _test-output-stream)
6640 (clear-stream $_test-output-buffered-file->buffer)
6641
6642 (write _test-input-stream "fn foo {\n")
6643 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6644 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6645 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6646 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6647 (write _test-input-stream "}\n")
6648
6649 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6650 (flush _test-output-buffered-file)
6651 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6657
6658 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
6659 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
6660 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
6661 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
6662 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
6663 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
6664 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
6665 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
6666 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
6667 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
6668 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
6669 (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")
6670 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset/12")
6671 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/13")
6672 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/14")
6673 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/15")
6674 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/16")
6675 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/17")
6676 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/18")
6677 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/19")
6678 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/20")
6679
6680 89/<- %esp 5/r32/ebp
6681 5d/pop-to-ebp
6682 c3/return
6683
6684 test-convert-index-into-array-of-bytes-using-offset:
6685
6686 55/push-ebp
6687 89/<- %ebp 4/r32/esp
6688
6689 (clear-stream _test-input-stream)
6690 (clear-stream $_test-input-buffered-file->buffer)
6691 (clear-stream _test-output-stream)
6692 (clear-stream $_test-output-buffered-file->buffer)
6693
6694 (write _test-input-stream "fn foo {\n")
6695 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6696 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6697 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6698 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6699 (write _test-input-stream "}\n")
6700
6701 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6702 (flush _test-output-buffered-file)
6703 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6709
6710 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
6711 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
6712 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
6713 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
6714 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
6715 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
6716 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
6717 (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")
6718 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
6719 (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")
6720 (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")
6721 (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")
6722 (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/12")
6723 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/13")
6724 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/14")
6725 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/15")
6726 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/16")
6727 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/17")
6728 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
6729 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/19")
6730 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/20")
6731
6732 89/<- %esp 5/r32/ebp
6733 5d/pop-to-ebp
6734 c3/return
6735
6736 test-convert-index-into-array-using-offset-on-stack:
6737
6738 55/push-ebp
6739 89/<- %ebp 4/r32/esp
6740
6741 (clear-stream _test-input-stream)
6742 (clear-stream $_test-input-buffered-file->buffer)
6743 (clear-stream _test-output-stream)
6744 (clear-stream $_test-output-buffered-file->buffer)
6745
6746 (write _test-input-stream "fn foo {\n")
6747 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
6748 (write _test-input-stream " var idx: int\n")
6749 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
6750 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
6751 (write _test-input-stream "}\n")
6752
6753 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6754 (flush _test-output-buffered-file)
6755 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6761
6762 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
6763 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
6764 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
6765 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
6766 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
6767 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
6768 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
6769 (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")
6770 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
6771 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
6772 (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")
6773 (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")
6774 (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/12")
6775 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/13")
6776 (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/14")
6777 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/15")
6778 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/16")
6779 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/17")
6780 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/18")
6781 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
6782 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/20")
6783 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/21")
6784
6785 89/<- %esp 5/r32/ebp
6786 5d/pop-to-ebp
6787 c3/return
6788
6789 test-convert-index-into-array-of-bytes-using-offset-on-stack:
6790
6791 55/push-ebp
6792 89/<- %ebp 4/r32/esp
6793
6794 (clear-stream _test-input-stream)
6795 (clear-stream $_test-input-buffered-file->buffer)
6796 (clear-stream _test-output-stream)
6797 (clear-stream $_test-output-buffered-file->buffer)
6798
6799 (write _test-input-stream "fn foo {\n")
6800 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
6801 (write _test-input-stream " var idx: int\n")
6802 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
6803 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
6804 (write _test-input-stream "}\n")
6805
6806 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6807 (flush _test-output-buffered-file)
6808 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6814
6815 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
6816 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
6817 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
6818 (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")
6819 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
6820 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
6821 (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")
6822 (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")
6823 (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")
6824 (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")
6825 (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")
6826 (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")
6827 (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/12")
6828 (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/13")
6829 (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/14")
6830 (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/15")
6831 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
6832 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
6833 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
6834 (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/19")
6835 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
6836 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/21")
6837
6838 89/<- %esp 5/r32/ebp
6839 5d/pop-to-ebp
6840 c3/return
6841
6842 test-convert-function-and-type-definition:
6843
6844 55/push-ebp
6845 89/<- %ebp 4/r32/esp
6846
6847 (clear-stream _test-input-stream)
6848 (clear-stream $_test-input-buffered-file->buffer)
6849 (clear-stream _test-output-stream)
6850 (clear-stream $_test-output-buffered-file->buffer)
6851
6852 (write _test-input-stream "fn foo a: (addr t) {\n")
6853 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
6854 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
6855 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
6856 (write _test-input-stream "}\n")
6857 (write _test-input-stream "type t {\n")
6858 (write _test-input-stream " x: int\n")
6859 (write _test-input-stream " y: int\n")
6860 (write _test-input-stream "}\n")
6861
6862 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6863 (flush _test-output-buffered-file)
6864 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
6870
6871 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
6872 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
6873 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
6874 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
6875 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
6876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
6877 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
6878 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
6879 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
6880 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
6881 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
6882 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
6883 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
6884 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
6885 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
6886 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
6887 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
6888 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
6889 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
6890
6891 89/<- %esp 5/r32/ebp
6892 5d/pop-to-ebp
6893 c3/return
6894
6895 test-type-definition-with-array:
6896
6897 55/push-ebp
6898 89/<- %ebp 4/r32/esp
6899
6900 (clear-stream _test-input-stream)
6901 (clear-stream $_test-input-buffered-file->buffer)
6902 (clear-stream _test-output-stream)
6903 (clear-stream $_test-output-buffered-file->buffer)
6904 (clear-stream _test-error-stream)
6905 (clear-stream $_test-error-buffered-file->buffer)
6906
6907 68/push 0/imm32
6908 68/push 0/imm32
6909 89/<- %edx 4/r32/esp
6910 (tailor-exit-descriptor %edx 0x10)
6911
6912 (write _test-input-stream "type t {\n")
6913 (write _test-input-stream " a: (array int 3)\n")
6914 (write _test-input-stream "}\n")
6915
6916 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6917
6918
6919 89/<- %edx 4/r32/esp
6920 (flush _test-output-buffered-file)
6921 (flush _test-error-buffered-file)
6922 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
6928
6929 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-array: output should be empty")
6930 (check-next-stream-line-equal _test-error-stream "type t: 'array' elements not allowed for now" "F - test-type-definition-with-array: error message")
6931
6932 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-array: exit status")
6933
6934 81 0/subop/add %esp 8/imm32
6935
6936 5d/pop-to-ebp
6937 c3/return
6938
6939 test-type-definition-with-addr:
6940
6941 55/push-ebp
6942 89/<- %ebp 4/r32/esp
6943
6944 (clear-stream _test-input-stream)
6945 (clear-stream $_test-input-buffered-file->buffer)
6946 (clear-stream _test-output-stream)
6947 (clear-stream $_test-output-buffered-file->buffer)
6948 (clear-stream _test-error-stream)
6949 (clear-stream $_test-error-buffered-file->buffer)
6950
6951 68/push 0/imm32
6952 68/push 0/imm32
6953 89/<- %edx 4/r32/esp
6954 (tailor-exit-descriptor %edx 0x10)
6955
6956 (write _test-input-stream "type t {\n")
6957 (write _test-input-stream " a: (addr int)\n")
6958 (write _test-input-stream "}\n")
6959
6960 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6961
6962
6963 89/<- %edx 4/r32/esp
6964 (flush _test-output-buffered-file)
6965 (flush _test-error-buffered-file)
6966 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
6972
6973 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-addr: output should be empty")
6974 (check-next-stream-line-equal _test-error-stream "type t: 'addr' elements not allowed" "F - test-type-definition-with-addr: error message")
6975
6976 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-addr: exit status")
6977
6978 81 0/subop/add %esp 8/imm32
6979
6980 5d/pop-to-ebp
6981 c3/return
6982
6983 test-convert-function-with-local-var-with-user-defined-type:
6984
6985 55/push-ebp
6986 89/<- %ebp 4/r32/esp
6987
6988 (clear-stream _test-input-stream)
6989 (clear-stream $_test-input-buffered-file->buffer)
6990 (clear-stream _test-output-stream)
6991 (clear-stream $_test-output-buffered-file->buffer)
6992
6993 (write _test-input-stream "fn foo {\n")
6994 (write _test-input-stream " var a: t\n")
6995 (write _test-input-stream "}\n")
6996 (write _test-input-stream "type t {\n")
6997 (write _test-input-stream " x: int\n")
6998 (write _test-input-stream " y: int\n")
6999 (write _test-input-stream "}\n")
7000
7001 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7002 (flush _test-output-buffered-file)
7003 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7009
7010 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
7011 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
7012 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
7013 (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")
7014 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
7015 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
7016 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
7017 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
7018 (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")
7019 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
7020 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
7021 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
7022 (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")
7023 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
7024 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
7025
7026 89/<- %esp 5/r32/ebp
7027 5d/pop-to-ebp
7028 c3/return
7029
7030 test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type:
7031
7032 55/push-ebp
7033 89/<- %ebp 4/r32/esp
7034
7035 (clear-stream _test-input-stream)
7036 (clear-stream $_test-input-buffered-file->buffer)
7037 (clear-stream _test-output-stream)
7038 (clear-stream $_test-output-buffered-file->buffer)
7039
7040 (write _test-input-stream "fn foo {\n")
7041 (write _test-input-stream " var a: t\n")
7042 (write _test-input-stream "}\n")
7043 (write _test-input-stream "type t {\n")
7044 (write _test-input-stream " x: s\n")
7045 (write _test-input-stream "}\n")
7046 (write _test-input-stream "type s {\n")
7047 (write _test-input-stream " z: int\n")
7048 (write _test-input-stream "}\n")
7049
7050 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7051 (flush _test-output-buffered-file)
7052 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7058
7059 (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")
7060 (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")
7061 (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")
7062 (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")
7063 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/4")
7064 (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")
7065 (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")
7066 (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")
7067 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/9")
7068 (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")
7069 (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")
7070 (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")
7071 (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")
7072 (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")
7073
7074 89/<- %esp 5/r32/ebp
7075 5d/pop-to-ebp
7076 c3/return
7077
7078 test-convert-function-call-with-arg-of-user-defined-type:
7079
7080 55/push-ebp
7081 89/<- %ebp 4/r32/esp
7082
7083 (clear-stream _test-input-stream)
7084 (clear-stream $_test-input-buffered-file->buffer)
7085 (clear-stream _test-output-stream)
7086 (clear-stream $_test-output-buffered-file->buffer)
7087
7088 (write _test-input-stream "fn f {\n")
7089 (write _test-input-stream " var a: t\n")
7090 (write _test-input-stream " foo a\n")
7091 (write _test-input-stream "}\n")
7092 (write _test-input-stream "fn foo x: t {\n")
7093 (write _test-input-stream "}\n")
7094 (write _test-input-stream "type t {\n")
7095 (write _test-input-stream " x: int\n")
7096 (write _test-input-stream " y: int\n")
7097 (write _test-input-stream "}\n")
7098
7099 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7100 (flush _test-output-buffered-file)
7101 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7107
7108 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
7109 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
7110 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
7111 (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")
7112 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
7113 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
7114
7115 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
7116 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
7117
7118 (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")
7119
7120 (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")
7121 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
7122 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
7123 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
7124 (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")
7125 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
7126 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
7127 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
7128 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
7129 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
7130 (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")
7131 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
7132 (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")
7133 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
7134 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
7135
7136 89/<- %esp 5/r32/ebp
7137 5d/pop-to-ebp
7138 c3/return
7139
7140 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
7141
7142 55/push-ebp
7143 89/<- %ebp 4/r32/esp
7144
7145 (clear-stream _test-input-stream)
7146 (clear-stream $_test-input-buffered-file->buffer)
7147 (clear-stream _test-output-stream)
7148 (clear-stream $_test-output-buffered-file->buffer)
7149
7150 (write _test-input-stream "fn f {\n")
7151 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
7152 (write _test-input-stream " foo *a\n")
7153 (write _test-input-stream "}\n")
7154 (write _test-input-stream "fn foo x: t {\n")
7155 (write _test-input-stream "}\n")
7156 (write _test-input-stream "type t {\n")
7157 (write _test-input-stream " x: int\n")
7158 (write _test-input-stream " y: int\n")
7159 (write _test-input-stream "}\n")
7160
7161 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7162 (flush _test-output-buffered-file)
7163 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7169
7170 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
7171 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
7172 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
7173 (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")
7174 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
7175 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
7176
7177 (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")
7178 (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")
7179
7180 (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")
7181
7182 (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")
7183 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
7184 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
7185 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
7186 (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")
7187 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
7188 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
7189 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
7190 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
7191 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
7192 (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")
7193 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
7194 (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")
7195 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
7196 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
7197
7198 89/<- %esp 5/r32/ebp
7199 5d/pop-to-ebp
7200 c3/return
7201
7202
7203
7204 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
7205
7206 55/push-ebp
7207 89/<- %ebp 4/r32/esp
7208
7209 (clear-stream _test-input-stream)
7210 (clear-stream $_test-input-buffered-file->buffer)
7211 (clear-stream _test-output-stream)
7212 (clear-stream $_test-output-buffered-file->buffer)
7213
7214 (write _test-input-stream "fn f {\n")
7215 (write _test-input-stream " var a: t\n")
7216 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
7217 (write _test-input-stream " foo b\n")
7218 (write _test-input-stream "}\n")
7219 (write _test-input-stream "fn foo x: (addr t) {\n")
7220 (write _test-input-stream " var x/ecx: (addr t) <- copy x\n")
7221 (write _test-input-stream "}\n")
7222 (write _test-input-stream "type t {\n")
7223 (write _test-input-stream " x: int\n")
7224 (write _test-input-stream " y: int\n")
7225 (write _test-input-stream "}\n")
7226
7227 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7228 (flush _test-output-buffered-file)
7229 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7235
7236 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
7237 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
7238 (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")
7239 (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")
7240 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
7241 (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")
7242
7243 (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")
7244 (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")
7245
7246 (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")
7247 (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")
7248
7249 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
7250
7251 (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")
7252 (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")
7253 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
7254 (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")
7255 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
7256 (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")
7257 (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")
7258 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
7259 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
7260 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
7261 (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")
7262 (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")
7263 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
7264 (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")
7265 (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")
7266 (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")
7267 (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")
7268 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
7269 (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")
7270 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
7271 (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")
7272 (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")
7273 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
7274
7275 89/<- %esp 5/r32/ebp
7276 5d/pop-to-ebp
7277 c3/return
7278
7279 test-convert-get-on-local-variable:
7280
7281 55/push-ebp
7282 89/<- %ebp 4/r32/esp
7283
7284 (clear-stream _test-input-stream)
7285 (clear-stream $_test-input-buffered-file->buffer)
7286 (clear-stream _test-output-stream)
7287 (clear-stream $_test-output-buffered-file->buffer)
7288
7289 (write _test-input-stream "fn foo {\n")
7290 (write _test-input-stream " var a: t\n")
7291 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7292 (write _test-input-stream "}\n")
7293 (write _test-input-stream "type t {\n")
7294 (write _test-input-stream " x: int\n")
7295 (write _test-input-stream " y: int\n")
7296 (write _test-input-stream "}\n")
7297
7298 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7299 (flush _test-output-buffered-file)
7300 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7306
7307 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
7308 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
7309 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
7310 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
7311 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
7312 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
7313
7314 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
7315 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
7316
7317 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
7318
7319 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
7320
7321 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
7322
7323 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
7324 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
7325 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
7326 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
7327 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
7328 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
7329 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
7330
7331 89/<- %esp 5/r32/ebp
7332 5d/pop-to-ebp
7333 c3/return
7334
7335 test-convert-get-on-function-argument:
7336
7337 55/push-ebp
7338 89/<- %ebp 4/r32/esp
7339
7340 (clear-stream _test-input-stream)
7341 (clear-stream $_test-input-buffered-file->buffer)
7342 (clear-stream _test-output-stream)
7343 (clear-stream $_test-output-buffered-file->buffer)
7344
7345 (write _test-input-stream "fn foo a: t {\n")
7346 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7347 (write _test-input-stream "}\n")
7348 (write _test-input-stream "type t {\n")
7349 (write _test-input-stream " x: int\n")
7350 (write _test-input-stream " y: int\n")
7351 (write _test-input-stream "}\n")
7352
7353 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7354 (flush _test-output-buffered-file)
7355 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7361
7362 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
7363 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
7364 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
7365 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
7366 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
7367 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
7368
7369 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
7370
7371 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
7372
7373 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
7374 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
7375 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
7376 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
7377 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
7378 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
7379 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
7380
7381 89/<- %esp 5/r32/ebp
7382 5d/pop-to-ebp
7383 c3/return
7384
7385 test-convert-get-on-function-argument-with-known-type:
7386
7387 55/push-ebp
7388 89/<- %ebp 4/r32/esp
7389
7390 (clear-stream _test-input-stream)
7391 (clear-stream $_test-input-buffered-file->buffer)
7392 (clear-stream _test-output-stream)
7393 (clear-stream $_test-output-buffered-file->buffer)
7394
7395 (write _test-input-stream "type t {\n")
7396 (write _test-input-stream " x: int\n")
7397 (write _test-input-stream " y: int\n")
7398 (write _test-input-stream "}\n")
7399 (write _test-input-stream "fn foo a: t {\n")
7400 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
7401 (write _test-input-stream "}\n")
7402
7403 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7404 (flush _test-output-buffered-file)
7405 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
7411
7412 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
7413 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
7414 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
7415 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
7416 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
7417 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
7418
7419 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
7420
7421 (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")
7422
7423 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
7424 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
7425 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
7426 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
7427 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
7428 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
7429 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
7430
7431 89/<- %esp 5/r32/ebp
7432 5d/pop-to-ebp
7433 c3/return
7434
7435 test-add-with-too-many-inouts:
7436
7437 55/push-ebp
7438 89/<- %ebp 4/r32/esp
7439
7440 (clear-stream _test-input-stream)
7441 (clear-stream $_test-input-buffered-file->buffer)
7442 (clear-stream _test-output-stream)
7443 (clear-stream $_test-output-buffered-file->buffer)
7444 (clear-stream _test-error-stream)
7445 (clear-stream $_test-error-buffered-file->buffer)
7446
7447 68/push 0/imm32
7448 68/push 0/imm32
7449 89/<- %edx 4/r32/esp
7450 (tailor-exit-descriptor %edx 0x10)
7451
7452 (write _test-input-stream "fn foo {\n")
7453 (write _test-input-stream " var a: int\n")
7454 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
7455 (write _test-input-stream "}\n")
7456
7457 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7458
7459
7460 89/<- %edx 4/r32/esp
7461 (flush _test-output-buffered-file)
7462 (flush _test-error-buffered-file)
7463 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7469
7470 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
7471 (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")
7472
7473 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
7474
7475 81 0/subop/add %esp 8/imm32
7476
7477 5d/pop-to-ebp
7478 c3/return
7479
7480 test-add-with-too-many-inouts-2:
7481
7482 55/push-ebp
7483 89/<- %ebp 4/r32/esp
7484
7485 (clear-stream _test-input-stream)
7486 (clear-stream $_test-input-buffered-file->buffer)
7487 (clear-stream _test-output-stream)
7488 (clear-stream $_test-output-buffered-file->buffer)
7489 (clear-stream _test-error-stream)
7490 (clear-stream $_test-error-buffered-file->buffer)
7491
7492 68/push 0/imm32
7493 68/push 0/imm32
7494 89/<- %edx 4/r32/esp
7495 (tailor-exit-descriptor %edx 0x10)
7496
7497 (write _test-input-stream "fn foo {\n")
7498 (write _test-input-stream " var a: int\n")
7499 (write _test-input-stream " add-to a, 0, 1\n")
7500 (write _test-input-stream "}\n")
7501
7502 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7503
7504
7505 89/<- %edx 4/r32/esp
7506 (flush _test-output-buffered-file)
7507 (flush _test-error-buffered-file)
7508 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7514
7515 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
7516 (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")
7517
7518 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
7519
7520 81 0/subop/add %esp 8/imm32
7521
7522 5d/pop-to-ebp
7523 c3/return
7524
7525 test-add-with-too-many-outputs:
7526
7527 55/push-ebp
7528 89/<- %ebp 4/r32/esp
7529
7530 (clear-stream _test-input-stream)
7531 (clear-stream $_test-input-buffered-file->buffer)
7532 (clear-stream _test-output-stream)
7533 (clear-stream $_test-output-buffered-file->buffer)
7534 (clear-stream _test-error-stream)
7535 (clear-stream $_test-error-buffered-file->buffer)
7536
7537 68/push 0/imm32
7538 68/push 0/imm32
7539 89/<- %edx 4/r32/esp
7540 (tailor-exit-descriptor %edx 0x10)
7541
7542 (write _test-input-stream "fn foo {\n")
7543 (write _test-input-stream " var a/eax: int <- copy 0\n")
7544 (write _test-input-stream " var b/ebx: int <- copy 0\n")
7545 (write _test-input-stream " var c/ecx: int <- copy 0\n")
7546 (write _test-input-stream " c, b <- add a\n")
7547 (write _test-input-stream "}\n")
7548
7549 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7550
7551
7552 89/<- %edx 4/r32/esp
7553 (flush _test-output-buffered-file)
7554 (flush _test-error-buffered-file)
7555 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7561
7562 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
7563 (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")
7564
7565 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
7566
7567 81 0/subop/add %esp 8/imm32
7568
7569 5d/pop-to-ebp
7570 c3/return
7571
7572 test-add-with-non-number:
7573
7574 55/push-ebp
7575 89/<- %ebp 4/r32/esp
7576
7577 (clear-stream _test-input-stream)
7578 (clear-stream $_test-input-buffered-file->buffer)
7579 (clear-stream _test-output-stream)
7580 (clear-stream $_test-output-buffered-file->buffer)
7581 (clear-stream _test-error-stream)
7582 (clear-stream $_test-error-buffered-file->buffer)
7583
7584 68/push 0/imm32
7585 68/push 0/imm32
7586 89/<- %edx 4/r32/esp
7587 (tailor-exit-descriptor %edx 0x10)
7588
7589 (write _test-input-stream "fn foo {\n")
7590 (write _test-input-stream " var a: int\n")
7591 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
7592 (write _test-input-stream "}\n")
7593
7594 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7595
7596
7597 89/<- %edx 4/r32/esp
7598 (flush _test-output-buffered-file)
7599 (flush _test-error-buffered-file)
7600 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7606
7607 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
7608 (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")
7609
7610 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
7611
7612 81 0/subop/add %esp 8/imm32
7613
7614 5d/pop-to-ebp
7615 c3/return
7616
7617 test-add-with-addr-dereferenced:
7618
7619 55/push-ebp
7620 89/<- %ebp 4/r32/esp
7621
7622 (clear-stream _test-input-stream)
7623 (clear-stream $_test-input-buffered-file->buffer)
7624 (clear-stream _test-output-stream)
7625 (clear-stream $_test-output-buffered-file->buffer)
7626
7627 (write _test-input-stream "fn foo {\n")
7628 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
7629 (write _test-input-stream " add-to *a, 1\n")
7630 (write _test-input-stream "}\n")
7631
7632 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7633 (flush _test-output-buffered-file)
7634
7635
7636 89/<- %esp 5/r32/ebp
7637 5d/pop-to-ebp
7638 c3/return
7639
7640 test-copy-with-no-inout:
7641
7642 55/push-ebp
7643 89/<- %ebp 4/r32/esp
7644
7645 (clear-stream _test-input-stream)
7646 (clear-stream $_test-input-buffered-file->buffer)
7647 (clear-stream _test-output-stream)
7648 (clear-stream $_test-output-buffered-file->buffer)
7649 (clear-stream _test-error-stream)
7650 (clear-stream $_test-error-buffered-file->buffer)
7651
7652 68/push 0/imm32
7653 68/push 0/imm32
7654 89/<- %edx 4/r32/esp
7655 (tailor-exit-descriptor %edx 0x10)
7656
7657 (write _test-input-stream "fn foo {\n")
7658 (write _test-input-stream " var x/eax: boolean <- copy\n")
7659 (write _test-input-stream "}\n")
7660
7661 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7662
7663
7664 89/<- %edx 4/r32/esp
7665 (flush _test-output-buffered-file)
7666 (flush _test-error-buffered-file)
7667 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7673
7674 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-inout: output should be empty")
7675 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an inout" "F - test-copy-with-no-inout: error message")
7676
7677 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-inout: exit status")
7678
7679 81 0/subop/add %esp 8/imm32
7680
7681 5d/pop-to-ebp
7682 c3/return
7683
7684 test-copy-with-multiple-inouts:
7685
7686 55/push-ebp
7687 89/<- %ebp 4/r32/esp
7688
7689 (clear-stream _test-input-stream)
7690 (clear-stream $_test-input-buffered-file->buffer)
7691 (clear-stream _test-output-stream)
7692 (clear-stream $_test-output-buffered-file->buffer)
7693 (clear-stream _test-error-stream)
7694 (clear-stream $_test-error-buffered-file->buffer)
7695
7696 68/push 0/imm32
7697 68/push 0/imm32
7698 89/<- %edx 4/r32/esp
7699 (tailor-exit-descriptor %edx 0x10)
7700
7701 (write _test-input-stream "fn foo {\n")
7702 (write _test-input-stream " var x/eax: boolean <- copy 0, 0\n")
7703 (write _test-input-stream "}\n")
7704
7705 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7706
7707
7708 89/<- %edx 4/r32/esp
7709 (flush _test-output-buffered-file)
7710 (flush _test-error-buffered-file)
7711 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7717
7718 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-inouts: output should be empty")
7719 (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")
7720
7721 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-inouts: exit status")
7722
7723 81 0/subop/add %esp 8/imm32
7724
7725 5d/pop-to-ebp
7726 c3/return
7727
7728 test-copy-with-no-output:
7729
7730 55/push-ebp
7731 89/<- %ebp 4/r32/esp
7732
7733 (clear-stream _test-input-stream)
7734 (clear-stream $_test-input-buffered-file->buffer)
7735 (clear-stream _test-output-stream)
7736 (clear-stream $_test-output-buffered-file->buffer)
7737 (clear-stream _test-error-stream)
7738 (clear-stream $_test-error-buffered-file->buffer)
7739
7740 68/push 0/imm32
7741 68/push 0/imm32
7742 89/<- %edx 4/r32/esp
7743 (tailor-exit-descriptor %edx 0x10)
7744
7745 (write _test-input-stream "fn foo {\n")
7746 (write _test-input-stream " copy 0\n")
7747 (write _test-input-stream "}\n")
7748
7749 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7750
7751
7752 89/<- %edx 4/r32/esp
7753 (flush _test-output-buffered-file)
7754 (flush _test-error-buffered-file)
7755 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7761
7762 (check-stream-equal _test-output-stream "" "F - test-copy-with-no-output: output should be empty")
7763 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'copy' expects an output" "F - test-copy-with-no-output: error message")
7764
7765 (check-ints-equal *(edx+4) 2 "F - test-copy-with-no-output: exit status")
7766
7767 81 0/subop/add %esp 8/imm32
7768
7769 5d/pop-to-ebp
7770 c3/return
7771
7772 test-copy-with-multiple-outputs:
7773
7774 55/push-ebp
7775 89/<- %ebp 4/r32/esp
7776
7777 (clear-stream _test-input-stream)
7778 (clear-stream $_test-input-buffered-file->buffer)
7779 (clear-stream _test-output-stream)
7780 (clear-stream $_test-output-buffered-file->buffer)
7781 (clear-stream _test-error-stream)
7782 (clear-stream $_test-error-buffered-file->buffer)
7783
7784 68/push 0/imm32
7785 68/push 0/imm32
7786 89/<- %edx 4/r32/esp
7787 (tailor-exit-descriptor %edx 0x10)
7788
7789 (write _test-input-stream "fn foo {\n")
7790 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
7791 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
7792 (write _test-input-stream " x, y <- copy 0\n")
7793 (write _test-input-stream "}\n")
7794
7795 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7796
7797
7798 89/<- %edx 4/r32/esp
7799 (flush _test-output-buffered-file)
7800 (flush _test-error-buffered-file)
7801 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7807
7808 (check-stream-equal _test-output-stream "" "F - test-copy-with-multiple-outputs: output should be empty")
7809 (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")
7810
7811 (check-ints-equal *(edx+4) 2 "F - test-copy-with-multiple-outputs: exit status")
7812
7813 81 0/subop/add %esp 8/imm32
7814
7815 5d/pop-to-ebp
7816 c3/return
7817
7818 test-copy-invalid-value-to-address:
7819
7820 55/push-ebp
7821 89/<- %ebp 4/r32/esp
7822
7823 (clear-stream _test-input-stream)
7824 (clear-stream $_test-input-buffered-file->buffer)
7825 (clear-stream _test-output-stream)
7826 (clear-stream $_test-output-buffered-file->buffer)
7827 (clear-stream _test-error-stream)
7828 (clear-stream $_test-error-buffered-file->buffer)
7829
7830 68/push 0/imm32
7831 68/push 0/imm32
7832 89/<- %edx 4/r32/esp
7833 (tailor-exit-descriptor %edx 0x10)
7834
7835 (write _test-input-stream "fn foo {\n")
7836 (write _test-input-stream " var x/eax: int <- copy 0\n")
7837 (write _test-input-stream " var y/ecx: (addr int) <- copy x\n")
7838 (write _test-input-stream "}\n")
7839
7840 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7841
7842
7843 89/<- %edx 4/r32/esp
7844 (flush _test-output-buffered-file)
7845 (flush _test-error-buffered-file)
7846 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7852
7853 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7854 (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")
7855
7856 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-address: exit status")
7857
7858 81 0/subop/add %esp 8/imm32
7859
7860 5d/pop-to-ebp
7861 c3/return
7862
7863 test-copy-null-value-to-address:
7864
7865 55/push-ebp
7866 89/<- %ebp 4/r32/esp
7867
7868 (clear-stream _test-input-stream)
7869 (clear-stream $_test-input-buffered-file->buffer)
7870 (clear-stream _test-output-stream)
7871 (clear-stream $_test-output-buffered-file->buffer)
7872
7873 (write _test-input-stream "fn foo {\n")
7874 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
7875 (write _test-input-stream "}\n")
7876
7877 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7878 (flush _test-output-buffered-file)
7879
7880
7881 89/<- %esp 5/r32/ebp
7882 5d/pop-to-ebp
7883 c3/return
7884
7885 test-copy-invalid-value-to-offset:
7886
7887 55/push-ebp
7888 89/<- %ebp 4/r32/esp
7889
7890 (clear-stream _test-input-stream)
7891 (clear-stream $_test-input-buffered-file->buffer)
7892 (clear-stream _test-output-stream)
7893 (clear-stream $_test-output-buffered-file->buffer)
7894 (clear-stream _test-error-stream)
7895 (clear-stream $_test-error-buffered-file->buffer)
7896
7897 68/push 0/imm32
7898 68/push 0/imm32
7899 89/<- %edx 4/r32/esp
7900 (tailor-exit-descriptor %edx 0x10)
7901
7902 (write _test-input-stream "fn foo {\n")
7903 (write _test-input-stream " var x/eax: int <- copy 0\n")
7904 (write _test-input-stream " var y/ecx: (offset int) <- copy x\n")
7905 (write _test-input-stream "}\n")
7906
7907 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7908
7909
7910 89/<- %edx 4/r32/esp
7911 (flush _test-output-buffered-file)
7912 (flush _test-error-buffered-file)
7913 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7919
7920 (check-stream-equal _test-output-stream "" "F - test-copy-invalid-value-to-address: output should be empty")
7921 (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")
7922
7923 (check-ints-equal *(edx+4) 2 "F - test-copy-invalid-value-to-offset: exit status")
7924
7925 81 0/subop/add %esp 8/imm32
7926
7927 5d/pop-to-ebp
7928 c3/return
7929
7930 test-copy-null-value-to-offset:
7931
7932 55/push-ebp
7933 89/<- %ebp 4/r32/esp
7934
7935 (clear-stream _test-input-stream)
7936 (clear-stream $_test-input-buffered-file->buffer)
7937 (clear-stream _test-output-stream)
7938 (clear-stream $_test-output-buffered-file->buffer)
7939
7940 (write _test-input-stream "fn foo {\n")
7941 (write _test-input-stream " var y/ecx: (offset int) <- copy 0\n")
7942 (write _test-input-stream "}\n")
7943
7944 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
7945 (flush _test-output-buffered-file)
7946 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7952
7953
7954 89/<- %esp 5/r32/ebp
7955 5d/pop-to-ebp
7956 c3/return
7957
7958 test-copy-non-literal-to-byte:
7959
7960 55/push-ebp
7961 89/<- %ebp 4/r32/esp
7962
7963 (clear-stream _test-input-stream)
7964 (clear-stream $_test-input-buffered-file->buffer)
7965 (clear-stream _test-output-stream)
7966 (clear-stream $_test-output-buffered-file->buffer)
7967 (clear-stream _test-error-stream)
7968 (clear-stream $_test-error-buffered-file->buffer)
7969
7970 68/push 0/imm32
7971 68/push 0/imm32
7972 89/<- %edx 4/r32/esp
7973 (tailor-exit-descriptor %edx 0x10)
7974
7975 (write _test-input-stream "fn foo {\n")
7976 (write _test-input-stream " var x/ecx: int <- copy 3\n")
7977 (write _test-input-stream " var y/ecx: byte <- copy x\n")
7978 (write _test-input-stream "}\n")
7979
7980 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7981
7982
7983 89/<- %edx 4/r32/esp
7984 (flush _test-output-buffered-file)
7985 (flush _test-error-buffered-file)
7986 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
7992
7993 (check-stream-equal _test-output-stream "" "F - test-copy-non-literal-to-byte: output should be empty")
7994 (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")
7995
7996 (check-ints-equal *(edx+4) 2 "F - test-copy-non-literal-to-byte: exit status")
7997
7998 81 0/subop/add %esp 8/imm32
7999
8000 5d/pop-to-ebp
8001 c3/return
8002
8003 test-copy-deref-address:
8004
8005 55/push-ebp
8006 89/<- %ebp 4/r32/esp
8007
8008 (clear-stream _test-input-stream)
8009 (clear-stream $_test-input-buffered-file->buffer)
8010 (clear-stream _test-output-stream)
8011 (clear-stream $_test-output-buffered-file->buffer)
8012
8013 (write _test-input-stream "fn foo {\n")
8014 (write _test-input-stream " var x/eax: (addr addr int) <- copy 0\n")
8015 (write _test-input-stream " var y/ecx: (addr int) <- copy *x\n")
8016 (write _test-input-stream "}\n")
8017
8018 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8019 (flush _test-output-buffered-file)
8020
8021
8022 5d/pop-to-ebp
8023 c3/return
8024
8025 test-copy-to-non-register:
8026
8027 55/push-ebp
8028 89/<- %ebp 4/r32/esp
8029
8030 (clear-stream _test-input-stream)
8031 (clear-stream $_test-input-buffered-file->buffer)
8032 (clear-stream _test-output-stream)
8033 (clear-stream $_test-output-buffered-file->buffer)
8034 (clear-stream _test-error-stream)
8035 (clear-stream $_test-error-buffered-file->buffer)
8036
8037 68/push 0/imm32
8038 68/push 0/imm32
8039 89/<- %edx 4/r32/esp
8040 (tailor-exit-descriptor %edx 0x10)
8041
8042 (write _test-input-stream "fn foo {\n")
8043 (write _test-input-stream " var x: int\n")
8044 (write _test-input-stream " x <- copy 0\n")
8045 (write _test-input-stream "}\n")
8046
8047 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8048
8049
8050 89/<- %edx 4/r32/esp
8051 (flush _test-output-buffered-file)
8052 (flush _test-error-buffered-file)
8053 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8059
8060 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-register: output should be empty")
8061 (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")
8062
8063 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-register: exit status")
8064
8065 81 0/subop/add %esp 8/imm32
8066
8067 5d/pop-to-ebp
8068 c3/return
8069
8070 test-copy-from-non-scalar-inout:
8071
8072 55/push-ebp
8073 89/<- %ebp 4/r32/esp
8074
8075 (clear-stream _test-input-stream)
8076 (clear-stream $_test-input-buffered-file->buffer)
8077 (clear-stream _test-output-stream)
8078 (clear-stream $_test-output-buffered-file->buffer)
8079 (clear-stream _test-error-stream)
8080 (clear-stream $_test-error-buffered-file->buffer)
8081
8082 68/push 0/imm32
8083 68/push 0/imm32
8084 89/<- %edx 4/r32/esp
8085 (tailor-exit-descriptor %edx 0x10)
8086
8087 (write _test-input-stream "fn foo {\n")
8088 (write _test-input-stream " var x: (handle int)\n")
8089 (write _test-input-stream " var y/eax: int <- copy x\n")
8090 (write _test-input-stream "}\n")
8091
8092 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8093
8094
8095 89/<- %edx 4/r32/esp
8096 (flush _test-output-buffered-file)
8097 (flush _test-error-buffered-file)
8098 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8104
8105 (check-stream-equal _test-output-stream "" "F - test-copy-from-non-scalar-inout: output should be empty")
8106 (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")
8107
8108 (check-ints-equal *(edx+4) 2 "F - test-copy-from-non-scalar-inout: exit status")
8109
8110 81 0/subop/add %esp 8/imm32
8111
8112 5d/pop-to-ebp
8113 c3/return
8114
8115 test-copy-to-with-no-inout:
8116
8117 55/push-ebp
8118 89/<- %ebp 4/r32/esp
8119
8120 (clear-stream _test-input-stream)
8121 (clear-stream $_test-input-buffered-file->buffer)
8122 (clear-stream _test-output-stream)
8123 (clear-stream $_test-output-buffered-file->buffer)
8124 (clear-stream _test-error-stream)
8125 (clear-stream $_test-error-buffered-file->buffer)
8126
8127 68/push 0/imm32
8128 68/push 0/imm32
8129 89/<- %edx 4/r32/esp
8130 (tailor-exit-descriptor %edx 0x10)
8131
8132 (write _test-input-stream "fn foo {\n")
8133 (write _test-input-stream " copy-to\n")
8134 (write _test-input-stream "}\n")
8135
8136 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8137
8138
8139 89/<- %edx 4/r32/esp
8140 (flush _test-output-buffered-file)
8141 (flush _test-error-buffered-file)
8142 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8148
8149 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-inout: output should be empty")
8150 (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")
8151
8152 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-inout: exit status")
8153
8154 81 0/subop/add %esp 8/imm32
8155
8156 5d/pop-to-ebp
8157 c3/return
8158
8159 test-copy-to-with-no-source:
8160
8161 55/push-ebp
8162 89/<- %ebp 4/r32/esp
8163
8164 (clear-stream _test-input-stream)
8165 (clear-stream $_test-input-buffered-file->buffer)
8166 (clear-stream _test-output-stream)
8167 (clear-stream $_test-output-buffered-file->buffer)
8168 (clear-stream _test-error-stream)
8169 (clear-stream $_test-error-buffered-file->buffer)
8170
8171 68/push 0/imm32
8172 68/push 0/imm32
8173 89/<- %edx 4/r32/esp
8174 (tailor-exit-descriptor %edx 0x10)
8175
8176 (write _test-input-stream "fn foo {\n")
8177 (write _test-input-stream " var x: boolean\n")
8178 (write _test-input-stream " copy-to x\n")
8179 (write _test-input-stream "}\n")
8180
8181 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8182
8183
8184 89/<- %edx 4/r32/esp
8185 (flush _test-output-buffered-file)
8186 (flush _test-error-buffered-file)
8187 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8193
8194 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-source: output should be empty")
8195 (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")
8196
8197 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-source: exit status")
8198
8199 81 0/subop/add %esp 8/imm32
8200
8201 5d/pop-to-ebp
8202 c3/return
8203
8204 test-copy-to-with-no-register:
8205
8206 55/push-ebp
8207 89/<- %ebp 4/r32/esp
8208
8209 (clear-stream _test-input-stream)
8210 (clear-stream $_test-input-buffered-file->buffer)
8211 (clear-stream _test-output-stream)
8212 (clear-stream $_test-output-buffered-file->buffer)
8213 (clear-stream _test-error-stream)
8214 (clear-stream $_test-error-buffered-file->buffer)
8215
8216 68/push 0/imm32
8217 68/push 0/imm32
8218 89/<- %edx 4/r32/esp
8219 (tailor-exit-descriptor %edx 0x10)
8220
8221 (write _test-input-stream "fn foo {\n")
8222 (write _test-input-stream " var x: boolean\n")
8223 (write _test-input-stream " copy-to x, x\n")
8224 (write _test-input-stream "}\n")
8225
8226 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8227
8228
8229 89/<- %edx 4/r32/esp
8230 (flush _test-output-buffered-file)
8231 (flush _test-error-buffered-file)
8232 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8238
8239 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-no-register: output should be empty")
8240 (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")
8241
8242 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-no-register: exit status")
8243
8244 81 0/subop/add %esp 8/imm32
8245
8246 5d/pop-to-ebp
8247 c3/return
8248
8249 test-copy-to-with-too-many-inouts:
8250
8251 55/push-ebp
8252 89/<- %ebp 4/r32/esp
8253
8254 (clear-stream _test-input-stream)
8255 (clear-stream $_test-input-buffered-file->buffer)
8256 (clear-stream _test-output-stream)
8257 (clear-stream $_test-output-buffered-file->buffer)
8258 (clear-stream _test-error-stream)
8259 (clear-stream $_test-error-buffered-file->buffer)
8260
8261 68/push 0/imm32
8262 68/push 0/imm32
8263 89/<- %edx 4/r32/esp
8264 (tailor-exit-descriptor %edx 0x10)
8265
8266 (write _test-input-stream "fn foo {\n")
8267 (write _test-input-stream " var x: boolean\n")
8268 (write _test-input-stream " copy-to x, 0, 0\n")
8269 (write _test-input-stream "}\n")
8270
8271 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8272
8273
8274 89/<- %edx 4/r32/esp
8275 (flush _test-output-buffered-file)
8276 (flush _test-error-buffered-file)
8277 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8283
8284 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-too-many-inouts: output should be empty")
8285 (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")
8286
8287 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-too-many-inouts: exit status")
8288
8289 81 0/subop/add %esp 8/imm32
8290
8291 5d/pop-to-ebp
8292 c3/return
8293
8294 test-copy-to-with-output:
8295
8296 55/push-ebp
8297 89/<- %ebp 4/r32/esp
8298
8299 (clear-stream _test-input-stream)
8300 (clear-stream $_test-input-buffered-file->buffer)
8301 (clear-stream _test-output-stream)
8302 (clear-stream $_test-output-buffered-file->buffer)
8303 (clear-stream _test-error-stream)
8304 (clear-stream $_test-error-buffered-file->buffer)
8305
8306 68/push 0/imm32
8307 68/push 0/imm32
8308 89/<- %edx 4/r32/esp
8309 (tailor-exit-descriptor %edx 0x10)
8310
8311 (write _test-input-stream "fn foo {\n")
8312 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
8313 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
8314 (write _test-input-stream " x <- copy-to y, 0\n")
8315 (write _test-input-stream "}\n")
8316
8317 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8318
8319
8320 89/<- %edx 4/r32/esp
8321 (flush _test-output-buffered-file)
8322 (flush _test-error-buffered-file)
8323 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8329
8330 (check-stream-equal _test-output-stream "" "F - test-copy-to-with-output: output should be empty")
8331 (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")
8332
8333 (check-ints-equal *(edx+4) 2 "F - test-copy-to-with-output: exit status")
8334
8335 81 0/subop/add %esp 8/imm32
8336
8337 5d/pop-to-ebp
8338 c3/return
8339
8340 test-copy-to-invalid-value-to-address:
8341
8342 55/push-ebp
8343 89/<- %ebp 4/r32/esp
8344
8345 (clear-stream _test-input-stream)
8346 (clear-stream $_test-input-buffered-file->buffer)
8347 (clear-stream _test-output-stream)
8348 (clear-stream $_test-output-buffered-file->buffer)
8349 (clear-stream _test-error-stream)
8350 (clear-stream $_test-error-buffered-file->buffer)
8351
8352 68/push 0/imm32
8353 68/push 0/imm32
8354 89/<- %edx 4/r32/esp
8355 (tailor-exit-descriptor %edx 0x10)
8356
8357 (write _test-input-stream "fn foo {\n")
8358 (write _test-input-stream " var x/eax: int <- copy 0\n")
8359 (write _test-input-stream " var y: (addr int)\n")
8360 (write _test-input-stream " copy-to y, x\n")
8361 (write _test-input-stream "}\n")
8362
8363 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8364
8365
8366 89/<- %edx 4/r32/esp
8367 (flush _test-output-buffered-file)
8368 (flush _test-error-buffered-file)
8369 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8375
8376 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-address: output should be empty")
8377 (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")
8378
8379 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-address: exit status")
8380
8381 81 0/subop/add %esp 8/imm32
8382
8383 5d/pop-to-ebp
8384 c3/return
8385
8386 test-copy-to-null-value-to-address:
8387
8388 55/push-ebp
8389 89/<- %ebp 4/r32/esp
8390
8391 (clear-stream _test-input-stream)
8392 (clear-stream $_test-input-buffered-file->buffer)
8393 (clear-stream _test-output-stream)
8394 (clear-stream $_test-output-buffered-file->buffer)
8395
8396 (write _test-input-stream "fn foo {\n")
8397 (write _test-input-stream " var y: (addr int)\n")
8398 (write _test-input-stream " copy-to y, 0\n")
8399 (write _test-input-stream "}\n")
8400
8401 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8402 (flush _test-output-buffered-file)
8403
8404
8405 89/<- %esp 5/r32/ebp
8406 5d/pop-to-ebp
8407 c3/return
8408
8409 test-copy-to-invalid-value-to-offset:
8410
8411 55/push-ebp
8412 89/<- %ebp 4/r32/esp
8413
8414 (clear-stream _test-input-stream)
8415 (clear-stream $_test-input-buffered-file->buffer)
8416 (clear-stream _test-output-stream)
8417 (clear-stream $_test-output-buffered-file->buffer)
8418 (clear-stream _test-error-stream)
8419 (clear-stream $_test-error-buffered-file->buffer)
8420
8421 68/push 0/imm32
8422 68/push 0/imm32
8423 89/<- %edx 4/r32/esp
8424 (tailor-exit-descriptor %edx 0x10)
8425
8426 (write _test-input-stream "fn foo {\n")
8427 (write _test-input-stream " var x/eax: int <- copy 0\n")
8428 (write _test-input-stream " var y: (offset int)\n")
8429 (write _test-input-stream " copy-to y, x\n")
8430 (write _test-input-stream "}\n")
8431
8432 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8433
8434
8435 89/<- %edx 4/r32/esp
8436 (flush _test-output-buffered-file)
8437 (flush _test-error-buffered-file)
8438 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8444
8445 (check-stream-equal _test-output-stream "" "F - test-copy-to-invalid-value-to-offset: output should be empty")
8446 (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")
8447
8448 (check-ints-equal *(edx+4) 2 "F - test-copy-to-invalid-value-to-offset: exit status")
8449
8450 81 0/subop/add %esp 8/imm32
8451
8452 5d/pop-to-ebp
8453 c3/return
8454
8455 test-copy-to-null-value-to-offset:
8456
8457 55/push-ebp
8458 89/<- %ebp 4/r32/esp
8459
8460 (clear-stream _test-input-stream)
8461 (clear-stream $_test-input-buffered-file->buffer)
8462 (clear-stream _test-output-stream)
8463 (clear-stream $_test-output-buffered-file->buffer)
8464
8465 (write _test-input-stream "fn foo {\n")
8466 (write _test-input-stream " var y: (offset int)\n")
8467 (write _test-input-stream " copy-to y, 0\n")
8468 (write _test-input-stream "}\n")
8469
8470 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8471 (flush _test-output-buffered-file)
8472
8473
8474 89/<- %esp 5/r32/ebp
8475 5d/pop-to-ebp
8476 c3/return
8477
8478 test-copy-to-non-literal-to-byte:
8479
8480 55/push-ebp
8481 89/<- %ebp 4/r32/esp
8482
8483 (clear-stream _test-input-stream)
8484 (clear-stream $_test-input-buffered-file->buffer)
8485 (clear-stream _test-output-stream)
8486 (clear-stream $_test-output-buffered-file->buffer)
8487 (clear-stream _test-error-stream)
8488 (clear-stream $_test-error-buffered-file->buffer)
8489
8490 68/push 0/imm32
8491 68/push 0/imm32
8492 89/<- %edx 4/r32/esp
8493 (tailor-exit-descriptor %edx 0x10)
8494
8495 (write _test-input-stream "fn foo {\n")
8496 (write _test-input-stream " var x/ecx: byte <- copy 3\n")
8497 (write _test-input-stream " var y/eax: (addr byte) <- copy 0\n")
8498 (write _test-input-stream " copy-to *y, x\n")
8499 (write _test-input-stream "}\n")
8500
8501 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8502
8503
8504 89/<- %edx 4/r32/esp
8505 (flush _test-output-buffered-file)
8506 (flush _test-error-buffered-file)
8507 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8513
8514 (check-stream-equal _test-output-stream "" "F - test-copy-to-non-literal-to-byte: output should be empty")
8515 (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")
8516
8517 (check-ints-equal *(edx+4) 2 "F - test-copy-to-non-literal-to-byte: exit status")
8518
8519 81 0/subop/add %esp 8/imm32
8520
8521 5d/pop-to-ebp
8522 c3/return
8523
8524 test-copy-to-deref-address:
8525
8526 55/push-ebp
8527 89/<- %ebp 4/r32/esp
8528
8529 (clear-stream _test-input-stream)
8530 (clear-stream $_test-input-buffered-file->buffer)
8531 (clear-stream _test-output-stream)
8532 (clear-stream $_test-output-buffered-file->buffer)
8533
8534 (write _test-input-stream "fn foo {\n")
8535 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
8536 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
8537 (write _test-input-stream " copy-to *y, x\n")
8538 (write _test-input-stream "}\n")
8539
8540 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8541 (flush _test-output-buffered-file)
8542
8543
8544 5d/pop-to-ebp
8545 c3/return
8546
8547 test-copy-to-from-non-scalar-inout:
8548
8549 55/push-ebp
8550 89/<- %ebp 4/r32/esp
8551
8552 (clear-stream _test-input-stream)
8553 (clear-stream $_test-input-buffered-file->buffer)
8554 (clear-stream _test-output-stream)
8555 (clear-stream $_test-output-buffered-file->buffer)
8556 (clear-stream _test-error-stream)
8557 (clear-stream $_test-error-buffered-file->buffer)
8558
8559 68/push 0/imm32
8560 68/push 0/imm32
8561 89/<- %edx 4/r32/esp
8562 (tailor-exit-descriptor %edx 0x10)
8563
8564 (write _test-input-stream "fn foo {\n")
8565 (write _test-input-stream " var x: (handle int)\n")
8566 (write _test-input-stream " var y: int\n")
8567 (write _test-input-stream " copy-to y, x\n")
8568 (write _test-input-stream "}\n")
8569
8570 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8571
8572
8573 89/<- %edx 4/r32/esp
8574 (flush _test-output-buffered-file)
8575 (flush _test-error-buffered-file)
8576 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8582
8583 (check-stream-equal _test-output-stream "" "F - test-copy-to-from-non-scalar-inout: output should be empty")
8584 (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")
8585
8586 (check-ints-equal *(edx+4) 2 "F - test-copy-to-from-non-scalar-inout: exit status")
8587
8588 81 0/subop/add %esp 8/imm32
8589
8590 5d/pop-to-ebp
8591 c3/return
8592
8593 test-copy-byte-with-no-inout:
8594
8595 55/push-ebp
8596 89/<- %ebp 4/r32/esp
8597
8598 (clear-stream _test-input-stream)
8599 (clear-stream $_test-input-buffered-file->buffer)
8600 (clear-stream _test-output-stream)
8601 (clear-stream $_test-output-buffered-file->buffer)
8602 (clear-stream _test-error-stream)
8603 (clear-stream $_test-error-buffered-file->buffer)
8604
8605 68/push 0/imm32
8606 68/push 0/imm32
8607 89/<- %edx 4/r32/esp
8608 (tailor-exit-descriptor %edx 0x10)
8609
8610 (write _test-input-stream "fn foo {\n")
8611 (write _test-input-stream " var x/eax: byte <- copy-byte\n")
8612 (write _test-input-stream "}\n")
8613
8614 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8615
8616
8617 89/<- %edx 4/r32/esp
8618 (flush _test-output-buffered-file)
8619 (flush _test-error-buffered-file)
8620 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8626
8627 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-no-inout: output should be empty")
8628 (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")
8629
8630 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-no-inout: exit status")
8631
8632 81 0/subop/add %esp 8/imm32
8633
8634 5d/pop-to-ebp
8635 c3/return
8636
8637 test-copy-byte-with-multiple-inouts:
8638
8639 55/push-ebp
8640 89/<- %ebp 4/r32/esp
8641
8642 (clear-stream _test-input-stream)
8643 (clear-stream $_test-input-buffered-file->buffer)
8644 (clear-stream _test-output-stream)
8645 (clear-stream $_test-output-buffered-file->buffer)
8646 (clear-stream _test-error-stream)
8647 (clear-stream $_test-error-buffered-file->buffer)
8648
8649 68/push 0/imm32
8650 68/push 0/imm32
8651 89/<- %edx 4/r32/esp
8652 (tailor-exit-descriptor %edx 0x10)
8653
8654 (write _test-input-stream "fn foo {\n")
8655 (write _test-input-stream " var x/eax: byte <- copy-byte 0, 0\n")
8656 (write _test-input-stream "}\n")
8657
8658 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8659
8660
8661 89/<- %edx 4/r32/esp
8662 (flush _test-output-buffered-file)
8663 (flush _test-error-buffered-file)
8664 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8670
8671 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-multiple-inouts: output should be empty")
8672 (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")
8673
8674 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-multiple-inouts: exit status")
8675
8676 81 0/subop/add %esp 8/imm32
8677
8678 5d/pop-to-ebp
8679 c3/return
8680
8681 test-copy-byte-with-no-output:
8682
8683 55/push-ebp
8684 89/<- %ebp 4/r32/esp
8685
8686 (clear-stream _test-input-stream)
8687 (clear-stream $_test-input-buffered-file->buffer)
8688 (clear-stream _test-output-stream)
8689 (clear-stream $_test-output-buffered-file->buffer)
8690 (clear-stream _test-error-stream)
8691 (clear-stream $_test-error-buffered-file->buffer)
8692
8693 68/push 0/imm32
8694 68/push 0/imm32
8695 89/<- %edx 4/r32/esp
8696 (tailor-exit-descriptor %edx 0x10)
8697
8698 (write _test-input-stream "fn foo {\n")
8699 (write _test-input-stream " copy-byte 0\n")
8700 (write _test-input-stream "}\n")
8701
8702 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8703
8704
8705 89/<- %edx 4/r32/esp
8706 (flush _test-output-buffered-file)
8707 (flush _test-error-buffered-file)
8708 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8714
8715 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-no-output: output should be empty")
8716 (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")
8717
8718 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-no-output: exit status")
8719
8720 81 0/subop/add %esp 8/imm32
8721
8722 5d/pop-to-ebp
8723 c3/return
8724
8725 test-copy-byte-with-multiple-outputs:
8726
8727 55/push-ebp
8728 89/<- %ebp 4/r32/esp
8729
8730 (clear-stream _test-input-stream)
8731 (clear-stream $_test-input-buffered-file->buffer)
8732 (clear-stream _test-output-stream)
8733 (clear-stream $_test-output-buffered-file->buffer)
8734 (clear-stream _test-error-stream)
8735 (clear-stream $_test-error-buffered-file->buffer)
8736
8737 68/push 0/imm32
8738 68/push 0/imm32
8739 89/<- %edx 4/r32/esp
8740 (tailor-exit-descriptor %edx 0x10)
8741
8742 (write _test-input-stream "fn foo {\n")
8743 (write _test-input-stream " var x/eax: byte <- copy 0\n")
8744 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
8745 (write _test-input-stream " x, y <- copy-byte 0\n")
8746 (write _test-input-stream "}\n")
8747
8748 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8749
8750
8751 89/<- %edx 4/r32/esp
8752 (flush _test-output-buffered-file)
8753 (flush _test-error-buffered-file)
8754 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8760
8761 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-multiple-outputs: output should be empty")
8762 (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")
8763
8764 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-multiple-outputs: exit status")
8765
8766 81 0/subop/add %esp 8/imm32
8767
8768 5d/pop-to-ebp
8769 c3/return
8770
8771 test-copy-byte-deref-address:
8772
8773 55/push-ebp
8774 89/<- %ebp 4/r32/esp
8775
8776 (clear-stream _test-input-stream)
8777 (clear-stream $_test-input-buffered-file->buffer)
8778 (clear-stream _test-output-stream)
8779 (clear-stream $_test-output-buffered-file->buffer)
8780
8781 (write _test-input-stream "fn foo {\n")
8782 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8783 (write _test-input-stream " var y/ecx: byte <- copy-byte *x\n")
8784 (write _test-input-stream "}\n")
8785
8786 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8787 (flush _test-output-buffered-file)
8788 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8794
8795 (check-next-stream-line-equal _test-error-stream "" "F - test-copy-byte-deref-address: error message")
8796
8797 5d/pop-to-ebp
8798 c3/return
8799
8800 test-copy-byte-with-invalid-output-type:
8801
8802 55/push-ebp
8803 89/<- %ebp 4/r32/esp
8804
8805 (clear-stream _test-input-stream)
8806 (clear-stream $_test-input-buffered-file->buffer)
8807 (clear-stream _test-output-stream)
8808 (clear-stream $_test-output-buffered-file->buffer)
8809 (clear-stream _test-error-stream)
8810 (clear-stream $_test-error-buffered-file->buffer)
8811
8812 68/push 0/imm32
8813 68/push 0/imm32
8814 89/<- %edx 4/r32/esp
8815 (tailor-exit-descriptor %edx 0x10)
8816
8817 (write _test-input-stream "fn foo {\n")
8818 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8819 (write _test-input-stream " var y/eax: int <- copy-byte *x\n")
8820 (write _test-input-stream "}\n")
8821
8822 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8823
8824
8825 89/<- %edx 4/r32/esp
8826 (flush _test-output-buffered-file)
8827 (flush _test-error-buffered-file)
8828 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8834
8835 (check-stream-equal _test-output-stream "" "F - test-copy-byte-with-invalid-output-type: output should be empty")
8836 (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")
8837
8838 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-with-invalid-output-type: exit status")
8839
8840 81 0/subop/add %esp 8/imm32
8841
8842 5d/pop-to-ebp
8843 c3/return
8844
8845 test-copy-byte-from-non-scalar-inout:
8846
8847 55/push-ebp
8848 89/<- %ebp 4/r32/esp
8849
8850 (clear-stream _test-input-stream)
8851 (clear-stream $_test-input-buffered-file->buffer)
8852 (clear-stream _test-output-stream)
8853 (clear-stream $_test-output-buffered-file->buffer)
8854 (clear-stream _test-error-stream)
8855 (clear-stream $_test-error-buffered-file->buffer)
8856
8857 68/push 0/imm32
8858 68/push 0/imm32
8859 89/<- %edx 4/r32/esp
8860 (tailor-exit-descriptor %edx 0x10)
8861
8862 (write _test-input-stream "fn foo {\n")
8863 (write _test-input-stream " var x: (handle int)\n")
8864 (write _test-input-stream " var y/eax: byte <- copy-byte x\n")
8865 (write _test-input-stream "}\n")
8866
8867 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8868
8869
8870 89/<- %edx 4/r32/esp
8871 (flush _test-output-buffered-file)
8872 (flush _test-error-buffered-file)
8873 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8879
8880 (check-stream-equal _test-output-stream "" "F - test-copy-byte-from-non-scalar-inout: output should be empty")
8881 (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")
8882
8883 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-from-non-scalar-inout: exit status")
8884
8885 81 0/subop/add %esp 8/imm32
8886
8887 5d/pop-to-ebp
8888 c3/return
8889
8890 test-copy-byte-to-with-no-inout:
8891
8892 55/push-ebp
8893 89/<- %ebp 4/r32/esp
8894
8895 (clear-stream _test-input-stream)
8896 (clear-stream $_test-input-buffered-file->buffer)
8897 (clear-stream _test-output-stream)
8898 (clear-stream $_test-output-buffered-file->buffer)
8899 (clear-stream _test-error-stream)
8900 (clear-stream $_test-error-buffered-file->buffer)
8901
8902 68/push 0/imm32
8903 68/push 0/imm32
8904 89/<- %edx 4/r32/esp
8905 (tailor-exit-descriptor %edx 0x10)
8906
8907 (write _test-input-stream "fn foo {\n")
8908 (write _test-input-stream " copy-byte-to\n")
8909 (write _test-input-stream "}\n")
8910
8911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8912
8913
8914 89/<- %edx 4/r32/esp
8915 (flush _test-output-buffered-file)
8916 (flush _test-error-buffered-file)
8917 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8923
8924 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-no-inout: output should be empty")
8925 (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")
8926
8927 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-no-inout: exit status")
8928
8929 81 0/subop/add %esp 8/imm32
8930
8931 5d/pop-to-ebp
8932 c3/return
8933
8934 test-copy-byte-to-with-no-source:
8935
8936 55/push-ebp
8937 89/<- %ebp 4/r32/esp
8938
8939 (clear-stream _test-input-stream)
8940 (clear-stream $_test-input-buffered-file->buffer)
8941 (clear-stream _test-output-stream)
8942 (clear-stream $_test-output-buffered-file->buffer)
8943 (clear-stream _test-error-stream)
8944 (clear-stream $_test-error-buffered-file->buffer)
8945
8946 68/push 0/imm32
8947 68/push 0/imm32
8948 89/<- %edx 4/r32/esp
8949 (tailor-exit-descriptor %edx 0x10)
8950
8951 (write _test-input-stream "fn foo {\n")
8952 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8953 (write _test-input-stream " copy-byte-to *x\n")
8954 (write _test-input-stream "}\n")
8955
8956 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8957
8958
8959 89/<- %edx 4/r32/esp
8960 (flush _test-output-buffered-file)
8961 (flush _test-error-buffered-file)
8962 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
8968
8969 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-no-source: output should be empty")
8970 (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")
8971
8972 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-no-source: exit status")
8973
8974 81 0/subop/add %esp 8/imm32
8975
8976 5d/pop-to-ebp
8977 c3/return
8978
8979 test-copy-byte-to-with-too-many-inouts:
8980
8981 55/push-ebp
8982 89/<- %ebp 4/r32/esp
8983
8984 (clear-stream _test-input-stream)
8985 (clear-stream $_test-input-buffered-file->buffer)
8986 (clear-stream _test-output-stream)
8987 (clear-stream $_test-output-buffered-file->buffer)
8988 (clear-stream _test-error-stream)
8989 (clear-stream $_test-error-buffered-file->buffer)
8990
8991 68/push 0/imm32
8992 68/push 0/imm32
8993 89/<- %edx 4/r32/esp
8994 (tailor-exit-descriptor %edx 0x10)
8995
8996 (write _test-input-stream "fn foo {\n")
8997 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
8998 (write _test-input-stream " copy-byte-to *x, 0, 0\n")
8999 (write _test-input-stream "}\n")
9000
9001 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9002
9003
9004 89/<- %edx 4/r32/esp
9005 (flush _test-output-buffered-file)
9006 (flush _test-error-buffered-file)
9007 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9013
9014 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-too-many-inouts: output should be empty")
9015 (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")
9016
9017 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-too-many-inouts: exit status")
9018
9019 81 0/subop/add %esp 8/imm32
9020
9021 5d/pop-to-ebp
9022 c3/return
9023
9024 test-copy-byte-to-with-output:
9025
9026 55/push-ebp
9027 89/<- %ebp 4/r32/esp
9028
9029 (clear-stream _test-input-stream)
9030 (clear-stream $_test-input-buffered-file->buffer)
9031 (clear-stream _test-output-stream)
9032 (clear-stream $_test-output-buffered-file->buffer)
9033 (clear-stream _test-error-stream)
9034 (clear-stream $_test-error-buffered-file->buffer)
9035
9036 68/push 0/imm32
9037 68/push 0/imm32
9038 89/<- %edx 4/r32/esp
9039 (tailor-exit-descriptor %edx 0x10)
9040
9041 (write _test-input-stream "fn foo {\n")
9042 (write _test-input-stream " var x/eax: byte <- copy 0\n")
9043 (write _test-input-stream " var y/ecx: (addr byte) <- copy 0\n")
9044 (write _test-input-stream " x <- copy-byte-to *y, 0\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-to-with-output: output should be empty")
9061 (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")
9062
9063 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-output: 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-invalid-output-type:
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 " var x/eax: byte <- copy 0\n")
9089 (write _test-input-stream " var y: int\n")
9090 (write _test-input-stream " copy-byte-to y, x\n")
9091 (write _test-input-stream "}\n")
9092
9093 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9094
9095
9096 89/<- %edx 4/r32/esp
9097 (flush _test-output-buffered-file)
9098 (flush _test-error-buffered-file)
9099 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9105
9106 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-invalid-output-type: output should be empty")
9107 (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")
9108
9109 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-invalid-output-type: exit status")
9110
9111 81 0/subop/add %esp 8/imm32
9112
9113 5d/pop-to-ebp
9114 c3/return
9115
9116 test-copy-byte-to-with-literal-inout:
9117
9118 55/push-ebp
9119 89/<- %ebp 4/r32/esp
9120
9121 (clear-stream _test-input-stream)
9122 (clear-stream $_test-input-buffered-file->buffer)
9123 (clear-stream _test-output-stream)
9124 (clear-stream $_test-output-buffered-file->buffer)
9125 (clear-stream _test-error-stream)
9126 (clear-stream $_test-error-buffered-file->buffer)
9127
9128 68/push 0/imm32
9129 68/push 0/imm32
9130 89/<- %edx 4/r32/esp
9131 (tailor-exit-descriptor %edx 0x10)
9132
9133 (write _test-input-stream "fn foo {\n")
9134 (write _test-input-stream " var x/eax: (addr byte) <- copy 0\n")
9135 (write _test-input-stream " copy-byte-to *x, 0\n")
9136 (write _test-input-stream "}\n")
9137
9138 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9139
9140
9141 89/<- %edx 4/r32/esp
9142 (flush _test-output-buffered-file)
9143 (flush _test-error-buffered-file)
9144 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9150
9151 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-with-literal-inout: output should be empty")
9152 (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")
9153
9154 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-with-literal-inout: exit status")
9155
9156 81 0/subop/add %esp 8/imm32
9157
9158 5d/pop-to-ebp
9159 c3/return
9160
9161 test-copy-byte-to-deref-address:
9162
9163 55/push-ebp
9164 89/<- %ebp 4/r32/esp
9165
9166 (clear-stream _test-input-stream)
9167 (clear-stream $_test-input-buffered-file->buffer)
9168 (clear-stream _test-output-stream)
9169 (clear-stream $_test-output-buffered-file->buffer)
9170
9171 (write _test-input-stream "fn foo {\n")
9172 (write _test-input-stream " var x/eax: byte <- copy 0\n")
9173 (write _test-input-stream " var y/ecx: (addr byte) <- copy 0\n")
9174 (write _test-input-stream " copy-byte-to *y, x\n")
9175 (write _test-input-stream "}\n")
9176
9177 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9178 (flush _test-output-buffered-file)
9179
9180
9181 5d/pop-to-ebp
9182 c3/return
9183
9184 test-copy-byte-to-from-non-scalar-inout:
9185
9186 55/push-ebp
9187 89/<- %ebp 4/r32/esp
9188
9189 (clear-stream _test-input-stream)
9190 (clear-stream $_test-input-buffered-file->buffer)
9191 (clear-stream _test-output-stream)
9192 (clear-stream $_test-output-buffered-file->buffer)
9193 (clear-stream _test-error-stream)
9194 (clear-stream $_test-error-buffered-file->buffer)
9195
9196 68/push 0/imm32
9197 68/push 0/imm32
9198 89/<- %edx 4/r32/esp
9199 (tailor-exit-descriptor %edx 0x10)
9200
9201 (write _test-input-stream "fn foo {\n")
9202 (write _test-input-stream " var x: (handle int)\n")
9203 (write _test-input-stream " var y/eax: (addr byte) <- copy 0\n")
9204 (write _test-input-stream " copy-byte-to *y, x\n")
9205 (write _test-input-stream "}\n")
9206
9207 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9208
9209
9210 89/<- %edx 4/r32/esp
9211 (flush _test-output-buffered-file)
9212 (flush _test-error-buffered-file)
9213 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9219
9220 (check-stream-equal _test-output-stream "" "F - test-copy-byte-to-from-non-scalar-inout: output should be empty")
9221 (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")
9222
9223 (check-ints-equal *(edx+4) 2 "F - test-copy-byte-to-from-non-scalar-inout: exit status")
9224
9225 81 0/subop/add %esp 8/imm32
9226
9227 5d/pop-to-ebp
9228 c3/return
9229
9230 test-compare-with-no-inout:
9231
9232 55/push-ebp
9233 89/<- %ebp 4/r32/esp
9234
9235 (clear-stream _test-input-stream)
9236 (clear-stream $_test-input-buffered-file->buffer)
9237 (clear-stream _test-output-stream)
9238 (clear-stream $_test-output-buffered-file->buffer)
9239 (clear-stream _test-error-stream)
9240 (clear-stream $_test-error-buffered-file->buffer)
9241
9242 68/push 0/imm32
9243 68/push 0/imm32
9244 89/<- %edx 4/r32/esp
9245 (tailor-exit-descriptor %edx 0x10)
9246
9247 (write _test-input-stream "fn foo {\n")
9248 (write _test-input-stream " var x: boolean\n")
9249 (write _test-input-stream " compare\n")
9250 (write _test-input-stream "}\n")
9251
9252 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9253
9254
9255 89/<- %edx 4/r32/esp
9256 (flush _test-output-buffered-file)
9257 (flush _test-error-buffered-file)
9258 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9264
9265 (check-stream-equal _test-output-stream "" "F - test-compare-with-no-inout: output should be empty")
9266 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must have two inouts" "F - test-compare-with-no-inout: error message")
9267
9268 (check-ints-equal *(edx+4) 2 "F - test-compare-with-no-inout: exit status")
9269
9270 81 0/subop/add %esp 8/imm32
9271
9272 5d/pop-to-ebp
9273 c3/return
9274
9275 test-compare-with-just-one-inout:
9276
9277 55/push-ebp
9278 89/<- %ebp 4/r32/esp
9279
9280 (clear-stream _test-input-stream)
9281 (clear-stream $_test-input-buffered-file->buffer)
9282 (clear-stream _test-output-stream)
9283 (clear-stream $_test-output-buffered-file->buffer)
9284 (clear-stream _test-error-stream)
9285 (clear-stream $_test-error-buffered-file->buffer)
9286
9287 68/push 0/imm32
9288 68/push 0/imm32
9289 89/<- %edx 4/r32/esp
9290 (tailor-exit-descriptor %edx 0x10)
9291
9292 (write _test-input-stream "fn foo {\n")
9293 (write _test-input-stream " var x: boolean\n")
9294 (write _test-input-stream " compare x\n")
9295 (write _test-input-stream "}\n")
9296
9297 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9298
9299
9300 89/<- %edx 4/r32/esp
9301 (flush _test-output-buffered-file)
9302 (flush _test-error-buffered-file)
9303 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9309
9310 (check-stream-equal _test-output-stream "" "F - test-compare-with-just-one-inout: output should be empty")
9311 (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")
9312
9313 (check-ints-equal *(edx+4) 2 "F - test-compare-with-just-one-inout: exit status")
9314
9315 81 0/subop/add %esp 8/imm32
9316
9317 5d/pop-to-ebp
9318 c3/return
9319
9320 test-compare-with-too-many-inouts:
9321
9322 55/push-ebp
9323 89/<- %ebp 4/r32/esp
9324
9325 (clear-stream _test-input-stream)
9326 (clear-stream $_test-input-buffered-file->buffer)
9327 (clear-stream _test-output-stream)
9328 (clear-stream $_test-output-buffered-file->buffer)
9329 (clear-stream _test-error-stream)
9330 (clear-stream $_test-error-buffered-file->buffer)
9331
9332 68/push 0/imm32
9333 68/push 0/imm32
9334 89/<- %edx 4/r32/esp
9335 (tailor-exit-descriptor %edx 0x10)
9336
9337 (write _test-input-stream "fn foo {\n")
9338 (write _test-input-stream " var x: boolean\n")
9339 (write _test-input-stream " compare x, 0, 0\n")
9340 (write _test-input-stream "}\n")
9341
9342 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9343
9344
9345 89/<- %edx 4/r32/esp
9346 (flush _test-output-buffered-file)
9347 (flush _test-error-buffered-file)
9348 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9354
9355 (check-stream-equal _test-output-stream "" "F - test-compare-with-too-many-inouts: output should be empty")
9356 (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")
9357
9358 (check-ints-equal *(edx+4) 2 "F - test-compare-with-too-many-inouts: exit status")
9359
9360 81 0/subop/add %esp 8/imm32
9361
9362 5d/pop-to-ebp
9363 c3/return
9364
9365 test-compare-with-output:
9366
9367 55/push-ebp
9368 89/<- %ebp 4/r32/esp
9369
9370 (clear-stream _test-input-stream)
9371 (clear-stream $_test-input-buffered-file->buffer)
9372 (clear-stream _test-output-stream)
9373 (clear-stream $_test-output-buffered-file->buffer)
9374 (clear-stream _test-error-stream)
9375 (clear-stream $_test-error-buffered-file->buffer)
9376
9377 68/push 0/imm32
9378 68/push 0/imm32
9379 89/<- %edx 4/r32/esp
9380 (tailor-exit-descriptor %edx 0x10)
9381
9382 (write _test-input-stream "fn foo {\n")
9383 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
9384 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
9385 (write _test-input-stream " x <- compare y, 0\n")
9386 (write _test-input-stream "}\n")
9387
9388 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9389
9390
9391 89/<- %edx 4/r32/esp
9392 (flush _test-output-buffered-file)
9393 (flush _test-error-buffered-file)
9394 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9400
9401 (check-stream-equal _test-output-stream "" "F - test-compare-with-output: output should be empty")
9402 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'compare' must not have any outputs" "F - test-compare-with-output: error message")
9403
9404 (check-ints-equal *(edx+4) 2 "F - test-compare-with-output: exit status")
9405
9406 81 0/subop/add %esp 8/imm32
9407
9408 5d/pop-to-ebp
9409 c3/return
9410
9411 test-compare-invalid-value-to-address:
9412
9413 55/push-ebp
9414 89/<- %ebp 4/r32/esp
9415
9416 (clear-stream _test-input-stream)
9417 (clear-stream $_test-input-buffered-file->buffer)
9418 (clear-stream _test-output-stream)
9419 (clear-stream $_test-output-buffered-file->buffer)
9420 (clear-stream _test-error-stream)
9421 (clear-stream $_test-error-buffered-file->buffer)
9422
9423 68/push 0/imm32
9424 68/push 0/imm32
9425 89/<- %edx 4/r32/esp
9426 (tailor-exit-descriptor %edx 0x10)
9427
9428 (write _test-input-stream "fn foo {\n")
9429 (write _test-input-stream " var x/eax: int <- copy 0\n")
9430 (write _test-input-stream " var y: (addr int)\n")
9431 (write _test-input-stream " compare y, x\n")
9432 (write _test-input-stream "}\n")
9433
9434 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9435
9436
9437 89/<- %edx 4/r32/esp
9438 (flush _test-output-buffered-file)
9439 (flush _test-error-buffered-file)
9440 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9446
9447 (check-stream-equal _test-output-stream "" "F - test-compare-invalid-value-to-address: output should be empty")
9448 (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")
9449
9450 (check-ints-equal *(edx+4) 2 "F - test-compare-invalid-value-to-address: exit status")
9451
9452 81 0/subop/add %esp 8/imm32
9453
9454 5d/pop-to-ebp
9455 c3/return
9456
9457 test-compare-address:
9458
9459 55/push-ebp
9460 89/<- %ebp 4/r32/esp
9461
9462 (clear-stream _test-input-stream)
9463 (clear-stream $_test-input-buffered-file->buffer)
9464 (clear-stream _test-output-stream)
9465 (clear-stream $_test-output-buffered-file->buffer)
9466
9467 (write _test-input-stream "fn foo {\n")
9468 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
9469 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
9470 (write _test-input-stream " compare y, x\n")
9471 (write _test-input-stream "}\n")
9472
9473 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9474 (flush _test-output-buffered-file)
9475
9476
9477 5d/pop-to-ebp
9478 c3/return
9479
9480 test-compare-deref-address:
9481
9482 55/push-ebp
9483 89/<- %ebp 4/r32/esp
9484
9485 (clear-stream _test-input-stream)
9486 (clear-stream $_test-input-buffered-file->buffer)
9487 (clear-stream _test-output-stream)
9488 (clear-stream $_test-output-buffered-file->buffer)
9489
9490 (write _test-input-stream "fn foo {\n")
9491 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
9492 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
9493 (write _test-input-stream " compare *y, x\n")
9494 (write _test-input-stream "}\n")
9495
9496 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9497 (flush _test-output-buffered-file)
9498
9499
9500 5d/pop-to-ebp
9501 c3/return
9502
9503 test-compare-two-vars-in-memory:
9504
9505 55/push-ebp
9506 89/<- %ebp 4/r32/esp
9507
9508 (clear-stream _test-input-stream)
9509 (clear-stream $_test-input-buffered-file->buffer)
9510 (clear-stream _test-output-stream)
9511 (clear-stream $_test-output-buffered-file->buffer)
9512 (clear-stream _test-error-stream)
9513 (clear-stream $_test-error-buffered-file->buffer)
9514
9515 68/push 0/imm32
9516 68/push 0/imm32
9517 89/<- %edx 4/r32/esp
9518 (tailor-exit-descriptor %edx 0x10)
9519
9520 (write _test-input-stream "fn foo {\n")
9521 (write _test-input-stream " var x: boolean\n")
9522 (write _test-input-stream " compare x, x\n")
9523 (write _test-input-stream "}\n")
9524
9525 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9526
9527
9528 89/<- %edx 4/r32/esp
9529 (flush _test-output-buffered-file)
9530 (flush _test-error-buffered-file)
9531 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9537
9538 (check-stream-equal _test-output-stream "" "F - test-compare-two-vars-in-memory: output should be empty")
9539 (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")
9540
9541 (check-ints-equal *(edx+4) 2 "F - test-compare-two-vars-in-memory: exit status")
9542
9543 81 0/subop/add %esp 8/imm32
9544
9545 5d/pop-to-ebp
9546 c3/return
9547
9548 test-compare-non-scalar:
9549
9550 55/push-ebp
9551 89/<- %ebp 4/r32/esp
9552
9553 (clear-stream _test-input-stream)
9554 (clear-stream $_test-input-buffered-file->buffer)
9555 (clear-stream _test-output-stream)
9556 (clear-stream $_test-output-buffered-file->buffer)
9557 (clear-stream _test-error-stream)
9558 (clear-stream $_test-error-buffered-file->buffer)
9559
9560 68/push 0/imm32
9561 68/push 0/imm32
9562 89/<- %edx 4/r32/esp
9563 (tailor-exit-descriptor %edx 0x10)
9564
9565 (write _test-input-stream "fn foo {\n")
9566 (write _test-input-stream " var x: (handle int)\n")
9567 (write _test-input-stream " var y: int\n")
9568 (write _test-input-stream " compare y, x\n")
9569 (write _test-input-stream "}\n")
9570
9571 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9572
9573
9574 89/<- %edx 4/r32/esp
9575 (flush _test-output-buffered-file)
9576 (flush _test-error-buffered-file)
9577 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9583
9584 (check-stream-equal _test-output-stream "" "F - test-compare-non-scalar: output should be empty")
9585
9586 (check-next-stream-line-equal _test-error-stream "fn foo: stmt compare: both inouts are in memory" "F - test-compare-non-scalar: error message")
9587
9588 (check-ints-equal *(edx+4) 2 "F - test-compare-non-scalar: exit status")
9589
9590 81 0/subop/add %esp 8/imm32
9591
9592 5d/pop-to-ebp
9593 c3/return
9594
9595 test-compare-with-string-literal:
9596
9597 55/push-ebp
9598 89/<- %ebp 4/r32/esp
9599
9600 (clear-stream _test-input-stream)
9601 (clear-stream $_test-input-buffered-file->buffer)
9602 (clear-stream _test-output-stream)
9603 (clear-stream $_test-output-buffered-file->buffer)
9604 (clear-stream _test-error-stream)
9605 (clear-stream $_test-error-buffered-file->buffer)
9606
9607 68/push 0/imm32
9608 68/push 0/imm32
9609 89/<- %edx 4/r32/esp
9610 (tailor-exit-descriptor %edx 0x10)
9611
9612 (write _test-input-stream "fn foo {\n")
9613 (write _test-input-stream " var x/eax: (addr array byte) <- copy 0\n")
9614 (write _test-input-stream " compare x, \"abc\"\n")
9615 (write _test-input-stream "}\n")
9616
9617 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9618
9619
9620 89/<- %edx 4/r32/esp
9621 (flush _test-output-buffered-file)
9622 (flush _test-error-buffered-file)
9623 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9629
9630 (check-stream-equal _test-output-stream "" "F - test-compare-with-string-literal: output should be empty")
9631 (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")
9632
9633 (check-ints-equal *(edx+4) 2 "F - test-compare-with-string-literal: exit status")
9634
9635 81 0/subop/add %esp 8/imm32
9636
9637 5d/pop-to-ebp
9638 c3/return
9639
9640 test-address-with-no-inout:
9641
9642 55/push-ebp
9643 89/<- %ebp 4/r32/esp
9644
9645 (clear-stream _test-input-stream)
9646 (clear-stream $_test-input-buffered-file->buffer)
9647 (clear-stream _test-output-stream)
9648 (clear-stream $_test-output-buffered-file->buffer)
9649 (clear-stream _test-error-stream)
9650 (clear-stream $_test-error-buffered-file->buffer)
9651
9652 68/push 0/imm32
9653 68/push 0/imm32
9654 89/<- %edx 4/r32/esp
9655 (tailor-exit-descriptor %edx 0x10)
9656
9657 (write _test-input-stream "fn foo {\n")
9658 (write _test-input-stream " var x/eax: boolean <- address\n")
9659 (write _test-input-stream "}\n")
9660
9661 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9662
9663
9664 89/<- %edx 4/r32/esp
9665 (flush _test-output-buffered-file)
9666 (flush _test-error-buffered-file)
9667 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9673
9674 (check-stream-equal _test-output-stream "" "F - test-address-with-no-inout: output should be empty")
9675 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an inout" "F - test-address-with-no-inout: error message")
9676
9677 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-inout: exit status")
9678
9679 81 0/subop/add %esp 8/imm32
9680
9681 5d/pop-to-ebp
9682 c3/return
9683
9684 test-address-with-multiple-inouts:
9685
9686 55/push-ebp
9687 89/<- %ebp 4/r32/esp
9688
9689 (clear-stream _test-input-stream)
9690 (clear-stream $_test-input-buffered-file->buffer)
9691 (clear-stream _test-output-stream)
9692 (clear-stream $_test-output-buffered-file->buffer)
9693 (clear-stream _test-error-stream)
9694 (clear-stream $_test-error-buffered-file->buffer)
9695
9696 68/push 0/imm32
9697 68/push 0/imm32
9698 89/<- %edx 4/r32/esp
9699 (tailor-exit-descriptor %edx 0x10)
9700
9701 (write _test-input-stream "fn foo {\n")
9702 (write _test-input-stream " var x/eax: boolean <- address 0, 0\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-address-with-multiple-inouts: output should be empty")
9719 (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")
9720
9721 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-inouts: exit status")
9722
9723 81 0/subop/add %esp 8/imm32
9724
9725 5d/pop-to-ebp
9726 c3/return
9727
9728 test-address-with-no-output:
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 " address 0\n")
9747 (write _test-input-stream "}\n")
9748
9749 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9750
9751
9752 89/<- %edx 4/r32/esp
9753 (flush _test-output-buffered-file)
9754 (flush _test-error-buffered-file)
9755 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9761
9762 (check-stream-equal _test-output-stream "" "F - test-address-with-no-output: output should be empty")
9763 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'address' expects an output" "F - test-address-with-no-output: error message")
9764
9765 (check-ints-equal *(edx+4) 2 "F - test-address-with-no-output: exit status")
9766
9767 81 0/subop/add %esp 8/imm32
9768
9769 5d/pop-to-ebp
9770 c3/return
9771
9772 test-address-with-multiple-outputs:
9773
9774 55/push-ebp
9775 89/<- %ebp 4/r32/esp
9776
9777 (clear-stream _test-input-stream)
9778 (clear-stream $_test-input-buffered-file->buffer)
9779 (clear-stream _test-output-stream)
9780 (clear-stream $_test-output-buffered-file->buffer)
9781 (clear-stream _test-error-stream)
9782 (clear-stream $_test-error-buffered-file->buffer)
9783
9784 68/push 0/imm32
9785 68/push 0/imm32
9786 89/<- %edx 4/r32/esp
9787 (tailor-exit-descriptor %edx 0x10)
9788
9789 (write _test-input-stream "fn foo {\n")
9790 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
9791 (write _test-input-stream " var y/ecx: boolean <- copy 0\n")
9792 (write _test-input-stream " x, y <- address 0\n")
9793 (write _test-input-stream "}\n")
9794
9795 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9796
9797
9798 89/<- %edx 4/r32/esp
9799 (flush _test-output-buffered-file)
9800 (flush _test-error-buffered-file)
9801 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9807
9808 (check-stream-equal _test-output-stream "" "F - test-address-with-multiple-outputs: output should be empty")
9809 (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")
9810
9811 (check-ints-equal *(edx+4) 2 "F - test-address-with-multiple-outputs: exit status")
9812
9813 81 0/subop/add %esp 8/imm32
9814
9815 5d/pop-to-ebp
9816 c3/return
9817
9818
9819 test-address-of-deref:
9820
9821 55/push-ebp
9822 89/<- %ebp 4/r32/esp
9823
9824 (clear-stream _test-input-stream)
9825 (clear-stream $_test-input-buffered-file->buffer)
9826 (clear-stream _test-output-stream)
9827 (clear-stream $_test-output-buffered-file->buffer)
9828
9829 (write _test-input-stream "fn foo {\n")
9830 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
9831 (write _test-input-stream " var y/ecx: (addr int) <- address *x\n")
9832 (write _test-input-stream "}\n")
9833
9834 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9835 (flush _test-output-buffered-file)
9836
9837
9838 5d/pop-to-ebp
9839 c3/return
9840
9841 test-address-to-non-register:
9842
9843 55/push-ebp
9844 89/<- %ebp 4/r32/esp
9845
9846 (clear-stream _test-input-stream)
9847 (clear-stream $_test-input-buffered-file->buffer)
9848 (clear-stream _test-output-stream)
9849 (clear-stream $_test-output-buffered-file->buffer)
9850 (clear-stream _test-error-stream)
9851 (clear-stream $_test-error-buffered-file->buffer)
9852
9853 68/push 0/imm32
9854 68/push 0/imm32
9855 89/<- %edx 4/r32/esp
9856 (tailor-exit-descriptor %edx 0x10)
9857
9858 (write _test-input-stream "fn foo {\n")
9859 (write _test-input-stream " var x: (addr int)\n")
9860 (write _test-input-stream " x <- address 0\n")
9861 (write _test-input-stream "}\n")
9862
9863 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9864
9865
9866 89/<- %edx 4/r32/esp
9867 (flush _test-output-buffered-file)
9868 (flush _test-error-buffered-file)
9869 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9875
9876 (check-stream-equal _test-output-stream "" "F - test-address-to-non-register: output should be empty")
9877 (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")
9878
9879 (check-ints-equal *(edx+4) 2 "F - test-address-to-non-register: exit status")
9880
9881 81 0/subop/add %esp 8/imm32
9882
9883 5d/pop-to-ebp
9884 c3/return
9885
9886 test-address-with-wrong-type:
9887
9888 55/push-ebp
9889 89/<- %ebp 4/r32/esp
9890
9891 (clear-stream _test-input-stream)
9892 (clear-stream $_test-input-buffered-file->buffer)
9893 (clear-stream _test-output-stream)
9894 (clear-stream $_test-output-buffered-file->buffer)
9895 (clear-stream _test-error-stream)
9896 (clear-stream $_test-error-buffered-file->buffer)
9897
9898 68/push 0/imm32
9899 68/push 0/imm32
9900 89/<- %edx 4/r32/esp
9901 (tailor-exit-descriptor %edx 0x10)
9902
9903 (write _test-input-stream "fn foo {\n")
9904 (write _test-input-stream " var x: int\n")
9905 (write _test-input-stream " var y/eax: (addr boolean) <- address x\n")
9906 (write _test-input-stream "}\n")
9907
9908 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9909
9910
9911 89/<- %edx 4/r32/esp
9912 (flush _test-output-buffered-file)
9913 (flush _test-error-buffered-file)
9914 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
9920
9921 (check-stream-equal _test-output-stream "" "F - test-address-with-wrong-type: output should be empty")
9922 (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")
9923
9924 (check-ints-equal *(edx+4) 2 "F - test-address-with-wrong-type: exit status")
9925
9926 81 0/subop/add %esp 8/imm32
9927
9928 5d/pop-to-ebp
9929 c3/return
9930
9931 test-address-with-right-type-for-array:
9932
9933 55/push-ebp
9934 89/<- %ebp 4/r32/esp
9935
9936 (clear-stream _test-input-stream)
9937 (clear-stream $_test-input-buffered-file->buffer)
9938 (clear-stream _test-output-stream)
9939 (clear-stream $_test-output-buffered-file->buffer)
9940
9941 (write _test-input-stream "fn foo {\n")
9942 (write _test-input-stream " var x: (array int 3)\n")
9943 (write _test-input-stream " var y/eax: (addr array int) <- address x\n")
9944 (write _test-input-stream "}\n")
9945
9946 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9947 (flush _test-output-buffered-file)
9948
9949
9950 89/<- %esp 5/r32/ebp
9951 5d/pop-to-ebp
9952 c3/return
9953
9954 test-address-with-right-type-for-stream:
9955
9956 55/push-ebp
9957 89/<- %ebp 4/r32/esp
9958
9959 (clear-stream _test-input-stream)
9960 (clear-stream $_test-input-buffered-file->buffer)
9961 (clear-stream _test-output-stream)
9962 (clear-stream $_test-output-buffered-file->buffer)
9963
9964 (write _test-input-stream "fn foo {\n")
9965 (write _test-input-stream " var x: (stream int 3)\n")
9966 (write _test-input-stream " var y/eax: (addr stream int) <- address x\n")
9967 (write _test-input-stream "}\n")
9968
9969 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9970 (flush _test-output-buffered-file)
9971
9972
9973 89/<- %esp 5/r32/ebp
9974 5d/pop-to-ebp
9975 c3/return
9976
9977 test-get-with-wrong-field:
9978
9979 55/push-ebp
9980 89/<- %ebp 4/r32/esp
9981
9982 (clear-stream _test-input-stream)
9983 (clear-stream $_test-input-buffered-file->buffer)
9984 (clear-stream _test-output-stream)
9985 (clear-stream $_test-output-buffered-file->buffer)
9986 (clear-stream _test-error-stream)
9987 (clear-stream $_test-error-buffered-file->buffer)
9988
9989 68/push 0/imm32
9990 68/push 0/imm32
9991 89/<- %edx 4/r32/esp
9992 (tailor-exit-descriptor %edx 0x10)
9993
9994 (write _test-input-stream "fn foo {\n")
9995 (write _test-input-stream " var a: t\n")
9996 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
9997 (write _test-input-stream "}\n")
9998 (write _test-input-stream "type t {\n")
9999 (write _test-input-stream " x: int\n")
10000 (write _test-input-stream "}\n")
10001
10002 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10003
10004
10005 89/<- %edx 4/r32/esp
10006 (flush _test-output-buffered-file)
10007 (flush _test-error-buffered-file)
10008 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10014
10015 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
10016 (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")
10017
10018 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
10019
10020 81 0/subop/add %esp 8/imm32
10021
10022 5d/pop-to-ebp
10023 c3/return
10024
10025 test-get-with-wrong-base-type:
10026
10027 55/push-ebp
10028 89/<- %ebp 4/r32/esp
10029
10030 (clear-stream _test-input-stream)
10031 (clear-stream $_test-input-buffered-file->buffer)
10032 (clear-stream _test-output-stream)
10033 (clear-stream $_test-output-buffered-file->buffer)
10034 (clear-stream _test-error-stream)
10035 (clear-stream $_test-error-buffered-file->buffer)
10036
10037 68/push 0/imm32
10038 68/push 0/imm32
10039 89/<- %edx 4/r32/esp
10040 (tailor-exit-descriptor %edx 0x10)
10041
10042 (write _test-input-stream "fn foo {\n")
10043 (write _test-input-stream " var a: int\n")
10044 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10045 (write _test-input-stream "}\n")
10046
10047 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10048
10049
10050 89/<- %edx 4/r32/esp
10051 (flush _test-output-buffered-file)
10052 (flush _test-error-buffered-file)
10053 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10059
10060 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
10061 (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")
10062
10063 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
10064
10065 81 0/subop/add %esp 8/imm32
10066
10067 5d/pop-to-ebp
10068 c3/return
10069
10070 test-get-with-wrong-base-type-2:
10071
10072 55/push-ebp
10073 89/<- %ebp 4/r32/esp
10074
10075 (clear-stream _test-input-stream)
10076 (clear-stream $_test-input-buffered-file->buffer)
10077 (clear-stream _test-output-stream)
10078 (clear-stream $_test-output-buffered-file->buffer)
10079 (clear-stream _test-error-stream)
10080 (clear-stream $_test-error-buffered-file->buffer)
10081
10082 68/push 0/imm32
10083 68/push 0/imm32
10084 89/<- %edx 4/r32/esp
10085 (tailor-exit-descriptor %edx 0x10)
10086
10087 (write _test-input-stream "fn foo {\n")
10088 (write _test-input-stream " var a: (addr t)\n")
10089 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10090 (write _test-input-stream "}\n")
10091 (write _test-input-stream "type t {\n")
10092 (write _test-input-stream " x: int\n")
10093 (write _test-input-stream "}\n")
10094
10095 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10096
10097
10098 89/<- %edx 4/r32/esp
10099 (flush _test-output-buffered-file)
10100 (flush _test-error-buffered-file)
10101 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10107
10108 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
10109 (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")
10110
10111 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
10112
10113 81 0/subop/add %esp 8/imm32
10114
10115 5d/pop-to-ebp
10116 c3/return
10117
10118 test-get-with-wrong-base-type-3:
10119
10120 55/push-ebp
10121 89/<- %ebp 4/r32/esp
10122
10123 (clear-stream _test-input-stream)
10124 (clear-stream $_test-input-buffered-file->buffer)
10125 (clear-stream _test-output-stream)
10126 (clear-stream $_test-output-buffered-file->buffer)
10127 (clear-stream _test-error-stream)
10128 (clear-stream $_test-error-buffered-file->buffer)
10129
10130 68/push 0/imm32
10131 68/push 0/imm32
10132 89/<- %edx 4/r32/esp
10133 (tailor-exit-descriptor %edx 0x10)
10134
10135 (write _test-input-stream "fn foo {\n")
10136 (write _test-input-stream " var a: (handle int)\n")
10137 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
10138 (write _test-input-stream "}\n")
10139
10140 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10141
10142
10143 89/<- %edx 4/r32/esp
10144 (flush _test-output-buffered-file)
10145 (flush _test-error-buffered-file)
10146 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10152
10153 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-3: output should be empty")
10154 (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")
10155
10156 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-3: exit status")
10157
10158 81 0/subop/add %esp 8/imm32
10159
10160 5d/pop-to-ebp
10161 c3/return
10162
10163 test-get-with-wrong-offset-type:
10164
10165 55/push-ebp
10166 89/<- %ebp 4/r32/esp
10167
10168 (clear-stream _test-input-stream)
10169 (clear-stream $_test-input-buffered-file->buffer)
10170 (clear-stream _test-output-stream)
10171 (clear-stream $_test-output-buffered-file->buffer)
10172 (clear-stream _test-error-stream)
10173 (clear-stream $_test-error-buffered-file->buffer)
10174
10175 68/push 0/imm32
10176 68/push 0/imm32
10177 89/<- %edx 4/r32/esp
10178 (tailor-exit-descriptor %edx 0x10)
10179
10180 (write _test-input-stream "fn foo {\n")
10181 (write _test-input-stream " var a: t\n")
10182 (write _test-input-stream " var b: int\n")
10183 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
10184 (write _test-input-stream "}\n")
10185 (write _test-input-stream "type t {\n")
10186 (write _test-input-stream " x: int\n")
10187 (write _test-input-stream "}\n")
10188
10189 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10190
10191
10192 89/<- %edx 4/r32/esp
10193 (flush _test-output-buffered-file)
10194 (flush _test-error-buffered-file)
10195 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10201
10202 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
10203 (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")
10204
10205 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
10206
10207 81 0/subop/add %esp 8/imm32
10208
10209 5d/pop-to-ebp
10210 c3/return
10211
10212 test-get-with-wrong-output-type:
10213
10214 55/push-ebp
10215 89/<- %ebp 4/r32/esp
10216
10217 (clear-stream _test-input-stream)
10218 (clear-stream $_test-input-buffered-file->buffer)
10219 (clear-stream _test-output-stream)
10220 (clear-stream $_test-output-buffered-file->buffer)
10221 (clear-stream _test-error-stream)
10222 (clear-stream $_test-error-buffered-file->buffer)
10223
10224 68/push 0/imm32
10225 68/push 0/imm32
10226 89/<- %edx 4/r32/esp
10227 (tailor-exit-descriptor %edx 0x10)
10228
10229 (write _test-input-stream "fn foo {\n")
10230 (write _test-input-stream " var a: t\n")
10231 (write _test-input-stream " var c: (addr int)\n")
10232 (write _test-input-stream " c <- get a, x\n")
10233 (write _test-input-stream "}\n")
10234 (write _test-input-stream "type t {\n")
10235 (write _test-input-stream " x: int\n")
10236 (write _test-input-stream "}\n")
10237
10238 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10239
10240
10241 89/<- %edx 4/r32/esp
10242 (flush _test-output-buffered-file)
10243 (flush _test-error-buffered-file)
10244 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10250
10251 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
10252 (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")
10253
10254 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
10255
10256 81 0/subop/add %esp 8/imm32
10257
10258 5d/pop-to-ebp
10259 c3/return
10260
10261 test-get-with-wrong-output-type-2:
10262
10263 55/push-ebp
10264 89/<- %ebp 4/r32/esp
10265
10266 (clear-stream _test-input-stream)
10267 (clear-stream $_test-input-buffered-file->buffer)
10268 (clear-stream _test-output-stream)
10269 (clear-stream $_test-output-buffered-file->buffer)
10270 (clear-stream _test-error-stream)
10271 (clear-stream $_test-error-buffered-file->buffer)
10272
10273 68/push 0/imm32
10274 68/push 0/imm32
10275 89/<- %edx 4/r32/esp
10276 (tailor-exit-descriptor %edx 0x10)
10277
10278 (write _test-input-stream "fn foo {\n")
10279 (write _test-input-stream " var a: t\n")
10280 (write _test-input-stream " var c/ecx: int <- get a, x\n")
10281 (write _test-input-stream "}\n")
10282 (write _test-input-stream "type t {\n")
10283 (write _test-input-stream " x: int\n")
10284 (write _test-input-stream "}\n")
10285
10286 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10287
10288
10289 89/<- %edx 4/r32/esp
10290 (flush _test-output-buffered-file)
10291 (flush _test-error-buffered-file)
10292 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10298
10299 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
10300 (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")
10301
10302 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
10303
10304 81 0/subop/add %esp 8/imm32
10305
10306 5d/pop-to-ebp
10307 c3/return
10308
10309 test-get-with-wrong-output-type-3:
10310
10311 55/push-ebp
10312 89/<- %ebp 4/r32/esp
10313
10314 (clear-stream _test-input-stream)
10315 (clear-stream $_test-input-buffered-file->buffer)
10316 (clear-stream _test-output-stream)
10317 (clear-stream $_test-output-buffered-file->buffer)
10318 (clear-stream _test-error-stream)
10319 (clear-stream $_test-error-buffered-file->buffer)
10320
10321 68/push 0/imm32
10322 68/push 0/imm32
10323 89/<- %edx 4/r32/esp
10324 (tailor-exit-descriptor %edx 0x10)
10325
10326 (write _test-input-stream "fn foo {\n")
10327 (write _test-input-stream " var a: t\n")
10328 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
10329 (write _test-input-stream "}\n")
10330 (write _test-input-stream "type t {\n")
10331 (write _test-input-stream " x: int\n")
10332 (write _test-input-stream "}\n")
10333
10334 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10335
10336
10337 89/<- %edx 4/r32/esp
10338 (flush _test-output-buffered-file)
10339 (flush _test-error-buffered-file)
10340 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10346
10347 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
10348 (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")
10349
10350 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
10351
10352 81 0/subop/add %esp 8/imm32
10353
10354 5d/pop-to-ebp
10355 c3/return
10356
10357 test-get-with-wrong-output-type-4:
10358
10359 55/push-ebp
10360 89/<- %ebp 4/r32/esp
10361
10362 (clear-stream _test-input-stream)
10363 (clear-stream $_test-input-buffered-file->buffer)
10364 (clear-stream _test-output-stream)
10365 (clear-stream $_test-output-buffered-file->buffer)
10366 (clear-stream _test-error-stream)
10367 (clear-stream $_test-error-buffered-file->buffer)
10368
10369 68/push 0/imm32
10370 68/push 0/imm32
10371 89/<- %edx 4/r32/esp
10372 (tailor-exit-descriptor %edx 0x10)
10373
10374 (write _test-input-stream "fn foo {\n")
10375 (write _test-input-stream " var a: t\n")
10376 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
10377 (write _test-input-stream "}\n")
10378 (write _test-input-stream "type t {\n")
10379 (write _test-input-stream " x: int\n")
10380 (write _test-input-stream "}\n")
10381
10382 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10383
10384
10385 89/<- %edx 4/r32/esp
10386 (flush _test-output-buffered-file)
10387 (flush _test-error-buffered-file)
10388 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10394
10395 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
10396 (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")
10397
10398 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
10399
10400 81 0/subop/add %esp 8/imm32
10401
10402 5d/pop-to-ebp
10403 c3/return
10404
10405 test-get-with-wrong-output-type-5:
10406
10407 55/push-ebp
10408 89/<- %ebp 4/r32/esp
10409
10410 (clear-stream _test-input-stream)
10411 (clear-stream $_test-input-buffered-file->buffer)
10412 (clear-stream _test-output-stream)
10413 (clear-stream $_test-output-buffered-file->buffer)
10414
10415 (write _test-input-stream "fn foo {\n")
10416 (write _test-input-stream " var a: t\n")
10417 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
10418 (write _test-input-stream "}\n")
10419 (write _test-input-stream "type t {\n")
10420 (write _test-input-stream " x: (handle int)\n")
10421 (write _test-input-stream "}\n")
10422
10423 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10424 (flush _test-output-buffered-file)
10425
10426
10427 89/<- %esp 5/r32/ebp
10428 5d/pop-to-ebp
10429 c3/return
10430
10431 test-get-with-too-few-inouts:
10432
10433 55/push-ebp
10434 89/<- %ebp 4/r32/esp
10435
10436 (clear-stream _test-input-stream)
10437 (clear-stream $_test-input-buffered-file->buffer)
10438 (clear-stream _test-output-stream)
10439 (clear-stream $_test-output-buffered-file->buffer)
10440 (clear-stream _test-error-stream)
10441 (clear-stream $_test-error-buffered-file->buffer)
10442
10443 68/push 0/imm32
10444 68/push 0/imm32
10445 89/<- %edx 4/r32/esp
10446 (tailor-exit-descriptor %edx 0x10)
10447
10448 (write _test-input-stream "fn foo {\n")
10449 (write _test-input-stream " var a: t\n")
10450 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
10451 (write _test-input-stream "}\n")
10452 (write _test-input-stream "type t {\n")
10453 (write _test-input-stream " x: int\n")
10454 (write _test-input-stream "}\n")
10455
10456 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10457
10458
10459 89/<- %edx 4/r32/esp
10460 (flush _test-output-buffered-file)
10461 (flush _test-error-buffered-file)
10462 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10468
10469 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
10470 (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")
10471
10472 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
10473
10474 81 0/subop/add %esp 8/imm32
10475
10476 5d/pop-to-ebp
10477 c3/return
10478
10479 test-get-with-too-many-inouts:
10480
10481 55/push-ebp
10482 89/<- %ebp 4/r32/esp
10483
10484 (clear-stream _test-input-stream)
10485 (clear-stream $_test-input-buffered-file->buffer)
10486 (clear-stream _test-output-stream)
10487 (clear-stream $_test-output-buffered-file->buffer)
10488 (clear-stream _test-error-stream)
10489 (clear-stream $_test-error-buffered-file->buffer)
10490
10491 68/push 0/imm32
10492 68/push 0/imm32
10493 89/<- %edx 4/r32/esp
10494 (tailor-exit-descriptor %edx 0x10)
10495
10496 (write _test-input-stream "fn foo {\n")
10497 (write _test-input-stream " var a: t\n")
10498 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
10499 (write _test-input-stream "}\n")
10500 (write _test-input-stream "type t {\n")
10501 (write _test-input-stream " x: int\n")
10502 (write _test-input-stream "}\n")
10503
10504 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10505
10506
10507 89/<- %edx 4/r32/esp
10508 (flush _test-output-buffered-file)
10509 (flush _test-error-buffered-file)
10510 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10516
10517 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
10518 (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")
10519
10520 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
10521
10522 81 0/subop/add %esp 8/imm32
10523
10524 5d/pop-to-ebp
10525 c3/return
10526
10527 test-get-with-no-output:
10528
10529 55/push-ebp
10530 89/<- %ebp 4/r32/esp
10531
10532 (clear-stream _test-input-stream)
10533 (clear-stream $_test-input-buffered-file->buffer)
10534 (clear-stream _test-output-stream)
10535 (clear-stream $_test-output-buffered-file->buffer)
10536 (clear-stream _test-error-stream)
10537 (clear-stream $_test-error-buffered-file->buffer)
10538
10539 68/push 0/imm32
10540 68/push 0/imm32
10541 89/<- %edx 4/r32/esp
10542 (tailor-exit-descriptor %edx 0x10)
10543
10544 (write _test-input-stream "fn foo {\n")
10545 (write _test-input-stream " var a: t\n")
10546 (write _test-input-stream " get a, x\n")
10547 (write _test-input-stream "}\n")
10548 (write _test-input-stream "type t {\n")
10549 (write _test-input-stream " x: int\n")
10550 (write _test-input-stream "}\n")
10551
10552 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10553
10554
10555 89/<- %edx 4/r32/esp
10556 (flush _test-output-buffered-file)
10557 (flush _test-error-buffered-file)
10558 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10564
10565 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
10566 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
10567
10568 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
10569
10570 81 0/subop/add %esp 8/imm32
10571
10572 5d/pop-to-ebp
10573 c3/return
10574
10575 test-get-with-too-many-outputs:
10576
10577 55/push-ebp
10578 89/<- %ebp 4/r32/esp
10579
10580 (clear-stream _test-input-stream)
10581 (clear-stream $_test-input-buffered-file->buffer)
10582 (clear-stream _test-output-stream)
10583 (clear-stream $_test-output-buffered-file->buffer)
10584 (clear-stream _test-error-stream)
10585 (clear-stream $_test-error-buffered-file->buffer)
10586
10587 68/push 0/imm32
10588 68/push 0/imm32
10589 89/<- %edx 4/r32/esp
10590 (tailor-exit-descriptor %edx 0x10)
10591
10592 (write _test-input-stream "fn foo {\n")
10593 (write _test-input-stream " var a: t\n")
10594 (write _test-input-stream " var b: int\n")
10595 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
10596 (write _test-input-stream " c, b <- get a, x\n")
10597 (write _test-input-stream "}\n")
10598 (write _test-input-stream "type t {\n")
10599 (write _test-input-stream " x: int\n")
10600 (write _test-input-stream "}\n")
10601
10602 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10603
10604
10605 89/<- %edx 4/r32/esp
10606 (flush _test-output-buffered-file)
10607 (flush _test-error-buffered-file)
10608 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10614
10615 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
10616 (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")
10617
10618 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
10619
10620 81 0/subop/add %esp 8/imm32
10621
10622 5d/pop-to-ebp
10623 c3/return
10624
10625 test-convert-array-of-user-defined-types:
10626
10627 55/push-ebp
10628 89/<- %ebp 4/r32/esp
10629
10630 (clear-stream _test-input-stream)
10631 (clear-stream $_test-input-buffered-file->buffer)
10632 (clear-stream _test-output-stream)
10633 (clear-stream $_test-output-buffered-file->buffer)
10634
10635 (write _test-input-stream "type t {\n")
10636 (write _test-input-stream " x: int\n")
10637 (write _test-input-stream " y: int\n")
10638 (write _test-input-stream "}\n")
10639 (write _test-input-stream "fn foo {\n")
10640 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10641 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
10642 (write _test-input-stream " var x/eax: (addr t) <- index arr, idx\n")
10643 (write _test-input-stream "}\n")
10644
10645 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10646 (flush _test-output-buffered-file)
10647 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10653
10654 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
10655 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
10656 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
10657 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
10658 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
10659 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
10660 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
10661 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
10662 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
10663 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
10664 (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")
10665 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000003 + 4) 0x00000000/r32" "F - test-convert-array-of-user-defined-types/11")
10666 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/12")
10667 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/13")
10668 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/14")
10669 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/15")
10670 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/16")
10671 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/17")
10672 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/18")
10673 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/19")
10674
10675 89/<- %esp 5/r32/ebp
10676 5d/pop-to-ebp
10677 c3/return
10678
10679 test-convert-length-of-array-of-user-defined-types-to-eax:
10680
10681 55/push-ebp
10682 89/<- %ebp 4/r32/esp
10683
10684 (clear-stream _test-input-stream)
10685 (clear-stream $_test-input-buffered-file->buffer)
10686 (clear-stream _test-output-stream)
10687 (clear-stream $_test-output-buffered-file->buffer)
10688
10689 (write _test-input-stream "type t {\n")
10690 (write _test-input-stream " x: int\n")
10691 (write _test-input-stream " y: int\n")
10692 (write _test-input-stream " z: int\n")
10693 (write _test-input-stream "}\n")
10694 (write _test-input-stream "fn foo {\n")
10695 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10696 (write _test-input-stream " var x/eax: int <- length arr\n")
10697 (write _test-input-stream "}\n")
10698
10699 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10700 (flush _test-output-buffered-file)
10701 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10707
10708 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
10709 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
10710 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
10711 (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")
10712 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
10713 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
10714
10715 (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")
10716 (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")
10717
10718 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
10719 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
10720 (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")
10721 (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")
10722 (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")
10723 (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")
10724 (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")
10725 (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")
10726
10727 (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")
10728
10729 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
10730 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
10731 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
10732 (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")
10733 (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")
10734 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
10735
10736 89/<- %esp 5/r32/ebp
10737 5d/pop-to-ebp
10738 c3/return
10739
10740 test-convert-length-of-array-of-user-defined-types-to-ecx:
10741
10742 55/push-ebp
10743 89/<- %ebp 4/r32/esp
10744
10745 (clear-stream _test-input-stream)
10746 (clear-stream $_test-input-buffered-file->buffer)
10747 (clear-stream _test-output-stream)
10748 (clear-stream $_test-output-buffered-file->buffer)
10749
10750 (write _test-input-stream "type t {\n")
10751 (write _test-input-stream " x: int\n")
10752 (write _test-input-stream " y: int\n")
10753 (write _test-input-stream " z: int\n")
10754 (write _test-input-stream "}\n")
10755 (write _test-input-stream "fn foo {\n")
10756 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10757 (write _test-input-stream " var x/ecx: int <- length arr\n")
10758 (write _test-input-stream "}\n")
10759
10760 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10761 (flush _test-output-buffered-file)
10762 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10768
10769 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
10770 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
10771 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
10772 (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")
10773 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
10774 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
10775
10776 (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")
10777 (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")
10778
10779 (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")
10780
10781 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
10782 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
10783 (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")
10784 (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")
10785 (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")
10786 (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")
10787 (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")
10788 (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")
10789 (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")
10790
10791 (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")
10792
10793 (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")
10794
10795 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
10796 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
10797 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
10798 (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")
10799 (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")
10800 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
10801
10802 89/<- %esp 5/r32/ebp
10803 5d/pop-to-ebp
10804 c3/return
10805
10806 test-convert-length-of-array-of-user-defined-types-to-edx:
10807
10808 55/push-ebp
10809 89/<- %ebp 4/r32/esp
10810
10811 (clear-stream _test-input-stream)
10812 (clear-stream $_test-input-buffered-file->buffer)
10813 (clear-stream _test-output-stream)
10814 (clear-stream $_test-output-buffered-file->buffer)
10815
10816 (write _test-input-stream "type t {\n")
10817 (write _test-input-stream " x: int\n")
10818 (write _test-input-stream " y: int\n")
10819 (write _test-input-stream " z: int\n")
10820 (write _test-input-stream "}\n")
10821 (write _test-input-stream "fn foo {\n")
10822 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10823 (write _test-input-stream " var x/edx: int <- length arr\n")
10824 (write _test-input-stream "}\n")
10825
10826 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10827 (flush _test-output-buffered-file)
10828 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10834
10835 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
10836 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
10837 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
10838 (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")
10839 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
10840 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
10841
10842 (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")
10843 (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")
10844
10845 (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")
10846
10847 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
10848 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
10849 (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")
10850 (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")
10851 (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")
10852 (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")
10853 (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")
10854 (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")
10855 (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")
10856
10857 (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")
10858
10859 (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")
10860
10861 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
10862 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
10863 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
10864 (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")
10865 (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")
10866 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
10867
10868 89/<- %esp 5/r32/ebp
10869 5d/pop-to-ebp
10870 c3/return
10871
10872 test-convert-length-of-array-of-user-defined-types:
10873
10874 55/push-ebp
10875 89/<- %ebp 4/r32/esp
10876
10877 (clear-stream _test-input-stream)
10878 (clear-stream $_test-input-buffered-file->buffer)
10879 (clear-stream _test-output-stream)
10880 (clear-stream $_test-output-buffered-file->buffer)
10881
10882 (write _test-input-stream "type t {\n")
10883 (write _test-input-stream " x: int\n")
10884 (write _test-input-stream " y: int\n")
10885 (write _test-input-stream " z: int\n")
10886 (write _test-input-stream "}\n")
10887 (write _test-input-stream "fn foo {\n")
10888 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
10889 (write _test-input-stream " var x/ebx: int <- length arr\n")
10890 (write _test-input-stream "}\n")
10891
10892 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10893 (flush _test-output-buffered-file)
10894 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
10900
10901 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
10902 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
10903 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
10904 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
10905 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
10906 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
10907 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
10908 (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")
10909 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
10910 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
10911 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
10912 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
10913 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
10914 (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")
10915 (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")
10916 (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")
10917 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
10918 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
10919 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
10920 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
10921 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
10922 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
10923 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
10924 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
10925 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
10926 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
10927 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
10928 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
10929
10930 89/<- %esp 5/r32/ebp
10931 5d/pop-to-ebp
10932 c3/return
10933
10934 test-index-with-non-array-atom-base-type:
10935
10936 55/push-ebp
10937 89/<- %ebp 4/r32/esp
10938
10939 (clear-stream _test-input-stream)
10940 (clear-stream $_test-input-buffered-file->buffer)
10941 (clear-stream _test-output-stream)
10942 (clear-stream $_test-output-buffered-file->buffer)
10943 (clear-stream _test-error-stream)
10944 (clear-stream $_test-error-buffered-file->buffer)
10945
10946 68/push 0/imm32
10947 68/push 0/imm32
10948 89/<- %edx 4/r32/esp
10949 (tailor-exit-descriptor %edx 0x10)
10950
10951 (write _test-input-stream "fn foo {\n")
10952 (write _test-input-stream " var a: int\n")
10953 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
10954 (write _test-input-stream "}\n")
10955
10956 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
10957
10958
10959 89/<- %edx 4/r32/esp
10960 (flush _test-output-buffered-file)
10961 (flush _test-error-buffered-file)
10962 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
10968
10969 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-atom-base-type: output should be empty")
10970 (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")
10971
10972 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-atom-base-type: exit status")
10973
10974 81 0/subop/add %esp 8/imm32
10975
10976 5d/pop-to-ebp
10977 c3/return
10978
10979 test-index-with-non-array-compound-base-type:
10980
10981 55/push-ebp
10982 89/<- %ebp 4/r32/esp
10983
10984 (clear-stream _test-input-stream)
10985 (clear-stream $_test-input-buffered-file->buffer)
10986 (clear-stream _test-output-stream)
10987 (clear-stream $_test-output-buffered-file->buffer)
10988 (clear-stream _test-error-stream)
10989 (clear-stream $_test-error-buffered-file->buffer)
10990
10991 68/push 0/imm32
10992 68/push 0/imm32
10993 89/<- %edx 4/r32/esp
10994 (tailor-exit-descriptor %edx 0x10)
10995
10996 (write _test-input-stream "fn foo {\n")
10997 (write _test-input-stream " var a: (handle int)\n")
10998 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
10999 (write _test-input-stream "}\n")
11000
11001 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11002
11003
11004 89/<- %edx 4/r32/esp
11005 (flush _test-output-buffered-file)
11006 (flush _test-error-buffered-file)
11007 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11013
11014 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type: output should be empty")
11015 (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")
11016
11017 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type: exit status")
11018
11019 81 0/subop/add %esp 8/imm32
11020
11021 5d/pop-to-ebp
11022 c3/return
11023
11024 test-index-with-non-array-compound-base-type-2:
11025
11026 55/push-ebp
11027 89/<- %ebp 4/r32/esp
11028
11029 (clear-stream _test-input-stream)
11030 (clear-stream $_test-input-buffered-file->buffer)
11031 (clear-stream _test-output-stream)
11032 (clear-stream $_test-output-buffered-file->buffer)
11033 (clear-stream _test-error-stream)
11034 (clear-stream $_test-error-buffered-file->buffer)
11035
11036 68/push 0/imm32
11037 68/push 0/imm32
11038 89/<- %edx 4/r32/esp
11039 (tailor-exit-descriptor %edx 0x10)
11040
11041 (write _test-input-stream "fn foo {\n")
11042 (write _test-input-stream " var a: (addr int)\n")
11043 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11044 (write _test-input-stream "}\n")
11045
11046 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11047
11048
11049 89/<- %edx 4/r32/esp
11050 (flush _test-output-buffered-file)
11051 (flush _test-error-buffered-file)
11052 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11058
11059 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type-2: output should be empty")
11060 (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")
11061
11062 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type-2: exit status")
11063
11064 81 0/subop/add %esp 8/imm32
11065
11066 5d/pop-to-ebp
11067 c3/return
11068
11069 test-index-with-array-atom-base-type:
11070
11071 55/push-ebp
11072 89/<- %ebp 4/r32/esp
11073
11074 (clear-stream _test-input-stream)
11075 (clear-stream $_test-input-buffered-file->buffer)
11076 (clear-stream _test-output-stream)
11077 (clear-stream $_test-output-buffered-file->buffer)
11078 (clear-stream _test-error-stream)
11079 (clear-stream $_test-error-buffered-file->buffer)
11080
11081 68/push 0/imm32
11082 68/push 0/imm32
11083 89/<- %edx 4/r32/esp
11084 (tailor-exit-descriptor %edx 0x10)
11085
11086 (write _test-input-stream "fn foo {\n")
11087 (write _test-input-stream " var a: array\n")
11088 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11089 (write _test-input-stream "}\n")
11090
11091 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11092
11093
11094 89/<- %edx 4/r32/esp
11095 (flush _test-output-buffered-file)
11096 (flush _test-error-buffered-file)
11097 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11103
11104 (check-stream-equal _test-output-stream "" "F - test-index-with-array-atom-base-type: output should be empty")
11105 (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")
11106
11107 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-atom-base-type: exit status")
11108
11109 81 0/subop/add %esp 8/imm32
11110
11111 5d/pop-to-ebp
11112 c3/return
11113
11114 test-index-with-addr-base-on-stack:
11115
11116 55/push-ebp
11117 89/<- %ebp 4/r32/esp
11118
11119 (clear-stream _test-input-stream)
11120 (clear-stream $_test-input-buffered-file->buffer)
11121 (clear-stream _test-output-stream)
11122 (clear-stream $_test-output-buffered-file->buffer)
11123 (clear-stream _test-error-stream)
11124 (clear-stream $_test-error-buffered-file->buffer)
11125
11126 68/push 0/imm32
11127 68/push 0/imm32
11128 89/<- %edx 4/r32/esp
11129 (tailor-exit-descriptor %edx 0x10)
11130
11131 (write _test-input-stream "fn foo {\n")
11132 (write _test-input-stream " var a: (addr array int)\n")
11133 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
11134 (write _test-input-stream "}\n")
11135
11136 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11137
11138
11139 89/<- %edx 4/r32/esp
11140 (flush _test-output-buffered-file)
11141 (flush _test-error-buffered-file)
11142 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11148
11149 (check-stream-equal _test-output-stream "" "F - test-index-with-addr-base-on-stack: output should be empty")
11150 (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")
11151
11152 (check-ints-equal *(edx+4) 2 "F - test-index-with-addr-base-on-stack: exit status")
11153
11154 81 0/subop/add %esp 8/imm32
11155
11156 5d/pop-to-ebp
11157 c3/return
11158
11159 test-index-with-wrong-index-type:
11160
11161 55/push-ebp
11162 89/<- %ebp 4/r32/esp
11163
11164 (clear-stream _test-input-stream)
11165 (clear-stream $_test-input-buffered-file->buffer)
11166 (clear-stream _test-output-stream)
11167 (clear-stream $_test-output-buffered-file->buffer)
11168 (clear-stream _test-error-stream)
11169 (clear-stream $_test-error-buffered-file->buffer)
11170
11171 68/push 0/imm32
11172 68/push 0/imm32
11173 89/<- %edx 4/r32/esp
11174 (tailor-exit-descriptor %edx 0x10)
11175
11176 (write _test-input-stream "fn foo {\n")
11177 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11178 (write _test-input-stream " var b: boolean\n")
11179 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11180 (write _test-input-stream "}\n")
11181
11182 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11183
11184
11185 89/<- %edx 4/r32/esp
11186 (flush _test-output-buffered-file)
11187 (flush _test-error-buffered-file)
11188 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11194
11195 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-index-type: output should be empty")
11196 (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")
11197
11198 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-index-type: exit status")
11199
11200 81 0/subop/add %esp 8/imm32
11201
11202 5d/pop-to-ebp
11203 c3/return
11204
11205 test-index-with-offset-atom-index-type:
11206
11207 55/push-ebp
11208 89/<- %ebp 4/r32/esp
11209
11210 (clear-stream _test-input-stream)
11211 (clear-stream $_test-input-buffered-file->buffer)
11212 (clear-stream _test-output-stream)
11213 (clear-stream $_test-output-buffered-file->buffer)
11214 (clear-stream _test-error-stream)
11215 (clear-stream $_test-error-buffered-file->buffer)
11216
11217 68/push 0/imm32
11218 68/push 0/imm32
11219 89/<- %edx 4/r32/esp
11220 (tailor-exit-descriptor %edx 0x10)
11221
11222 (write _test-input-stream "fn foo {\n")
11223 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11224 (write _test-input-stream " var b: offset\n")
11225 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\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-offset-atom-index-type: output should be empty")
11242 (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")
11243
11244 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-atom-index-type: 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-offset-on-stack:
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/eax: (addr array int) <- copy 0\n")
11270 (write _test-input-stream " var b: int\n")
11271 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11272 (write _test-input-stream "}\n")
11273
11274 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11275
11276
11277 89/<- %edx 4/r32/esp
11278 (flush _test-output-buffered-file)
11279 (flush _test-error-buffered-file)
11280 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11286
11287 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-on-stack: output should be empty")
11288 (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")
11289
11290 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-on-stack: exit status")
11291
11292 81 0/subop/add %esp 8/imm32
11293
11294 5d/pop-to-ebp
11295 c3/return
11296
11297 test-index-needs-offset-type:
11298
11299 55/push-ebp
11300 89/<- %ebp 4/r32/esp
11301
11302 (clear-stream _test-input-stream)
11303 (clear-stream $_test-input-buffered-file->buffer)
11304 (clear-stream _test-output-stream)
11305 (clear-stream $_test-output-buffered-file->buffer)
11306 (clear-stream _test-error-stream)
11307 (clear-stream $_test-error-buffered-file->buffer)
11308
11309 68/push 0/imm32
11310 68/push 0/imm32
11311 89/<- %edx 4/r32/esp
11312 (tailor-exit-descriptor %edx 0x10)
11313
11314 (write _test-input-stream "fn foo {\n")
11315 (write _test-input-stream " var a/eax: (addr array t) <- copy 0\n")
11316 (write _test-input-stream " var b/ebx: int <- copy 0\n")
11317 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
11318 (write _test-input-stream "}\n")
11319 (write _test-input-stream "type t {\n")
11320 (write _test-input-stream " x: int\n")
11321 (write _test-input-stream " y: int\n")
11322 (write _test-input-stream " z: int\n")
11323 (write _test-input-stream "}\n")
11324
11325 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11326
11327
11328 89/<- %edx 4/r32/esp
11329 (flush _test-output-buffered-file)
11330 (flush _test-error-buffered-file)
11331 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11337
11338 (check-stream-equal _test-output-stream "" "F - test-index-needs-offset-type: output should be empty")
11339 (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")
11340
11341 (check-ints-equal *(edx+4) 2 "F - test-index-needs-offset-type: exit status")
11342
11343 81 0/subop/add %esp 8/imm32
11344
11345 5d/pop-to-ebp
11346 c3/return
11347
11348 test-index-with-output-not-address:
11349
11350 55/push-ebp
11351 89/<- %ebp 4/r32/esp
11352
11353 (clear-stream _test-input-stream)
11354 (clear-stream $_test-input-buffered-file->buffer)
11355 (clear-stream _test-output-stream)
11356 (clear-stream $_test-output-buffered-file->buffer)
11357 (clear-stream _test-error-stream)
11358 (clear-stream $_test-error-buffered-file->buffer)
11359
11360 68/push 0/imm32
11361 68/push 0/imm32
11362 89/<- %edx 4/r32/esp
11363 (tailor-exit-descriptor %edx 0x10)
11364
11365 (write _test-input-stream "fn foo {\n")
11366 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11367 (write _test-input-stream " var o/edi: int <- index a, 0\n")
11368 (write _test-input-stream "}\n")
11369
11370 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11371
11372
11373 89/<- %edx 4/r32/esp
11374 (flush _test-output-buffered-file)
11375 (flush _test-error-buffered-file)
11376 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11382
11383 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address: output should be empty")
11384 (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")
11385
11386 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address: exit status")
11387
11388 81 0/subop/add %esp 8/imm32
11389
11390 5d/pop-to-ebp
11391 c3/return
11392
11393 test-index-with-output-not-address-2:
11394
11395 55/push-ebp
11396 89/<- %ebp 4/r32/esp
11397
11398 (clear-stream _test-input-stream)
11399 (clear-stream $_test-input-buffered-file->buffer)
11400 (clear-stream _test-output-stream)
11401 (clear-stream $_test-output-buffered-file->buffer)
11402 (clear-stream _test-error-stream)
11403 (clear-stream $_test-error-buffered-file->buffer)
11404
11405 68/push 0/imm32
11406 68/push 0/imm32
11407 89/<- %edx 4/r32/esp
11408 (tailor-exit-descriptor %edx 0x10)
11409
11410 (write _test-input-stream "fn foo {\n")
11411 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11412 (write _test-input-stream " var o/edi: (int) <- index a, 0\n")
11413 (write _test-input-stream "}\n")
11414
11415 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11416
11417
11418 89/<- %edx 4/r32/esp
11419 (flush _test-output-buffered-file)
11420 (flush _test-error-buffered-file)
11421 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11427
11428 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address-2: output should be empty")
11429 (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")
11430
11431 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address-2: exit status")
11432
11433 81 0/subop/add %esp 8/imm32
11434
11435 5d/pop-to-ebp
11436 c3/return
11437
11438 test-index-with-wrong-output-type:
11439
11440 55/push-ebp
11441 89/<- %ebp 4/r32/esp
11442
11443 (clear-stream _test-input-stream)
11444 (clear-stream $_test-input-buffered-file->buffer)
11445 (clear-stream _test-output-stream)
11446 (clear-stream $_test-output-buffered-file->buffer)
11447 (clear-stream _test-error-stream)
11448 (clear-stream $_test-error-buffered-file->buffer)
11449
11450 68/push 0/imm32
11451 68/push 0/imm32
11452 89/<- %edx 4/r32/esp
11453 (tailor-exit-descriptor %edx 0x10)
11454
11455 (write _test-input-stream "fn foo {\n")
11456 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11457 (write _test-input-stream " var o/edi: (addr int) <- index a, 0\n")
11458 (write _test-input-stream "}\n")
11459
11460 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11461
11462
11463 89/<- %edx 4/r32/esp
11464 (flush _test-output-buffered-file)
11465 (flush _test-error-buffered-file)
11466 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11472
11473 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-type: output should be empty")
11474 (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")
11475
11476 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-type: exit status")
11477
11478 81 0/subop/add %esp 8/imm32
11479
11480 5d/pop-to-ebp
11481 c3/return
11482
11483 test-index-with-wrong-output-compound-type:
11484
11485 55/push-ebp
11486 89/<- %ebp 4/r32/esp
11487
11488 (clear-stream _test-input-stream)
11489 (clear-stream $_test-input-buffered-file->buffer)
11490 (clear-stream _test-output-stream)
11491 (clear-stream $_test-output-buffered-file->buffer)
11492 (clear-stream _test-error-stream)
11493 (clear-stream $_test-error-buffered-file->buffer)
11494
11495 68/push 0/imm32
11496 68/push 0/imm32
11497 89/<- %edx 4/r32/esp
11498 (tailor-exit-descriptor %edx 0x10)
11499
11500 (write _test-input-stream "fn foo {\n")
11501 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
11502 (write _test-input-stream " var o/edi: (addr handle int) <- index a, 0\n")
11503 (write _test-input-stream "}\n")
11504
11505 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11506
11507
11508 89/<- %edx 4/r32/esp
11509 (flush _test-output-buffered-file)
11510 (flush _test-error-buffered-file)
11511 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11517
11518 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-compound-type: output should be empty")
11519 (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")
11520
11521 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-compound-type: exit status")
11522
11523 81 0/subop/add %esp 8/imm32
11524
11525 5d/pop-to-ebp
11526 c3/return
11527
11528 test-index-with-no-inouts:
11529
11530 55/push-ebp
11531 89/<- %ebp 4/r32/esp
11532
11533 (clear-stream _test-input-stream)
11534 (clear-stream $_test-input-buffered-file->buffer)
11535 (clear-stream _test-output-stream)
11536 (clear-stream $_test-output-buffered-file->buffer)
11537 (clear-stream _test-error-stream)
11538 (clear-stream $_test-error-buffered-file->buffer)
11539
11540 68/push 0/imm32
11541 68/push 0/imm32
11542 89/<- %edx 4/r32/esp
11543 (tailor-exit-descriptor %edx 0x10)
11544
11545 (write _test-input-stream "fn foo {\n")
11546 (write _test-input-stream " var c/ecx: (addr int) <- index\n")
11547 (write _test-input-stream "}\n")
11548
11549 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11550
11551
11552 89/<- %edx 4/r32/esp
11553 (flush _test-output-buffered-file)
11554 (flush _test-error-buffered-file)
11555 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11561
11562 (check-stream-equal _test-output-stream "" "F - test-index-with-no-inouts: output should be empty")
11563 (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")
11564
11565 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-inouts: exit status")
11566
11567 81 0/subop/add %esp 8/imm32
11568
11569 5d/pop-to-ebp
11570 c3/return
11571
11572 test-index-with-too-few-inouts:
11573
11574 55/push-ebp
11575 89/<- %ebp 4/r32/esp
11576
11577 (clear-stream _test-input-stream)
11578 (clear-stream $_test-input-buffered-file->buffer)
11579 (clear-stream _test-output-stream)
11580 (clear-stream $_test-output-buffered-file->buffer)
11581 (clear-stream _test-error-stream)
11582 (clear-stream $_test-error-buffered-file->buffer)
11583
11584 68/push 0/imm32
11585 68/push 0/imm32
11586 89/<- %edx 4/r32/esp
11587 (tailor-exit-descriptor %edx 0x10)
11588
11589 (write _test-input-stream "fn foo {\n")
11590 (write _test-input-stream " var a: (array int 3)\n")
11591 (write _test-input-stream " var c/ecx: (addr int) <- index a\n")
11592 (write _test-input-stream "}\n")
11593
11594 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11595
11596
11597 89/<- %edx 4/r32/esp
11598 (flush _test-output-buffered-file)
11599 (flush _test-error-buffered-file)
11600 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11606
11607 (check-stream-equal _test-output-stream "" "F - test-index-with-too-few-inouts: output should be empty")
11608 (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")
11609
11610 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-few-inouts: exit status")
11611
11612 81 0/subop/add %esp 8/imm32
11613
11614 5d/pop-to-ebp
11615 c3/return
11616
11617 test-index-with-too-many-inouts:
11618
11619 55/push-ebp
11620 89/<- %ebp 4/r32/esp
11621
11622 (clear-stream _test-input-stream)
11623 (clear-stream $_test-input-buffered-file->buffer)
11624 (clear-stream _test-output-stream)
11625 (clear-stream $_test-output-buffered-file->buffer)
11626 (clear-stream _test-error-stream)
11627 (clear-stream $_test-error-buffered-file->buffer)
11628
11629 68/push 0/imm32
11630 68/push 0/imm32
11631 89/<- %edx 4/r32/esp
11632 (tailor-exit-descriptor %edx 0x10)
11633
11634 (write _test-input-stream "fn foo {\n")
11635 (write _test-input-stream " var a: (array int 3)\n")
11636 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0, 0\n")
11637 (write _test-input-stream "}\n")
11638
11639 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11640
11641
11642 89/<- %edx 4/r32/esp
11643 (flush _test-output-buffered-file)
11644 (flush _test-error-buffered-file)
11645 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11651
11652 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-inouts: output should be empty")
11653 (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")
11654
11655 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-inouts: exit status")
11656
11657 81 0/subop/add %esp 8/imm32
11658
11659 5d/pop-to-ebp
11660 c3/return
11661
11662 test-index-with-no-output:
11663
11664 55/push-ebp
11665 89/<- %ebp 4/r32/esp
11666
11667 (clear-stream _test-input-stream)
11668 (clear-stream $_test-input-buffered-file->buffer)
11669 (clear-stream _test-output-stream)
11670 (clear-stream $_test-output-buffered-file->buffer)
11671 (clear-stream _test-error-stream)
11672 (clear-stream $_test-error-buffered-file->buffer)
11673
11674 68/push 0/imm32
11675 68/push 0/imm32
11676 89/<- %edx 4/r32/esp
11677 (tailor-exit-descriptor %edx 0x10)
11678
11679 (write _test-input-stream "fn foo {\n")
11680 (write _test-input-stream " var a: (array int 3)\n")
11681 (write _test-input-stream " index a, 0\n")
11682 (write _test-input-stream "}\n")
11683
11684 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11685
11686
11687 89/<- %edx 4/r32/esp
11688 (flush _test-output-buffered-file)
11689 (flush _test-error-buffered-file)
11690 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11696
11697 (check-stream-equal _test-output-stream "" "F - test-index-with-no-output: output should be empty")
11698 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: must have an output" "F - test-index-with-no-output: error message")
11699
11700 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-output: exit status")
11701
11702 81 0/subop/add %esp 8/imm32
11703
11704 5d/pop-to-ebp
11705 c3/return
11706
11707 test-index-with-too-many-outputs:
11708
11709 55/push-ebp
11710 89/<- %ebp 4/r32/esp
11711
11712 (clear-stream _test-input-stream)
11713 (clear-stream $_test-input-buffered-file->buffer)
11714 (clear-stream _test-output-stream)
11715 (clear-stream $_test-output-buffered-file->buffer)
11716 (clear-stream _test-error-stream)
11717 (clear-stream $_test-error-buffered-file->buffer)
11718
11719 68/push 0/imm32
11720 68/push 0/imm32
11721 89/<- %edx 4/r32/esp
11722 (tailor-exit-descriptor %edx 0x10)
11723
11724 (write _test-input-stream "fn foo {\n")
11725 (write _test-input-stream " var a: (array int 3)\n")
11726 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
11727 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
11728 (write _test-input-stream " b, c <- index a, 0\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-too-many-outputs: output should be empty")
11745 (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")
11746
11747 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-outputs: exit status")
11748
11749 81 0/subop/add %esp 8/imm32
11750
11751 5d/pop-to-ebp
11752 c3/return
11753
11754 test-compute-offset-with-non-array-atom-base-type:
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: int\n")
11773 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\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-compute-offset-with-non-array-atom-base-type: output should be empty")
11790 (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")
11791
11792 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-atom-base-type: exit status")
11793
11794 81 0/subop/add %esp 8/imm32
11795
11796 5d/pop-to-ebp
11797 c3/return
11798
11799 test-compute-offset-with-non-array-compound-base-type:
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: (handle int)\n")
11818 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 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-compute-offset-with-non-array-compound-base-type: output should be empty")
11835 (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")
11836
11837 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type: exit status")
11838
11839 81 0/subop/add %esp 8/imm32
11840
11841 5d/pop-to-ebp
11842 c3/return
11843
11844 test-compute-offset-with-non-array-compound-base-type-2:
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: (addr int)\n")
11863 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset 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-compute-offset-with-non-array-compound-base-type-2: output should be empty")
11880 (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")
11881
11882 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type-2: exit status")
11883
11884 81 0/subop/add %esp 8/imm32
11885
11886 5d/pop-to-ebp
11887 c3/return
11888
11889 test-compute-offset-with-array-atom-base-type:
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\n")
11908 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
11909 (write _test-input-stream "}\n")
11910
11911 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11912
11913
11914 89/<- %edx 4/r32/esp
11915 (flush _test-output-buffered-file)
11916 (flush _test-error-buffered-file)
11917 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11923
11924 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-array-atom-base-type: output should be empty")
11925 (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")
11926
11927 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-array-atom-base-type: exit status")
11928
11929 81 0/subop/add %esp 8/imm32
11930
11931 5d/pop-to-ebp
11932 c3/return
11933
11934 test-compute-offset-with-wrong-index-type:
11935
11936 55/push-ebp
11937 89/<- %ebp 4/r32/esp
11938
11939 (clear-stream _test-input-stream)
11940 (clear-stream $_test-input-buffered-file->buffer)
11941 (clear-stream _test-output-stream)
11942 (clear-stream $_test-output-buffered-file->buffer)
11943 (clear-stream _test-error-stream)
11944 (clear-stream $_test-error-buffered-file->buffer)
11945
11946 68/push 0/imm32
11947 68/push 0/imm32
11948 89/<- %edx 4/r32/esp
11949 (tailor-exit-descriptor %edx 0x10)
11950
11951 (write _test-input-stream "fn foo {\n")
11952 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
11953 (write _test-input-stream " var b: boolean\n")
11954 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, b\n")
11955 (write _test-input-stream "}\n")
11956
11957 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
11958
11959
11960 89/<- %edx 4/r32/esp
11961 (flush _test-output-buffered-file)
11962 (flush _test-error-buffered-file)
11963 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
11969
11970 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-index-type: output should be empty")
11971 (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")
11972
11973 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-index-type: exit status")
11974
11975 81 0/subop/add %esp 8/imm32
11976
11977 5d/pop-to-ebp
11978 c3/return
11979
11980 test-compute-offset-with-output-not-offset:
11981
11982 55/push-ebp
11983 89/<- %ebp 4/r32/esp
11984
11985 (clear-stream _test-input-stream)
11986 (clear-stream $_test-input-buffered-file->buffer)
11987 (clear-stream _test-output-stream)
11988 (clear-stream $_test-output-buffered-file->buffer)
11989 (clear-stream _test-error-stream)
11990 (clear-stream $_test-error-buffered-file->buffer)
11991
11992 68/push 0/imm32
11993 68/push 0/imm32
11994 89/<- %edx 4/r32/esp
11995 (tailor-exit-descriptor %edx 0x10)
11996
11997 (write _test-input-stream "fn foo {\n")
11998 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
11999 (write _test-input-stream " var o/edi: int <- compute-offset a, 0\n")
12000 (write _test-input-stream "}\n")
12001
12002 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12003
12004
12005 89/<- %edx 4/r32/esp
12006 (flush _test-output-buffered-file)
12007 (flush _test-error-buffered-file)
12008 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12014
12015 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-offset: output should be empty")
12016 (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")
12017
12018 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-offset: exit status")
12019
12020 81 0/subop/add %esp 8/imm32
12021
12022 5d/pop-to-ebp
12023 c3/return
12024
12025 test-compute-offset-with-output-not-address-2:
12026
12027 55/push-ebp
12028 89/<- %ebp 4/r32/esp
12029
12030 (clear-stream _test-input-stream)
12031 (clear-stream $_test-input-buffered-file->buffer)
12032 (clear-stream _test-output-stream)
12033 (clear-stream $_test-output-buffered-file->buffer)
12034 (clear-stream _test-error-stream)
12035 (clear-stream $_test-error-buffered-file->buffer)
12036
12037 68/push 0/imm32
12038 68/push 0/imm32
12039 89/<- %edx 4/r32/esp
12040 (tailor-exit-descriptor %edx 0x10)
12041
12042 (write _test-input-stream "fn foo {\n")
12043 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12044 (write _test-input-stream " var o/edi: (int) <- compute-offset a, 0\n")
12045 (write _test-input-stream "}\n")
12046
12047 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12048
12049
12050 89/<- %edx 4/r32/esp
12051 (flush _test-output-buffered-file)
12052 (flush _test-error-buffered-file)
12053 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12059
12060 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-address-2: output should be empty")
12061 (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")
12062
12063 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-address-2: exit status")
12064
12065 81 0/subop/add %esp 8/imm32
12066
12067 5d/pop-to-ebp
12068 c3/return
12069
12070 test-compute-offset-with-wrong-output-type:
12071
12072 55/push-ebp
12073 89/<- %ebp 4/r32/esp
12074
12075 (clear-stream _test-input-stream)
12076 (clear-stream $_test-input-buffered-file->buffer)
12077 (clear-stream _test-output-stream)
12078 (clear-stream $_test-output-buffered-file->buffer)
12079 (clear-stream _test-error-stream)
12080 (clear-stream $_test-error-buffered-file->buffer)
12081
12082 68/push 0/imm32
12083 68/push 0/imm32
12084 89/<- %edx 4/r32/esp
12085 (tailor-exit-descriptor %edx 0x10)
12086
12087 (write _test-input-stream "fn foo {\n")
12088 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
12089 (write _test-input-stream " var o/edi: (offset int) <- compute-offset a, 0\n")
12090 (write _test-input-stream "}\n")
12091
12092 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12093
12094
12095 89/<- %edx 4/r32/esp
12096 (flush _test-output-buffered-file)
12097 (flush _test-error-buffered-file)
12098 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12104
12105 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-type: output should be empty")
12106 (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")
12107
12108 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-type: exit status")
12109
12110 81 0/subop/add %esp 8/imm32
12111
12112 5d/pop-to-ebp
12113 c3/return
12114
12115 test-compute-offset-with-wrong-output-compound-type:
12116
12117 55/push-ebp
12118 89/<- %ebp 4/r32/esp
12119
12120 (clear-stream _test-input-stream)
12121 (clear-stream $_test-input-buffered-file->buffer)
12122 (clear-stream _test-output-stream)
12123 (clear-stream $_test-output-buffered-file->buffer)
12124 (clear-stream _test-error-stream)
12125 (clear-stream $_test-error-buffered-file->buffer)
12126
12127 68/push 0/imm32
12128 68/push 0/imm32
12129 89/<- %edx 4/r32/esp
12130 (tailor-exit-descriptor %edx 0x10)
12131
12132 (write _test-input-stream "fn foo {\n")
12133 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
12134 (write _test-input-stream " var o/edi: (offset handle int) <- compute-offset a, 0\n")
12135 (write _test-input-stream "}\n")
12136
12137 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12138
12139
12140 89/<- %edx 4/r32/esp
12141 (flush _test-output-buffered-file)
12142 (flush _test-error-buffered-file)
12143 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12149
12150 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-compound-type: output should be empty")
12151 (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")
12152
12153 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-compound-type: exit status")
12154
12155 81 0/subop/add %esp 8/imm32
12156
12157 5d/pop-to-ebp
12158 c3/return
12159
12160 test-compute-offset-with-no-inouts:
12161
12162 55/push-ebp
12163 89/<- %ebp 4/r32/esp
12164
12165 (clear-stream _test-input-stream)
12166 (clear-stream $_test-input-buffered-file->buffer)
12167 (clear-stream _test-output-stream)
12168 (clear-stream $_test-output-buffered-file->buffer)
12169 (clear-stream _test-error-stream)
12170 (clear-stream $_test-error-buffered-file->buffer)
12171
12172 68/push 0/imm32
12173 68/push 0/imm32
12174 89/<- %edx 4/r32/esp
12175 (tailor-exit-descriptor %edx 0x10)
12176
12177 (write _test-input-stream "fn foo {\n")
12178 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset\n")
12179 (write _test-input-stream "}\n")
12180
12181 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12182
12183
12184 89/<- %edx 4/r32/esp
12185 (flush _test-output-buffered-file)
12186 (flush _test-error-buffered-file)
12187 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12193
12194 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-inouts: output should be empty")
12195 (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")
12196
12197 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-inouts: exit status")
12198
12199 81 0/subop/add %esp 8/imm32
12200
12201 5d/pop-to-ebp
12202 c3/return
12203
12204 test-compute-offset-with-too-few-inouts:
12205
12206 55/push-ebp
12207 89/<- %ebp 4/r32/esp
12208
12209 (clear-stream _test-input-stream)
12210 (clear-stream $_test-input-buffered-file->buffer)
12211 (clear-stream _test-output-stream)
12212 (clear-stream $_test-output-buffered-file->buffer)
12213 (clear-stream _test-error-stream)
12214 (clear-stream $_test-error-buffered-file->buffer)
12215
12216 68/push 0/imm32
12217 68/push 0/imm32
12218 89/<- %edx 4/r32/esp
12219 (tailor-exit-descriptor %edx 0x10)
12220
12221 (write _test-input-stream "fn foo {\n")
12222 (write _test-input-stream " var a: (array int 3)\n")
12223 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a\n")
12224 (write _test-input-stream "}\n")
12225
12226 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12227
12228
12229 89/<- %edx 4/r32/esp
12230 (flush _test-output-buffered-file)
12231 (flush _test-error-buffered-file)
12232 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12238
12239 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-few-inouts: output should be empty")
12240 (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")
12241
12242 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-few-inouts: exit status")
12243
12244 81 0/subop/add %esp 8/imm32
12245
12246 5d/pop-to-ebp
12247 c3/return
12248
12249 test-compute-offset-with-too-many-inouts:
12250
12251 55/push-ebp
12252 89/<- %ebp 4/r32/esp
12253
12254 (clear-stream _test-input-stream)
12255 (clear-stream $_test-input-buffered-file->buffer)
12256 (clear-stream _test-output-stream)
12257 (clear-stream $_test-output-buffered-file->buffer)
12258 (clear-stream _test-error-stream)
12259 (clear-stream $_test-error-buffered-file->buffer)
12260
12261 68/push 0/imm32
12262 68/push 0/imm32
12263 89/<- %edx 4/r32/esp
12264 (tailor-exit-descriptor %edx 0x10)
12265
12266 (write _test-input-stream "fn foo {\n")
12267 (write _test-input-stream " var a: (array int 3)\n")
12268 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0, 0\n")
12269 (write _test-input-stream "}\n")
12270
12271 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12272
12273
12274 89/<- %edx 4/r32/esp
12275 (flush _test-output-buffered-file)
12276 (flush _test-error-buffered-file)
12277 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12283
12284 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-inouts: output should be empty")
12285 (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")
12286
12287 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-inouts: exit status")
12288
12289 81 0/subop/add %esp 8/imm32
12290
12291 5d/pop-to-ebp
12292 c3/return
12293
12294 test-compute-offset-with-no-output:
12295
12296 55/push-ebp
12297 89/<- %ebp 4/r32/esp
12298
12299 (clear-stream _test-input-stream)
12300 (clear-stream $_test-input-buffered-file->buffer)
12301 (clear-stream _test-output-stream)
12302 (clear-stream $_test-output-buffered-file->buffer)
12303 (clear-stream _test-error-stream)
12304 (clear-stream $_test-error-buffered-file->buffer)
12305
12306 68/push 0/imm32
12307 68/push 0/imm32
12308 89/<- %edx 4/r32/esp
12309 (tailor-exit-descriptor %edx 0x10)
12310
12311 (write _test-input-stream "fn foo {\n")
12312 (write _test-input-stream " var a: (array int 3)\n")
12313 (write _test-input-stream " compute-offset a, 0\n")
12314 (write _test-input-stream "}\n")
12315
12316 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12317
12318
12319 89/<- %edx 4/r32/esp
12320 (flush _test-output-buffered-file)
12321 (flush _test-error-buffered-file)
12322 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12328
12329 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-output: output should be empty")
12330 (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")
12331
12332 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-output: exit status")
12333
12334 81 0/subop/add %esp 8/imm32
12335
12336 5d/pop-to-ebp
12337 c3/return
12338
12339 test-compute-offset-with-too-many-outputs:
12340
12341 55/push-ebp
12342 89/<- %ebp 4/r32/esp
12343
12344 (clear-stream _test-input-stream)
12345 (clear-stream $_test-input-buffered-file->buffer)
12346 (clear-stream _test-output-stream)
12347 (clear-stream $_test-output-buffered-file->buffer)
12348 (clear-stream _test-error-stream)
12349 (clear-stream $_test-error-buffered-file->buffer)
12350
12351 68/push 0/imm32
12352 68/push 0/imm32
12353 89/<- %edx 4/r32/esp
12354 (tailor-exit-descriptor %edx 0x10)
12355
12356 (write _test-input-stream "fn foo {\n")
12357 (write _test-input-stream " var a: (array int 3)\n")
12358 (write _test-input-stream " var b/eax: (offset int) <- compute-offset a, 0\n")
12359 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
12360 (write _test-input-stream " b, c <- compute-offset a, 0\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-too-many-outputs: output should be empty")
12377 (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")
12378
12379 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-outputs: exit status")
12380
12381 81 0/subop/add %esp 8/imm32
12382
12383 5d/pop-to-ebp
12384 c3/return
12385
12386 test-convert-read-from-stream:
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
12396 (write _test-input-stream "fn foo {\n")
12397 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
12398 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
12399 (write _test-input-stream " read-from-stream s, o\n")
12400 (write _test-input-stream "}\n")
12401
12402 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12403
12404
12405 89/<- %edx 4/r32/esp
12406 (flush _test-output-buffered-file)
12407 (flush _test-error-buffered-file)
12408 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12414
12415 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream/0")
12416 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream/1")
12417 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream/2")
12418 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream/3")
12419 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream/4")
12420 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream/5")
12421 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream/6")
12422 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream/7")
12423 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream/8")
12424 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream/9")
12425 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000004)" "F - test-convert-read-from-stream/10")
12426 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream/11")
12427 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream/12")
12428 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream/13")
12429 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream/14")
12430 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream/15")
12431 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream/16")
12432 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream/17")
12433 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream/18")
12434
12435 89/<- %esp 5/r32/ebp
12436 5d/pop-to-ebp
12437 c3/return
12438
12439 test-convert-read-from-stream-with-correct-payload-size:
12440
12441 55/push-ebp
12442 89/<- %ebp 4/r32/esp
12443
12444 (clear-stream _test-input-stream)
12445 (clear-stream $_test-input-buffered-file->buffer)
12446 (clear-stream _test-output-stream)
12447 (clear-stream $_test-output-buffered-file->buffer)
12448
12449 (write _test-input-stream "fn foo {\n")
12450 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
12451 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
12452 (write _test-input-stream " read-from-stream s, o\n")
12453 (write _test-input-stream "}\n")
12454
12455 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12456
12457
12458 89/<- %edx 4/r32/esp
12459 (flush _test-output-buffered-file)
12460 (flush _test-error-buffered-file)
12461 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12467
12468 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream-with-correct-payload-size/0")
12469 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream-with-correct-payload-size/1")
12470 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/2")
12471 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream-with-correct-payload-size/3")
12472 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream-with-correct-payload-size/4")
12473 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream-with-correct-payload-size/5")
12474 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream-with-correct-payload-size/6")
12475 (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")
12476 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/8")
12477 (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")
12478 (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")
12479 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/11")
12480 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream-with-correct-payload-size/12")
12481 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream-with-correct-payload-size/13")
12482 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream-with-correct-payload-size/14")
12483 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream-with-correct-payload-size/15")
12484 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream-with-correct-payload-size/16")
12485 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/17")
12486 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream-with-correct-payload-size/18")
12487
12488 89/<- %esp 5/r32/ebp
12489 5d/pop-to-ebp
12490 c3/return
12491
12492 test-read-from-stream-with-non-stream-atom-base-type:
12493
12494 55/push-ebp
12495 89/<- %ebp 4/r32/esp
12496
12497 (clear-stream _test-input-stream)
12498 (clear-stream $_test-input-buffered-file->buffer)
12499 (clear-stream _test-output-stream)
12500 (clear-stream $_test-output-buffered-file->buffer)
12501 (clear-stream _test-error-stream)
12502 (clear-stream $_test-error-buffered-file->buffer)
12503
12504 68/push 0/imm32
12505 68/push 0/imm32
12506 89/<- %edx 4/r32/esp
12507 (tailor-exit-descriptor %edx 0x10)
12508
12509 (write _test-input-stream "fn foo {\n")
12510 (write _test-input-stream " var a: int\n")
12511 (write _test-input-stream " read-from-stream a, 0\n")
12512 (write _test-input-stream "}\n")
12513
12514 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12515
12516
12517 89/<- %edx 4/r32/esp
12518 (flush _test-output-buffered-file)
12519 (flush _test-error-buffered-file)
12520 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12526
12527 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-atom-base-type: output should be empty")
12528 (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")
12529
12530 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-atom-base-type: exit status")
12531
12532 81 0/subop/add %esp 8/imm32
12533
12534 5d/pop-to-ebp
12535 c3/return
12536
12537 test-read-from-stream-with-non-stream-compound-base-type:
12538
12539 55/push-ebp
12540 89/<- %ebp 4/r32/esp
12541
12542 (clear-stream _test-input-stream)
12543 (clear-stream $_test-input-buffered-file->buffer)
12544 (clear-stream _test-output-stream)
12545 (clear-stream $_test-output-buffered-file->buffer)
12546 (clear-stream _test-error-stream)
12547 (clear-stream $_test-error-buffered-file->buffer)
12548
12549 68/push 0/imm32
12550 68/push 0/imm32
12551 89/<- %edx 4/r32/esp
12552 (tailor-exit-descriptor %edx 0x10)
12553
12554 (write _test-input-stream "fn foo {\n")
12555 (write _test-input-stream " var a: (handle int)\n")
12556 (write _test-input-stream " read-from-stream a, 0\n")
12557 (write _test-input-stream "}\n")
12558
12559 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12560
12561
12562 89/<- %edx 4/r32/esp
12563 (flush _test-output-buffered-file)
12564 (flush _test-error-buffered-file)
12565 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12571
12572 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type: output should be empty")
12573 (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")
12574
12575 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type: exit status")
12576
12577 81 0/subop/add %esp 8/imm32
12578
12579 5d/pop-to-ebp
12580 c3/return
12581
12582 test-read-from-stream-with-non-stream-compound-base-type-2:
12583
12584 55/push-ebp
12585 89/<- %ebp 4/r32/esp
12586
12587 (clear-stream _test-input-stream)
12588 (clear-stream $_test-input-buffered-file->buffer)
12589 (clear-stream _test-output-stream)
12590 (clear-stream $_test-output-buffered-file->buffer)
12591 (clear-stream _test-error-stream)
12592 (clear-stream $_test-error-buffered-file->buffer)
12593
12594 68/push 0/imm32
12595 68/push 0/imm32
12596 89/<- %edx 4/r32/esp
12597 (tailor-exit-descriptor %edx 0x10)
12598
12599 (write _test-input-stream "fn foo {\n")
12600 (write _test-input-stream " var a: (addr int)\n")
12601 (write _test-input-stream " read-from-stream a, 0\n")
12602 (write _test-input-stream "}\n")
12603
12604 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12605
12606
12607 89/<- %edx 4/r32/esp
12608 (flush _test-output-buffered-file)
12609 (flush _test-error-buffered-file)
12610 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12616
12617 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type-2: output should be empty")
12618 (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")
12619
12620 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type-2: exit status")
12621
12622 81 0/subop/add %esp 8/imm32
12623
12624 5d/pop-to-ebp
12625 c3/return
12626
12627 test-read-from-stream-with-stream-atom-base-type:
12628
12629 55/push-ebp
12630 89/<- %ebp 4/r32/esp
12631
12632 (clear-stream _test-input-stream)
12633 (clear-stream $_test-input-buffered-file->buffer)
12634 (clear-stream _test-output-stream)
12635 (clear-stream $_test-output-buffered-file->buffer)
12636 (clear-stream _test-error-stream)
12637 (clear-stream $_test-error-buffered-file->buffer)
12638
12639 68/push 0/imm32
12640 68/push 0/imm32
12641 89/<- %edx 4/r32/esp
12642 (tailor-exit-descriptor %edx 0x10)
12643
12644 (write _test-input-stream "fn foo {\n")
12645 (write _test-input-stream " var a: stream\n")
12646 (write _test-input-stream " read-from-stream a, 0\n")
12647 (write _test-input-stream "}\n")
12648
12649 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12650
12651
12652 89/<- %edx 4/r32/esp
12653 (flush _test-output-buffered-file)
12654 (flush _test-error-buffered-file)
12655 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12661
12662 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-stream-atom-base-type: output should be empty")
12663 (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")
12664
12665 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-stream-atom-base-type: exit status")
12666
12667 81 0/subop/add %esp 8/imm32
12668
12669 5d/pop-to-ebp
12670 c3/return
12671
12672 test-read-from-stream-with-wrong-index-type:
12673
12674 55/push-ebp
12675 89/<- %ebp 4/r32/esp
12676
12677 (clear-stream _test-input-stream)
12678 (clear-stream $_test-input-buffered-file->buffer)
12679 (clear-stream _test-output-stream)
12680 (clear-stream $_test-output-buffered-file->buffer)
12681 (clear-stream _test-error-stream)
12682 (clear-stream $_test-error-buffered-file->buffer)
12683
12684 68/push 0/imm32
12685 68/push 0/imm32
12686 89/<- %edx 4/r32/esp
12687 (tailor-exit-descriptor %edx 0x10)
12688
12689 (write _test-input-stream "fn foo {\n")
12690 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
12691 (write _test-input-stream " var b: boolean\n")
12692 (write _test-input-stream " read-from-stream a, b\n")
12693 (write _test-input-stream "}\n")
12694
12695 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12696
12697
12698 89/<- %edx 4/r32/esp
12699 (flush _test-output-buffered-file)
12700 (flush _test-error-buffered-file)
12701 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12707
12708 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-wrong-index-type: output should be empty")
12709 (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")
12710
12711 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-wrong-index-type: exit status")
12712
12713 81 0/subop/add %esp 8/imm32
12714
12715 5d/pop-to-ebp
12716 c3/return
12717
12718 test-read-from-stream-with-no-inouts:
12719
12720 55/push-ebp
12721 89/<- %ebp 4/r32/esp
12722
12723 (clear-stream _test-input-stream)
12724 (clear-stream $_test-input-buffered-file->buffer)
12725 (clear-stream _test-output-stream)
12726 (clear-stream $_test-output-buffered-file->buffer)
12727 (clear-stream _test-error-stream)
12728 (clear-stream $_test-error-buffered-file->buffer)
12729
12730 68/push 0/imm32
12731 68/push 0/imm32
12732 89/<- %edx 4/r32/esp
12733 (tailor-exit-descriptor %edx 0x10)
12734
12735 (write _test-input-stream "fn foo {\n")
12736 (write _test-input-stream " read-from-stream\n")
12737 (write _test-input-stream "}\n")
12738
12739 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12740
12741
12742 89/<- %edx 4/r32/esp
12743 (flush _test-output-buffered-file)
12744 (flush _test-error-buffered-file)
12745 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12751
12752 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-no-inouts: output should be empty")
12753 (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")
12754
12755 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-no-inouts: exit status")
12756
12757 81 0/subop/add %esp 8/imm32
12758
12759 5d/pop-to-ebp
12760 c3/return
12761
12762 test-read-from-stream-with-too-few-inouts:
12763
12764 55/push-ebp
12765 89/<- %ebp 4/r32/esp
12766
12767 (clear-stream _test-input-stream)
12768 (clear-stream $_test-input-buffered-file->buffer)
12769 (clear-stream _test-output-stream)
12770 (clear-stream $_test-output-buffered-file->buffer)
12771 (clear-stream _test-error-stream)
12772 (clear-stream $_test-error-buffered-file->buffer)
12773
12774 68/push 0/imm32
12775 68/push 0/imm32
12776 89/<- %edx 4/r32/esp
12777 (tailor-exit-descriptor %edx 0x10)
12778
12779 (write _test-input-stream "fn foo {\n")
12780 (write _test-input-stream " var a: (addr stream int)\n")
12781 (write _test-input-stream " read-from-stream a\n")
12782 (write _test-input-stream "}\n")
12783
12784 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12785
12786
12787 89/<- %edx 4/r32/esp
12788 (flush _test-output-buffered-file)
12789 (flush _test-error-buffered-file)
12790 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12796
12797 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-few-inouts: output should be empty")
12798 (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")
12799
12800 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-few-inouts: exit status")
12801
12802 81 0/subop/add %esp 8/imm32
12803
12804 5d/pop-to-ebp
12805 c3/return
12806
12807 test-read-from-stream-with-too-many-inouts:
12808
12809 55/push-ebp
12810 89/<- %ebp 4/r32/esp
12811
12812 (clear-stream _test-input-stream)
12813 (clear-stream $_test-input-buffered-file->buffer)
12814 (clear-stream _test-output-stream)
12815 (clear-stream $_test-output-buffered-file->buffer)
12816 (clear-stream _test-error-stream)
12817 (clear-stream $_test-error-buffered-file->buffer)
12818
12819 68/push 0/imm32
12820 68/push 0/imm32
12821 89/<- %edx 4/r32/esp
12822 (tailor-exit-descriptor %edx 0x10)
12823
12824 (write _test-input-stream "fn foo {\n")
12825 (write _test-input-stream " var a: (addr stream int)\n")
12826 (write _test-input-stream " var b: (addr int)\n")
12827 (write _test-input-stream " read-from-stream a, b, 0\n")
12828 (write _test-input-stream "}\n")
12829
12830 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12831
12832
12833 89/<- %edx 4/r32/esp
12834 (flush _test-output-buffered-file)
12835 (flush _test-error-buffered-file)
12836 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12842
12843 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-many-inouts: output should be empty")
12844 (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")
12845
12846 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-many-inouts: exit status")
12847
12848 81 0/subop/add %esp 8/imm32
12849
12850 5d/pop-to-ebp
12851 c3/return
12852
12853 test-read-from-stream-with-output:
12854
12855 55/push-ebp
12856 89/<- %ebp 4/r32/esp
12857
12858 (clear-stream _test-input-stream)
12859 (clear-stream $_test-input-buffered-file->buffer)
12860 (clear-stream _test-output-stream)
12861 (clear-stream $_test-output-buffered-file->buffer)
12862 (clear-stream _test-error-stream)
12863 (clear-stream $_test-error-buffered-file->buffer)
12864
12865 68/push 0/imm32
12866 68/push 0/imm32
12867 89/<- %edx 4/r32/esp
12868 (tailor-exit-descriptor %edx 0x10)
12869
12870 (write _test-input-stream "fn foo {\n")
12871 (write _test-input-stream " var a: (addr stream int)\n")
12872 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
12873 (write _test-input-stream " b <- read-from-stream a, b\n")
12874 (write _test-input-stream "}\n")
12875
12876 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
12877
12878
12879 89/<- %edx 4/r32/esp
12880 (flush _test-output-buffered-file)
12881 (flush _test-error-buffered-file)
12882 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
12888
12889 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-output: output should be empty")
12890 (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")
12891
12892 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-output: exit status")
12893
12894 81 0/subop/add %esp 8/imm32
12895
12896 5d/pop-to-ebp
12897 c3/return
12898
12899 test-convert-write-to-stream:
12900
12901 55/push-ebp
12902 89/<- %ebp 4/r32/esp
12903
12904 (clear-stream _test-input-stream)
12905 (clear-stream $_test-input-buffered-file->buffer)
12906 (clear-stream _test-output-stream)
12907 (clear-stream $_test-output-buffered-file->buffer)
12908
12909 (write _test-input-stream "fn foo {\n")
12910 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
12911 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
12912 (write _test-input-stream " write-to-stream s, o\n")
12913 (write _test-input-stream "}\n")
12914
12915 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12916
12917
12918 89/<- %edx 4/r32/esp
12919 (flush _test-output-buffered-file)
12920 (flush _test-error-buffered-file)
12921 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12927
12928 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream/0")
12929 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream/1")
12930 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream/2")
12931 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream/3")
12932 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream/4")
12933 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream/5")
12934 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream/6")
12935 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream/7")
12936 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream/8")
12937 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream/9")
12938 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000004)" "F - test-convert-write-to-stream/10")
12939 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream/11")
12940 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream/12")
12941 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream/13")
12942 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream/14")
12943 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream/15")
12944 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream/16")
12945 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream/17")
12946 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream/18")
12947
12948 89/<- %esp 5/r32/ebp
12949 5d/pop-to-ebp
12950 c3/return
12951
12952 test-convert-write-to-stream-with-correct-payload-size:
12953
12954 55/push-ebp
12955 89/<- %ebp 4/r32/esp
12956
12957 (clear-stream _test-input-stream)
12958 (clear-stream $_test-input-buffered-file->buffer)
12959 (clear-stream _test-output-stream)
12960 (clear-stream $_test-output-buffered-file->buffer)
12961
12962 (write _test-input-stream "fn foo {\n")
12963 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
12964 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
12965 (write _test-input-stream " write-to-stream s, o\n")
12966 (write _test-input-stream "}\n")
12967
12968 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
12969
12970
12971 89/<- %edx 4/r32/esp
12972 (flush _test-output-buffered-file)
12973 (flush _test-error-buffered-file)
12974 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
12980
12981 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream-with-correct-payload-size/0")
12982 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream-with-correct-payload-size/1")
12983 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/2")
12984 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream-with-correct-payload-size/3")
12985 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream-with-correct-payload-size/4")
12986 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream-with-correct-payload-size/5")
12987 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream-with-correct-payload-size/6")
12988 (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")
12989 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/8")
12990 (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")
12991 (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")
12992 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/11")
12993 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream-with-correct-payload-size/12")
12994 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream-with-correct-payload-size/13")
12995 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream-with-correct-payload-size/14")
12996 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream-with-correct-payload-size/15")
12997 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream-with-correct-payload-size/16")
12998 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/17")
12999 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream-with-correct-payload-size/18")
13000
13001 89/<- %esp 5/r32/ebp
13002 5d/pop-to-ebp
13003 c3/return
13004
13005 test-write-to-stream-with-non-stream-atom-base-type:
13006
13007 55/push-ebp
13008 89/<- %ebp 4/r32/esp
13009
13010 (clear-stream _test-input-stream)
13011 (clear-stream $_test-input-buffered-file->buffer)
13012 (clear-stream _test-output-stream)
13013 (clear-stream $_test-output-buffered-file->buffer)
13014 (clear-stream _test-error-stream)
13015 (clear-stream $_test-error-buffered-file->buffer)
13016
13017 68/push 0/imm32
13018 68/push 0/imm32
13019 89/<- %edx 4/r32/esp
13020 (tailor-exit-descriptor %edx 0x10)
13021
13022 (write _test-input-stream "fn foo {\n")
13023 (write _test-input-stream " var a: int\n")
13024 (write _test-input-stream " write-to-stream a, 0\n")
13025 (write _test-input-stream "}\n")
13026
13027 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13028
13029
13030 89/<- %edx 4/r32/esp
13031 (flush _test-output-buffered-file)
13032 (flush _test-error-buffered-file)
13033 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13039
13040 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-atom-base-type: output should be empty")
13041 (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")
13042
13043 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-atom-base-type: exit status")
13044
13045 81 0/subop/add %esp 8/imm32
13046
13047 5d/pop-to-ebp
13048 c3/return
13049
13050 test-write-to-stream-with-non-stream-compound-base-type:
13051
13052 55/push-ebp
13053 89/<- %ebp 4/r32/esp
13054
13055 (clear-stream _test-input-stream)
13056 (clear-stream $_test-input-buffered-file->buffer)
13057 (clear-stream _test-output-stream)
13058 (clear-stream $_test-output-buffered-file->buffer)
13059 (clear-stream _test-error-stream)
13060 (clear-stream $_test-error-buffered-file->buffer)
13061
13062 68/push 0/imm32
13063 68/push 0/imm32
13064 89/<- %edx 4/r32/esp
13065 (tailor-exit-descriptor %edx 0x10)
13066
13067 (write _test-input-stream "fn foo {\n")
13068 (write _test-input-stream " var a: (handle int)\n")
13069 (write _test-input-stream " write-to-stream a, 0\n")
13070 (write _test-input-stream "}\n")
13071
13072 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13073
13074
13075 89/<- %edx 4/r32/esp
13076 (flush _test-output-buffered-file)
13077 (flush _test-error-buffered-file)
13078 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13084
13085 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type: output should be empty")
13086 (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")
13087
13088 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type: exit status")
13089
13090 81 0/subop/add %esp 8/imm32
13091
13092 5d/pop-to-ebp
13093 c3/return
13094
13095 test-write-to-stream-with-non-stream-compound-base-type-2:
13096
13097 55/push-ebp
13098 89/<- %ebp 4/r32/esp
13099
13100 (clear-stream _test-input-stream)
13101 (clear-stream $_test-input-buffered-file->buffer)
13102 (clear-stream _test-output-stream)
13103 (clear-stream $_test-output-buffered-file->buffer)
13104 (clear-stream _test-error-stream)
13105 (clear-stream $_test-error-buffered-file->buffer)
13106
13107 68/push 0/imm32
13108 68/push 0/imm32
13109 89/<- %edx 4/r32/esp
13110 (tailor-exit-descriptor %edx 0x10)
13111
13112 (write _test-input-stream "fn foo {\n")
13113 (write _test-input-stream " var a: (addr int)\n")
13114 (write _test-input-stream " write-to-stream a, 0\n")
13115 (write _test-input-stream "}\n")
13116
13117 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13118
13119
13120 89/<- %edx 4/r32/esp
13121 (flush _test-output-buffered-file)
13122 (flush _test-error-buffered-file)
13123 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13129
13130 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type-2: output should be empty")
13131 (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")
13132
13133 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type-2: exit status")
13134
13135 81 0/subop/add %esp 8/imm32
13136
13137 5d/pop-to-ebp
13138 c3/return
13139
13140 test-write-to-stream-with-stream-atom-base-type:
13141
13142 55/push-ebp
13143 89/<- %ebp 4/r32/esp
13144
13145 (clear-stream _test-input-stream)
13146 (clear-stream $_test-input-buffered-file->buffer)
13147 (clear-stream _test-output-stream)
13148 (clear-stream $_test-output-buffered-file->buffer)
13149 (clear-stream _test-error-stream)
13150 (clear-stream $_test-error-buffered-file->buffer)
13151
13152 68/push 0/imm32
13153 68/push 0/imm32
13154 89/<- %edx 4/r32/esp
13155 (tailor-exit-descriptor %edx 0x10)
13156
13157 (write _test-input-stream "fn foo {\n")
13158 (write _test-input-stream " var a: stream\n")
13159 (write _test-input-stream " write-to-stream a, 0\n")
13160 (write _test-input-stream "}\n")
13161
13162 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13163
13164
13165 89/<- %edx 4/r32/esp
13166 (flush _test-output-buffered-file)
13167 (flush _test-error-buffered-file)
13168 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13174
13175 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-stream-atom-base-type: output should be empty")
13176 (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")
13177
13178 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-stream-atom-base-type: exit status")
13179
13180 81 0/subop/add %esp 8/imm32
13181
13182 5d/pop-to-ebp
13183 c3/return
13184
13185 test-write-to-stream-with-wrong-index-type:
13186
13187 55/push-ebp
13188 89/<- %ebp 4/r32/esp
13189
13190 (clear-stream _test-input-stream)
13191 (clear-stream $_test-input-buffered-file->buffer)
13192 (clear-stream _test-output-stream)
13193 (clear-stream $_test-output-buffered-file->buffer)
13194 (clear-stream _test-error-stream)
13195 (clear-stream $_test-error-buffered-file->buffer)
13196
13197 68/push 0/imm32
13198 68/push 0/imm32
13199 89/<- %edx 4/r32/esp
13200 (tailor-exit-descriptor %edx 0x10)
13201
13202 (write _test-input-stream "fn foo {\n")
13203 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
13204 (write _test-input-stream " var b: boolean\n")
13205 (write _test-input-stream " write-to-stream a, b\n")
13206 (write _test-input-stream "}\n")
13207
13208 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13209
13210
13211 89/<- %edx 4/r32/esp
13212 (flush _test-output-buffered-file)
13213 (flush _test-error-buffered-file)
13214 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13220
13221 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-wrong-index-type: output should be empty")
13222 (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")
13223
13224 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-wrong-index-type: exit status")
13225
13226 81 0/subop/add %esp 8/imm32
13227
13228 5d/pop-to-ebp
13229 c3/return
13230
13231 test-write-to-stream-with-no-inouts:
13232
13233 55/push-ebp
13234 89/<- %ebp 4/r32/esp
13235
13236 (clear-stream _test-input-stream)
13237 (clear-stream $_test-input-buffered-file->buffer)
13238 (clear-stream _test-output-stream)
13239 (clear-stream $_test-output-buffered-file->buffer)
13240 (clear-stream _test-error-stream)
13241 (clear-stream $_test-error-buffered-file->buffer)
13242
13243 68/push 0/imm32
13244 68/push 0/imm32
13245 89/<- %edx 4/r32/esp
13246 (tailor-exit-descriptor %edx 0x10)
13247
13248 (write _test-input-stream "fn foo {\n")
13249 (write _test-input-stream " write-to-stream\n")
13250 (write _test-input-stream "}\n")
13251
13252 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13253
13254
13255 89/<- %edx 4/r32/esp
13256 (flush _test-output-buffered-file)
13257 (flush _test-error-buffered-file)
13258 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13264
13265 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-no-inouts: output should be empty")
13266 (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")
13267
13268 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-no-inouts: exit status")
13269
13270 81 0/subop/add %esp 8/imm32
13271
13272 5d/pop-to-ebp
13273 c3/return
13274
13275 test-write-to-stream-with-too-few-inouts:
13276
13277 55/push-ebp
13278 89/<- %ebp 4/r32/esp
13279
13280 (clear-stream _test-input-stream)
13281 (clear-stream $_test-input-buffered-file->buffer)
13282 (clear-stream _test-output-stream)
13283 (clear-stream $_test-output-buffered-file->buffer)
13284 (clear-stream _test-error-stream)
13285 (clear-stream $_test-error-buffered-file->buffer)
13286
13287 68/push 0/imm32
13288 68/push 0/imm32
13289 89/<- %edx 4/r32/esp
13290 (tailor-exit-descriptor %edx 0x10)
13291
13292 (write _test-input-stream "fn foo {\n")
13293 (write _test-input-stream " var a: (addr stream int)\n")
13294 (write _test-input-stream " write-to-stream a\n")
13295 (write _test-input-stream "}\n")
13296
13297 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13298
13299
13300 89/<- %edx 4/r32/esp
13301 (flush _test-output-buffered-file)
13302 (flush _test-error-buffered-file)
13303 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13309
13310 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-few-inouts: output should be empty")
13311 (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")
13312
13313 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-few-inouts: exit status")
13314
13315 81 0/subop/add %esp 8/imm32
13316
13317 5d/pop-to-ebp
13318 c3/return
13319
13320 test-write-to-stream-with-too-many-inouts:
13321
13322 55/push-ebp
13323 89/<- %ebp 4/r32/esp
13324
13325 (clear-stream _test-input-stream)
13326 (clear-stream $_test-input-buffered-file->buffer)
13327 (clear-stream _test-output-stream)
13328 (clear-stream $_test-output-buffered-file->buffer)
13329 (clear-stream _test-error-stream)
13330 (clear-stream $_test-error-buffered-file->buffer)
13331
13332 68/push 0/imm32
13333 68/push 0/imm32
13334 89/<- %edx 4/r32/esp
13335 (tailor-exit-descriptor %edx 0x10)
13336
13337 (write _test-input-stream "fn foo {\n")
13338 (write _test-input-stream " var a: (addr stream int)\n")
13339 (write _test-input-stream " var b: (addr int)\n")
13340 (write _test-input-stream " write-to-stream a, b, 0\n")
13341 (write _test-input-stream "}\n")
13342
13343 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13344
13345
13346 89/<- %edx 4/r32/esp
13347 (flush _test-output-buffered-file)
13348 (flush _test-error-buffered-file)
13349 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13355
13356 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-many-inouts: output should be empty")
13357 (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")
13358
13359 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-many-inouts: exit status")
13360
13361 81 0/subop/add %esp 8/imm32
13362
13363 5d/pop-to-ebp
13364 c3/return
13365
13366 test-write-to-stream-with-output:
13367
13368 55/push-ebp
13369 89/<- %ebp 4/r32/esp
13370
13371 (clear-stream _test-input-stream)
13372 (clear-stream $_test-input-buffered-file->buffer)
13373 (clear-stream _test-output-stream)
13374 (clear-stream $_test-output-buffered-file->buffer)
13375 (clear-stream _test-error-stream)
13376 (clear-stream $_test-error-buffered-file->buffer)
13377
13378 68/push 0/imm32
13379 68/push 0/imm32
13380 89/<- %edx 4/r32/esp
13381 (tailor-exit-descriptor %edx 0x10)
13382
13383 (write _test-input-stream "fn foo {\n")
13384 (write _test-input-stream " var a: (addr stream int)\n")
13385 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
13386 (write _test-input-stream " b <- write-to-stream a, b\n")
13387 (write _test-input-stream "}\n")
13388
13389 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13390
13391
13392 89/<- %edx 4/r32/esp
13393 (flush _test-output-buffered-file)
13394 (flush _test-error-buffered-file)
13395 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13401
13402 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-output: output should be empty")
13403 (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")
13404
13405 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-output: exit status")
13406
13407 81 0/subop/add %esp 8/imm32
13408
13409 5d/pop-to-ebp
13410 c3/return
13411
13412 test-length-with-non-array-atom-base-type:
13413
13414 55/push-ebp
13415 89/<- %ebp 4/r32/esp
13416
13417 (clear-stream _test-input-stream)
13418 (clear-stream $_test-input-buffered-file->buffer)
13419 (clear-stream _test-output-stream)
13420 (clear-stream $_test-output-buffered-file->buffer)
13421 (clear-stream _test-error-stream)
13422 (clear-stream $_test-error-buffered-file->buffer)
13423
13424 68/push 0/imm32
13425 68/push 0/imm32
13426 89/<- %edx 4/r32/esp
13427 (tailor-exit-descriptor %edx 0x10)
13428
13429 (write _test-input-stream "fn foo {\n")
13430 (write _test-input-stream " var a: int\n")
13431 (write _test-input-stream " var c/ecx: int <- length a\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-length-with-non-array-atom-base-type: output should be empty")
13448 (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")
13449
13450 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-atom-base-type: exit status")
13451
13452 81 0/subop/add %esp 8/imm32
13453
13454 5d/pop-to-ebp
13455 c3/return
13456
13457 test-length-with-non-array-compound-base-type:
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: (handle int)\n")
13476 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\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-length-with-non-array-compound-base-type: output should be empty")
13493 (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")
13494
13495 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type: exit status")
13496
13497 81 0/subop/add %esp 8/imm32
13498
13499 5d/pop-to-ebp
13500 c3/return
13501
13502 test-length-with-non-array-compound-base-type-2:
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 int)\n")
13521 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
13522 (write _test-input-stream "}\n")
13523
13524 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13525
13526
13527 89/<- %edx 4/r32/esp
13528 (flush _test-output-buffered-file)
13529 (flush _test-error-buffered-file)
13530 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13536
13537 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type-2: output should be empty")
13538 (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")
13539
13540 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type-2: exit status")
13541
13542 81 0/subop/add %esp 8/imm32
13543
13544 5d/pop-to-ebp
13545 c3/return
13546
13547 test-length-with-array-atom-base-type:
13548
13549 55/push-ebp
13550 89/<- %ebp 4/r32/esp
13551
13552 (clear-stream _test-input-stream)
13553 (clear-stream $_test-input-buffered-file->buffer)
13554 (clear-stream _test-output-stream)
13555 (clear-stream $_test-output-buffered-file->buffer)
13556 (clear-stream _test-error-stream)
13557 (clear-stream $_test-error-buffered-file->buffer)
13558
13559 68/push 0/imm32
13560 68/push 0/imm32
13561 89/<- %edx 4/r32/esp
13562 (tailor-exit-descriptor %edx 0x10)
13563
13564 (write _test-input-stream "fn foo {\n")
13565 (write _test-input-stream " var a: array\n")
13566 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
13567 (write _test-input-stream "}\n")
13568
13569 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13570
13571
13572 89/<- %edx 4/r32/esp
13573 (flush _test-output-buffered-file)
13574 (flush _test-error-buffered-file)
13575 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13581
13582 (check-stream-equal _test-output-stream "" "F - test-length-with-array-atom-base-type: output should be empty")
13583 (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")
13584
13585 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-atom-base-type: exit status")
13586
13587 81 0/subop/add %esp 8/imm32
13588
13589 5d/pop-to-ebp
13590 c3/return
13591
13592 test-length-with-addr-base-on-stack:
13593
13594 55/push-ebp
13595 89/<- %ebp 4/r32/esp
13596
13597 (clear-stream _test-input-stream)
13598 (clear-stream $_test-input-buffered-file->buffer)
13599 (clear-stream _test-output-stream)
13600 (clear-stream $_test-output-buffered-file->buffer)
13601 (clear-stream _test-error-stream)
13602 (clear-stream $_test-error-buffered-file->buffer)
13603
13604 68/push 0/imm32
13605 68/push 0/imm32
13606 89/<- %edx 4/r32/esp
13607 (tailor-exit-descriptor %edx 0x10)
13608
13609 (write _test-input-stream "fn foo {\n")
13610 (write _test-input-stream " var a: (addr array int)\n")
13611 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
13612 (write _test-input-stream "}\n")
13613
13614 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13615
13616
13617 89/<- %edx 4/r32/esp
13618 (flush _test-output-buffered-file)
13619 (flush _test-error-buffered-file)
13620 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13626
13627 (check-stream-equal _test-output-stream "" "F - test-length-with-addr-base-on-stack: output should be empty")
13628 (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")
13629
13630 (check-ints-equal *(edx+4) 2 "F - test-length-with-addr-base-on-stack: exit status")
13631
13632 81 0/subop/add %esp 8/imm32
13633
13634 5d/pop-to-ebp
13635 c3/return
13636
13637 test-length-with-wrong-output-type:
13638
13639 55/push-ebp
13640 89/<- %ebp 4/r32/esp
13641
13642 (clear-stream _test-input-stream)
13643 (clear-stream $_test-input-buffered-file->buffer)
13644 (clear-stream _test-output-stream)
13645 (clear-stream $_test-output-buffered-file->buffer)
13646 (clear-stream _test-error-stream)
13647 (clear-stream $_test-error-buffered-file->buffer)
13648
13649 68/push 0/imm32
13650 68/push 0/imm32
13651 89/<- %edx 4/r32/esp
13652 (tailor-exit-descriptor %edx 0x10)
13653
13654 (write _test-input-stream "fn foo {\n")
13655 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
13656 (write _test-input-stream " var o/edi: (addr int) <- length a\n")
13657 (write _test-input-stream "}\n")
13658
13659 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13660
13661
13662 89/<- %edx 4/r32/esp
13663 (flush _test-output-buffered-file)
13664 (flush _test-error-buffered-file)
13665 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13671
13672 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-type: output should be empty")
13673 (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")
13674
13675 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-type: exit status")
13676
13677 81 0/subop/add %esp 8/imm32
13678
13679 5d/pop-to-ebp
13680 c3/return
13681
13682 test-length-with-wrong-output-compound-type:
13683
13684 55/push-ebp
13685 89/<- %ebp 4/r32/esp
13686
13687 (clear-stream _test-input-stream)
13688 (clear-stream $_test-input-buffered-file->buffer)
13689 (clear-stream _test-output-stream)
13690 (clear-stream $_test-output-buffered-file->buffer)
13691 (clear-stream _test-error-stream)
13692 (clear-stream $_test-error-buffered-file->buffer)
13693
13694 68/push 0/imm32
13695 68/push 0/imm32
13696 89/<- %edx 4/r32/esp
13697 (tailor-exit-descriptor %edx 0x10)
13698
13699 (write _test-input-stream "fn foo {\n")
13700 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
13701 (write _test-input-stream " var o/edi: (addr handle int) <- length a\n")
13702 (write _test-input-stream "}\n")
13703
13704 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13705
13706
13707 89/<- %edx 4/r32/esp
13708 (flush _test-output-buffered-file)
13709 (flush _test-error-buffered-file)
13710 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13716
13717 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-compound-type: output should be empty")
13718 (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")
13719
13720 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-compound-type: exit status")
13721
13722 81 0/subop/add %esp 8/imm32
13723
13724 5d/pop-to-ebp
13725 c3/return
13726
13727 test-length-with-no-inouts:
13728
13729 55/push-ebp
13730 89/<- %ebp 4/r32/esp
13731
13732 (clear-stream _test-input-stream)
13733 (clear-stream $_test-input-buffered-file->buffer)
13734 (clear-stream _test-output-stream)
13735 (clear-stream $_test-output-buffered-file->buffer)
13736 (clear-stream _test-error-stream)
13737 (clear-stream $_test-error-buffered-file->buffer)
13738
13739 68/push 0/imm32
13740 68/push 0/imm32
13741 89/<- %edx 4/r32/esp
13742 (tailor-exit-descriptor %edx 0x10)
13743
13744 (write _test-input-stream "fn foo {\n")
13745 (write _test-input-stream " var c/ecx: int <- length\n")
13746 (write _test-input-stream "}\n")
13747
13748 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13749
13750
13751 89/<- %edx 4/r32/esp
13752 (flush _test-output-buffered-file)
13753 (flush _test-error-buffered-file)
13754 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13760
13761 (check-stream-equal _test-output-stream "" "F - test-length-with-no-inouts: output should be empty")
13762 (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")
13763
13764 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-inouts: exit status")
13765
13766 81 0/subop/add %esp 8/imm32
13767
13768 5d/pop-to-ebp
13769 c3/return
13770
13771 test-length-with-too-many-inouts:
13772
13773 55/push-ebp
13774 89/<- %ebp 4/r32/esp
13775
13776 (clear-stream _test-input-stream)
13777 (clear-stream $_test-input-buffered-file->buffer)
13778 (clear-stream _test-output-stream)
13779 (clear-stream $_test-output-buffered-file->buffer)
13780 (clear-stream _test-error-stream)
13781 (clear-stream $_test-error-buffered-file->buffer)
13782
13783 68/push 0/imm32
13784 68/push 0/imm32
13785 89/<- %edx 4/r32/esp
13786 (tailor-exit-descriptor %edx 0x10)
13787
13788 (write _test-input-stream "fn foo {\n")
13789 (write _test-input-stream " var a: (array int 3)\n")
13790 (write _test-input-stream " var c/ecx: int <- length a, 0, 0\n")
13791 (write _test-input-stream "}\n")
13792
13793 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13794
13795
13796 89/<- %edx 4/r32/esp
13797 (flush _test-output-buffered-file)
13798 (flush _test-error-buffered-file)
13799 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13805
13806 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-inouts: output should be empty")
13807 (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")
13808
13809 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-inouts: exit status")
13810
13811 81 0/subop/add %esp 8/imm32
13812
13813 5d/pop-to-ebp
13814 c3/return
13815
13816 test-length-with-no-output:
13817
13818 55/push-ebp
13819 89/<- %ebp 4/r32/esp
13820
13821 (clear-stream _test-input-stream)
13822 (clear-stream $_test-input-buffered-file->buffer)
13823 (clear-stream _test-output-stream)
13824 (clear-stream $_test-output-buffered-file->buffer)
13825 (clear-stream _test-error-stream)
13826 (clear-stream $_test-error-buffered-file->buffer)
13827
13828 68/push 0/imm32
13829 68/push 0/imm32
13830 89/<- %edx 4/r32/esp
13831 (tailor-exit-descriptor %edx 0x10)
13832
13833 (write _test-input-stream "fn foo {\n")
13834 (write _test-input-stream " var a: (array int 3)\n")
13835 (write _test-input-stream " length a\n")
13836 (write _test-input-stream "}\n")
13837
13838 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13839
13840
13841 89/<- %edx 4/r32/esp
13842 (flush _test-output-buffered-file)
13843 (flush _test-error-buffered-file)
13844 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13850
13851 (check-stream-equal _test-output-stream "" "F - test-length-with-no-output: output should be empty")
13852 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: must have an output" "F - test-length-with-no-output: error message")
13853
13854 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-output: exit status")
13855
13856 81 0/subop/add %esp 8/imm32
13857
13858 5d/pop-to-ebp
13859 c3/return
13860
13861 test-length-with-too-many-outputs:
13862
13863 55/push-ebp
13864 89/<- %ebp 4/r32/esp
13865
13866 (clear-stream _test-input-stream)
13867 (clear-stream $_test-input-buffered-file->buffer)
13868 (clear-stream _test-output-stream)
13869 (clear-stream $_test-output-buffered-file->buffer)
13870 (clear-stream _test-error-stream)
13871 (clear-stream $_test-error-buffered-file->buffer)
13872
13873 68/push 0/imm32
13874 68/push 0/imm32
13875 89/<- %edx 4/r32/esp
13876 (tailor-exit-descriptor %edx 0x10)
13877
13878 (write _test-input-stream "fn foo {\n")
13879 (write _test-input-stream " var a: (array int 3)\n")
13880 (write _test-input-stream " var b/eax: int <- copy 0\n")
13881 (write _test-input-stream " var c/ecx: int <- copy 0\n")
13882 (write _test-input-stream " b, c <- length a\n")
13883 (write _test-input-stream "}\n")
13884
13885 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
13886
13887
13888 89/<- %edx 4/r32/esp
13889 (flush _test-output-buffered-file)
13890 (flush _test-error-buffered-file)
13891 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
13897
13898 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-outputs: output should be empty")
13899 (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")
13900
13901 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-outputs: exit status")
13902
13903 81 0/subop/add %esp 8/imm32
13904
13905 5d/pop-to-ebp
13906 c3/return
13907
13908 test-convert-function-with-return-register-and-local:
13909
13910 55/push-ebp
13911 89/<- %ebp 4/r32/esp
13912
13913 (clear-stream _test-input-stream)
13914 (clear-stream $_test-input-buffered-file->buffer)
13915 (clear-stream _test-output-stream)
13916 (clear-stream $_test-output-buffered-file->buffer)
13917
13918 (write _test-input-stream "fn foo -> _/eax: int {\n")
13919 (write _test-input-stream " var y/eax: int <- copy 3\n")
13920 (write _test-input-stream " var z/ecx: int <- copy 4\n")
13921 (write _test-input-stream " return y\n")
13922 (write _test-input-stream "}\n")
13923
13924 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13925 (flush _test-output-buffered-file)
13926 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
13932
13933 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local/0")
13934 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local/1")
13935 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local/2")
13936 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local/3")
13937 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local/4")
13938 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local/5")
13939 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local/6")
13940 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local/7")
13941 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local/8")
13942 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local/9")
13943 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register-and-local/10")
13944 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local/11")
13945 (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")
13946 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local/13")
13947 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local/14")
13948 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local/15")
13949 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local/16")
13950 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local/17")
13951 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local/18")
13952 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local/19")
13953
13954 89/<- %esp 5/r32/ebp
13955 5d/pop-to-ebp
13956 c3/return
13957
13958 test-convert-function-with-return-register-and-local-2:
13959
13960 55/push-ebp
13961 89/<- %ebp 4/r32/esp
13962
13963 (clear-stream _test-input-stream)
13964 (clear-stream $_test-input-buffered-file->buffer)
13965 (clear-stream _test-output-stream)
13966 (clear-stream $_test-output-buffered-file->buffer)
13967
13968 (write _test-input-stream "fn foo -> _/eax: int {\n")
13969 (write _test-input-stream " var y/eax: int <- copy 3\n")
13970 (write _test-input-stream " var z/ecx: int <- copy 4\n")
13971 (write _test-input-stream " return z\n")
13972 (write _test-input-stream "}\n")
13973
13974 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
13975 (flush _test-output-buffered-file)
13976 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
13982
13983 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local-2/0")
13984 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local-2/1")
13985 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local-2/2")
13986 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local-2/3")
13987 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local-2/4")
13988 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local-2/5")
13989 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local-2/6")
13990 (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")
13991 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local-2/8")
13992 (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")
13993 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-function-with-return-register-and-local-2/10")
13994 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local-2/11")
13995 (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")
13996 (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")
13997 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local-2/14")
13998 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local-2/15")
13999 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local-2/16")
14000 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local-2/17")
14001 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local-2/18")
14002 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local-2/19")
14003
14004 89/<- %esp 5/r32/ebp
14005 5d/pop-to-ebp
14006 c3/return
14007
14008 test-convert-function-with-return-float-register-and-local:
14009
14010 55/push-ebp
14011 89/<- %ebp 4/r32/esp
14012
14013 (clear-stream _test-input-stream)
14014 (clear-stream $_test-input-buffered-file->buffer)
14015 (clear-stream _test-output-stream)
14016 (clear-stream $_test-output-buffered-file->buffer)
14017
14018 (write _test-input-stream "fn foo -> _/xmm1: float {\n")
14019 (write _test-input-stream " var y/eax: int <- copy 3\n")
14020 (write _test-input-stream " var g/xmm0: float <- convert y\n")
14021 (write _test-input-stream " var h/xmm1: float <- convert y\n")
14022 (write _test-input-stream " return g\n")
14023 (write _test-input-stream "}\n")
14024
14025 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14026 (flush _test-output-buffered-file)
14027 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14033
14034 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-float-register-and-local/0")
14035 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-float-register-and-local/1")
14036 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-float-register-and-local/2")
14037 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-float-register-and-local/3")
14038 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-float-register-and-local/4")
14039 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-float-register-and-local/5")
14040 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-float-register-and-local/6")
14041 (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")
14042 (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")
14043 (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")
14044 (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")
14045 (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")
14046 (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")
14047 (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")
14048 (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")
14049 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
14050 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 0/x32" "F - test-convert-floating-point-dereferenced/16")
14051 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/17")
14052 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-return-float-register-and-local/18")
14053 (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")
14054 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-float-register-and-local/20")
14055 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-float-register-and-local/21")
14056 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-float-register-and-local/22")
14057 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-float-register-and-local/23")
14058 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-float-register-and-local/24")
14059 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-float-register-and-local/25")
14060
14061 89/<- %esp 5/r32/ebp
14062 5d/pop-to-ebp
14063 c3/return
14064
14065 test-convert-function-with-return-and-local-vars:
14066
14067 55/push-ebp
14068 89/<- %ebp 4/r32/esp
14069
14070 (clear-stream _test-input-stream)
14071 (clear-stream $_test-input-buffered-file->buffer)
14072 (clear-stream _test-output-stream)
14073 (clear-stream $_test-output-buffered-file->buffer)
14074
14075 (write _test-input-stream "fn foo -> _/eax: int {\n")
14076 (write _test-input-stream " {\n")
14077 (write _test-input-stream " var x: int\n")
14078 (write _test-input-stream " {\n")
14079 (write _test-input-stream " var y: int\n")
14080 (write _test-input-stream " return y\n")
14081 (write _test-input-stream " increment x\n")
14082 (write _test-input-stream " }\n")
14083 (write _test-input-stream " }\n")
14084 (write _test-input-stream " return 0\n")
14085 (write _test-input-stream "}\n")
14086
14087 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14088 (flush _test-output-buffered-file)
14089 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
14095
14096 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-and-local-vars/0")
14097 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-and-local-vars/1")
14098 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-and-local-vars/2")
14099 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-and-local-vars/3")
14100 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/4")
14101 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-and-local-vars/5")
14102 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/6")
14103 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-return-and-local-vars/7")
14104 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/8")
14105 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/9")
14106 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-return-and-local-vars/10")
14107 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/11")
14108 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-return-and-local-vars/12")
14109 (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")
14110 (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")
14111 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/15")
14112 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/16")
14113 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-return-and-local-vars/17")
14114 (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")
14115 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/19")
14116 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-return-and-local-vars/20")
14117 (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")
14118 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/21")
14119 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/21")
14120 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-and-local-vars/22")
14121 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-and-local-vars/23")
14122 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-and-local-vars/24")
14123 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-and-local-vars/25")
14124 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-and-local-vars/26")
14125
14126 89/<- %esp 5/r32/ebp
14127 5d/pop-to-ebp
14128 c3/return
14129
14130 test-copy-object-with-no-inout:
14131
14132 55/push-ebp
14133 89/<- %ebp 4/r32/esp
14134
14135 (clear-stream _test-input-stream)
14136 (clear-stream $_test-input-buffered-file->buffer)
14137 (clear-stream _test-output-stream)
14138 (clear-stream $_test-output-buffered-file->buffer)
14139 (clear-stream _test-error-stream)
14140 (clear-stream $_test-error-buffered-file->buffer)
14141
14142 68/push 0/imm32
14143 68/push 0/imm32
14144 89/<- %edx 4/r32/esp
14145 (tailor-exit-descriptor %edx 0x10)
14146
14147 (write _test-input-stream "fn foo {\n")
14148 (write _test-input-stream " copy-object\n")
14149 (write _test-input-stream "}\n")
14150
14151 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14152
14153
14154 89/<- %edx 4/r32/esp
14155 (flush _test-output-buffered-file)
14156 (flush _test-error-buffered-file)
14157 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14163
14164 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-inout: output should be empty")
14165 (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")
14166
14167 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-inout: exit status")
14168
14169 81 0/subop/add %esp 8/imm32
14170
14171 5d/pop-to-ebp
14172 c3/return
14173
14174 test-copy-object-with-no-source:
14175
14176 55/push-ebp
14177 89/<- %ebp 4/r32/esp
14178
14179 (clear-stream _test-input-stream)
14180 (clear-stream $_test-input-buffered-file->buffer)
14181 (clear-stream _test-output-stream)
14182 (clear-stream $_test-output-buffered-file->buffer)
14183 (clear-stream _test-error-stream)
14184 (clear-stream $_test-error-buffered-file->buffer)
14185
14186 68/push 0/imm32
14187 68/push 0/imm32
14188 89/<- %edx 4/r32/esp
14189 (tailor-exit-descriptor %edx 0x10)
14190
14191 (write _test-input-stream "fn foo {\n")
14192 (write _test-input-stream " var x: (addr int)\n")
14193 (write _test-input-stream " copy-object x\n")
14194 (write _test-input-stream "}\n")
14195
14196 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14197
14198
14199 89/<- %edx 4/r32/esp
14200 (flush _test-output-buffered-file)
14201 (flush _test-error-buffered-file)
14202 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14208
14209 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-no-source: output should be empty")
14210 (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")
14211
14212 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-no-source: exit status")
14213
14214 81 0/subop/add %esp 8/imm32
14215
14216 5d/pop-to-ebp
14217 c3/return
14218
14219 test-copy-object-with-too-many-inouts:
14220
14221 55/push-ebp
14222 89/<- %ebp 4/r32/esp
14223
14224 (clear-stream _test-input-stream)
14225 (clear-stream $_test-input-buffered-file->buffer)
14226 (clear-stream _test-output-stream)
14227 (clear-stream $_test-output-buffered-file->buffer)
14228 (clear-stream _test-error-stream)
14229 (clear-stream $_test-error-buffered-file->buffer)
14230
14231 68/push 0/imm32
14232 68/push 0/imm32
14233 89/<- %edx 4/r32/esp
14234 (tailor-exit-descriptor %edx 0x10)
14235
14236 (write _test-input-stream "fn foo {\n")
14237 (write _test-input-stream " var x: (addr boolean)\n")
14238 (write _test-input-stream " copy-object x, x, x\n")
14239 (write _test-input-stream "}\n")
14240
14241 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14242
14243
14244 89/<- %edx 4/r32/esp
14245 (flush _test-output-buffered-file)
14246 (flush _test-error-buffered-file)
14247 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14253
14254 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-too-many-inouts: output should be empty")
14255 (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")
14256
14257 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-too-many-inouts: exit status")
14258
14259 81 0/subop/add %esp 8/imm32
14260
14261 5d/pop-to-ebp
14262 c3/return
14263
14264 test-copy-object-with-output:
14265
14266 55/push-ebp
14267 89/<- %ebp 4/r32/esp
14268
14269 (clear-stream _test-input-stream)
14270 (clear-stream $_test-input-buffered-file->buffer)
14271 (clear-stream _test-output-stream)
14272 (clear-stream $_test-output-buffered-file->buffer)
14273 (clear-stream _test-error-stream)
14274 (clear-stream $_test-error-buffered-file->buffer)
14275
14276 68/push 0/imm32
14277 68/push 0/imm32
14278 89/<- %edx 4/r32/esp
14279 (tailor-exit-descriptor %edx 0x10)
14280
14281 (write _test-input-stream "fn foo {\n")
14282 (write _test-input-stream " var x/eax: (addr boolean) <- copy 0\n")
14283 (write _test-input-stream " var y/ecx: (addr boolean) <- copy 0\n")
14284 (write _test-input-stream " x <- copy-object x, y\n")
14285 (write _test-input-stream "}\n")
14286
14287 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14288
14289
14290 89/<- %edx 4/r32/esp
14291 (flush _test-output-buffered-file)
14292 (flush _test-error-buffered-file)
14293 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14299
14300 (check-stream-equal _test-output-stream "" "F - test-copy-object-with-output: output should be empty")
14301 (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")
14302
14303 (check-ints-equal *(edx+4) 2 "F - test-copy-object-with-output: exit status")
14304
14305 81 0/subop/add %esp 8/imm32
14306
14307 5d/pop-to-ebp
14308 c3/return
14309
14310 test-copy-object-deref-address:
14311
14312 55/push-ebp
14313 89/<- %ebp 4/r32/esp
14314
14315 (clear-stream _test-input-stream)
14316 (clear-stream $_test-input-buffered-file->buffer)
14317 (clear-stream _test-output-stream)
14318 (clear-stream $_test-output-buffered-file->buffer)
14319
14320 (write _test-input-stream "fn foo {\n")
14321 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
14322 (write _test-input-stream " var y/ecx: (addr addr int) <- copy 0\n")
14323 (write _test-input-stream " copy-object *y, x\n")
14324 (write _test-input-stream "}\n")
14325
14326 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14327 (flush _test-output-buffered-file)
14328
14329
14330 5d/pop-to-ebp
14331 c3/return
14332
14333 test-copy-object-non-addr:
14334
14335 55/push-ebp
14336 89/<- %ebp 4/r32/esp
14337
14338 (clear-stream _test-input-stream)
14339 (clear-stream $_test-input-buffered-file->buffer)
14340 (clear-stream _test-output-stream)
14341 (clear-stream $_test-output-buffered-file->buffer)
14342 (clear-stream _test-error-stream)
14343 (clear-stream $_test-error-buffered-file->buffer)
14344
14345 68/push 0/imm32
14346 68/push 0/imm32
14347 89/<- %edx 4/r32/esp
14348 (tailor-exit-descriptor %edx 0x10)
14349
14350 (write _test-input-stream "fn foo {\n")
14351 (write _test-input-stream " var x: int\n")
14352 (write _test-input-stream " var y: int\n")
14353 (write _test-input-stream " copy-object y, x\n")
14354 (write _test-input-stream "}\n")
14355
14356 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14357
14358
14359 89/<- %edx 4/r32/esp
14360 (flush _test-output-buffered-file)
14361 (flush _test-error-buffered-file)
14362 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14368
14369 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-addr: output should be empty")
14370 (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")
14371
14372 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-addr: exit status")
14373
14374 81 0/subop/add %esp 8/imm32
14375
14376 5d/pop-to-ebp
14377 c3/return
14378
14379 test-copy-object-non-equal:
14380
14381 55/push-ebp
14382 89/<- %ebp 4/r32/esp
14383
14384 (clear-stream _test-input-stream)
14385 (clear-stream $_test-input-buffered-file->buffer)
14386 (clear-stream _test-output-stream)
14387 (clear-stream $_test-output-buffered-file->buffer)
14388 (clear-stream _test-error-stream)
14389 (clear-stream $_test-error-buffered-file->buffer)
14390
14391 68/push 0/imm32
14392 68/push 0/imm32
14393 89/<- %edx 4/r32/esp
14394 (tailor-exit-descriptor %edx 0x10)
14395
14396 (write _test-input-stream "fn foo {\n")
14397 (write _test-input-stream " var x: (addr int)\n")
14398 (write _test-input-stream " var y: (addr boolean)\n")
14399 (write _test-input-stream " copy-object y, x\n")
14400 (write _test-input-stream "}\n")
14401
14402 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14403
14404
14405 89/<- %edx 4/r32/esp
14406 (flush _test-output-buffered-file)
14407 (flush _test-error-buffered-file)
14408 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14414
14415 (check-stream-equal _test-output-stream "" "F - test-copy-object-non-equal: output should be empty")
14416 (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")
14417
14418 (check-ints-equal *(edx+4) 2 "F - test-copy-object-non-equal: exit status")
14419
14420 81 0/subop/add %esp 8/imm32
14421
14422 5d/pop-to-ebp
14423 c3/return
14424
14425 test-allocate-with-no-inout:
14426
14427 55/push-ebp
14428 89/<- %ebp 4/r32/esp
14429
14430 (clear-stream _test-input-stream)
14431 (clear-stream $_test-input-buffered-file->buffer)
14432 (clear-stream _test-output-stream)
14433 (clear-stream $_test-output-buffered-file->buffer)
14434 (clear-stream _test-error-stream)
14435 (clear-stream $_test-error-buffered-file->buffer)
14436
14437 68/push 0/imm32
14438 68/push 0/imm32
14439 89/<- %edx 4/r32/esp
14440 (tailor-exit-descriptor %edx 0x10)
14441
14442 (write _test-input-stream "fn foo {\n")
14443 (write _test-input-stream " allocate\n")
14444 (write _test-input-stream "}\n")
14445
14446 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14447
14448
14449 89/<- %edx 4/r32/esp
14450 (flush _test-output-buffered-file)
14451 (flush _test-error-buffered-file)
14452 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14458
14459 (check-stream-equal _test-output-stream "" "F - test-allocate-with-no-inout: output should be empty")
14460 (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")
14461
14462 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-no-inout: exit status")
14463
14464 81 0/subop/add %esp 8/imm32
14465
14466 5d/pop-to-ebp
14467 c3/return
14468
14469 test-allocate-with-too-many-inouts:
14470
14471 55/push-ebp
14472 89/<- %ebp 4/r32/esp
14473
14474 (clear-stream _test-input-stream)
14475 (clear-stream $_test-input-buffered-file->buffer)
14476 (clear-stream _test-output-stream)
14477 (clear-stream $_test-output-buffered-file->buffer)
14478 (clear-stream _test-error-stream)
14479 (clear-stream $_test-error-buffered-file->buffer)
14480
14481 68/push 0/imm32
14482 68/push 0/imm32
14483 89/<- %edx 4/r32/esp
14484 (tailor-exit-descriptor %edx 0x10)
14485
14486 (write _test-input-stream "fn foo {\n")
14487 (write _test-input-stream " var x: (addr handle int)\n")
14488 (write _test-input-stream " allocate x, 0\n")
14489 (write _test-input-stream "}\n")
14490
14491 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14492
14493
14494 89/<- %edx 4/r32/esp
14495 (flush _test-output-buffered-file)
14496 (flush _test-error-buffered-file)
14497 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14503
14504 (check-stream-equal _test-output-stream "" "F - test-allocate-with-too-many-inouts: output should be empty")
14505 (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")
14506
14507 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-too-many-inouts: exit status")
14508
14509 81 0/subop/add %esp 8/imm32
14510
14511 5d/pop-to-ebp
14512 c3/return
14513
14514 test-allocate-with-output:
14515
14516 55/push-ebp
14517 89/<- %ebp 4/r32/esp
14518
14519 (clear-stream _test-input-stream)
14520 (clear-stream $_test-input-buffered-file->buffer)
14521 (clear-stream _test-output-stream)
14522 (clear-stream $_test-output-buffered-file->buffer)
14523 (clear-stream _test-error-stream)
14524 (clear-stream $_test-error-buffered-file->buffer)
14525
14526 68/push 0/imm32
14527 68/push 0/imm32
14528 89/<- %edx 4/r32/esp
14529 (tailor-exit-descriptor %edx 0x10)
14530
14531 (write _test-input-stream "fn foo {\n")
14532 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
14533 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14534 (write _test-input-stream " x <- allocate y\n")
14535 (write _test-input-stream "}\n")
14536
14537 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14538
14539
14540 89/<- %edx 4/r32/esp
14541 (flush _test-output-buffered-file)
14542 (flush _test-error-buffered-file)
14543 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14549
14550 (check-stream-equal _test-output-stream "" "F - test-allocate-with-output: output should be empty")
14551 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'allocate' must not have any outputs" "F - test-allocate-with-output: error message")
14552
14553 (check-ints-equal *(edx+4) 2 "F - test-allocate-with-output: exit status")
14554
14555 81 0/subop/add %esp 8/imm32
14556
14557 5d/pop-to-ebp
14558 c3/return
14559
14560 test-allocate-non-addr:
14561
14562 55/push-ebp
14563 89/<- %ebp 4/r32/esp
14564
14565 (clear-stream _test-input-stream)
14566 (clear-stream $_test-input-buffered-file->buffer)
14567 (clear-stream _test-output-stream)
14568 (clear-stream $_test-output-buffered-file->buffer)
14569 (clear-stream _test-error-stream)
14570 (clear-stream $_test-error-buffered-file->buffer)
14571
14572 68/push 0/imm32
14573 68/push 0/imm32
14574 89/<- %edx 4/r32/esp
14575 (tailor-exit-descriptor %edx 0x10)
14576
14577 (write _test-input-stream "fn foo {\n")
14578 (write _test-input-stream " var y: (handle int)\n")
14579 (write _test-input-stream " allocate y\n")
14580 (write _test-input-stream "}\n")
14581
14582 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14583
14584
14585 89/<- %edx 4/r32/esp
14586 (flush _test-output-buffered-file)
14587 (flush _test-error-buffered-file)
14588 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14594
14595 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr: output must be empty")
14596 (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")
14597
14598 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr: exit status")
14599
14600 81 0/subop/add %esp 8/imm32
14601
14602 5d/pop-to-ebp
14603 c3/return
14604
14605 test-allocate-non-addr-handle:
14606
14607 55/push-ebp
14608 89/<- %ebp 4/r32/esp
14609
14610 (clear-stream _test-input-stream)
14611 (clear-stream $_test-input-buffered-file->buffer)
14612 (clear-stream _test-output-stream)
14613 (clear-stream $_test-output-buffered-file->buffer)
14614 (clear-stream _test-error-stream)
14615 (clear-stream $_test-error-buffered-file->buffer)
14616
14617 68/push 0/imm32
14618 68/push 0/imm32
14619 89/<- %edx 4/r32/esp
14620 (tailor-exit-descriptor %edx 0x10)
14621
14622 (write _test-input-stream "fn foo {\n")
14623 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
14624 (write _test-input-stream " allocate y\n")
14625 (write _test-input-stream "}\n")
14626
14627 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14628
14629
14630 89/<- %edx 4/r32/esp
14631 (flush _test-output-buffered-file)
14632 (flush _test-error-buffered-file)
14633 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14639
14640 (check-stream-equal _test-output-stream "" "F - test-allocate-non-addr-handle: output should be empty")
14641 (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")
14642
14643 (check-ints-equal *(edx+4) 2 "F - test-allocate-non-addr-handle: exit status")
14644
14645 81 0/subop/add %esp 8/imm32
14646
14647 5d/pop-to-ebp
14648 c3/return
14649
14650 test-allocate-deref-address:
14651
14652 55/push-ebp
14653 89/<- %ebp 4/r32/esp
14654
14655 (clear-stream _test-input-stream)
14656 (clear-stream $_test-input-buffered-file->buffer)
14657 (clear-stream _test-output-stream)
14658 (clear-stream $_test-output-buffered-file->buffer)
14659
14660 (write _test-input-stream "fn foo {\n")
14661 (write _test-input-stream " var y/ecx: (addr addr handle int) <- copy 0\n")
14662 (write _test-input-stream " allocate *y\n")
14663 (write _test-input-stream "}\n")
14664
14665 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14666 (flush _test-output-buffered-file)
14667
14668
14669 5d/pop-to-ebp
14670 c3/return
14671
14672 test-populate-with-no-inout:
14673
14674 55/push-ebp
14675 89/<- %ebp 4/r32/esp
14676
14677 (clear-stream _test-input-stream)
14678 (clear-stream $_test-input-buffered-file->buffer)
14679 (clear-stream _test-output-stream)
14680 (clear-stream $_test-output-buffered-file->buffer)
14681 (clear-stream _test-error-stream)
14682 (clear-stream $_test-error-buffered-file->buffer)
14683
14684 68/push 0/imm32
14685 68/push 0/imm32
14686 89/<- %edx 4/r32/esp
14687 (tailor-exit-descriptor %edx 0x10)
14688
14689 (write _test-input-stream "fn foo {\n")
14690 (write _test-input-stream " populate\n")
14691 (write _test-input-stream "}\n")
14692
14693 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14694
14695
14696 89/<- %edx 4/r32/esp
14697 (flush _test-output-buffered-file)
14698 (flush _test-error-buffered-file)
14699 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14705
14706 (check-stream-equal _test-output-stream "" "F - test-populate-with-no-inout: output should be empty")
14707 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must have two inouts" "F - test-populate-with-no-inout: error message")
14708
14709 (check-ints-equal *(edx+4) 2 "F - test-populate-with-no-inout: exit status")
14710
14711 81 0/subop/add %esp 8/imm32
14712
14713 5d/pop-to-ebp
14714 c3/return
14715
14716 test-populate-with-too-many-inouts:
14717
14718 55/push-ebp
14719 89/<- %ebp 4/r32/esp
14720
14721 (clear-stream _test-input-stream)
14722 (clear-stream $_test-input-buffered-file->buffer)
14723 (clear-stream _test-output-stream)
14724 (clear-stream $_test-output-buffered-file->buffer)
14725 (clear-stream _test-error-stream)
14726 (clear-stream $_test-error-buffered-file->buffer)
14727
14728 68/push 0/imm32
14729 68/push 0/imm32
14730 89/<- %edx 4/r32/esp
14731 (tailor-exit-descriptor %edx 0x10)
14732
14733 (write _test-input-stream "fn foo {\n")
14734 (write _test-input-stream " var x: (addr handle int)\n")
14735 (write _test-input-stream " populate x, 3, 0\n")
14736 (write _test-input-stream "}\n")
14737
14738 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14739
14740
14741 89/<- %edx 4/r32/esp
14742 (flush _test-output-buffered-file)
14743 (flush _test-error-buffered-file)
14744 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14750
14751 (check-stream-equal _test-output-stream "" "F - test-populate-with-too-many-inouts: output should be empty")
14752 (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")
14753
14754 (check-ints-equal *(edx+4) 2 "F - test-populate-with-too-many-inouts: exit status")
14755
14756 81 0/subop/add %esp 8/imm32
14757
14758 5d/pop-to-ebp
14759 c3/return
14760
14761 test-populate-with-output:
14762
14763 55/push-ebp
14764 89/<- %ebp 4/r32/esp
14765
14766 (clear-stream _test-input-stream)
14767 (clear-stream $_test-input-buffered-file->buffer)
14768 (clear-stream _test-output-stream)
14769 (clear-stream $_test-output-buffered-file->buffer)
14770 (clear-stream _test-error-stream)
14771 (clear-stream $_test-error-buffered-file->buffer)
14772
14773 68/push 0/imm32
14774 68/push 0/imm32
14775 89/<- %edx 4/r32/esp
14776 (tailor-exit-descriptor %edx 0x10)
14777
14778 (write _test-input-stream "fn foo {\n")
14779 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
14780 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14781 (write _test-input-stream " x <- populate y\n")
14782 (write _test-input-stream "}\n")
14783
14784 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14785
14786
14787 89/<- %edx 4/r32/esp
14788 (flush _test-output-buffered-file)
14789 (flush _test-error-buffered-file)
14790 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14796
14797 (check-stream-equal _test-output-stream "" "F - test-populate-with-output: output should be empty")
14798 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'populate' must not have any outputs" "F - test-populate-with-output: error message")
14799
14800 (check-ints-equal *(edx+4) 2 "F - test-populate-with-output: exit status")
14801
14802 81 0/subop/add %esp 8/imm32
14803
14804 5d/pop-to-ebp
14805 c3/return
14806
14807 test-populate-non-addr:
14808
14809 55/push-ebp
14810 89/<- %ebp 4/r32/esp
14811
14812 (clear-stream _test-input-stream)
14813 (clear-stream $_test-input-buffered-file->buffer)
14814 (clear-stream _test-output-stream)
14815 (clear-stream $_test-output-buffered-file->buffer)
14816 (clear-stream _test-error-stream)
14817 (clear-stream $_test-error-buffered-file->buffer)
14818
14819 68/push 0/imm32
14820 68/push 0/imm32
14821 89/<- %edx 4/r32/esp
14822 (tailor-exit-descriptor %edx 0x10)
14823
14824 (write _test-input-stream "fn foo {\n")
14825 (write _test-input-stream " var y: (handle int)\n")
14826 (write _test-input-stream " populate y, 3\n")
14827 (write _test-input-stream "}\n")
14828
14829 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14830
14831
14832 89/<- %edx 4/r32/esp
14833 (flush _test-output-buffered-file)
14834 (flush _test-error-buffered-file)
14835 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14841
14842 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr: output must be empty")
14843 (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")
14844
14845 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr: exit status")
14846
14847 81 0/subop/add %esp 8/imm32
14848
14849 5d/pop-to-ebp
14850 c3/return
14851
14852 test-populate-non-addr-handle:
14853
14854 55/push-ebp
14855 89/<- %ebp 4/r32/esp
14856
14857 (clear-stream _test-input-stream)
14858 (clear-stream $_test-input-buffered-file->buffer)
14859 (clear-stream _test-output-stream)
14860 (clear-stream $_test-output-buffered-file->buffer)
14861 (clear-stream _test-error-stream)
14862 (clear-stream $_test-error-buffered-file->buffer)
14863
14864 68/push 0/imm32
14865 68/push 0/imm32
14866 89/<- %edx 4/r32/esp
14867 (tailor-exit-descriptor %edx 0x10)
14868
14869 (write _test-input-stream "fn foo {\n")
14870 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
14871 (write _test-input-stream " populate y, 3\n")
14872 (write _test-input-stream "}\n")
14873
14874 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14875
14876
14877 89/<- %edx 4/r32/esp
14878 (flush _test-output-buffered-file)
14879 (flush _test-error-buffered-file)
14880 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14886
14887 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle: output should be empty")
14888 (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")
14889
14890 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle: exit status")
14891
14892 81 0/subop/add %esp 8/imm32
14893
14894 5d/pop-to-ebp
14895 c3/return
14896
14897 test-populate-non-addr-handle-array:
14898
14899 55/push-ebp
14900 89/<- %ebp 4/r32/esp
14901
14902 (clear-stream _test-input-stream)
14903 (clear-stream $_test-input-buffered-file->buffer)
14904 (clear-stream _test-output-stream)
14905 (clear-stream $_test-output-buffered-file->buffer)
14906 (clear-stream _test-error-stream)
14907 (clear-stream $_test-error-buffered-file->buffer)
14908
14909 68/push 0/imm32
14910 68/push 0/imm32
14911 89/<- %edx 4/r32/esp
14912 (tailor-exit-descriptor %edx 0x10)
14913
14914 (write _test-input-stream "fn foo {\n")
14915 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
14916 (write _test-input-stream " populate y, 3\n")
14917 (write _test-input-stream "}\n")
14918
14919 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14920
14921
14922 89/<- %edx 4/r32/esp
14923 (flush _test-output-buffered-file)
14924 (flush _test-error-buffered-file)
14925 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14931
14932 (check-stream-equal _test-output-stream "" "F - test-populate-non-addr-handle-array: output should be empty")
14933 (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")
14934
14935 (check-ints-equal *(edx+4) 2 "F - test-populate-non-addr-handle-array: exit status")
14936
14937 81 0/subop/add %esp 8/imm32
14938
14939 5d/pop-to-ebp
14940 c3/return
14941
14942 test-populate-deref-address:
14943
14944 55/push-ebp
14945 89/<- %ebp 4/r32/esp
14946
14947 (clear-stream _test-input-stream)
14948 (clear-stream $_test-input-buffered-file->buffer)
14949 (clear-stream _test-output-stream)
14950 (clear-stream $_test-output-buffered-file->buffer)
14951
14952 (write _test-input-stream "fn foo {\n")
14953 (write _test-input-stream " var y/ecx: (addr addr handle array int) <- copy 0\n")
14954 (write _test-input-stream " populate *y, 3\n")
14955 (write _test-input-stream "}\n")
14956
14957 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
14958 (flush _test-output-buffered-file)
14959
14960
14961 5d/pop-to-ebp
14962 c3/return
14963
14964 test-populate-stream-with-no-inout:
14965
14966 55/push-ebp
14967 89/<- %ebp 4/r32/esp
14968
14969 (clear-stream _test-input-stream)
14970 (clear-stream $_test-input-buffered-file->buffer)
14971 (clear-stream _test-output-stream)
14972 (clear-stream $_test-output-buffered-file->buffer)
14973 (clear-stream _test-error-stream)
14974 (clear-stream $_test-error-buffered-file->buffer)
14975
14976 68/push 0/imm32
14977 68/push 0/imm32
14978 89/<- %edx 4/r32/esp
14979 (tailor-exit-descriptor %edx 0x10)
14980
14981 (write _test-input-stream "fn foo {\n")
14982 (write _test-input-stream " populate-stream\n")
14983 (write _test-input-stream "}\n")
14984
14985 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
14986
14987
14988 89/<- %edx 4/r32/esp
14989 (flush _test-output-buffered-file)
14990 (flush _test-error-buffered-file)
14991 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
14997
14998 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-no-inout: output should be empty")
14999 (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")
15000
15001 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-no-inout: exit status")
15002
15003 81 0/subop/add %esp 8/imm32
15004
15005 5d/pop-to-ebp
15006 c3/return
15007
15008 test-populate-stream-with-too-many-inouts:
15009
15010 55/push-ebp
15011 89/<- %ebp 4/r32/esp
15012
15013 (clear-stream _test-input-stream)
15014 (clear-stream $_test-input-buffered-file->buffer)
15015 (clear-stream _test-output-stream)
15016 (clear-stream $_test-output-buffered-file->buffer)
15017 (clear-stream _test-error-stream)
15018 (clear-stream $_test-error-buffered-file->buffer)
15019
15020 68/push 0/imm32
15021 68/push 0/imm32
15022 89/<- %edx 4/r32/esp
15023 (tailor-exit-descriptor %edx 0x10)
15024
15025 (write _test-input-stream "fn foo {\n")
15026 (write _test-input-stream " var x: (addr handle int)\n")
15027 (write _test-input-stream " populate-stream x, 3, 0\n")
15028 (write _test-input-stream "}\n")
15029
15030 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15031
15032
15033 89/<- %edx 4/r32/esp
15034 (flush _test-output-buffered-file)
15035 (flush _test-error-buffered-file)
15036 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15042
15043 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-too-many-inouts: output should be empty")
15044 (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")
15045
15046 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-too-many-inouts: exit status")
15047
15048 81 0/subop/add %esp 8/imm32
15049
15050 5d/pop-to-ebp
15051 c3/return
15052
15053 test-populate-stream-with-output:
15054
15055 55/push-ebp
15056 89/<- %ebp 4/r32/esp
15057
15058 (clear-stream _test-input-stream)
15059 (clear-stream $_test-input-buffered-file->buffer)
15060 (clear-stream _test-output-stream)
15061 (clear-stream $_test-output-buffered-file->buffer)
15062 (clear-stream _test-error-stream)
15063 (clear-stream $_test-error-buffered-file->buffer)
15064
15065 68/push 0/imm32
15066 68/push 0/imm32
15067 89/<- %edx 4/r32/esp
15068 (tailor-exit-descriptor %edx 0x10)
15069
15070 (write _test-input-stream "fn foo {\n")
15071 (write _test-input-stream " var x/eax: boolean <- copy 0\n")
15072 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
15073 (write _test-input-stream " x <- populate-stream y\n")
15074 (write _test-input-stream "}\n")
15075
15076 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15077
15078
15079 89/<- %edx 4/r32/esp
15080 (flush _test-output-buffered-file)
15081 (flush _test-error-buffered-file)
15082 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15088
15089 (check-stream-equal _test-output-stream "" "F - test-populate-stream-with-output: output should be empty")
15090 (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")
15091
15092 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-with-output: exit status")
15093
15094 81 0/subop/add %esp 8/imm32
15095
15096 5d/pop-to-ebp
15097 c3/return
15098
15099 test-populate-stream-non-addr:
15100
15101 55/push-ebp
15102 89/<- %ebp 4/r32/esp
15103
15104 (clear-stream _test-input-stream)
15105 (clear-stream $_test-input-buffered-file->buffer)
15106 (clear-stream _test-output-stream)
15107 (clear-stream $_test-output-buffered-file->buffer)
15108 (clear-stream _test-error-stream)
15109 (clear-stream $_test-error-buffered-file->buffer)
15110
15111 68/push 0/imm32
15112 68/push 0/imm32
15113 89/<- %edx 4/r32/esp
15114 (tailor-exit-descriptor %edx 0x10)
15115
15116 (write _test-input-stream "fn foo {\n")
15117 (write _test-input-stream " var y: (handle int)\n")
15118 (write _test-input-stream " populate-stream y, 3\n")
15119 (write _test-input-stream "}\n")
15120
15121 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15122
15123
15124 89/<- %edx 4/r32/esp
15125 (flush _test-output-buffered-file)
15126 (flush _test-error-buffered-file)
15127 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15133
15134 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr: output must be empty")
15135 (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")
15136
15137 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr: exit status")
15138
15139 81 0/subop/add %esp 8/imm32
15140
15141 5d/pop-to-ebp
15142 c3/return
15143
15144 test-populate-stream-non-addr-handle:
15145
15146 55/push-ebp
15147 89/<- %ebp 4/r32/esp
15148
15149 (clear-stream _test-input-stream)
15150 (clear-stream $_test-input-buffered-file->buffer)
15151 (clear-stream _test-output-stream)
15152 (clear-stream $_test-output-buffered-file->buffer)
15153 (clear-stream _test-error-stream)
15154 (clear-stream $_test-error-buffered-file->buffer)
15155
15156 68/push 0/imm32
15157 68/push 0/imm32
15158 89/<- %edx 4/r32/esp
15159 (tailor-exit-descriptor %edx 0x10)
15160
15161 (write _test-input-stream "fn foo {\n")
15162 (write _test-input-stream " var y/ecx: (addr int) <- copy 0\n")
15163 (write _test-input-stream " populate-stream y, 3\n")
15164 (write _test-input-stream "}\n")
15165
15166 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15167
15168
15169 89/<- %edx 4/r32/esp
15170 (flush _test-output-buffered-file)
15171 (flush _test-error-buffered-file)
15172 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15178
15179 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle: output should be empty")
15180 (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")
15181
15182 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle: exit status")
15183
15184 81 0/subop/add %esp 8/imm32
15185
15186 5d/pop-to-ebp
15187 c3/return
15188
15189 test-populate-stream-non-addr-handle-stream:
15190
15191 55/push-ebp
15192 89/<- %ebp 4/r32/esp
15193
15194 (clear-stream _test-input-stream)
15195 (clear-stream $_test-input-buffered-file->buffer)
15196 (clear-stream _test-output-stream)
15197 (clear-stream $_test-output-buffered-file->buffer)
15198 (clear-stream _test-error-stream)
15199 (clear-stream $_test-error-buffered-file->buffer)
15200
15201 68/push 0/imm32
15202 68/push 0/imm32
15203 89/<- %edx 4/r32/esp
15204 (tailor-exit-descriptor %edx 0x10)
15205
15206 (write _test-input-stream "fn foo {\n")
15207 (write _test-input-stream " var y/ecx: (addr handle int) <- copy 0\n")
15208 (write _test-input-stream " populate-stream y, 3\n")
15209 (write _test-input-stream "}\n")
15210
15211 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15212
15213
15214 89/<- %edx 4/r32/esp
15215 (flush _test-output-buffered-file)
15216 (flush _test-error-buffered-file)
15217 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15223
15224 (check-stream-equal _test-output-stream "" "F - test-populate-stream-non-addr-handle-stream: output should be empty")
15225 (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")
15226
15227 (check-ints-equal *(edx+4) 2 "F - test-populate-stream-non-addr-handle-stream: exit status")
15228
15229 81 0/subop/add %esp 8/imm32
15230
15231 5d/pop-to-ebp
15232 c3/return
15233
15234 test-populate-stream-deref-address:
15235
15236 55/push-ebp
15237 89/<- %ebp 4/r32/esp
15238
15239 (clear-stream _test-input-stream)
15240 (clear-stream $_test-input-buffered-file->buffer)
15241 (clear-stream _test-output-stream)
15242 (clear-stream $_test-output-buffered-file->buffer)
15243
15244 (write _test-input-stream "fn foo {\n")
15245 (write _test-input-stream " var y/ecx: (addr addr handle stream int) <- copy 0\n")
15246 (write _test-input-stream " populate-stream *y, 3\n")
15247 (write _test-input-stream "}\n")
15248
15249 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
15250 (flush _test-output-buffered-file)
15251
15252
15253 5d/pop-to-ebp
15254 c3/return
15255
15256 test-convert-with-no-inout:
15257
15258 55/push-ebp
15259 89/<- %ebp 4/r32/esp
15260
15261 (clear-stream _test-input-stream)
15262 (clear-stream $_test-input-buffered-file->buffer)
15263 (clear-stream _test-output-stream)
15264 (clear-stream $_test-output-buffered-file->buffer)
15265 (clear-stream _test-error-stream)
15266 (clear-stream $_test-error-buffered-file->buffer)
15267
15268 68/push 0/imm32
15269 68/push 0/imm32
15270 89/<- %edx 4/r32/esp
15271 (tailor-exit-descriptor %edx 0x10)
15272
15273 (write _test-input-stream "fn foo {\n")
15274 (write _test-input-stream " var x/eax: int <- convert\n")
15275 (write _test-input-stream "}\n")
15276
15277 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15278
15279
15280 89/<- %edx 4/r32/esp
15281 (flush _test-output-buffered-file)
15282 (flush _test-error-buffered-file)
15283 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15289
15290 (check-stream-equal _test-output-stream "" "F - test-convert-with-no-inout: output should be empty")
15291 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' expects an inout" "F - test-convert-with-no-inout: error message")
15292
15293 (check-ints-equal *(edx+4) 2 "F - test-convert-with-no-inout: exit status")
15294
15295 81 0/subop/add %esp 8/imm32
15296
15297 5d/pop-to-ebp
15298 c3/return
15299
15300 test-convert-with-multiple-inouts:
15301
15302 55/push-ebp
15303 89/<- %ebp 4/r32/esp
15304
15305 (clear-stream _test-input-stream)
15306 (clear-stream $_test-input-buffered-file->buffer)
15307 (clear-stream _test-output-stream)
15308 (clear-stream $_test-output-buffered-file->buffer)
15309 (clear-stream _test-error-stream)
15310 (clear-stream $_test-error-buffered-file->buffer)
15311
15312 68/push 0/imm32
15313 68/push 0/imm32
15314 89/<- %edx 4/r32/esp
15315 (tailor-exit-descriptor %edx 0x10)
15316
15317 (write _test-input-stream "fn foo {\n")
15318 (write _test-input-stream " var x/eax: int <- convert 0, 0\n")
15319 (write _test-input-stream "}\n")
15320
15321 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15322
15323
15324 89/<- %edx 4/r32/esp
15325 (flush _test-output-buffered-file)
15326 (flush _test-error-buffered-file)
15327 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15333
15334 (check-stream-equal _test-output-stream "" "F - test-convert-with-multiple-inouts: output should be empty")
15335 (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")
15336
15337 (check-ints-equal *(edx+4) 2 "F - test-convert-with-multiple-inouts: exit status")
15338
15339 81 0/subop/add %esp 8/imm32
15340
15341 5d/pop-to-ebp
15342 c3/return
15343
15344 test-convert-with-no-output:
15345
15346 55/push-ebp
15347 89/<- %ebp 4/r32/esp
15348
15349 (clear-stream _test-input-stream)
15350 (clear-stream $_test-input-buffered-file->buffer)
15351 (clear-stream _test-output-stream)
15352 (clear-stream $_test-output-buffered-file->buffer)
15353 (clear-stream _test-error-stream)
15354 (clear-stream $_test-error-buffered-file->buffer)
15355
15356 68/push 0/imm32
15357 68/push 0/imm32
15358 89/<- %edx 4/r32/esp
15359 (tailor-exit-descriptor %edx 0x10)
15360
15361 (write _test-input-stream "fn foo {\n")
15362 (write _test-input-stream " convert 0\n")
15363 (write _test-input-stream "}\n")
15364
15365 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15366
15367
15368 89/<- %edx 4/r32/esp
15369 (flush _test-output-buffered-file)
15370 (flush _test-error-buffered-file)
15371 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15377
15378 (check-stream-equal _test-output-stream "" "F - test-convert-with-no-output: output should be empty")
15379 (check-next-stream-line-equal _test-error-stream "fn foo: stmt 'convert' expects an output" "F - test-convert-with-no-output: error message")
15380
15381 (check-ints-equal *(edx+4) 2 "F - test-convert-with-no-output: exit status")
15382
15383 81 0/subop/add %esp 8/imm32
15384
15385 5d/pop-to-ebp
15386 c3/return
15387
15388 test-convert-with-multiple-outputs:
15389
15390 55/push-ebp
15391 89/<- %ebp 4/r32/esp
15392
15393 (clear-stream _test-input-stream)
15394 (clear-stream $_test-input-buffered-file->buffer)
15395 (clear-stream _test-output-stream)
15396 (clear-stream $_test-output-buffered-file->buffer)
15397 (clear-stream _test-error-stream)
15398 (clear-stream $_test-error-buffered-file->buffer)
15399
15400 68/push 0/imm32
15401 68/push 0/imm32
15402 89/<- %edx 4/r32/esp
15403 (tailor-exit-descriptor %edx 0x10)
15404
15405 (write _test-input-stream "fn foo {\n")
15406 (write _test-input-stream " var x/eax: int <- copy 0\n")
15407 (write _test-input-stream " var y/ecx: int <- copy 0\n")
15408 (write _test-input-stream " x, y <- convert 0\n")
15409 (write _test-input-stream "}\n")
15410
15411 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15412
15413
15414 89/<- %edx 4/r32/esp
15415 (flush _test-output-buffered-file)
15416 (flush _test-error-buffered-file)
15417 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15423
15424 (check-stream-equal _test-output-stream "" "F - test-convert-with-multiple-outputs: output should be empty")
15425 (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")
15426
15427 (check-ints-equal *(edx+4) 2 "F - test-convert-with-multiple-outputs: exit status")
15428
15429 81 0/subop/add %esp 8/imm32
15430
15431 5d/pop-to-ebp
15432 c3/return
15433
15434 test-convert-deref-address:
15435
15436 55/push-ebp
15437 89/<- %ebp 4/r32/esp
15438
15439 (clear-stream _test-input-stream)
15440 (clear-stream $_test-input-buffered-file->buffer)
15441 (clear-stream _test-output-stream)
15442 (clear-stream $_test-output-buffered-file->buffer)
15443
15444 (write _test-input-stream "fn foo {\n")
15445 (write _test-input-stream " var x/eax: (addr int) <- copy 0\n")
15446 (write _test-input-stream " var y/xmm4: float <- convert *x\n")
15447 (write _test-input-stream "}\n")
15448
15449 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
15450 (flush _test-output-buffered-file)
15451
15452
15453 5d/pop-to-ebp
15454 c3/return
15455
15456 test-convert-to-non-register:
15457
15458 55/push-ebp
15459 89/<- %ebp 4/r32/esp
15460
15461 (clear-stream _test-input-stream)
15462 (clear-stream $_test-input-buffered-file->buffer)
15463 (clear-stream _test-output-stream)
15464 (clear-stream $_test-output-buffered-file->buffer)
15465 (clear-stream _test-error-stream)
15466 (clear-stream $_test-error-buffered-file->buffer)
15467
15468 68/push 0/imm32
15469 68/push 0/imm32
15470 89/<- %edx 4/r32/esp
15471 (tailor-exit-descriptor %edx 0x10)
15472
15473 (write _test-input-stream "fn foo {\n")
15474 (write _test-input-stream " var x: float\n")
15475 (write _test-input-stream " var y: int\n")
15476 (write _test-input-stream " x <- convert y\n")
15477 (write _test-input-stream "}\n")
15478
15479 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15480
15481
15482 89/<- %edx 4/r32/esp
15483 (flush _test-output-buffered-file)
15484 (flush _test-error-buffered-file)
15485 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15491
15492 (check-stream-equal _test-output-stream "" "F - test-convert-to-non-register: output should be empty")
15493 (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")
15494
15495 (check-ints-equal *(edx+4) 2 "F - test-convert-to-non-register: exit status")
15496
15497 81 0/subop/add %esp 8/imm32
15498
15499 5d/pop-to-ebp
15500 c3/return
15501
15502 test-convert-invalid-inout-type:
15503
15504 55/push-ebp
15505 89/<- %ebp 4/r32/esp
15506
15507 (clear-stream _test-input-stream)
15508 (clear-stream $_test-input-buffered-file->buffer)
15509 (clear-stream _test-output-stream)
15510 (clear-stream $_test-output-buffered-file->buffer)
15511 (clear-stream _test-error-stream)
15512 (clear-stream $_test-error-buffered-file->buffer)
15513
15514 68/push 0/imm32
15515 68/push 0/imm32
15516 89/<- %edx 4/r32/esp
15517 (tailor-exit-descriptor %edx 0x10)
15518
15519 (write _test-input-stream "fn foo {\n")
15520 (write _test-input-stream " var x: boolean\n")
15521 (write _test-input-stream " var y/xmm1: float <- convert x\n")
15522 (write _test-input-stream "}\n")
15523
15524 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15525
15526
15527 89/<- %edx 4/r32/esp
15528 (flush _test-output-buffered-file)
15529 (flush _test-error-buffered-file)
15530 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15536
15537 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-inout-type: output should be empty")
15538 (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")
15539
15540 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-inout-type: exit status")
15541
15542 81 0/subop/add %esp 8/imm32
15543
15544 5d/pop-to-ebp
15545 c3/return
15546
15547 test-convert-invalid-output-type:
15548
15549 55/push-ebp
15550 89/<- %ebp 4/r32/esp
15551
15552 (clear-stream _test-input-stream)
15553 (clear-stream $_test-input-buffered-file->buffer)
15554 (clear-stream _test-output-stream)
15555 (clear-stream $_test-output-buffered-file->buffer)
15556 (clear-stream _test-error-stream)
15557 (clear-stream $_test-error-buffered-file->buffer)
15558
15559 68/push 0/imm32
15560 68/push 0/imm32
15561 89/<- %edx 4/r32/esp
15562 (tailor-exit-descriptor %edx 0x10)
15563
15564 (write _test-input-stream "fn foo {\n")
15565 (write _test-input-stream " var x: float\n")
15566 (write _test-input-stream " var y/eax: boolean <- convert x\n")
15567 (write _test-input-stream "}\n")
15568
15569 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15570
15571
15572 89/<- %edx 4/r32/esp
15573 (flush _test-output-buffered-file)
15574 (flush _test-error-buffered-file)
15575 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15581
15582 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-output-type: output should be empty")
15583 (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")
15584
15585 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-output-type: exit status")
15586
15587 81 0/subop/add %esp 8/imm32
15588
15589 5d/pop-to-ebp
15590 c3/return
15591
15592 test-convert-int-to-int:
15593
15594 55/push-ebp
15595 89/<- %ebp 4/r32/esp
15596
15597 (clear-stream _test-input-stream)
15598 (clear-stream $_test-input-buffered-file->buffer)
15599 (clear-stream _test-output-stream)
15600 (clear-stream $_test-output-buffered-file->buffer)
15601 (clear-stream _test-error-stream)
15602 (clear-stream $_test-error-buffered-file->buffer)
15603
15604 68/push 0/imm32
15605 68/push 0/imm32
15606 89/<- %edx 4/r32/esp
15607 (tailor-exit-descriptor %edx 0x10)
15608
15609 (write _test-input-stream "fn foo {\n")
15610 (write _test-input-stream " var x: int\n")
15611 (write _test-input-stream " var y/eax: int <- convert x\n")
15612 (write _test-input-stream "}\n")
15613
15614 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15615
15616
15617 89/<- %edx 4/r32/esp
15618 (flush _test-output-buffered-file)
15619 (flush _test-error-buffered-file)
15620 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15626
15627 (check-stream-equal _test-output-stream "" "F - test-convert-int-to-int: output should be empty")
15628 (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")
15629
15630 (check-ints-equal *(edx+4) 2 "F - test-convert-int-to-int: exit status")
15631
15632 81 0/subop/add %esp 8/imm32
15633
15634 5d/pop-to-ebp
15635 c3/return
15636
15637 test-convert-float-to-float:
15638
15639 55/push-ebp
15640 89/<- %ebp 4/r32/esp
15641
15642 (clear-stream _test-input-stream)
15643 (clear-stream $_test-input-buffered-file->buffer)
15644 (clear-stream _test-output-stream)
15645 (clear-stream $_test-output-buffered-file->buffer)
15646 (clear-stream _test-error-stream)
15647 (clear-stream $_test-error-buffered-file->buffer)
15648
15649 68/push 0/imm32
15650 68/push 0/imm32
15651 89/<- %edx 4/r32/esp
15652 (tailor-exit-descriptor %edx 0x10)
15653
15654 (write _test-input-stream "fn foo {\n")
15655 (write _test-input-stream " var x: float\n")
15656 (write _test-input-stream " var y/xmm6: float <- convert x\n")
15657 (write _test-input-stream "}\n")
15658
15659 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
15660
15661
15662 89/<- %edx 4/r32/esp
15663 (flush _test-output-buffered-file)
15664 (flush _test-error-buffered-file)
15665 +-- 6 lines: #? # dump _test-error-stream ------------------------------------------------------------------------------------------------------------------------------------------
15671
15672 (check-stream-equal _test-output-stream "" "F - test-convert-float-to-float: output should be empty")
15673 (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")
15674
15675 (check-ints-equal *(edx+4) 2 "F - test-convert-float-to-float: exit status")
15676
15677 81 0/subop/add %esp 8/imm32
15678
15679 5d/pop-to-ebp
15680 c3/return
15681
15682
15683
15684
15685
15686 == data
15687
15688
15689 Next-block-index:
15690 1/imm32
15691
15692 Curr-block-depth:
15693 1/imm32
15694
15695 == code
15696
15697 parse-mu:
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736 55/push-ebp
15737 89/<- %ebp 4/r32/esp
15738
15739 68/push _Program-signatures/imm32
15740
15741 50/push-eax
15742 51/push-ecx
15743 52/push-edx
15744 53/push-ebx
15745 56/push-esi
15746 57/push-edi
15747
15748 81 5/subop/subtract %esp 0x200/imm32
15749 68/push 0x200/imm32/size
15750 68/push 0/imm32/read
15751 68/push 0/imm32/write
15752 89/<- %ecx 4/r32/esp
15753
15754 68/push 0/imm32/end
15755 68/push 0/imm32/start
15756 89/<- %edx 4/r32/esp
15757
15758 bf/copy-to-edi _Program-functions/imm32
15759
15760 81 5/subop/subtract %esp 0xc00/imm32
15761 68/push 0xc00/imm32/size
15762 68/push 0/imm32/top
15763 89/<- %ebx 4/r32/esp
15764 {
15765 $parse-mu:line-loop:
15766 (clear-stream %ecx)
15767 (read-line-buffered *(ebp+8) %ecx)
15768
15769 81 7/subop/compare *ecx 0/imm32
15770 0f 84/jump-if-= break/disp32
15771 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
15777 (next-mu-token %ecx %edx)
15778
15779 (slice-empty? %edx)
15780 3d/compare-eax-and 0/imm32/false
15781 0f 85/jump-if-!= loop/disp32
15782
15783
15784 8b/-> *edx 0/r32/eax
15785 8a/copy-byte *eax 0/r32/AL
15786 81 4/subop/and %eax 0xff/imm32
15787
15788 3d/compare-eax-and 0x23/imm32/hash
15789 0f 84/jump-if-= loop/disp32
15790
15791 {
15792 $parse-mu:fn:
15793 (slice-equal? %edx "fn")
15794 3d/compare-eax-and 0/imm32/false
15795 0f 84/jump-if-= break/disp32
15796
15797 68/push 0/imm32
15798 68/push 0/imm32
15799 89/<- %esi 4/r32/esp
15800
15801 (allocate Heap *Function-size %esi)
15802
15803 (lookup *esi *(esi+4))
15804
15805 (clear-stack %ebx)
15806
15807 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
15808 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
15809
15810 8b/-> *esi 0/r32/eax
15811 89/<- *edi 0/r32/eax
15812 8b/-> *(esi+4) 0/r32/eax
15813 89/<- *(edi+4) 0/r32/eax
15814
15815
15816 (lookup *esi *(esi+4))
15817
15818 8d/copy-address *(eax+0x20) 7/r32/edi
15819
15820 81 0/subop/add %esp 8/imm32
15821
15822 e9/jump $parse-mu:line-loop/disp32
15823 }
15824
15825
15826 {
15827 $parse-mu:sig:
15828 (slice-equal? %edx "sig")
15829 3d/compare-eax-and 0/imm32/false
15830 0f 84/jump-if-= break/disp32
15831
15832 57/push-edi
15833 8b/-> *(ebp-4) 7/r32/edi
15834
15835 68/push 0/imm32
15836 68/push 0/imm32
15837 89/<- %esi 4/r32/esp
15838
15839 (allocate Heap *Function-size %esi)
15840
15841 (lookup *esi *(esi+4))
15842
15843 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
15844
15845 8b/-> *esi 0/r32/eax
15846 89/<- *edi 0/r32/eax
15847 8b/-> *(esi+4) 0/r32/eax
15848 89/<- *(edi+4) 0/r32/eax
15849
15850
15851 (lookup *esi *(esi+4))
15852
15853 8d/copy-address *(eax+0x20) 7/r32/edi
15854
15855 81 0/subop/add %esp 8/imm32
15856
15857 89/<- *(ebp-4) 7/r32/edi
15858
15859 5f/pop-to-edi
15860
15861 e9/jump $parse-mu:line-loop/disp32
15862 }
15863
15864 {
15865 $parse-mu:type:
15866 (slice-equal? %edx "type")
15867 3d/compare-eax-and 0/imm32
15868 0f 84/jump-if-= break/disp32
15869 (next-mu-token %ecx %edx)
15870
15871 (pos-or-insert-slice Type-id %edx)
15872
15873 51/push-ecx
15874
15875 68/push 0/imm32
15876 68/push 0/imm32
15877 89/<- %ecx 4/r32/esp
15878 (find-or-create-typeinfo %eax %ecx)
15879
15880 (lookup *ecx *(ecx+4))
15881
15882
15883 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
15884
15885
15886 81 0/subop/add %esp 8/imm32
15887
15888 59/pop-to-ecx
15889 e9/jump $parse-mu:line-loop/disp32
15890 }
15891
15892 e9/jump $parse-mu:error1/disp32
15893 }
15894 $parse-mu:end:
15895
15896 81 0/subop/add %esp 0x20c/imm32
15897 81 0/subop/add %esp 0xc08/imm32
15898 81 0/subop/add %esp 8/imm32
15899
15900 5f/pop-to-edi
15901 5e/pop-to-esi
15902 5b/pop-to-ebx
15903 5a/pop-to-edx
15904 59/pop-to-ecx
15905 58/pop-to-eax
15906
15907 81 0/subop/add %esp 4/imm32
15908
15909 89/<- %esp 5/r32/ebp
15910 5d/pop-to-ebp
15911 c3/return
15912
15913 $parse-mu:error1:
15914
15915 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
15916 (write-slice-buffered *(ebp+0xc) %edx)
15917 (write-buffered *(ebp+0xc) "\n")
15918 (flush *(ebp+0xc))
15919 (stop *(ebp+0x10) 1)
15920
15921
15922 $parse-mu:error2:
15923
15924 (write-int32-hex-buffered *(ebp+0xc) *ebx)
15925 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
15926 (write-slice-buffered *(ebp+0xc) *eax)
15927 (write-buffered *(ebp+0xc) "'\n")
15928 (flush *(ebp+0xc))
15929 (stop *(ebp+0x10) 1)
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946 populate-mu-function-header:
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978 55/push-ebp
15979 89/<- %ebp 4/r32/esp
15980
15981 50/push-eax
15982 51/push-ecx
15983 52/push-edx
15984 53/push-ebx
15985 57/push-edi
15986
15987 8b/-> *(ebp+0xc) 7/r32/edi
15988
15989 68/push 0/imm32/end
15990 68/push 0/imm32/start
15991 89/<- %ecx 4/r32/esp
15992
15993 68/push 0/imm32
15994 68/push 0/imm32
15995 89/<- %ebx 4/r32/esp
15996
15997 (next-mu-token *(ebp+8) %ecx)
15998
15999
16000 (slice-empty? %ecx)
16001 3d/compare-eax-and 0/imm32/false
16002 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16003
16004 (slice-equal? %ecx "{")
16005 3d/compare-eax-and 0/imm32/false
16006 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16007
16008 (slice-equal? %ecx "->")
16009 3d/compare-eax-and 0/imm32/false
16010 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16011
16012 (slice-equal? %ecx "}")
16013 3d/compare-eax-and 0/imm32/false
16014 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16015
16016 (function-exists? %ecx)
16017 3d/compare-eax-and 0/imm32/false
16018 0f 85/jump-if-!= $populate-mu-function-header:error-duplicate/disp32
16019
16020 (slice-starts-with? %ecx "break")
16021 3d/compare-eax-and 0/imm32/false
16022 0f 85/jump-if-!= $populate-mu-function-header:error-break/disp32
16023 (slice-starts-with? %ecx "loop")
16024 3d/compare-eax-and 0/imm32/false
16025 0f 85/jump-if-!= $populate-mu-function-header:error-loop/disp32
16026 (slice-equal? %ecx "lookup")
16027 3d/compare-eax-and 0/imm32/false
16028 0f 85/jump-if-!= $populate-mu-function-header:error-lookup/disp32
16029
16030 (slice-to-string Heap %ecx %edi)
16031
16032 {
16033 $populate-mu-function-header:check-for-inout:
16034 (next-mu-token *(ebp+8) %ecx)
16035
16036 (slice-empty? %ecx)
16037 3d/compare-eax-and 0/imm32/false
16038 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16039
16040 (slice-equal? %ecx "{")
16041 3d/compare-eax-and 0/imm32/false
16042 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
16043
16044 (slice-equal? %ecx "->")
16045 3d/compare-eax-and 0/imm32/false
16046 0f 85/jump-if-!= break/disp32
16047
16048 (slice-equal? %ecx "}")
16049 3d/compare-eax-and 0/imm32/false
16050 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16051
16052 (lookup *edi *(edi+4))
16053 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
16054
16055
16056 (lookup *ebx *(ebx+4))
16057 81 7/subop/compare *(eax+0x18) 0/imm32
16058 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
16059
16060
16061 {
16062 (lookup *edi *(edi+4))
16063 (string-equal? %eax "main")
16064 3d/compare-eax-and 0/imm32/false
16065 75/jump-if-!= break/disp8
16066 (lookup *ebx *(ebx+4))
16067 (addr-payload-contains-addr? %eax)
16068 3d/compare-eax-and 0/imm32/false
16069 0f 85/jump-if-!= $populate-mu-function-header:error-nested-addr-inout/disp32
16070 }
16071
16072
16073
16074 8d/copy-address *(edi+8) 0/r32/eax
16075 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
16076
16077 (push *(ebp+0x10) *ebx)
16078 (push *(ebp+0x10) *(ebx+4))
16079 (push *(ebp+0x10) 0)
16080
16081 e9/jump loop/disp32
16082 }
16083
16084 {
16085 $populate-mu-function-header:check-for-out:
16086 (next-mu-token *(ebp+8) %ecx)
16087
16088 (slice-empty? %ecx)
16089 3d/compare-eax-and 0/imm32/false
16090 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16091
16092 (slice-equal? %ecx "{")
16093 3d/compare-eax-and 0/imm32/false
16094 0f 85/jump-if-!= break/disp32
16095
16096 (slice-equal? %ecx "->")
16097 3d/compare-eax-and 0/imm32/false
16098 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16099
16100 (slice-equal? %ecx "}")
16101 3d/compare-eax-and 0/imm32/false
16102 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
16103
16104 (lookup *edi *(edi+4))
16105 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x14) *(ebp+0x18))
16106
16107
16108 (lookup *ebx *(ebx+4))
16109 81 7/subop/compare *(eax+0x18) 0/imm32
16110 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
16111
16112 (lookup *eax *(eax+4))
16113 (string-equal? %eax "_")
16114 3d/compare-eax-and 0/imm32/false
16115 0f 84/jump-if-= $populate-mu-function-header:error4/disp32
16116
16117 (lookup *ebx *(ebx+4))
16118 (lookup *(eax+8) *(eax+0xc))
16119 (mu-addr-type? %eax)
16120 3d/compare-eax-and 0/imm32/false
16121 0f 85/jump-if-!= $populate-mu-function-header:error-addr-output/disp32
16122
16123 8d/copy-address *(edi+0x10) 0/r32/eax
16124 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
16125
16126 e9/jump loop/disp32
16127 }
16128 $populate-mu-function-header:done:
16129 (check-no-tokens-left *(ebp+8))
16130 $populate-mu-function-header:end:
16131
16132 81 0/subop/add %esp 0x10/imm32
16133
16134 5f/pop-to-edi
16135 5b/pop-to-ebx
16136 5a/pop-to-edx
16137 59/pop-to-ecx
16138 58/pop-to-eax
16139
16140 89/<- %esp 5/r32/ebp
16141 5d/pop-to-ebp
16142 c3/return
16143
16144 $populate-mu-function-header:error1:
16145
16146 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
16147 (flush *(ebp+0x14))
16148 (rewind-stream *(ebp+8))
16149 (write-stream-data *(ebp+0x14) *(ebp+8))
16150 (write-buffered *(ebp+0x14) "'\n")
16151 (flush *(ebp+0x14))
16152 (stop *(ebp+0x18) 1)
16153
16154
16155 $populate-mu-function-header:error2:
16156
16157 (write-buffered *(ebp+0x14) "fn ")
16158 50/push-eax
16159 (lookup *edi *(edi+4))
16160 (write-buffered *(ebp+0x14) %eax)
16161 58/pop-to-eax
16162 (write-buffered *(ebp+0x14) ": function inout '")
16163 (lookup *eax *(eax+4))
16164 (write-buffered *(ebp+0x14) %eax)
16165 (write-buffered *(ebp+0x14) "' cannot be in a register")
16166 (flush *(ebp+0x14))
16167 (stop *(ebp+0x18) 1)
16168
16169
16170 $populate-mu-function-header:error3:
16171
16172 (write-buffered *(ebp+0x14) "fn ")
16173 50/push-eax
16174 (lookup *edi *(edi+4))
16175 (write-buffered *(ebp+0x14) %eax)
16176 58/pop-to-eax
16177 (write-buffered *(ebp+0x14) ": function output '")
16178 (lookup *ebx *(ebx+4))
16179 (lookup *eax *(eax+4))
16180 (write-buffered *(ebp+0x14) %eax)
16181 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
16182 (rewind-stream *(ebp+8))
16183 (write-stream-data *(ebp+0x14) *(ebp+8))
16184 (write-buffered *(ebp+0x14) "'\n")
16185 (flush *(ebp+0x14))
16186 (stop *(ebp+0x18) 1)
16187
16188
16189 $populate-mu-function-header:error4:
16190
16191 (write-buffered *(ebp+0x14) "fn ")
16192 50/push-eax
16193 (lookup *edi *(edi+4))
16194 (write-buffered *(ebp+0x14) %eax)
16195 58/pop-to-eax
16196 (write-buffered *(ebp+0x14) ": function outputs cannot be named; rename '")
16197 (lookup *ebx *(ebx+4))
16198 (lookup *eax *(eax+4))
16199 (write-buffered *(ebp+0x14) %eax)
16200 (write-buffered *(ebp+0x14) "' in the header to '_'\n")
16201 (flush *(ebp+0x14))
16202 (stop *(ebp+0x18) 1)
16203
16204
16205 $populate-mu-function-header:error-duplicate:
16206 (write-buffered *(ebp+0x14) "fn ")
16207 (write-slice-buffered *(ebp+0x14) %ecx)
16208 (write-buffered *(ebp+0x14) " defined more than once\n")
16209 (flush *(ebp+0x14))
16210 (stop *(ebp+0x18) 1)
16211
16212
16213 $populate-mu-function-header:error-break:
16214 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
16215 (flush *(ebp+0x14))
16216 (stop *(ebp+0x18) 1)
16217
16218
16219 $populate-mu-function-header:error-loop:
16220 (write-buffered *(ebp+0x14) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
16221 (flush *(ebp+0x14))
16222 (stop *(ebp+0x18) 1)
16223
16224
16225 $populate-mu-function-header:error-lookup:
16226 (write-buffered *(ebp+0x14) "cannot define a function called 'lookup'\n")
16227 (flush *(ebp+0x14))
16228 (stop *(ebp+0x18) 1)
16229
16230
16231 $populate-mu-function-header:error-addr-output:
16232
16233 (write-buffered *(ebp+0x14) "fn ")
16234 50/push-eax
16235 (lookup *edi *(edi+4))
16236 (write-buffered *(ebp+0x14) %eax)
16237 58/pop-to-eax
16238 (write-buffered *(ebp+0x14) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
16239 (flush *(ebp+0x14))
16240 (stop *(ebp+0x18) 1)
16241
16242
16243 $populate-mu-function-header:error-nested-addr-inout:
16244
16245 (write-buffered *(ebp+0x14) "fn ")
16246 (lookup *edi *(edi+4))
16247 (write-buffered *(ebp+0x14) %eax)
16248 (write-buffered *(ebp+0x14) ": inout '")
16249 (lookup *ebx *(ebx+4))
16250 (lookup *eax *(eax+4))
16251 (write-buffered *(ebp+0x14) %eax)
16252 (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")
16253 (flush *(ebp+0x14))
16254 (stop *(ebp+0x18) 1)
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266 populate-mu-function-signature:
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292 55/push-ebp
16293 89/<- %ebp 4/r32/esp
16294
16295 50/push-eax
16296 51/push-ecx
16297 52/push-edx
16298 53/push-ebx
16299 57/push-edi
16300
16301 8b/-> *(ebp+0xc) 7/r32/edi
16302
16303 68/push 0/imm32/end
16304 68/push 0/imm32/start
16305 89/<- %ecx 4/r32/esp
16306
16307 68/push 0/imm32
16308 68/push 0/imm32
16309 89/<- %ebx 4/r32/esp
16310
16311 (next-mu-token *(ebp+8) %ecx)
16312
16313
16314 (slice-equal? %ecx "{")
16315 3d/compare-eax-and 0/imm32/false
16316 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16317
16318 (slice-equal? %ecx "->")
16319 3d/compare-eax-and 0/imm32/false
16320 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16321
16322 (slice-equal? %ecx "}")
16323 3d/compare-eax-and 0/imm32/false
16324 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16325
16326 (function-exists? %ecx)
16327 3d/compare-eax-and 0/imm32/false
16328 0f 85/jump-if-!= $populate-mu-function-signature:error-duplicate/disp32
16329
16330 (slice-starts-with? %ecx "break")
16331 3d/compare-eax-and 0/imm32/false
16332 0f 85/jump-if-!= $populate-mu-function-signature:error-break/disp32
16333 (slice-starts-with? %ecx "loop")
16334 3d/compare-eax-and 0/imm32/false
16335 0f 85/jump-if-!= $populate-mu-function-signature:error-loop/disp32
16336
16337 (slice-to-string Heap %ecx %edi)
16338
16339 {
16340 $populate-mu-function-signature:check-for-inout:
16341 (next-mu-token *(ebp+8) %ecx)
16342 (slice-empty? %ecx)
16343 3d/compare-eax-and 0/imm32/false
16344 0f 85/jump-if-!= break/disp32
16345
16346 (slice-equal? %ecx "->")
16347 3d/compare-eax-and 0/imm32/false
16348 0f 85/jump-if-!= break/disp32
16349
16350 (slice-equal? %ecx "{")
16351 3d/compare-eax-and 0/imm32/false
16352 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16353
16354 (slice-equal? %ecx "}")
16355 3d/compare-eax-and 0/imm32/false
16356 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16357
16358 (lookup *edi *(edi+4))
16359 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
16360
16361
16362 (lookup *ebx *(ebx+4))
16363 81 7/subop/compare *(eax+0x18) 0/imm32
16364 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
16365
16366
16367 {
16368 (lookup *edi *(edi+4))
16369 (string-equal? %eax "main")
16370 3d/compare-eax-and 0/imm32/false
16371 75/jump-if-!= break/disp8
16372 (lookup *ebx *(ebx+4))
16373 (addr-payload-contains-addr? %eax)
16374 3d/compare-eax-and 0/imm32/false
16375 0f 85/jump-if-!= $populate-mu-function-signature:error-nested-addr-inout/disp32
16376 }
16377
16378
16379 (lookup *ebx *(ebx+4))
16380 81 7/subop/compare *(eax+0x18) 0/imm32
16381 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
16382
16383
16384
16385 8d/copy-address *(edi+8) 0/r32/eax
16386 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
16387
16388 e9/jump loop/disp32
16389 }
16390
16391 {
16392 $populate-mu-function-signature:check-for-out:
16393 (next-mu-token *(ebp+8) %ecx)
16394 (slice-empty? %ecx)
16395 3d/compare-eax-and 0/imm32/false
16396 0f 85/jump-if-!= break/disp32
16397
16398 (slice-equal? %ecx "{")
16399 3d/compare-eax-and 0/imm32/false
16400 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16401
16402 (slice-equal? %ecx "->")
16403 3d/compare-eax-and 0/imm32/false
16404 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16405
16406 (slice-equal? %ecx "}")
16407 3d/compare-eax-and 0/imm32/false
16408 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
16409
16410 (lookup *edi *(edi+4))
16411 (parse-var-with-type %ecx *(ebp+8) %ebx %eax *(ebp+0x10) *(ebp+0x14))
16412
16413
16414 (lookup *ebx *(ebx+4))
16415 81 7/subop/compare *(eax+0x18) 0/imm32
16416 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
16417
16418 (lookup *eax *(eax+4))
16419 (string-equal? %eax "_")
16420 3d/compare-eax-and 0/imm32/false
16421 0f 84/jump-if-= $populate-mu-function-signature:error4/disp32
16422
16423
16424 {
16425 (lookup *edi *(edi+4))
16426 (string-equal? %eax "lookup")
16427 3d/compare-eax-and 0/imm32/false
16428 75/jump-if-!= break/disp8
16429 (lookup *ebx *(ebx+4))
16430 (lookup *(eax+8) *(eax+0xc))
16431 (mu-addr-type? %eax)
16432 3d/compare-eax-and 0/imm32/false
16433 0f 85/jump-if-!= $populate-mu-function-signature:error-addr-output/disp32
16434 }
16435
16436 8d/copy-address *(edi+0x10) 0/r32/eax
16437 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
16438
16439 e9/jump loop/disp32
16440 }
16441 $populate-mu-function-signature:done:
16442 (check-no-tokens-left *(ebp+8))
16443 $populate-mu-function-signature:end:
16444
16445 81 0/subop/add %esp 0x10/imm32
16446
16447 5f/pop-to-edi
16448 5b/pop-to-ebx
16449 5a/pop-to-edx
16450 59/pop-to-ecx
16451 58/pop-to-eax
16452
16453 89/<- %esp 5/r32/ebp
16454 5d/pop-to-ebp
16455 c3/return
16456
16457 $populate-mu-function-signature:error1:
16458
16459 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
16460 (flush *(ebp+0x10))
16461 (rewind-stream *(ebp+8))
16462 (write-stream-data *(ebp+0x10) *(ebp+8))
16463 (write-buffered *(ebp+0x10) "'\n")
16464 (flush *(ebp+0x10))
16465 (stop *(ebp+0x14) 1)
16466
16467
16468 $populate-mu-function-signature:error2:
16469
16470 (write-buffered *(ebp+0x10) "fn ")
16471 50/push-eax
16472 (lookup *edi *(edi+4))
16473 (write-buffered *(ebp+0x10) %eax)
16474 58/pop-to-eax
16475 (write-buffered *(ebp+0x10) ": function inout '")
16476 (lookup *eax *(eax+4))
16477 (write-buffered *(ebp+0x10) %eax)
16478 (write-buffered *(ebp+0x10) "' cannot be in a register")
16479 (flush *(ebp+0x10))
16480 (stop *(ebp+0x14) 1)
16481
16482
16483 $populate-mu-function-signature:error3:
16484
16485 (write-buffered *(ebp+0x10) "fn ")
16486 50/push-eax
16487 (lookup *edi *(edi+4))
16488 (write-buffered *(ebp+0x10) %eax)
16489 58/pop-to-eax
16490 (write-buffered *(ebp+0x10) ": function output '")
16491 (lookup *ebx *(ebx+4))
16492 (lookup *eax *(eax+4))
16493 (write-buffered *(ebp+0x10) %eax)
16494 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
16495 (rewind-stream *(ebp+8))
16496 (write-stream-data *(ebp+0x10) *(ebp+8))
16497 (write-buffered *(ebp+0x10) "'\n")
16498 (flush *(ebp+0x10))
16499 (stop *(ebp+0x14) 1)
16500
16501
16502 $populate-mu-function-signature:error4:
16503
16504 (write-buffered *(ebp+0x10) "fn ")
16505 50/push-eax
16506 (lookup *edi *(edi+4))
16507 (write-buffered *(ebp+0x10) %eax)
16508 58/pop-to-eax
16509 (write-buffered *(ebp+0x10) ": function outputs cannot be named; rename '")
16510 (lookup *ebx *(ebx+4))
16511 (lookup *eax *(eax+4))
16512 (write-buffered *(ebp+0x10) %eax)
16513 (write-buffered *(ebp+0x10) "' in the header to '_'\n")
16514 (flush *(ebp+0x10))
16515 (stop *(ebp+0x14) 1)
16516
16517
16518 $populate-mu-function-signature:error-duplicate:
16519 (write-buffered *(ebp+0x10) "fn ")
16520 (write-slice-buffered *(ebp+0x10) %ecx)
16521 (write-buffered *(ebp+0x10) " defined more than once\n")
16522 (flush *(ebp+0x10))
16523 (stop *(ebp+0x14) 1)
16524
16525
16526 $populate-mu-function-signature:error-break:
16527 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'break' for now. Please contact mu@akkartik.com.\n")
16528 (flush *(ebp+0x10))
16529 (stop *(ebp+0x14) 1)
16530
16531
16532 $populate-mu-function-signature:error-loop:
16533 (write-buffered *(ebp+0x10) "Sorry, I've reserved all function names starting with 'loop' for now. Please contact mu@akkartik.com.\n")
16534 (flush *(ebp+0x10))
16535 (stop *(ebp+0x14) 1)
16536
16537
16538 $populate-mu-function-signature:error-addr-output:
16539
16540 (write-buffered *(ebp+0x10) "fn ")
16541 50/push-eax
16542 (lookup *edi *(edi+4))
16543 (write-buffered *(ebp+0x10) %eax)
16544 58/pop-to-eax
16545 (write-buffered *(ebp+0x10) ": output cannot have an addr type; that could allow unsafe addresses to escape the function\n")
16546 (flush *(ebp+0x10))
16547 (stop *(ebp+0x14) 1)
16548
16549
16550 $populate-mu-function-signature:error-nested-addr-inout:
16551
16552 (write-buffered *(ebp+0x10) "fn ")
16553 (lookup *edi *(edi+4))
16554 (write-buffered *(ebp+0x10) %eax)
16555 (write-buffered *(ebp+0x10) ": inout '")
16556 (lookup *ebx *(ebx+4))
16557 (lookup *eax *(eax+4))
16558 (write-buffered *(ebp+0x10) %eax)
16559 (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")
16560 (flush *(ebp+0x10))
16561 (stop *(ebp+0x14) 1)
16562
16563
16564 addr-payload-contains-addr?:
16565
16566 55/push-ebp
16567 89/<- %ebp 4/r32/esp
16568
16569 8b/-> *(ebp+8) 0/r32/eax
16570 (lookup *(eax+8) *(eax+0xc))
16571
16572 (lookup *(eax+0xc) *(eax+0x10))
16573 (type-tree-contains? %eax 2)
16574
16575 $addr-payload-contains-addr?:end:
16576
16577 89/<- %esp 5/r32/ebp
16578 5d/pop-to-ebp
16579 c3/return
16580
16581 type-tree-contains?:
16582
16583 55/push-ebp
16584 89/<- %ebp 4/r32/esp
16585
16586 51/push-ecx
16587
16588 8b/-> *(ebp+8) 0/r32/eax
16589 3d/compare-eax-and 0/imm32
16590 0f 84/jump-if-= $type-tree-contains?:end/disp32
16591
16592 81 7/subop/compare *eax 0/imm32/false
16593 {
16594 74/jump-if-= break/disp8
16595 8b/-> *(ebp+0xc) 1/r32/ecx
16596 39/compare *(eax+4) 1/r32/ecx
16597 0f 94/set-if-= %al
16598 81 4/subop/and %eax 0xff/imm32
16599 eb/jump $type-tree-contains?:end/disp8
16600 }
16601
16602 (lookup *(eax+4) *(eax+8))
16603 (type-tree-contains? %eax *(ebp+0xc))
16604 3d/compare-eax-and 0/imm32/false
16605 75/jump-if-!= $type-tree-contains?:end/disp8
16606
16607 8b/-> *(ebp+8) 0/r32/eax
16608 (lookup *(eax+0xc) *(eax+0x10))
16609 (type-tree-contains? %eax *(ebp+0xc))
16610 $type-tree-contains?:end:
16611
16612 59/pop-to-ecx
16613
16614 89/<- %esp 5/r32/ebp
16615 5d/pop-to-ebp
16616 c3/return
16617
16618 function-exists?:
16619
16620 55/push-ebp
16621 89/<- %ebp 4/r32/esp
16622
16623 51/push-ecx
16624
16625 (lookup *_Program-functions *_Program-functions->payload)
16626 89/<- %ecx 0/r32/eax
16627 {
16628
16629 81 7/subop/compare %ecx 0/imm32
16630 74/jump-if-= break/disp8
16631
16632 {
16633 (lookup *ecx *(ecx+4))
16634 (slice-equal? *(ebp+8) %eax)
16635 3d/compare-eax-and 0/imm32/false
16636 74/jump-if-= break/disp8
16637 b8/copy-to-eax 1/imm32/true
16638 e9/jump $function-exists?:end/disp32
16639 }
16640
16641 (lookup *(ecx+0x20) *(ecx+0x24))
16642 89/<- %ecx 0/r32/eax
16643
16644 eb/jump loop/disp8
16645 }
16646
16647 (lookup *_Program-signatures *_Program-signatures->payload)
16648 89/<- %ecx 0/r32/eax
16649 {
16650
16651 81 7/subop/compare %ecx 0/imm32
16652 74/jump-if-= break/disp8
16653
16654 {
16655 (lookup *ecx *(ecx+4))
16656 (slice-equal? *(ebp+8) %eax)
16657 3d/compare-eax-and 0/imm32/false
16658 74/jump-if-= break/disp8
16659 b8/copy-to-eax 1/imm32/true
16660 eb/jump $function-exists?:end/disp8
16661 }
16662
16663 (lookup *(ecx+0x20) *(ecx+0x24))
16664 89/<- %ecx 0/r32/eax
16665
16666 eb/jump loop/disp8
16667 }
16668
16669 b8/copy-to-eax 0/imm32/false
16670 $function-exists?:end:
16671
16672 59/pop-to-ecx
16673
16674 89/<- %esp 5/r32/ebp
16675 5d/pop-to-ebp
16676 c3/return
16677
16678 test-function-header-with-arg:
16679
16680 55/push-ebp
16681 89/<- %ebp 4/r32/esp
16682
16683 8b/-> *Primitive-type-ids 0/r32/eax
16684 89/<- *Type-id 0/r32/eax
16685 c7 0/subop/copy *_Program-functions 0/imm32
16686 c7 0/subop/copy *_Program-functions->payload 0/imm32
16687 c7 0/subop/copy *_Program-types 0/imm32
16688 c7 0/subop/copy *_Program-types->payload 0/imm32
16689 c7 0/subop/copy *_Program-signatures 0/imm32
16690 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16691 (clear-stream _test-input-stream)
16692 (write _test-input-stream "foo n: int {\n")
16693
16694 2b/subtract *Function-size 4/r32/esp
16695 89/<- %ecx 4/r32/esp
16696 (zero-out %ecx *Function-size)
16697
16698 81 5/subop/subtract %esp 0xc0/imm32
16699 68/push 0xc0/imm32/size
16700 68/push 0/imm32/top
16701 89/<- %ebx 4/r32/esp
16702
16703 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
16704
16705 (lookup *ecx *(ecx+4))
16706 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
16707
16708 (lookup *(ecx+8) *(ecx+0xc))
16709 (lookup *eax *(eax+4))
16710 89/<- %edx 0/r32/eax
16711
16712 (lookup *edx *(edx+4))
16713 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
16714
16715 (lookup *(edx+8) *(edx+0xc))
16716 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
16717 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
16718 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
16719
16720 89/<- %esp 5/r32/ebp
16721 5d/pop-to-ebp
16722 c3/return
16723
16724 test-function-header-with-multiple-args:
16725
16726 55/push-ebp
16727 89/<- %ebp 4/r32/esp
16728
16729 8b/-> *Primitive-type-ids 0/r32/eax
16730 89/<- *Type-id 0/r32/eax
16731 c7 0/subop/copy *_Program-functions 0/imm32
16732 c7 0/subop/copy *_Program-functions->payload 0/imm32
16733 c7 0/subop/copy *_Program-types 0/imm32
16734 c7 0/subop/copy *_Program-types->payload 0/imm32
16735 c7 0/subop/copy *_Program-signatures 0/imm32
16736 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16737 (clear-stream _test-input-stream)
16738 (write _test-input-stream "foo a: int, b: int c: int {\n")
16739
16740 2b/subtract *Function-size 4/r32/esp
16741 89/<- %ecx 4/r32/esp
16742 (zero-out %ecx *Function-size)
16743
16744 81 5/subop/subtract %esp 0xc0/imm32
16745 68/push 0xc0/imm32/size
16746 68/push 0/imm32/top
16747 89/<- %ebx 4/r32/esp
16748
16749 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
16750
16751 (lookup *ecx *(ecx+4))
16752 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
16753
16754 (lookup *(ecx+8) *(ecx+0xc))
16755 89/<- %edx 0/r32/eax
16756 $test-function-header-with-multiple-args:inout0:
16757
16758 (lookup *edx *(edx+4))
16759 89/<- %ebx 0/r32/eax
16760
16761 (lookup *ebx *(ebx+4))
16762 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
16763
16764 (lookup *(ebx+8) *(ebx+0xc))
16765 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
16766 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
16767 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
16768 $test-function-header-with-multiple-args:inout1:
16769
16770 (lookup *(edx+8) *(edx+0xc))
16771 89/<- %edx 0/r32/eax
16772
16773 (lookup *edx *(edx+4))
16774 89/<- %ebx 0/r32/eax
16775
16776 (lookup *ebx *(ebx+4))
16777 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
16778
16779 (lookup *(ebx+8) *(ebx+0xc))
16780 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
16781 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
16782 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
16783 $test-function-header-with-multiple-args:inout2:
16784
16785 (lookup *(edx+8) *(edx+0xc))
16786 89/<- %edx 0/r32/eax
16787
16788 (lookup *edx *(edx+4))
16789 89/<- %ebx 0/r32/eax
16790
16791 (lookup *ebx *(ebx+4))
16792 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
16793
16794 (lookup *(ebx+8) *(ebx+0xc))
16795 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
16796 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
16797 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
16798
16799 89/<- %esp 5/r32/ebp
16800 5d/pop-to-ebp
16801 c3/return
16802
16803 test-function-header-with-multiple-args-and-outputs:
16804
16805 55/push-ebp
16806 89/<- %ebp 4/r32/esp
16807
16808 8b/-> *Primitive-type-ids 0/r32/eax
16809 89/<- *Type-id 0/r32/eax
16810 c7 0/subop/copy *_Program-functions 0/imm32
16811 c7 0/subop/copy *_Program-functions->payload 0/imm32
16812 c7 0/subop/copy *_Program-types 0/imm32
16813 c7 0/subop/copy *_Program-types->payload 0/imm32
16814 c7 0/subop/copy *_Program-signatures 0/imm32
16815 c7 0/subop/copy *_Program-signatures->payload 0/imm32
16816 (clear-stream _test-input-stream)
16817 (write _test-input-stream "foo a: int, b: int, c: int -> _/ecx: int _/edx: int {\n")
16818
16819 2b/subtract *Function-size 4/r32/esp
16820 89/<- %ecx 4/r32/esp
16821 (zero-out %ecx *Function-size)
16822
16823 81 5/subop/subtract %esp 0xc0/imm32
16824 68/push 0xc0/imm32/size
16825 68/push 0/imm32/top
16826 89/<- %ebx 4/r32/esp
16827
16828 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
16829
16830 (lookup *ecx *(ecx+4))
16831 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
16832
16833 (lookup *(ecx+8) *(ecx+0xc))
16834 89/<- %edx 0/r32/eax
16835 $test-function-header-with-multiple-args-and-outputs:inout0:
16836
16837 (lookup *edx *(edx+4))
16838 89/<- %ebx 0/r32/eax
16839
16840 (lookup *ebx *(ebx+4))
16841 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
16842
16843 (lookup *(ebx+8) *(ebx+0xc))
16844 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
16845 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
16846 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
16847 $test-function-header-with-multiple-args-and-outputs:inout1:
16848
16849 (lookup *(edx+8) *(edx+0xc))
16850 89/<- %edx 0/r32/eax
16851
16852 (lookup *edx *(edx+4))
16853 89/<- %ebx 0/r32/eax
16854
16855 (lookup *ebx *(ebx+4))
16856 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
16857
16858 (lookup *(ebx+8) *(ebx+0xc))
16859 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
16860 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
16861 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
16862 $test-function-header-with-multiple-args-and-outputs:inout2:
16863
16864 (lookup *(edx+8) *(edx+0xc))
16865 89/<- %edx 0/r32/eax
16866
16867 (lookup *edx *(edx+4))
16868 89/<- %ebx 0/r32/eax
16869
16870 (lookup *ebx *(ebx+4))
16871 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
16872
16873 (lookup *(ebx+8) *(ebx+0xc))
16874 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
16875 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
16876 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
16877 $test-function-header-with-multiple-args-and-outputs:out0:
16878
16879 (lookup *(ecx+0x10) *(ecx+0x14))
16880 89/<- %edx 0/r32/eax
16881
16882 (lookup *edx *(edx+4))
16883 89/<- %ebx 0/r32/eax
16884
16885 (lookup *ebx *(ebx+4))
16886 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:0")
16887
16888 (lookup *(ebx+0x18) *(ebx+0x1c))
16889 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
16890
16891 (lookup *(ebx+8) *(ebx+0xc))
16892 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
16893 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
16894 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
16895 $test-function-header-with-multiple-args-and-outputs:out1:
16896
16897 (lookup *(edx+8) *(edx+0xc))
16898 89/<- %edx 0/r32/eax
16899
16900 (lookup *edx *(edx+4))
16901 89/<- %ebx 0/r32/eax
16902
16903 (lookup *ebx *(ebx+4))
16904 (check-strings-equal %eax "_" "F - test-function-header-with-multiple-args-and-outputs/output:1")
16905
16906 (lookup *(ebx+0x18) *(ebx+0x1c))
16907 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
16908
16909 (lookup *(ebx+8) *(ebx+0xc))
16910 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
16911 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
16912 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
16913
16914 89/<- %esp 5/r32/ebp
16915 5d/pop-to-ebp
16916 c3/return
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926 parse-var-with-type:
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943 55/push-ebp
16944 89/<- %ebp 4/r32/esp
16945
16946 50/push-eax
16947 51/push-ecx
16948 52/push-edx
16949 53/push-ebx
16950 56/push-esi
16951 57/push-edi
16952
16953 8b/-> *(ebp+8) 6/r32/esi
16954
16955 8b/-> *(esi+4) 1/r32/ecx
16956 49/decrement-ecx
16957 8a/copy-byte *ecx 1/r32/CL
16958 81 4/subop/and %ecx 0xff/imm32
16959 81 7/subop/compare %ecx 0x3a/imm32/colon
16960 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
16961
16962 ff 1/subop/decrement *(esi+4)
16963
16964 68/push 0/imm32/end
16965 68/push 0/imm32/start
16966 89/<- %ecx 4/r32/esp
16967 $parse-var-with-type:parse-name:
16968 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
16969 $parse-var-with-type:create-var:
16970
16971 (new-var-from-slice Heap %ecx *(ebp+0x10))
16972
16973 $parse-var-with-type:save-register:
16974
16975 8b/-> *(ebp+0x10) 7/r32/edi
16976 (lookup *edi *(edi+4))
16977 89/<- %edi 0/r32/eax
16978
16979 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
16980
16981 {
16982 $parse-var-with-type:write-register:
16983 (slice-empty? %ecx)
16984 3d/compare-eax-and 0/imm32/false
16985 75/jump-if-!= break/disp8
16986
16987 8d/copy-address *(edi+0x18) 0/r32/eax
16988 (slice-to-string Heap %ecx %eax)
16989 }
16990 $parse-var-with-type:save-type:
16991 8d/copy-address *(edi+8) 0/r32/eax
16992 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x18) *(ebp+0x1c))
16993 $parse-var-with-type:check-register:
16994 (lookup *(edi+0x18) *(edi+0x1c))
16995 3d/compare-eax-and 0/imm32
16996 74/jump-if-= $parse-var-with-type:end/disp8
16997 (float-register? %eax)
16998 {
16999 3d/compare-eax-and 0/imm32/false
17000 74/jump-if-= break/disp8
17001
17002 (lookup *(edi+8) *(edi+0xc))
17003 (simple-mu-type? %eax 0xf)
17004 3d/compare-eax-and 0/imm32/false
17005 0f 84/jump-if-= $parse-var-with-type:error-non-float-in-floating-point-register/disp32
17006 eb/jump $parse-var-with-type:end/disp8
17007 }
17008
17009 (lookup *(edi+8) *(edi+0xc))
17010 (simple-mu-type? %eax 0xf)
17011 3d/compare-eax-and 0/imm32/false
17012 0f 85/jump-if-!= $parse-var-with-type:error-float-in-integer-register/disp32
17013 $parse-var-with-type:end:
17014
17015 81 0/subop/add %esp 8/imm32
17016
17017 5f/pop-to-edi
17018 5e/pop-to-esi
17019 5b/pop-to-ebx
17020 5a/pop-to-edx
17021 59/pop-to-ecx
17022 58/pop-to-eax
17023
17024 89/<- %esp 5/r32/ebp
17025 5d/pop-to-ebp
17026 c3/return
17027
17028 $parse-var-with-type:abort:
17029
17030 (write-buffered *(ebp+0x18) "fn ")
17031 (write-buffered *(ebp+0x18) *(ebp+0x14))
17032 (write-buffered *(ebp+0x18) ": var should have form 'name: type' in '")
17033 (flush *(ebp+0x18))
17034 (rewind-stream *(ebp+0xc))
17035 (write-stream-data *(ebp+0x18) *(ebp+0xc))
17036 (write-buffered *(ebp+0x18) "'\n")
17037 (flush *(ebp+0x18))
17038 (stop *(ebp+0x1c) 1)
17039
17040
17041 $parse-var-with-type:error-float-in-integer-register:
17042
17043 (write-buffered *(ebp+0x18) "fn ")
17044 (write-buffered *(ebp+0x18) *(ebp+0x14))
17045 (write-buffered *(ebp+0x18) ": float var '")
17046 (lookup *edi *(edi+4))
17047 (write-buffered *(ebp+0x18) %eax)
17048 (write-buffered *(ebp+0x18) "' should be in a floating-point register\n")
17049 (flush *(ebp+0x18))
17050 (stop *(ebp+0x1c) 1)
17051
17052
17053 $parse-var-with-type:error-non-float-in-floating-point-register:
17054
17055 (write-buffered *(ebp+0x18) "fn ")
17056 (write-buffered *(ebp+0x18) *(ebp+0x14))
17057 (write-buffered *(ebp+0x18) ": non-float var '")
17058 (lookup *edi *(edi+4))
17059 (write-buffered *(ebp+0x18) %eax)
17060 (write-buffered *(ebp+0x18) "' should be in an integer register\n")
17061 (flush *(ebp+0x18))
17062 (stop *(ebp+0x1c) 1)
17063
17064
17065 float-register?:
17066
17067 55/push-ebp
17068 89/<- %ebp 4/r32/esp
17069
17070 (get Mu-registers-unique *(ebp+8) 0xc "Mu-registers-unique")
17071 81 7/subop/compare *eax 8/imm32/start-of-floating-point-registers
17072 0f 9d/set-if->= %al
17073 81 4/subop/and %eax 0xff/imm32
17074 $float-register?:end:
17075
17076 89/<- %esp 5/r32/ebp
17077 5d/pop-to-ebp
17078 c3/return
17079
17080 parse-type:
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103 55/push-ebp
17104 89/<- %ebp 4/r32/esp
17105
17106 50/push-eax
17107 51/push-ecx
17108 52/push-edx
17109
17110 (zero-out *(ebp+0x10) *Handle-size)
17111
17112 68/push 0/imm32
17113 68/push 0/imm32
17114 89/<- %ecx 4/r32/esp
17115
17116 (next-mu-token *(ebp+0xc) %ecx)
17117
17118
17119
17120
17121
17122 (slice-equal? %ecx "")
17123 3d/compare-eax-and 0/imm32/false
17124 0f 85/jump-if-!= $parse-type:abort/disp32
17125
17126 (slice-equal? %ecx "{")
17127 3d/compare-eax-and 0/imm32/false
17128 0f 85/jump-if-!= $parse-type:abort/disp32
17129
17130 (slice-equal? %ecx "}")
17131 3d/compare-eax-and 0/imm32/false
17132 0f 85/jump-if-!= $parse-type:abort/disp32
17133
17134 (slice-equal? %ecx "->")
17135 3d/compare-eax-and 0/imm32/false
17136 0f 85/jump-if-!= $parse-type:abort/disp32
17137
17138 (slice-equal? %ecx ")")
17139 3d/compare-eax-and 0/imm32/false
17140 0f 85/jump-if-!= $parse-type:end/disp32
17141
17142 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
17143
17144 8b/-> *(ebp+0x10) 2/r32/edx
17145 (lookup *edx *(edx+4))
17146 89/<- %edx 0/r32/eax
17147 {
17148
17149 (slice-equal? %ecx "(")
17150 3d/compare-eax-and 0/imm32/false
17151 0f 85/jump-if-!= break/disp32
17152
17153 {
17154 $parse-type:check-for-int:
17155
17156 8b/-> *ecx 0/r32/eax
17157 8a/copy-byte *eax 0/r32/AL
17158 81 4/subop/and %eax 0xff/imm32
17159
17160 (decimal-digit? %eax)
17161 3d/compare-eax-and 0/imm32/false
17162 74/jump-if-= break/disp8
17163 $parse-type:int:
17164
17165 (next-token-from-slice *ecx *(ecx+4) 0x2f %ecx)
17166
17167 (check-mu-hex-int %ecx *(ebp+0x14) *(ebp+0x18))
17168 (parse-hex-int-from-slice %ecx)
17169 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
17170 89/<- *(edx+8) 0/r32/eax
17171 e9/jump $parse-type:end/disp32
17172 }
17173 $parse-type:atom:
17174
17175 c7 0/subop/copy *edx 1/imm32/true
17176 {
17177 $parse-type:check-for-type-parameter:
17178
17179 8b/-> *ecx 0/r32/eax
17180 8a/copy-byte *eax 0/r32/AL
17181 81 4/subop/and %eax 0xff/imm32
17182
17183 3d/compare-eax-and 0x5f/imm32/_
17184 75/jump-if-!= break/disp8
17185 $parse-type:type-parameter:
17186
17187 c7 0/subop/copy *(edx+4) 0xa/imm32/type-parameter
17188
17189 8d/copy-address *(edx+8) 0/r32/eax
17190 (slice-to-string *(ebp+8) %ecx %eax)
17191 e9/jump $parse-type:end/disp32
17192 }
17193 $parse-type:non-type-parameter:
17194
17195 (pos-or-insert-slice Type-id %ecx)
17196 89/<- *(edx+4) 0/r32/eax
17197 e9/jump $parse-type:end/disp32
17198 }
17199 $parse-type:non-atom:
17200
17201
17202 8d/copy-address *(edx+4) 0/r32/eax
17203 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17204
17205 8d/copy-address *(edx+0xc) 0/r32/eax
17206 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17207 $parse-type:end:
17208
17209 81 0/subop/add %esp 8/imm32
17210
17211 5a/pop-to-edx
17212 59/pop-to-ecx
17213 58/pop-to-eax
17214
17215 89/<- %esp 5/r32/ebp
17216 5d/pop-to-ebp
17217 c3/return
17218
17219 $parse-type:abort:
17220
17221 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
17222 (write-slice-buffered *(ebp+0x14) %ecx)
17223 (write-buffered *(ebp+0x14) "'\n")
17224 (flush *(ebp+0x14))
17225 (stop *(ebp+0x18) 1)
17226
17227
17228 parse-type-tree:
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238 55/push-ebp
17239 89/<- %ebp 4/r32/esp
17240
17241 50/push-eax
17242 51/push-ecx
17243 52/push-edx
17244
17245 (zero-out *(ebp+0x10) *Handle-size)
17246
17247 68/push 0/imm32
17248 68/push 0/imm32
17249 89/<- %ecx 4/r32/esp
17250
17251 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
17252
17253 81 7/subop/compare *ecx 0/imm32
17254 74/jump-if-= $parse-type-tree:end/disp8
17255
17256 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
17257
17258 8b/-> *(ebp+0x10) 2/r32/edx
17259 (lookup *edx *(edx+4))
17260 89/<- %edx 0/r32/eax
17261
17262 8b/-> *ecx 0/r32/eax
17263 89/<- *(edx+4) 0/r32/eax
17264 8b/-> *(ecx+4) 0/r32/eax
17265 89/<- *(edx+8) 0/r32/eax
17266
17267 8d/copy-address *(edx+0xc) 0/r32/eax
17268 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
17269 $parse-type-tree:end:
17270
17271 81 0/subop/add %esp 8/imm32
17272
17273 5a/pop-to-edx
17274 59/pop-to-ecx
17275 58/pop-to-eax
17276
17277 89/<- %esp 5/r32/ebp
17278 5d/pop-to-ebp
17279 c3/return
17280
17281 next-mu-token:
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326 55/push-ebp
17327 89/<- %ebp 4/r32/esp
17328
17329 50/push-eax
17330 51/push-ecx
17331 56/push-esi
17332 57/push-edi
17333
17334 8b/-> *(ebp+8) 6/r32/esi
17335
17336 8b/-> *(ebp+0xc) 7/r32/edi
17337 $next-mu-token:start:
17338 (skip-chars-matching-whitespace %esi)
17339 $next-mu-token:check0:
17340
17341
17342 8b/-> *(esi+4) 1/r32/ecx
17343
17344 3b/compare<- *esi 1/r32/ecx
17345 c7 0/subop/copy *edi 0/imm32
17346 c7 0/subop/copy *(edi+4) 0/imm32
17347 0f 8d/jump-if->= $next-mu-token:end/disp32
17348
17349 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
17350 89/<- *edi 0/r32/eax
17351
17352 31/xor-with %eax 0/r32/eax
17353 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
17354 {
17355 $next-mu-token:check-for-comma:
17356
17357 3d/compare-eax-and 0x2c/imm32/comma
17358 75/jump-if-!= break/disp8
17359
17360 ff 0/subop/increment *(esi+4)
17361
17362 e9/jump $next-mu-token:start/disp32
17363 }
17364 {
17365 $next-mu-token:check-for-comment:
17366
17367 3d/compare-eax-and 0x23/imm32/pound
17368 75/jump-if-!= break/disp8
17369
17370 e9/jump $next-mu-token:done/disp32
17371 }
17372 {
17373 $next-mu-token:check-for-string-literal:
17374
17375 3d/compare-eax-and 0x22/imm32/dquote
17376 75/jump-if-!= break/disp8
17377 (skip-string %esi)
17378
17379 e9/jump $next-mu-token:done/disp32
17380 }
17381 {
17382 $next-mu-token:check-for-open-paren:
17383
17384 3d/compare-eax-and 0x28/imm32/open-paren
17385 75/jump-if-!= break/disp8
17386
17387 ff 0/subop/increment *(esi+4)
17388
17389 e9/jump $next-mu-token:done/disp32
17390 }
17391 {
17392 $next-mu-token:check-for-close-paren:
17393
17394 3d/compare-eax-and 0x29/imm32/close-paren
17395 75/jump-if-!= break/disp8
17396
17397 ff 0/subop/increment *(esi+4)
17398
17399 e9/jump $next-mu-token:done/disp32
17400 }
17401 {
17402 $next-mu-token:regular-word-without-metadata:
17403
17404
17405 8b/-> *(esi+4) 1/r32/ecx
17406
17407 3b/compare<- *esi 1/r32/ecx
17408 7d/jump-if->= break/disp8
17409
17410 31/xor-with %eax 0/r32/eax
17411 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
17412
17413 3d/compare-eax-and 0x20/imm32/space
17414 74/jump-if-= break/disp8
17415
17416 3d/compare-eax-and 0xd/imm32/carriage-return
17417 74/jump-if-= break/disp8
17418
17419 3d/compare-eax-and 0xa/imm32/newline
17420 74/jump-if-= break/disp8
17421
17422 3d/compare-eax-and 0x28/imm32/open-paren
17423 0f 84/jump-if-= break/disp32
17424
17425 3d/compare-eax-and 0x29/imm32/close-paren
17426 0f 84/jump-if-= break/disp32
17427
17428 3d/compare-eax-and 0x2c/imm32/comma
17429 0f 84/jump-if-= break/disp32
17430
17431 ff 0/subop/increment *(esi+4)
17432
17433 e9/jump loop/disp32
17434 }
17435 $next-mu-token:done:
17436
17437 8b/-> *(esi+4) 1/r32/ecx
17438 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
17439 89/<- *(edi+4) 0/r32/eax
17440 $next-mu-token:end:
17441
17442 5f/pop-to-edi
17443 5e/pop-to-esi
17444 59/pop-to-ecx
17445 58/pop-to-eax
17446
17447 89/<- %esp 5/r32/ebp
17448 5d/pop-to-ebp
17449 c3/return
17450
17451 pos-or-insert-slice:
17452
17453 55/push-ebp
17454 89/<- %ebp 4/r32/esp
17455
17456 (pos-slice *(ebp+8) *(ebp+0xc))
17457 3d/compare-eax-and -1/imm32
17458 75/jump-if-!= $pos-or-insert-slice:end/disp8
17459 $pos-or-insert-slice:insert:
17460
17461 68/push 0/imm32
17462 68/push 0/imm32
17463 89/<- %eax 4/r32/esp
17464 (slice-to-string Heap *(ebp+0xc) %eax)
17465
17466 (lookup *eax *(eax+4))
17467 (write-int *(ebp+8) %eax)
17468 (pos-slice *(ebp+8) *(ebp+0xc))
17469 $pos-or-insert-slice:end:
17470
17471 81 0/subop/add %esp 8/imm32
17472
17473 89/<- %esp 5/r32/ebp
17474 5d/pop-to-ebp
17475 c3/return
17476
17477
17478
17479 pos-slice:
17480
17481 55/push-ebp
17482 89/<- %ebp 4/r32/esp
17483
17484 51/push-ecx
17485 52/push-edx
17486 53/push-ebx
17487 56/push-esi
17488
17489
17490
17491
17492
17493 8b/-> *(ebp+8) 6/r32/esi
17494
17495 b9/copy-to-ecx 0/imm32
17496
17497 8d/copy-address *(esi+0xc) 2/r32/edx
17498
17499 8b/-> *esi 3/r32/ebx
17500 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
17501 {
17502
17503
17504
17505
17506
17507 39/compare %edx 3/r32/ebx
17508 b8/copy-to-eax -1/imm32
17509 73/jump-if-addr>= $pos-slice:end/disp8
17510
17511 (slice-equal? *(ebp+0xc) *edx)
17512 3d/compare-eax-and 0/imm32/false
17513 75/jump-if-!= break/disp8
17514
17515 41/increment-ecx
17516
17517 81 0/subop/add %edx 4/imm32
17518
17519 eb/jump loop/disp8
17520 }
17521
17522 89/<- %eax 1/r32/ecx
17523 $pos-slice:end:
17524
17525
17526
17527
17528 5e/pop-to-esi
17529 5b/pop-to-ebx
17530 5a/pop-to-edx
17531 59/pop-to-ecx
17532
17533 89/<- %esp 5/r32/ebp
17534 5d/pop-to-ebp
17535 c3/return
17536
17537 test-parse-var-with-type:
17538
17539 55/push-ebp
17540 89/<- %ebp 4/r32/esp
17541
17542 8b/-> *Primitive-type-ids 0/r32/eax
17543 89/<- *Type-id 0/r32/eax
17544
17545 b8/copy-to-eax "x:"/imm32
17546 8b/-> *eax 1/r32/ecx
17547 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17548 05/add-to-eax 4/imm32
17549
17550 51/push-ecx
17551 50/push-eax
17552 89/<- %ecx 4/r32/esp
17553
17554 (clear-stream _test-input-stream)
17555 (write _test-input-stream "int")
17556
17557 68/push 0/imm32
17558 68/push 0/imm32
17559 89/<- %edx 4/r32/esp
17560
17561 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17562
17563 (lookup *edx *(edx+4))
17564 89/<- %edx 0/r32/eax
17565
17566 (lookup *edx *(edx+4))
17567 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
17568
17569 (lookup *(edx+8) *(edx+0xc))
17570 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
17571 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
17572 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
17573
17574 89/<- %esp 5/r32/ebp
17575 5d/pop-to-ebp
17576 c3/return
17577
17578 test-parse-var-with-type-and-register:
17579
17580 55/push-ebp
17581 89/<- %ebp 4/r32/esp
17582
17583 8b/-> *Primitive-type-ids 0/r32/eax
17584 89/<- *Type-id 0/r32/eax
17585
17586 b8/copy-to-eax "x/eax:"/imm32
17587 8b/-> *eax 1/r32/ecx
17588 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17589 05/add-to-eax 4/imm32
17590
17591 51/push-ecx
17592 50/push-eax
17593 89/<- %ecx 4/r32/esp
17594
17595 (clear-stream _test-input-stream)
17596 (write _test-input-stream "int")
17597
17598 68/push 0/imm32
17599 68/push 0/imm32
17600 89/<- %edx 4/r32/esp
17601
17602 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17603
17604 (lookup *edx *(edx+4))
17605 89/<- %edx 0/r32/eax
17606
17607 (lookup *edx *(edx+4))
17608 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
17609
17610 (lookup *(edx+0x18) *(edx+0x1c))
17611 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
17612
17613 (lookup *(edx+8) *(edx+0xc))
17614 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
17615 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
17616 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
17617
17618 89/<- %esp 5/r32/ebp
17619 5d/pop-to-ebp
17620 c3/return
17621
17622 test-parse-var-with-trailing-characters:
17623
17624 55/push-ebp
17625 89/<- %ebp 4/r32/esp
17626
17627 8b/-> *Primitive-type-ids 0/r32/eax
17628 89/<- *Type-id 0/r32/eax
17629
17630 b8/copy-to-eax "x:"/imm32
17631 8b/-> *eax 1/r32/ecx
17632 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17633 05/add-to-eax 4/imm32
17634
17635 51/push-ecx
17636 50/push-eax
17637 89/<- %ecx 4/r32/esp
17638
17639 (clear-stream _test-input-stream)
17640 (write _test-input-stream "int,")
17641
17642 68/push 0/imm32
17643 68/push 0/imm32
17644 89/<- %edx 4/r32/esp
17645
17646 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17647
17648 (lookup *edx *(edx+4))
17649 89/<- %edx 0/r32/eax
17650
17651 (lookup *edx *(edx+4))
17652 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
17653
17654 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
17655
17656 (lookup *(edx+8) *(edx+0xc))
17657 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
17658 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
17659 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
17660
17661 89/<- %esp 5/r32/ebp
17662 5d/pop-to-ebp
17663 c3/return
17664
17665 test-parse-var-with-register-and-trailing-characters:
17666
17667 55/push-ebp
17668 89/<- %ebp 4/r32/esp
17669
17670 8b/-> *Primitive-type-ids 0/r32/eax
17671 89/<- *Type-id 0/r32/eax
17672
17673 b8/copy-to-eax "x/eax:"/imm32
17674 8b/-> *eax 1/r32/ecx
17675 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17676 05/add-to-eax 4/imm32
17677
17678 51/push-ecx
17679 50/push-eax
17680 89/<- %ecx 4/r32/esp
17681
17682 (clear-stream _test-input-stream)
17683 (write _test-input-stream "int,")
17684
17685 68/push 0/imm32
17686 68/push 0/imm32
17687 89/<- %edx 4/r32/esp
17688
17689 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17690
17691 (lookup *edx *(edx+4))
17692 89/<- %edx 0/r32/eax
17693
17694 (lookup *edx *(edx+4))
17695 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
17696
17697 (lookup *(edx+0x18) *(edx+0x1c))
17698 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
17699
17700 (lookup *(edx+8) *(edx+0xc))
17701 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
17702 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
17703 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
17704
17705 89/<- %esp 5/r32/ebp
17706 5d/pop-to-ebp
17707 c3/return
17708
17709 test-parse-var-with-compound-type:
17710
17711 55/push-ebp
17712 89/<- %ebp 4/r32/esp
17713
17714 8b/-> *Primitive-type-ids 0/r32/eax
17715 89/<- *Type-id 0/r32/eax
17716
17717 b8/copy-to-eax "x:"/imm32
17718 8b/-> *eax 1/r32/ecx
17719 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17720 05/add-to-eax 4/imm32
17721
17722 51/push-ecx
17723 50/push-eax
17724 89/<- %ecx 4/r32/esp
17725
17726 (clear-stream _test-input-stream)
17727 (write _test-input-stream "(addr int)")
17728
17729 68/push 0/imm32
17730 68/push 0/imm32
17731 89/<- %edx 4/r32/esp
17732
17733 (parse-var-with-type %ecx _test-input-stream %edx 0 Stderr 0)
17734
17735 (lookup *edx *(edx+4))
17736 89/<- %edx 0/r32/eax
17737
17738 (lookup *edx *(edx+4))
17739 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
17740
17741 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
17742
17743
17744 (lookup *(edx+8) *(edx+0xc))
17745 89/<- %edx 0/r32/eax
17746
17747 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
17748
17749 (lookup *(edx+4) *(edx+8))
17750 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
17751 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
17752
17753 (lookup *(edx+0xc) *(edx+0x10))
17754 (lookup *(eax+4) *(eax+8))
17755 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
17756 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
17757
17758 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
17759
17760 89/<- %esp 5/r32/ebp
17761 5d/pop-to-ebp
17762 c3/return
17763
17764
17765
17766
17767 identifier?:
17768
17769 55/push-ebp
17770 89/<- %ebp 4/r32/esp
17771
17772 (slice-empty? *(ebp+8))
17773 3d/compare-eax-and 0/imm32/false
17774 75/jump-if-!= $identifier?:false/disp8
17775
17776 8b/-> *(ebp+8) 0/r32/eax
17777 8b/-> *eax 0/r32/eax
17778 8a/copy-byte *eax 0/r32/AL
17779 81 4/subop/and %eax 0xff/imm32
17780
17781 3d/compare-eax-and 0x24/imm32/$
17782 74/jump-if-= $identifier?:true/disp8
17783
17784 3d/compare-eax-and 0x5f/imm32/_
17785 74/jump-if-= $identifier?:true/disp8
17786
17787 25/and-eax-with 0x5f/imm32
17788
17789 3d/compare-eax-and 0x41/imm32/A
17790 7c/jump-if-< $identifier?:false/disp8
17791
17792 3d/compare-eax-and 0x5a/imm32/Z
17793 7f/jump-if-> $identifier?:false/disp8
17794
17795 $identifier?:true:
17796 b8/copy-to-eax 1/imm32/true
17797 eb/jump $identifier?:end/disp8
17798 $identifier?:false:
17799 b8/copy-to-eax 0/imm32/false
17800 $identifier?:end:
17801
17802 89/<- %esp 5/r32/ebp
17803 5d/pop-to-ebp
17804 c3/return
17805
17806 test-is-identifier-dollar:
17807
17808 55/push-ebp
17809 89/<- %ebp 4/r32/esp
17810
17811 b8/copy-to-eax "$a"/imm32
17812 8b/-> *eax 1/r32/ecx
17813 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17814 05/add-to-eax 4/imm32
17815
17816 51/push-ecx
17817 50/push-eax
17818 89/<- %ecx 4/r32/esp
17819
17820 (identifier? %ecx)
17821 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
17822
17823 89/<- %esp 5/r32/ebp
17824 5d/pop-to-ebp
17825 c3/return
17826
17827 test-is-identifier-underscore:
17828
17829 55/push-ebp
17830 89/<- %ebp 4/r32/esp
17831
17832 b8/copy-to-eax "_a"/imm32
17833 8b/-> *eax 1/r32/ecx
17834 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17835 05/add-to-eax 4/imm32
17836
17837 51/push-ecx
17838 50/push-eax
17839 89/<- %ecx 4/r32/esp
17840
17841 (identifier? %ecx)
17842 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
17843
17844 89/<- %esp 5/r32/ebp
17845 5d/pop-to-ebp
17846 c3/return
17847
17848 test-is-identifier-a:
17849
17850 55/push-ebp
17851 89/<- %ebp 4/r32/esp
17852
17853 b8/copy-to-eax "a$"/imm32
17854 8b/-> *eax 1/r32/ecx
17855 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17856 05/add-to-eax 4/imm32
17857
17858 51/push-ecx
17859 50/push-eax
17860 89/<- %ecx 4/r32/esp
17861
17862 (identifier? %ecx)
17863 (check-ints-equal %eax 1 "F - test-is-identifier-a")
17864
17865 89/<- %esp 5/r32/ebp
17866 5d/pop-to-ebp
17867 c3/return
17868
17869 test-is-identifier-z:
17870
17871 55/push-ebp
17872 89/<- %ebp 4/r32/esp
17873
17874 b8/copy-to-eax "z$"/imm32
17875 8b/-> *eax 1/r32/ecx
17876 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17877 05/add-to-eax 4/imm32
17878
17879 51/push-ecx
17880 50/push-eax
17881 89/<- %ecx 4/r32/esp
17882
17883 (identifier? %ecx)
17884 (check-ints-equal %eax 1 "F - test-is-identifier-z")
17885
17886 89/<- %esp 5/r32/ebp
17887 5d/pop-to-ebp
17888 c3/return
17889
17890 test-is-identifier-A:
17891
17892 55/push-ebp
17893 89/<- %ebp 4/r32/esp
17894
17895 b8/copy-to-eax "A$"/imm32
17896 8b/-> *eax 1/r32/ecx
17897 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17898 05/add-to-eax 4/imm32
17899
17900 51/push-ecx
17901 50/push-eax
17902 89/<- %ecx 4/r32/esp
17903
17904 (identifier? %ecx)
17905 (check-ints-equal %eax 1 "F - test-is-identifier-A")
17906
17907 89/<- %esp 5/r32/ebp
17908 5d/pop-to-ebp
17909 c3/return
17910
17911 test-is-identifier-Z:
17912
17913 55/push-ebp
17914 89/<- %ebp 4/r32/esp
17915
17916 b8/copy-to-eax "Z$"/imm32
17917 8b/-> *eax 1/r32/ecx
17918 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17919 05/add-to-eax 4/imm32
17920
17921 51/push-ecx
17922 50/push-eax
17923 89/<- %ecx 4/r32/esp
17924
17925 (identifier? %ecx)
17926 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
17927
17928 89/<- %esp 5/r32/ebp
17929 5d/pop-to-ebp
17930 c3/return
17931
17932 test-is-identifier-at:
17933
17934
17935 55/push-ebp
17936 89/<- %ebp 4/r32/esp
17937
17938 b8/copy-to-eax "@a"/imm32
17939 8b/-> *eax 1/r32/ecx
17940 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17941 05/add-to-eax 4/imm32
17942
17943 51/push-ecx
17944 50/push-eax
17945 89/<- %ecx 4/r32/esp
17946
17947 (identifier? %ecx)
17948 (check-ints-equal %eax 0 "F - test-is-identifier-@")
17949
17950 89/<- %esp 5/r32/ebp
17951 5d/pop-to-ebp
17952 c3/return
17953
17954 test-is-identifier-square-bracket:
17955
17956
17957 55/push-ebp
17958 89/<- %ebp 4/r32/esp
17959
17960 b8/copy-to-eax "[a"/imm32
17961 8b/-> *eax 1/r32/ecx
17962 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17963 05/add-to-eax 4/imm32
17964
17965 51/push-ecx
17966 50/push-eax
17967 89/<- %ecx 4/r32/esp
17968
17969 (identifier? %ecx)
17970 (check-ints-equal %eax 0 "F - test-is-identifier-@")
17971
17972 89/<- %esp 5/r32/ebp
17973 5d/pop-to-ebp
17974 c3/return
17975
17976 test-is-identifier-backtick:
17977
17978
17979 55/push-ebp
17980 89/<- %ebp 4/r32/esp
17981
17982 b8/copy-to-eax "`a"/imm32
17983 8b/-> *eax 1/r32/ecx
17984 8d/copy-address *(eax+ecx+4) 1/r32/ecx
17985 05/add-to-eax 4/imm32
17986
17987 51/push-ecx
17988 50/push-eax
17989 89/<- %ecx 4/r32/esp
17990
17991 (identifier? %ecx)
17992 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
17993
17994 89/<- %esp 5/r32/ebp
17995 5d/pop-to-ebp
17996 c3/return
17997
17998 test-is-identifier-curly-brace-open:
17999
18000
18001 55/push-ebp
18002 89/<- %ebp 4/r32/esp
18003
18004 b8/copy-to-eax "{a"/imm32
18005 8b/-> *eax 1/r32/ecx
18006 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18007 05/add-to-eax 4/imm32
18008
18009 51/push-ecx
18010 50/push-eax
18011 89/<- %ecx 4/r32/esp
18012
18013 (identifier? %ecx)
18014 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
18015
18016 89/<- %esp 5/r32/ebp
18017 5d/pop-to-ebp
18018 c3/return
18019
18020 test-is-identifier-curly-brace-close:
18021
18022 55/push-ebp
18023 89/<- %ebp 4/r32/esp
18024
18025 b8/copy-to-eax "}a"/imm32
18026 8b/-> *eax 1/r32/ecx
18027 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18028 05/add-to-eax 4/imm32
18029
18030 51/push-ecx
18031 50/push-eax
18032 89/<- %ecx 4/r32/esp
18033
18034 (identifier? %ecx)
18035 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
18036
18037 89/<- %esp 5/r32/ebp
18038 5d/pop-to-ebp
18039 c3/return
18040
18041 test-is-identifier-hyphen:
18042
18043
18044 55/push-ebp
18045 89/<- %ebp 4/r32/esp
18046
18047 b8/copy-to-eax "-a"/imm32
18048 8b/-> *eax 1/r32/ecx
18049 8d/copy-address *(eax+ecx+4) 1/r32/ecx
18050 05/add-to-eax 4/imm32
18051
18052 51/push-ecx
18053 50/push-eax
18054 89/<- %ecx 4/r32/esp
18055
18056 (identifier? %ecx)
18057 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
18058
18059 89/<- %esp 5/r32/ebp
18060 5d/pop-to-ebp
18061 c3/return
18062
18063 populate-mu-function-body:
18064
18065 55/push-ebp
18066 89/<- %ebp 4/r32/esp
18067
18068 50/push-eax
18069 56/push-esi
18070 57/push-edi
18071
18072 8b/-> *(ebp+8) 6/r32/esi
18073
18074 8b/-> *(ebp+0xc) 7/r32/edi
18075
18076 c7 0/subop/copy *Curr-block-depth 1/imm32
18077
18078 8d/copy-address *(edi+0x18) 0/r32/eax
18079 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
18080 $populate-mu-function-body:end:
18081
18082 5f/pop-to-edi
18083 5e/pop-to-esi
18084 58/pop-to-eax
18085
18086 89/<- %esp 5/r32/ebp
18087 5d/pop-to-ebp
18088 c3/return
18089
18090
18091 parse-mu-block:
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129 55/push-ebp
18130 89/<- %ebp 4/r32/esp
18131
18132 50/push-eax
18133 51/push-ecx
18134 52/push-edx
18135 53/push-ebx
18136 57/push-edi
18137
18138 81 5/subop/subtract %esp 0x200/imm32
18139 68/push 0x200/imm32/size
18140 68/push 0/imm32/read
18141 68/push 0/imm32/write
18142 89/<- %ecx 4/r32/esp
18143
18144 68/push 0/imm32/end
18145 68/push 0/imm32/start
18146 89/<- %edx 4/r32/esp
18147
18148 (allocate Heap *Stmt-size *(ebp+0x14))
18149
18150 8b/-> *(ebp+0x14) 7/r32/edi
18151 (lookup *edi *(edi+4))
18152 89/<- %edi 0/r32/eax
18153
18154
18155 8d/copy-address *(edi+0xc) 0/r32/eax
18156 (new-block-name *(ebp+0x10) %eax)
18157
18158 (push *(ebp+0xc) *(edi+0xc))
18159 (push *(ebp+0xc) *(edi+0x10))
18160 (push *(ebp+0xc) 0)
18161
18162 ff 0/subop/increment *Curr-block-depth
18163 {
18164 $parse-mu-block:line-loop:
18165
18166 (clear-stream %ecx)
18167 (read-line-buffered *(ebp+8) %ecx)
18168
18169
18170
18171
18172
18173
18174 81 7/subop/compare *ecx 0/imm32
18175 0f 84/jump-if-= break/disp32
18176
18177
18178
18179 (next-mu-token %ecx %edx)
18180
18181
18182
18183
18184
18185 (slice-empty? %edx)
18186 3d/compare-eax-and 0/imm32/false
18187 0f 85/jump-if-!= loop/disp32
18188
18189
18190 8b/-> *edx 0/r32/eax
18191 8a/copy-byte *eax 0/r32/AL
18192 81 4/subop/and %eax 0xff/imm32
18193
18194 3d/compare-eax-and 0x23/imm32/hash
18195 0f 84/jump-if-= loop/disp32
18196
18197 {
18198 $parse-mu-block:check-for-block:
18199 (slice-equal? %edx "{")
18200 3d/compare-eax-and 0/imm32/false
18201 74/jump-if-= break/disp8
18202 (check-no-tokens-left %ecx)
18203
18204
18205 68/push 0/imm32
18206 68/push 0/imm32
18207 89/<- %eax 4/r32/esp
18208
18209 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18210 (append-to-block Heap %edi *eax *(eax+4))
18211
18212 81 0/subop/add %esp 8/imm32
18213
18214 e9/jump $parse-mu-block:line-loop/disp32
18215 }
18216
18217 $parse-mu-block:check-for-end:
18218 (slice-equal? %edx "}")
18219 3d/compare-eax-and 0/imm32/false
18220 0f 85/jump-if-!= break/disp32
18221
18222 {
18223 $parse-mu-block:check-for-named-block:
18224
18225 8b/-> *(edx+4) 0/r32/eax
18226 48/decrement-eax
18227 8a/copy-byte *eax 0/r32/AL
18228 81 4/subop/and %eax 0xff/imm32
18229
18230 3d/compare-eax-and 0x3a/imm32/colon
18231 0f 85/jump-if-!= break/disp32
18232
18233
18234
18235 ff 1/subop/decrement *(edx+4)
18236
18237 68/push 0/imm32
18238 68/push 0/imm32
18239 89/<- %eax 4/r32/esp
18240
18241 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18242 (append-to-block Heap %edi *eax *(eax+4))
18243
18244 81 0/subop/add %esp 8/imm32
18245
18246 e9/jump $parse-mu-block:line-loop/disp32
18247 }
18248
18249 {
18250 $parse-mu-block:check-for-var:
18251 (slice-equal? %edx "var")
18252 3d/compare-eax-and 0/imm32/false
18253 74/jump-if-= break/disp8
18254
18255 68/push 0/imm32
18256 68/push 0/imm32
18257 89/<- %eax 4/r32/esp
18258
18259 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
18260 (append-to-block Heap %edi *eax *(eax+4))
18261
18262 81 0/subop/add %esp 8/imm32
18263
18264 e9/jump $parse-mu-block:line-loop/disp32
18265 }
18266 $parse-mu-block:regular-stmt:
18267
18268
18269 68/push 0/imm32
18270 68/push 0/imm32
18271 89/<- %eax 4/r32/esp
18272
18273 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
18274 (append-to-block Heap %edi *eax *(eax+4))
18275
18276 81 0/subop/add %esp 8/imm32
18277
18278 e9/jump loop/disp32
18279 }
18280 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
18281
18282 ff 1/subop/decrement *Curr-block-depth
18283
18284 (pop *(ebp+0xc))
18285 (pop *(ebp+0xc))
18286 (pop *(ebp+0xc))
18287 $parse-mu-block:end:
18288
18289 81 0/subop/add %esp 0x214/imm32
18290
18291 5f/pop-to-edi
18292 5b/pop-to-ebx
18293 5a/pop-to-edx
18294 59/pop-to-ecx
18295 58/pop-to-eax
18296
18297 89/<- %esp 5/r32/ebp
18298 5d/pop-to-ebp
18299 c3/return
18300
18301 $parse-mu-block:abort:
18302
18303 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
18304 (rewind-stream %ecx)
18305 (write-stream-data *(ebp+0x18) %ecx)
18306 (write-buffered *(ebp+0x18) "'\n")
18307 (flush *(ebp+0x18))
18308 (stop *(ebp+0x1c) 1)
18309
18310
18311 new-block-name:
18312
18313 55/push-ebp
18314 89/<- %ebp 4/r32/esp
18315
18316 50/push-eax
18317 51/push-ecx
18318 52/push-edx
18319
18320 8b/-> *(ebp+8) 0/r32/eax
18321 (lookup *eax *(eax+4))
18322 8b/-> *eax 0/r32/eax
18323 05/add-to-eax 0xd/imm32
18324 89/<- %ecx 0/r32/eax
18325
18326 29/subtract-from %esp 1/r32/ecx
18327 ff 6/subop/push %ecx
18328 68/push 0/imm32/read
18329 68/push 0/imm32/write
18330 89/<- %edx 4/r32/esp
18331 (clear-stream %edx)
18332
18333 8b/-> *(ebp+8) 0/r32/eax
18334 (lookup *eax *(eax+4))
18335
18336 (write %edx "$")
18337 (write %edx %eax)
18338 (write %edx ":")
18339 (write-int32-hex %edx *Next-block-index)
18340 ff 0/subop/increment *Next-block-index
18341
18342
18343 8b/-> *edx 0/r32/eax
18344
18345 8d/copy-address *(edx+0xc) 2/r32/edx
18346
18347 01/add-to %eax 2/r32/edx
18348
18349 ff 6/subop/push %eax
18350 ff 6/subop/push %edx
18351 89/<- %eax 4/r32/esp
18352
18353 (new-literal Heap %eax *(ebp+0xc))
18354
18355
18356
18357
18358
18359
18360
18361 $new-block-name:end:
18362
18363 81 0/subop/add %ecx 0xc/imm32
18364 81 0/subop/add %ecx 8/imm32
18365 01/add-to %esp 1/r32/ecx
18366
18367 5a/pop-to-edx
18368 59/pop-to-ecx
18369 58/pop-to-eax
18370
18371 89/<- %esp 5/r32/ebp
18372 5d/pop-to-ebp
18373 c3/return
18374
18375 check-no-tokens-left:
18376
18377 55/push-ebp
18378 89/<- %ebp 4/r32/esp
18379
18380 50/push-eax
18381 51/push-ecx
18382
18383 68/push 0/imm32/end
18384 68/push 0/imm32/start
18385 89/<- %ecx 4/r32/esp
18386
18387 (next-mu-token *(ebp+8) %ecx)
18388
18389 (slice-empty? %ecx)
18390 3d/compare-eax-and 0/imm32/false
18391 75/jump-if-!= $check-no-tokens-left:end/disp8
18392
18393
18394 8b/-> *edx 0/r32/eax
18395 8a/copy-byte *eax 0/r32/AL
18396 81 4/subop/and %eax 0xff/imm32
18397
18398 3d/compare-eax-and 0x23/imm32/hash
18399 74/jump-if-= $check-no-tokens-left:end/disp8
18400
18401 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
18402 (rewind-stream %ecx)
18403 (write-stream 2 %ecx)
18404 (write-buffered Stderr "'\n")
18405 (flush Stderr)
18406
18407 bb/copy-to-ebx 1/imm32
18408 e8/call syscall_exit/disp32
18409
18410 $check-no-tokens-left:end:
18411
18412 81 0/subop/add %esp 8/imm32
18413
18414 59/pop-to-ecx
18415 58/pop-to-eax
18416
18417 89/<- %esp 5/r32/ebp
18418 5d/pop-to-ebp
18419 c3/return
18420
18421 parse-mu-named-block:
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432 55/push-ebp
18433 89/<- %ebp 4/r32/esp
18434
18435 50/push-eax
18436 51/push-ecx
18437 57/push-edi
18438
18439 68/push 0/imm32
18440 68/push 0/imm32
18441 89/<- %ecx 4/r32/esp
18442
18443 (new-literal Heap *(ebp+8) %ecx)
18444
18445 (push *(ebp+0x10) *ecx)
18446 (push *(ebp+0x10) *(ecx+4))
18447 (push *(ebp+0x10) 0)
18448
18449 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
18450
18451 (pop *(ebp+0x10))
18452 (pop *(ebp+0x10))
18453 (pop *(ebp+0x10))
18454
18455 8b/-> *(ebp+0x18) 7/r32/edi
18456 (lookup *edi *(edi+4))
18457 89/<- %edi 0/r32/eax
18458
18459 c7 0/subop/copy *edi 0/imm32/block
18460
18461 8b/-> *ecx 0/r32/eax
18462 89/<- *(edi+0xc) 0/r32/eax
18463 8b/-> *(ecx+4) 0/r32/eax
18464 89/<- *(edi+0x10) 0/r32/eax
18465 $parse-mu-named-block:end:
18466
18467 81 0/subop/add %esp 8/imm32
18468
18469 5f/pop-to-edi
18470 59/pop-to-ecx
18471 58/pop-to-eax
18472
18473 89/<- %esp 5/r32/ebp
18474 5d/pop-to-ebp
18475 c3/return
18476
18477 parse-mu-var-def:
18478
18479 55/push-ebp
18480 89/<- %ebp 4/r32/esp
18481
18482 50/push-eax
18483 51/push-ecx
18484 52/push-edx
18485 56/push-esi
18486 57/push-edi
18487
18488 8b/-> *(ebp+0x10) 7/r32/edi
18489
18490 68/push 0/imm32/end
18491 68/push 0/imm32/start
18492 89/<- %ecx 4/r32/esp
18493
18494 68/push 0/imm32
18495 68/push 0/imm32
18496 89/<- %edx 4/r32/esp
18497
18498 (next-mu-token *(ebp+8) %ecx)
18499 {
18500
18501 8b/-> *(ebp+0x14) 0/r32/eax
18502 3d/compare-eax-and 0/imm32
18503 74/jump-if-= break/disp8
18504 (lookup *eax *(eax+4))
18505 }
18506 (parse-var-with-type %ecx *(ebp+8) %edx %eax *(ebp+0x18) *(ebp+0x1c))
18507
18508 (lookup *edx *(edx+4))
18509 89/<- %esi 0/r32/eax
18510
18511 8b/-> *Curr-block-depth 0/r32/eax
18512 89/<- *(esi+0x10) 0/r32/eax
18513
18514 81 7/subop/compare *(esi+0x18) 0/imm32
18515 {
18516 75/jump-if-!= break/disp8
18517
18518 (lookup *(esi+8) *(esi+0xc))
18519 (simple-mu-type? %eax 8)
18520 3d/compare-eax-and 0/imm32/false
18521 0f 85/jump-if-!= $parse-mu-var-def:error-byte-on-stack/disp32
18522
18523 (next-mu-token *(ebp+8) %ecx)
18524 (slice-empty? %ecx)
18525 3d/compare-eax-and 0/imm32/false
18526 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
18527
18528 (new-var-def Heap *edx *(edx+4) %edi)
18529 e9/jump $parse-mu-var-def:update-vars/disp32
18530 }
18531
18532 {
18533 0f 84/jump-if-= break/disp32
18534
18535 {
18536 (lookup *(esi+8) *(esi+0xc))
18537 (simple-mu-type? %eax 8)
18538 3d/compare-eax-and 0/imm32/false
18539 74/jump-if-= break/disp8
18540 (lookup *(esi+0x18) *(esi+0x1c))
18541 (string-equal? %eax "esi")
18542 3d/compare-eax-and 0/imm32/false
18543 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
18544 (lookup *(esi+0x18) *(esi+0x1c))
18545 (string-equal? %eax "edi")
18546 3d/compare-eax-and 0/imm32/false
18547 0f 85/jump-if-!= $parse-mu-var-def:error-byte-registers/disp32
18548 }
18549
18550
18551 (next-mu-token *(ebp+8) %ecx)
18552 (slice-equal? %ecx "<-")
18553 3d/compare-eax-and 0/imm32/false
18554 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
18555
18556 (new-reg-var-def Heap *edx *(edx+4) %edi)
18557 (lookup *edi *(edi+4))
18558 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
18559 }
18560 $parse-mu-var-def:update-vars:
18561
18562 (push *(ebp+0xc) *edx)
18563 (push *(ebp+0xc) *(edx+4))
18564 (push *(ebp+0xc) 0)
18565 $parse-mu-var-def:end:
18566
18567 81 0/subop/add %esp 0x10/imm32
18568
18569 5f/pop-to-edi
18570 5e/pop-to-esi
18571 5a/pop-to-edx
18572 59/pop-to-ecx
18573 58/pop-to-eax
18574
18575 89/<- %esp 5/r32/ebp
18576 5d/pop-to-ebp
18577 c3/return
18578
18579 $parse-mu-var-def:error1:
18580 (rewind-stream *(ebp+8))
18581
18582 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
18583 (flush *(ebp+0x18))
18584 (write-stream-data *(ebp+0x18) *(ebp+8))
18585 (write-buffered *(ebp+0x18) "'\n")
18586 (flush *(ebp+0x18))
18587 (stop *(ebp+0x1c) 1)
18588
18589
18590 $parse-mu-var-def:error2:
18591
18592 (write-buffered *(ebp+0x18) "fn ")
18593 8b/-> *(ebp+0x14) 0/r32/eax
18594 (lookup *eax *(eax+4))
18595 (write-buffered *(ebp+0x18) %eax)
18596 (write-buffered *(ebp+0x18) ": var ")
18597
18598 (lookup *edx *(edx+4))
18599 (lookup *eax *(eax+4))
18600 (write-buffered *(ebp+0x18) %eax)
18601 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
18602 (flush *(ebp+0x18))
18603 (stop *(ebp+0x1c) 1)
18604
18605
18606 $parse-mu-var-def:error-byte-on-stack:
18607
18608 (write-buffered *(ebp+0x18) "fn ")
18609 8b/-> *(ebp+0x14) 0/r32/eax
18610 (lookup *eax *(eax+4))
18611 (write-buffered *(ebp+0x18) %eax)
18612 (write-buffered *(ebp+0x18) ": var '")
18613
18614 (lookup *edx *(edx+4))
18615 (lookup *eax *(eax+4))
18616 (write-buffered *(ebp+0x18) %eax)
18617 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be on the stack\n")
18618 (flush *(ebp+0x18))
18619 (stop *(ebp+0x1c) 1)
18620
18621
18622 $parse-mu-var-def:error-byte-registers:
18623
18624 (write-buffered *(ebp+0x18) "fn ")
18625 8b/-> *(ebp+0x14) 0/r32/eax
18626 (lookup *eax *(eax+4))
18627 (write-buffered *(ebp+0x18) %eax)
18628 (write-buffered *(ebp+0x18) ": var '")
18629
18630 (lookup *edx *(edx+4))
18631 (lookup *eax *(eax+4))
18632 (write-buffered *(ebp+0x18) %eax)
18633 (write-buffered *(ebp+0x18) "' of type 'byte' cannot be in esi or edi\n")
18634 (flush *(ebp+0x18))
18635 (stop *(ebp+0x1c) 1)
18636
18637
18638 test-parse-mu-var-def:
18639
18640
18641 55/push-ebp
18642 89/<- %ebp 4/r32/esp
18643
18644 8b/-> *Primitive-type-ids 0/r32/eax
18645 89/<- *Type-id 0/r32/eax
18646 (clear-stream _test-input-stream)
18647 (write _test-input-stream "n: int\n")
18648 c7 0/subop/copy *Curr-block-depth 1/imm32
18649
18650 68/push 0/imm32
18651 68/push 0/imm32
18652 89/<- %esi 4/r32/esp
18653
18654 81 5/subop/subtract %esp 0xc0/imm32
18655 68/push 0xc0/imm32/size
18656 68/push 0/imm32/top
18657 89/<- %ecx 4/r32/esp
18658 (clear-stack %ecx)
18659
18660 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
18661
18662 (lookup *esi *(esi+4))
18663 89/<- %esi 0/r32/eax
18664
18665 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
18666
18667 (lookup *(esi+4) *(esi+8))
18668 89/<- %ecx 0/r32/eax
18669
18670 (lookup *ecx *(ecx+4))
18671 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
18672
18673 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
18674
18675 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
18676
18677 (lookup *(ecx+8) *(ecx+0xc))
18678 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
18679 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
18680 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
18681
18682 89/<- %esp 5/r32/ebp
18683 5d/pop-to-ebp
18684 c3/return
18685
18686 test-parse-mu-reg-var-def:
18687
18688
18689 55/push-ebp
18690 89/<- %ebp 4/r32/esp
18691
18692 8b/-> *Primitive-type-ids 0/r32/eax
18693 89/<- *Type-id 0/r32/eax
18694 (clear-stream _test-input-stream)
18695 (write _test-input-stream "n/eax: int <- copy 0\n")
18696 c7 0/subop/copy *Curr-block-depth 1/imm32
18697
18698 68/push 0/imm32
18699 68/push 0/imm32
18700 89/<- %esi 4/r32/esp
18701
18702 81 5/subop/subtract %esp 0xc0/imm32
18703 68/push 0xc0/imm32/size
18704 68/push 0/imm32/top
18705 89/<- %ecx 4/r32/esp
18706 (clear-stack %ecx)
18707
18708 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
18709
18710 (lookup *esi *(esi+4))
18711 89/<- %esi 0/r32/eax
18712
18713 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
18714
18715
18716 (lookup *(esi+0x14) *(esi+0x18))
18717
18718 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
18719
18720 (lookup *eax *(eax+4))
18721
18722 89/<- %ecx 0/r32/eax
18723
18724 (lookup *ecx *(ecx+4))
18725 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
18726
18727 (lookup *(ecx+0x18) *(ecx+0x1c))
18728 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
18729
18730 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
18731
18732 (lookup *(ecx+8) *(ecx+0xc))
18733 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
18734 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
18735 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
18736
18737 89/<- %esp 5/r32/ebp
18738 5d/pop-to-ebp
18739 c3/return
18740
18741 parse-mu-stmt:
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757 55/push-ebp
18758 89/<- %ebp 4/r32/esp
18759
18760 50/push-eax
18761 51/push-ecx
18762 52/push-edx
18763 53/push-ebx
18764 57/push-edi
18765
18766 68/push 0/imm32/end
18767 68/push 0/imm32/start
18768 89/<- %ecx 4/r32/esp
18769
18770 ba/copy-to-edx 0/imm32/false
18771
18772 68/push 0/imm32
18773 68/push 0/imm32
18774 89/<- %ebx 4/r32/esp
18775
18776 (allocate Heap *Stmt-size *(ebp+0x14))
18777
18778 8b/-> *(ebp+0x14) 7/r32/edi
18779 (lookup *edi *(edi+4))
18780 89/<- %edi 0/r32/eax
18781
18782 c7 0/subop/copy *edi 1/imm32/stmt1
18783 {
18784 (stmt-has-outputs? *(ebp+8))
18785 3d/compare-eax-and 0/imm32/false
18786 0f 84/jump-if-= break/disp32
18787 {
18788 $parse-mu-stmt:read-outputs:
18789
18790 (next-mu-token *(ebp+8) %ecx)
18791
18792 (slice-empty? %ecx)
18793 3d/compare-eax-and 0/imm32/false
18794 0f 85/jump-if-!= break/disp32
18795
18796 (slice-equal? %ecx "<-")
18797 3d/compare-eax-and 0/imm32/false
18798 0f 85/jump-if-!= break/disp32
18799
18800 8b/-> *ecx 0/r32/eax
18801 8a/copy-byte *eax 0/r32/AL
18802 81 4/subop/and %eax 0xff/imm32
18803 3d/compare-eax-and 0x2a/imm32/asterisk
18804 0f 84/jump-if-= $parse-mu-stmt:error-output-dereferenced/disp32
18805
18806 (identifier? %ecx)
18807 3d/compare-eax-and 0/imm32/false
18808 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
18809
18810 (lookup-var %ecx *(ebp+0xc) %ebx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
18811 8d/copy-address *(edi+0x14) 0/r32/eax
18812 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) 0 %eax)
18813
18814 e9/jump loop/disp32
18815 }
18816 }
18817 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
18818 $parse-mu-stmt:end:
18819
18820 81 0/subop/add %esp 0x10/imm32
18821
18822 5f/pop-to-edi
18823 5b/pop-to-ebx
18824 5a/pop-to-edx
18825 59/pop-to-ecx
18826 58/pop-to-eax
18827
18828 89/<- %esp 5/r32/ebp
18829 5d/pop-to-ebp
18830 c3/return
18831
18832 $parse-mu-stmt:abort:
18833
18834 (write-buffered *(ebp+0x18) "fn ")
18835 8b/-> *(ebp+0x10) 0/r32/eax
18836 (lookup *eax *(eax+4))
18837 (write-buffered *(ebp+0x18) %eax)
18838 (write-buffered *(ebp+0x18) ": invalid identifier '")
18839 (write-slice-buffered *(ebp+0x18) %ecx)
18840 (write-buffered *(ebp+0x18) "'\n")
18841 (flush *(ebp+0x18))
18842 (stop *(ebp+0x1c) 1)
18843
18844
18845 $parse-mu-stmt:error-output-dereferenced:
18846
18847 (write-buffered *(ebp+0x18) "fn ")
18848 8b/-> *(ebp+0x10) 0/r32/eax
18849 (lookup *eax *(eax+4))
18850 (write-buffered *(ebp+0x18) %eax)
18851 (write-buffered *(ebp+0x18) ": output '")
18852 (write-slice-buffered *(ebp+0x18) %ecx)
18853 (write-buffered *(ebp+0x18) "' should write to a register, and therefore cannot be dereferenced\n")
18854 (flush *(ebp+0x18))
18855 (stop *(ebp+0x1c) 1)
18856
18857
18858 add-operation-and-inputs-to-stmt:
18859
18860
18861
18862
18863
18864
18865
18866
18867 55/push-ebp
18868 89/<- %ebp 4/r32/esp
18869
18870 50/push-eax
18871 51/push-ecx
18872 52/push-edx
18873 53/push-ebx
18874 56/push-esi
18875 57/push-edi
18876
18877 8b/-> *(ebp+8) 7/r32/edi
18878
18879 68/push 0/imm32/end
18880 68/push 0/imm32/start
18881 89/<- %ecx 4/r32/esp
18882
18883 ba/copy-to-edx 0/imm32/false
18884
18885 68/push 0/imm32
18886 68/push 0/imm32
18887 89/<- %esi 4/r32/esp
18888 $add-operation-and-inputs-to-stmt:read-operation:
18889 (next-mu-token *(ebp+0xc) %ecx)
18890 8d/copy-address *(edi+4) 0/r32/eax
18891 (slice-to-string Heap %ecx %eax)
18892
18893 (slice-equal? %ecx "get")
18894 89/<- %ebx 0/r32/eax
18895 {
18896 $add-operation-and-inputs-to-stmt:read-inouts:
18897
18898 (next-mu-token *(ebp+0xc) %ecx)
18899
18900 (slice-empty? %ecx)
18901 3d/compare-eax-and 0/imm32/false
18902 0f 85/jump-if-!= break/disp32
18903
18904 (slice-equal? %ecx "<-")
18905 3d/compare-eax-and 0/imm32/false
18906 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
18907
18908 {
18909 81 7/subop/compare %ebx 0/imm32/false
18910 74/jump-if-= break/disp8
18911 (lookup *(edi+0xc) *(edi+0x10))
18912 3d/compare-eax-and 0/imm32
18913 74/jump-if-= break/disp8
18914 (lookup-or-create-constant %eax %ecx %esi)
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
18926 }
18927
18928 ba/copy-to-edx 0/imm32/false
18929
18930 8b/-> *ecx 0/r32/eax
18931 8a/copy-byte *eax 0/r32/AL
18932 81 4/subop/and %eax 0xff/imm32
18933 3d/compare-eax-and 0x2a/imm32/asterisk
18934 {
18935 75/jump-if-!= break/disp8
18936 $add-operation-and-inputs-to-stmt:inout-is-deref:
18937 ff 0/subop/increment *ecx
18938 ba/copy-to-edx 1/imm32/true
18939 }
18940 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
18941
18942 81 7/subop/compare %edx 0/imm32/false
18943 {
18944 74/jump-if-= break/disp8
18945
18946 (lookup *esi *(esi+4))
18947 81 7/subop/compare *(eax+0x18) 0/imm32
18948 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-on-stack/disp32
18949
18950 (lookup *(eax+8) *(eax+0xc))
18951 (mu-addr-type? %eax)
18952 3d/compare-eax-and 0/imm32/false
18953 0f 84/jump-if-= $add-operation-and-inputs-to-stmt:error-deref-non-addr/disp32
18954 }
18955 $add-operation-and-inputs-to-stmt:save-var:
18956 8d/copy-address *(edi+0xc) 0/r32/eax
18957 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
18958
18959 e9/jump loop/disp32
18960 }
18961 $add-operation-and-inputs-to-stmt:end:
18962
18963 81 0/subop/add %esp 0x10/imm32
18964
18965 5f/pop-to-edi
18966 5e/pop-to-esi
18967 5b/pop-to-ebx
18968 5a/pop-to-edx
18969 59/pop-to-ecx
18970 58/pop-to-eax
18971
18972 89/<- %esp 5/r32/ebp
18973 5d/pop-to-ebp
18974 c3/return
18975
18976 $add-operation-and-inputs-to-stmt:abort:
18977
18978 (write-buffered *(ebp+0x18) "fn ")
18979 8b/-> *(ebp+0x14) 0/r32/eax
18980 (lookup *eax *(eax+4))
18981 (write-buffered *(ebp+0x18) %eax)
18982 (rewind-stream *(ebp+0xc))
18983 (write-buffered *(ebp+0x18) ": invalid identifier in '")
18984 (write-stream-data *(ebp+0x18) *(ebp+0xc))
18985 (write-buffered *(ebp+0x18) "'\n")
18986 (flush *(ebp+0x18))
18987 (stop *(ebp+0x1c) 1)
18988
18989
18990 $add-operation-and-inputs-to-stmt:error-deref-on-stack:
18991
18992 (write-buffered *(ebp+0x18) "fn ")
18993 8b/-> *(ebp+0x14) 0/r32/eax
18994 (lookup *eax *(eax+4))
18995 (write-buffered *(ebp+0x18) %eax)
18996 (rewind-stream *(ebp+0xc))
18997 (write-buffered *(ebp+0x18) ": cannot dereference var '")
18998 (lookup *esi *(esi+4))
18999 (lookup *eax *(eax+4))
19000 (write-buffered *(ebp+0x18) %eax)
19001 (write-buffered *(ebp+0x18) "' on stack\n")
19002 (flush *(ebp+0x18))
19003 (stop *(ebp+0x1c) 1)
19004
19005
19006 $add-operation-and-inputs-to-stmt:error-deref-non-addr:
19007
19008 (write-buffered *(ebp+0x18) "fn ")
19009 8b/-> *(ebp+0x14) 0/r32/eax
19010 (lookup *eax *(eax+4))
19011 (write-buffered *(ebp+0x18) %eax)
19012 (rewind-stream *(ebp+0xc))
19013 (write-buffered *(ebp+0x18) ": cannot dereference non-addr var '")
19014 (lookup *esi *(esi+4))
19015 (lookup *eax *(eax+4))
19016 (write-buffered *(ebp+0x18) %eax)
19017 (write-buffered *(ebp+0x18) "'\n")
19018 (flush *(ebp+0x18))
19019 (stop *(ebp+0x1c) 1)
19020
19021
19022 stmt-has-outputs?:
19023
19024 55/push-ebp
19025 89/<- %ebp 4/r32/esp
19026
19027 51/push-ecx
19028
19029 68/push 0/imm32/end
19030 68/push 0/imm32/start
19031 89/<- %ecx 4/r32/esp
19032
19033 b8/copy-to-eax 0/imm32/false
19034 (rewind-stream *(ebp+8))
19035 {
19036 (next-mu-token *(ebp+8) %ecx)
19037
19038 (slice-empty? %ecx)
19039 3d/compare-eax-and 0/imm32/false
19040 b8/copy-to-eax 0/imm32/false/result
19041 0f 85/jump-if-!= break/disp32
19042
19043
19044 8b/-> *ecx 0/r32/eax
19045 8a/copy-byte *eax 0/r32/AL
19046 81 4/subop/and %eax 0xff/imm32
19047
19048 3d/compare-eax-and 0x23/imm32/hash
19049 b8/copy-to-eax 0/imm32/false/result
19050 0f 84/jump-if-= break/disp32
19051
19052 (slice-equal? %ecx "<-")
19053 3d/compare-eax-and 0/imm32/false
19054 74/jump-if-= loop/disp8
19055 b8/copy-to-eax 1/imm32/true
19056 }
19057 $stmt-has-outputs:end:
19058 (rewind-stream *(ebp+8))
19059
19060 81 0/subop/add %esp 8/imm32
19061
19062 59/pop-to-ecx
19063
19064 89/<- %esp 5/r32/ebp
19065 5d/pop-to-ebp
19066 c3/return
19067
19068
19069
19070 lookup-var-or-literal:
19071
19072 55/push-ebp
19073 89/<- %ebp 4/r32/esp
19074
19075 50/push-eax
19076 51/push-ecx
19077 56/push-esi
19078
19079 8b/-> *(ebp+8) 6/r32/esi
19080
19081 (slice-empty? %esi)
19082 3d/compare-eax-and 0/imm32/false
19083 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
19084
19085 8b/-> *esi 1/r32/ecx
19086 8a/copy-byte *ecx 1/r32/CL
19087 81 4/subop/and %ecx 0xff/imm32
19088
19089 {
19090 81 7/subop/compare %ecx 0x2d/imm32/dash
19091 74/jump-if-= $lookup-var-or-literal:literal/disp8
19092 (decimal-digit? %ecx)
19093 3d/compare-eax-and 0/imm32/false
19094 74/jump-if-= break/disp8
19095 $lookup-var-or-literal:literal:
19096 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19097 eb/jump $lookup-var-or-literal:end/disp8
19098 }
19099
19100 {
19101 81 7/subop/compare %ecx 0x22/imm32/dquote
19102 75/jump-if-!= break/disp8
19103 $lookup-var-or-literal:literal-string:
19104 (new-literal-string Heap %esi *(ebp+0x10))
19105 eb/jump $lookup-var-or-literal:end/disp8
19106 }
19107
19108 {
19109 $lookup-var-or-literal:var:
19110 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19111 }
19112 $lookup-var-or-literal:end:
19113
19114 5e/pop-to-esi
19115 59/pop-to-ecx
19116 58/pop-to-eax
19117
19118 89/<- %esp 5/r32/ebp
19119 5d/pop-to-ebp
19120 c3/return
19121
19122 $lookup-var-or-literal:abort:
19123 (write-buffered *(ebp+0x18) "fn ")
19124 8b/-> *(ebp+0x14) 0/r32/eax
19125 (lookup *eax *(eax+4))
19126 (write-buffered *(ebp+0x18) %eax)
19127 (write-buffered *(ebp+0x18) ": empty variable!")
19128 (flush *(ebp+0x18))
19129 (stop *(ebp+0x1c) 1)
19130
19131
19132
19133 lookup-var:
19134
19135 55/push-ebp
19136 89/<- %ebp 4/r32/esp
19137
19138 50/push-eax
19139
19140 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
19141
19142 8b/-> *(ebp+0x10) 0/r32/eax
19143 81 7/subop/compare *eax 0/imm32
19144 74/jump-if-= $lookup-var:abort/disp8
19145 $lookup-var:end:
19146
19147 58/pop-to-eax
19148
19149 89/<- %esp 5/r32/ebp
19150 5d/pop-to-ebp
19151 c3/return
19152
19153 $lookup-var:abort:
19154 (write-buffered *(ebp+0x18) "fn ")
19155 8b/-> *(ebp+0x14) 0/r32/eax
19156 (lookup *eax *(eax+4))
19157 (write-buffered *(ebp+0x18) %eax)
19158 (write-buffered *(ebp+0x18) ": unknown variable '")
19159 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19160 (write-buffered *(ebp+0x18) "'\n")
19161 (flush *(ebp+0x18))
19162 (stop *(ebp+0x1c) 1)
19163
19164
19165
19166
19167 lookup-var-helper:
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178 55/push-ebp
19179 89/<- %ebp 4/r32/esp
19180
19181 50/push-eax
19182 51/push-ecx
19183 52/push-edx
19184 53/push-ebx
19185 56/push-esi
19186 57/push-edi
19187
19188 (zero-out *(ebp+0x10) *Handle-size)
19189
19190 8b/-> *(ebp+0xc) 6/r32/esi
19191
19192 8b/-> *esi 3/r32/ebx
19193
19194 3b/compare<- *(esi+4) 0/r32/eax
19195 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
19196
19197 8d/copy-address *(esi+8) 2/r32/edx
19198
19199 8d/copy-address *(esi+ebx-4) 3/r32/ebx
19200
19201 68/push 0/imm32
19202 68/push 0/imm32
19203 68/push 0/imm32
19204 68/push 0/imm32
19205 68/push 0/imm32
19206 68/push 0/imm32
19207 68/push 0/imm32
19208 68/push 0/imm32
19209 68/push 0/imm32
19210 68/push 0/imm32
19211 68/push 0/imm32
19212 68/push 0/imm32
19213 68/push 0/imm32
19214 68/push 0/imm32
19215 68/push 0/imm32
19216 68/push 0/imm32
19217 89/<- %edi 4/r32/esp
19218 {
19219 $lookup-var-helper:loop:
19220
19221 39/compare %ebx 2/r32/edx
19222 0f 82/jump-if-addr< break/disp32
19223
19224 (lookup *ebx *(ebx+4))
19225 89/<- %ecx 0/r32/eax
19226
19227 (lookup *ecx *(ecx+4))
19228
19229 (slice-equal? *(ebp+8) %eax)
19230 3d/compare-eax-and 0/imm32/false
19231 {
19232 74/jump-if-= break/disp8
19233 $lookup-var-helper:found:
19234
19235 (lookup *(ecx+0x18) *(ecx+0x1c))
19236 3d/compare-eax-and 0/imm32
19237 {
19238 74/jump-if-= break/disp8
19239 $lookup-var-helper:found-register:
19240
19241 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
19242 8b/-> *eax 0/r32/eax
19243
19244 8b/-> *(edi+eax<<2) 0/r32/eax
19245 3d/compare-eax-and 0/imm32
19246 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
19247 }
19248 $lookup-var-helper:return:
19249
19250 8b/-> *(ebp+0x10) 6/r32/esi
19251
19252 8b/-> *ebx 0/r32/eax
19253 89/<- *esi 0/r32/eax
19254 8b/-> *(ebx+4) 0/r32/eax
19255 89/<- *(esi+4) 0/r32/eax
19256
19257 eb/jump $lookup-var-helper:end/disp8
19258 }
19259
19260
19261 (lookup *(ecx+0x18) *(ecx+0x1c))
19262
19263 3d/compare-eax-and 0/imm32
19264 74/jump-if-= $lookup-var-helper:continue/disp8
19265
19266 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
19267 8b/-> *eax 0/r32/eax
19268
19269 89/<- *(edi+eax<<2) 1/r32/ecx
19270 $lookup-var-helper:continue:
19271
19272 81 5/subop/subtract %ebx 0xc/imm32
19273 e9/jump loop/disp32
19274 }
19275 $lookup-var-helper:end:
19276
19277 81 0/subop/add %esp 0x40/imm32
19278
19279 5f/pop-to-edi
19280 5e/pop-to-esi
19281 5b/pop-to-ebx
19282 5a/pop-to-edx
19283 59/pop-to-ecx
19284 58/pop-to-eax
19285
19286 89/<- %esp 5/r32/ebp
19287 5d/pop-to-ebp
19288 c3/return
19289
19290 $lookup-var-helper:error1:
19291 (write-buffered *(ebp+0x18) "fn ")
19292 8b/-> *(ebp+0x14) 0/r32/eax
19293 (lookup *eax *(eax+4))
19294 (write-buffered *(ebp+0x18) %eax)
19295 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
19296 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19297 (write-buffered *(ebp+0x18) "'\n")
19298 (flush *(ebp+0x18))
19299 (stop *(ebp+0x1c) 1)
19300
19301
19302 $lookup-var-helper:error2:
19303
19304 (write-buffered *(ebp+0x18) "fn ")
19305 50/push-eax
19306 8b/-> *(ebp+0x14) 0/r32/eax
19307 (lookup *eax *(eax+4))
19308 (write-buffered *(ebp+0x18) %eax)
19309 58/pop-eax
19310 (write-buffered *(ebp+0x18) ": register ")
19311 50/push-eax
19312 (lookup *(eax+0x18) *(eax+0x1c))
19313 (write-buffered *(ebp+0x18) %eax)
19314 58/pop-to-eax
19315 (write-buffered *(ebp+0x18) " reads var '")
19316 (write-slice-buffered *(ebp+0x18) *(ebp+8))
19317 (write-buffered *(ebp+0x18) "' after writing var '")
19318 (lookup *eax *(eax+4))
19319 (write-buffered *(ebp+0x18) %eax)
19320 (write-buffered *(ebp+0x18) "'\n")
19321 (flush *(ebp+0x18))
19322 (stop *(ebp+0x1c) 1)
19323
19324
19325 dump-vars:
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335 55/push-ebp
19336 89/<- %ebp 4/r32/esp
19337
19338 52/push-edx
19339 53/push-ebx
19340 56/push-esi
19341
19342 8b/-> *(ebp+8) 6/r32/esi
19343
19344 8b/-> *esi 3/r32/ebx
19345
19346 8d/copy-address *(esi+8) 2/r32/edx
19347
19348 8d/copy-address *(esi+ebx-4) 3/r32/ebx
19349 {
19350 $dump-vars:loop:
19351
19352 39/compare %ebx 2/r32/edx
19353 0f 82/jump-if-addr< break/disp32
19354
19355 (write-buffered Stderr " var@")
19356 (dump-var 2 %ebx)
19357
19358 81 5/subop/subtract %ebx 0xc/imm32
19359 e9/jump loop/disp32
19360 }
19361 $dump-vars:end:
19362
19363 5e/pop-to-esi
19364 5b/pop-to-ebx
19365 5a/pop-to-edx
19366
19367 89/<- %esp 5/r32/ebp
19368 5d/pop-to-ebp
19369 c3/return
19370
19371 == data
19372
19373 Mu-registers:
19374
19375 0xa8/imm32/write
19376 0/imm32/read
19377 0xa8/imm32/length
19378
19379
19380
19381 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
19382 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
19383 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
19384 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
19385 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
19386 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
19387
19388 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 0/imm32
19389 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 1/imm32
19390 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 2/imm32
19391 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 3/imm32
19392 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 4/imm32
19393 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 5/imm32
19394 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 6/imm32
19395 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 7/imm32
19396
19397
19398
19399
19400 Mu-registers-unique:
19401
19402 0xa8/imm32/write
19403 0/imm32/read
19404 0xa8/imm32/length
19405
19406
19407 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
19408 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
19409 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
19410 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
19411 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
19412 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
19413
19414 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 8/imm32
19415 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 9/imm32
19416 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 0xa/imm32
19417 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 0xb/imm32
19418 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 0xc/imm32
19419 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 0xd/imm32
19420 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 0xe/imm32
19421 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 0xf/imm32
19422
19423 $Mu-register-eax:
19424 0x11/imm32/alloc-id
19425 3/imm32/size
19426 0x65/e 0x61/a 0x78/x
19427
19428 $Mu-register-ecx:
19429 0x11/imm32/alloc-id
19430 3/imm32/size
19431 0x65/e 0x63/c 0x78/x
19432
19433 $Mu-register-edx:
19434 0x11/imm32/alloc-id
19435 3/imm32/size
19436 0x65/e 0x64/d 0x78/x
19437
19438 $Mu-register-ebx:
19439 0x11/imm32/alloc-id
19440 3/imm32/size
19441 0x65/e 0x62/b 0x78/x
19442
19443 $Mu-register-esi:
19444 0x11/imm32/alloc-id
19445 3/imm32/size
19446 0x65/e 0x73/s 0x69/i
19447
19448 $Mu-register-edi:
19449 0x11/imm32/alloc-id
19450 3/imm32/size
19451 0x65/e 0x64/d 0x69/i
19452
19453 $Mu-register-xmm0:
19454 0x11/imm32/alloc-id:fake:payload
19455
19456 0x4/imm32/size
19457 0x78/x 0x6d/m 0x6d/m 0x30/0
19458
19459 $Mu-register-xmm1:
19460 0x11/imm32/alloc-id:fake:payload
19461
19462 0x4/imm32/size
19463 0x78/x 0x6d/m 0x6d/m 0x31/1
19464
19465 $Mu-register-xmm2:
19466 0x11/imm32/alloc-id:fake:payload
19467
19468 0x4/imm32/size
19469 0x78/x 0x6d/m 0x6d/m 0x32/2
19470
19471 $Mu-register-xmm3:
19472 0x11/imm32/alloc-id:fake:payload
19473
19474 0x4/imm32/size
19475 0x78/x 0x6d/m 0x6d/m 0x33/3
19476
19477 $Mu-register-xmm4:
19478 0x11/imm32/alloc-id:fake:payload
19479
19480 0x4/imm32/size
19481 0x78/x 0x6d/m 0x6d/m 0x34/4
19482
19483 $Mu-register-xmm5:
19484 0x11/imm32/alloc-id:fake:payload
19485
19486 0x4/imm32/size
19487 0x78/x 0x6d/m 0x6d/m 0x35/5
19488
19489 $Mu-register-xmm6:
19490 0x11/imm32/alloc-id:fake:payload
19491
19492 0x4/imm32/size
19493 0x78/x 0x6d/m 0x6d/m 0x36/6
19494
19495 $Mu-register-xmm7:
19496 0x11/imm32/alloc-id:fake:payload
19497
19498 0x4/imm32/size
19499 0x78/x 0x6d/m 0x6d/m 0x37/7
19500
19501 == code
19502
19503
19504 maybe-define-var:
19505
19506 55/push-ebp
19507 89/<- %ebp 4/r32/esp
19508
19509 50/push-eax
19510
19511 (lookup *(ebp+8) *(ebp+0xc))
19512
19513 (binding-exists? %eax *(ebp+0x10))
19514 3d/compare-eax-and 0/imm32/false
19515 75/jump-if-!= $maybe-define-var:end/disp8
19516
19517 (push *(ebp+0x10) *(ebp+8))
19518 (push *(ebp+0x10) *(ebp+0xc))
19519 (push *(ebp+0x10) 0)
19520 $maybe-define-var:end:
19521
19522 58/pop-to-eax
19523
19524 89/<- %esp 5/r32/ebp
19525 5d/pop-to-ebp
19526 c3/return
19527
19528
19529 binding-exists?:
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541 55/push-ebp
19542 89/<- %ebp 4/r32/esp
19543
19544 51/push-ecx
19545 52/push-edx
19546 56/push-esi
19547
19548 8b/-> *(ebp+8) 0/r32/eax
19549 (lookup *eax *(eax+4))
19550 89/<- %ecx 0/r32/eax
19551
19552 8b/-> *(ebp+0xc) 6/r32/esi
19553
19554 8b/-> *esi 0/r32/eax
19555
19556 8d/copy-address *(esi+8) 2/r32/edx
19557
19558 8d/copy-address *(esi+eax-4) 6/r32/esi
19559 {
19560 $binding-exists?:loop:
19561
19562 39/compare %esi 2/r32/edx
19563 0f 82/jump-if-addr< break/disp32
19564
19565 (lookup *esi *(esi+4))
19566
19567 (lookup *eax *(eax+4))
19568
19569 (string-equal? %ecx %eax)
19570 3d/compare-eax-and 0/imm32/false
19571 75/jump-if-!= $binding-exists?:end/disp8
19572
19573 81 5/subop/subtract %esi 0xc/imm32
19574 e9/jump loop/disp32
19575 }
19576 b8/copy-to-eax 0/imm32/false
19577 $binding-exists?:end:
19578
19579 5e/pop-to-esi
19580 5a/pop-to-edx
19581 59/pop-to-ecx
19582
19583 89/<- %esp 5/r32/ebp
19584 5d/pop-to-ebp
19585 c3/return
19586
19587 test-parse-mu-stmt:
19588
19589 55/push-ebp
19590 89/<- %ebp 4/r32/esp
19591
19592 8b/-> *Primitive-type-ids 0/r32/eax
19593 89/<- *Type-id 0/r32/eax
19594 (clear-stream _test-input-stream)
19595 (write _test-input-stream "increment n\n")
19596
19597 81 5/subop/subtract %esp 0xc0/imm32
19598 68/push 0xc0/imm32/size
19599 68/push 0/imm32/top
19600 89/<- %ecx 4/r32/esp
19601 (clear-stack %ecx)
19602
19603 68/push 0/imm32
19604 68/push 0/imm32
19605 89/<- %edx 4/r32/esp
19606
19607 68/push 0/imm32
19608 68/push 0/imm32
19609 89/<- %eax 4/r32/esp
19610
19611 (copy-array Heap "n" %eax)
19612 (new-var Heap *eax *(eax+4) %edx)
19613
19614 (push %ecx *edx)
19615 (push %ecx *(edx+4))
19616 (push %ecx 0)
19617
19618 68/push 0/imm32
19619 68/push 0/imm32
19620 89/<- %eax 4/r32/esp
19621
19622 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
19623
19624 (lookup *eax *(eax+4))
19625 89/<- %edx 0/r32/eax
19626
19627 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
19628
19629 (lookup *(edx+4) *(edx+8))
19630 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
19631
19632
19633 (lookup *(edx+0xc) *(edx+0x10))
19634
19635 (lookup *eax *(eax+4))
19636
19637 (lookup *eax *(eax+4))
19638
19639 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
19640
19641 89/<- %esp 5/r32/ebp
19642 5d/pop-to-ebp
19643 c3/return
19644
19645 test-parse-mu-stmt-with-comma:
19646
19647 55/push-ebp
19648 89/<- %ebp 4/r32/esp
19649
19650 8b/-> *Primitive-type-ids 0/r32/eax
19651 89/<- *Type-id 0/r32/eax
19652 (clear-stream _test-input-stream)
19653 (write _test-input-stream "copy-to n, 3\n")
19654
19655 81 5/subop/subtract %esp 0xc0/imm32
19656 68/push 0xc0/imm32/size
19657 68/push 0/imm32/top
19658 89/<- %ecx 4/r32/esp
19659 (clear-stack %ecx)
19660
19661 68/push 0/imm32
19662 68/push 0/imm32
19663 89/<- %edx 4/r32/esp
19664
19665 68/push 0/imm32
19666 68/push 0/imm32
19667 89/<- %eax 4/r32/esp
19668
19669 (copy-array Heap "n" %eax)
19670 (new-var Heap *eax *(eax+4) %edx)
19671
19672 (push %ecx *edx)
19673 (push %ecx *(edx+4))
19674 (push %ecx 0)
19675
19676 68/push 0/imm32
19677 68/push 0/imm32
19678 89/<- %eax 4/r32/esp
19679
19680 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
19681
19682 (lookup *eax *(eax+4))
19683 89/<- %edx 0/r32/eax
19684
19685 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
19686
19687 (lookup *(edx+4) *(edx+8))
19688 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
19689
19690
19691 (lookup *(edx+0xc) *(edx+0x10))
19692
19693 (lookup *eax *(eax+4))
19694
19695 (lookup *eax *(eax+4))
19696
19697 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
19698
19699 89/<- %esp 5/r32/ebp
19700 5d/pop-to-ebp
19701 c3/return
19702
19703 new-var:
19704
19705 55/push-ebp
19706 89/<- %ebp 4/r32/esp
19707
19708 50/push-eax
19709 51/push-ecx
19710
19711 8b/-> *(ebp+0x14) 1/r32/ecx
19712
19713 (allocate *(ebp+8) *Var-size %ecx)
19714
19715 (lookup *ecx *(ecx+4))
19716
19717 8b/-> *(ebp+0xc) 1/r32/ecx
19718 89/<- *eax 1/r32/ecx
19719 8b/-> *(ebp+0x10) 1/r32/ecx
19720 89/<- *(eax+4) 1/r32/ecx
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730 $new-var:end:
19731
19732 59/pop-to-ecx
19733 58/pop-to-eax
19734
19735 89/<- %esp 5/r32/ebp
19736 5d/pop-to-ebp
19737 c3/return
19738
19739
19740 new-literal-integer:
19741
19742 55/push-ebp
19743 89/<- %ebp 4/r32/esp
19744
19745 50/push-eax
19746 51/push-ecx
19747
19748 8b/-> *(ebp+0xc) 1/r32/ecx
19749 (next-token-from-slice *ecx *(ecx+4) 0x2f *(ebp+0xc))
19750
19751 (hex-int? *(ebp+0xc))
19752 3d/compare-eax-and 0/imm32/false
19753 0f 84/jump-if-= $new-literal-integer:abort/disp32
19754
19755 (check-mu-hex-int *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
19756
19757 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
19758
19759 8b/-> *(ebp+0x10) 0/r32/eax
19760 (lookup *eax *(eax+4))
19761 89/<- %ecx 0/r32/eax
19762
19763 8b/-> *Curr-block-depth 0/r32/eax
19764 89/<- *(ecx+0x10) 0/r32/eax
19765
19766 8d/copy-address *(ecx+8) 0/r32/eax
19767 (allocate *(ebp+8) *Type-tree-size %eax)
19768 (lookup *(ecx+8) *(ecx+0xc))
19769 c7 0/subop/copy *eax 1/imm32/true
19770
19771 $new-literal-integer:end:
19772
19773 81 0/subop/add %esp 8/imm32
19774
19775 59/pop-to-ecx
19776 58/pop-to-eax
19777
19778 89/<- %esp 5/r32/ebp
19779 5d/pop-to-ebp
19780 c3/return
19781
19782 $new-literal-integer:abort:
19783 (write-buffered *(ebp+0x18) "fn ")
19784 8b/-> *(ebp+0x14) 0/r32/eax
19785 (lookup *eax *(eax+4))
19786 (write-buffered *(ebp+0x18) %eax)
19787 (write-buffered *(ebp+0x18) ": variable '")
19788 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
19789 (write-buffered *(ebp+0x18) "' cannot begin with a digit (or do you have a typo in a number?)\n")
19790 (flush *(ebp+0x18))
19791 (stop *(ebp+0x1c) 1)
19792
19793
19794
19795 check-mu-hex-int:
19796
19797 55/push-ebp
19798 89/<- %ebp 4/r32/esp
19799
19800 50/push-eax
19801 51/push-ecx
19802 52/push-edx
19803
19804 8b/-> *(ebp+8) 1/r32/ecx
19805
19806 8b/-> *ecx 2/r32/edx
19807
19808 b8/copy-to-eax 0/imm32
19809 8a/copy-byte *edx 0/r32/AL
19810 3d/compare-eax-and 0x2d/imm32/dash
19811 {
19812 75/jump-if-!= break/disp8
19813 42/increment-edx
19814 }
19815
19816 8b/-> *(ecx+4) 1/r32/ecx
19817
19818 89/<- %eax 1/r32/ecx
19819 29/subtract-from %eax 2/r32/edx
19820
19821 3d/compare-eax-with 1/imm32
19822 0f 8e/jump-if-<= $check-mu-hex-int:end/disp32
19823 $check-mu-hex-int:length->-1:
19824
19825
19826 51/push-ecx
19827 52/push-edx
19828 89/<- %eax 4/r32/esp
19829
19830 (slice-starts-with? %eax "0x")
19831
19832 81 0/subop/add %esp 8/imm32
19833
19834 3d/compare-eax-with 0/imm32/false
19835 75/jump-if-!= $check-mu-hex-int:end/disp8
19836 $check-mu-hex-int:abort:
19837
19838 (write-buffered *(ebp+0xc) "literal integers are always hex in Mu; start '")
19839 (write-slice-buffered *(ebp+0xc) *(ebp+8))
19840 (write-buffered *(ebp+0xc) "' with a '0x' to be unambiguous, converting it to hexadecimal as necessary.\n")
19841 (flush *(ebp+0xc))
19842 (stop *(ebp+0x10) 1)
19843 $check-mu-hex-int:end:
19844
19845 5a/pop-to-edx
19846 59/pop-to-ecx
19847 58/pop-to-eax
19848
19849 89/<- %esp 5/r32/ebp
19850 5d/pop-to-ebp
19851 c3/return
19852
19853 new-literal:
19854
19855 55/push-ebp
19856 89/<- %ebp 4/r32/esp
19857
19858 50/push-eax
19859 51/push-ecx
19860
19861 68/push 0/imm32
19862 68/push 0/imm32
19863 89/<- %ecx 4/r32/esp
19864
19865 (slice-to-string Heap *(ebp+0xc) %ecx)
19866
19867 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
19868
19869 8b/-> *(ebp+0x10) 1/r32/ecx
19870 (lookup *ecx *(ecx+4))
19871 89/<- %ecx 0/r32/eax
19872
19873 8b/-> *Curr-block-depth 0/r32/eax
19874 89/<- *(ecx+0x10) 0/r32/eax
19875
19876 8d/copy-address *(ecx+8) 0/r32/eax
19877 (allocate *(ebp+8) *Type-tree-size %eax)
19878 (lookup *(ecx+8) *(ecx+0xc))
19879
19880 c7 0/subop/copy *eax 1/imm32/true
19881 $new-literal:end:
19882
19883 81 0/subop/add %esp 8/imm32
19884
19885 59/pop-to-ecx
19886 58/pop-to-eax
19887
19888 89/<- %esp 5/r32/ebp
19889 5d/pop-to-ebp
19890 c3/return
19891
19892 new-literal-string:
19893
19894 55/push-ebp
19895 89/<- %ebp 4/r32/esp
19896
19897 50/push-eax
19898 51/push-ecx
19899
19900 68/push 0/imm32
19901 68/push 0/imm32
19902 89/<- %ecx 4/r32/esp
19903
19904 (slice-to-string Heap *(ebp+0xc) %ecx)
19905
19906 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
19907
19908 8b/-> *(ebp+0x10) 1/r32/ecx
19909 (lookup *ecx *(ecx+4))
19910 89/<- %ecx 0/r32/eax
19911
19912 8b/-> *Curr-block-depth 0/r32/eax
19913 89/<- *(ecx+0x10) 0/r32/eax
19914
19915 8d/copy-address *(ecx+8) 0/r32/eax
19916 (allocate *(ebp+8) *Type-tree-size %eax)
19917 (lookup *(ecx+8) *(ecx+0xc))
19918
19919 c7 0/subop/copy *(eax+4) 0x10/imm32/type-id-string-literal
19920
19921 c7 0/subop/copy *eax 1/imm32/true
19922 $new-literal-string:end:
19923
19924 81 0/subop/add %esp 8/imm32
19925
19926 59/pop-to-ecx
19927 58/pop-to-eax
19928
19929 89/<- %esp 5/r32/ebp
19930 5d/pop-to-ebp
19931 c3/return
19932
19933 new-var-from-slice:
19934
19935 55/push-ebp
19936 89/<- %ebp 4/r32/esp
19937
19938 51/push-ecx
19939
19940 68/push 0/imm32
19941 68/push 0/imm32
19942 89/<- %ecx 4/r32/esp
19943
19944 (slice-to-string Heap *(ebp+0xc) %ecx)
19945
19946 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
19947 $new-var-from-slice:end:
19948
19949 81 0/subop/add %esp 8/imm32
19950
19951 59/pop-to-ecx
19952
19953 89/<- %esp 5/r32/ebp
19954 5d/pop-to-ebp
19955 c3/return
19956
19957 new-var-def:
19958
19959 55/push-ebp
19960 89/<- %ebp 4/r32/esp
19961
19962 50/push-eax
19963 51/push-ecx
19964
19965 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
19966
19967 8b/-> *(ebp+0x14) 0/r32/eax
19968 (lookup *eax *(eax+4))
19969
19970 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
19971
19972 8b/-> *(ebp+0xc) 1/r32/ecx
19973 89/<- *(eax+4) 1/r32/ecx
19974 8b/-> *(ebp+0x10) 1/r32/ecx
19975 89/<- *(eax+8) 1/r32/ecx
19976 $new-var-def:end:
19977
19978 59/pop-to-ecx
19979 58/pop-to-eax
19980
19981 89/<- %esp 5/r32/ebp
19982 5d/pop-to-ebp
19983 c3/return
19984
19985 new-reg-var-def:
19986
19987 55/push-ebp
19988 89/<- %ebp 4/r32/esp
19989
19990 50/push-eax
19991
19992 8b/-> *(ebp+0x14) 0/r32/eax
19993
19994 (allocate *(ebp+8) *Stmt-size %eax)
19995
19996 (lookup *eax *(eax+4))
19997
19998 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
19999
20000 8d/copy-address *(eax+0x14) 0/r32/eax
20001 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
20002 $new-reg-var-def:end:
20003
20004 58/pop-to-eax
20005
20006 89/<- %esp 5/r32/ebp
20007 5d/pop-to-ebp
20008 c3/return
20009
20010 append-list:
20011
20012 55/push-ebp
20013 89/<- %ebp 4/r32/esp
20014
20015 50/push-eax
20016 51/push-ecx
20017 57/push-edi
20018
20019 8b/-> *(ebp+0x1c) 7/r32/edi
20020
20021 (allocate *(ebp+8) *List-size %edi)
20022
20023 (lookup *edi *(edi+4))
20024 89/<- %edi 0/r32/eax
20025
20026 8b/-> *(ebp+0xc) 0/r32/eax
20027 89/<- *edi 0/r32/eax
20028 8b/-> *(ebp+0x10) 0/r32/eax
20029 89/<- *(edi+4) 0/r32/eax
20030
20031 81 7/subop/compare *(ebp+0x14) 0/imm32
20032 74/jump-if-= $append-list:end/disp8
20033
20034 $append-list:non-empty-list:
20035
20036 (lookup *(ebp+0x14) *(ebp+0x18))
20037
20038 {
20039 81 7/subop/compare *(eax+8) 0/imm32
20040 74/jump-if-= break/disp8
20041
20042 (lookup *(eax+8) *(eax+0xc))
20043
20044 eb/jump loop/disp8
20045 }
20046
20047 8b/-> *(ebp+0x1c) 7/r32/edi
20048
20049 8b/-> *edi 1/r32/ecx
20050 89/<- *(eax+8) 1/r32/ecx
20051 8b/-> *(edi+4) 1/r32/ecx
20052 89/<- *(eax+0xc) 1/r32/ecx
20053
20054 8b/-> *(ebp+0x14) 1/r32/ecx
20055 89/<- *edi 1/r32/ecx
20056 8b/-> *(ebp+0x18) 1/r32/ecx
20057 89/<- *(edi+4) 1/r32/ecx
20058 $append-list:end:
20059
20060 5f/pop-to-edi
20061 59/pop-to-ecx
20062 58/pop-to-eax
20063
20064 89/<- %esp 5/r32/ebp
20065 5d/pop-to-ebp
20066 c3/return
20067
20068 append-stmt-var:
20069
20070 55/push-ebp
20071 89/<- %ebp 4/r32/esp
20072
20073 50/push-eax
20074 51/push-ecx
20075 57/push-edi
20076
20077 8b/-> *(ebp+0x20) 7/r32/edi
20078
20079 (allocate *(ebp+8) *Stmt-var-size %edi)
20080
20081 (lookup *edi *(edi+4))
20082 89/<- %ecx 0/r32/eax
20083
20084 8b/-> *(ebp+0xc) 0/r32/eax
20085 89/<- *ecx 0/r32/eax
20086 8b/-> *(ebp+0x10) 0/r32/eax
20087 89/<- *(ecx+4) 0/r32/eax
20088
20089 8b/-> *(ebp+0x1c) 0/r32/eax
20090 89/<- *(ecx+0x10) 0/r32/eax
20091
20092 81 7/subop/compare *(ebp+0x14) 0/imm32/null
20093 74/jump-if-= $append-stmt-var:end/disp8
20094
20095
20096 (lookup *(ebp+0x14) *(ebp+0x18))
20097
20098 {
20099 81 7/subop/compare *(eax+8) 0/imm32
20100 74/jump-if-= break/disp8
20101
20102 (lookup *(eax+8) *(eax+0xc))
20103
20104 eb/jump loop/disp8
20105 }
20106
20107 8b/-> *edi 1/r32/ecx
20108 89/<- *(eax+8) 1/r32/ecx
20109 8b/-> *(edi+4) 1/r32/ecx
20110 89/<- *(eax+0xc) 1/r32/ecx
20111
20112 8b/-> *(ebp+0x14) 1/r32/ecx
20113 89/<- *edi 1/r32/ecx
20114 8b/-> *(ebp+0x18) 1/r32/ecx
20115 89/<- *(edi+4) 1/r32/ecx
20116 $append-stmt-var:end:
20117
20118 5f/pop-to-edi
20119 59/pop-to-ecx
20120 58/pop-to-eax
20121
20122 89/<- %esp 5/r32/ebp
20123 5d/pop-to-ebp
20124 c3/return
20125
20126 append-to-block:
20127
20128 55/push-ebp
20129 89/<- %ebp 4/r32/esp
20130
20131 50/push-eax
20132 56/push-esi
20133
20134 8b/-> *(ebp+0xc) 6/r32/esi
20135
20136 8d/copy-address *(esi+4) 0/r32/eax
20137 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
20138 $append-to-block:end:
20139
20140 5e/pop-to-esi
20141 58/pop-to-eax
20142
20143 89/<- %esp 5/r32/ebp
20144 5d/pop-to-ebp
20145 c3/return
20146
20147
20148
20149
20150
20151
20152
20153 lookup-or-create-constant:
20154
20155 55/push-ebp
20156 89/<- %ebp 4/r32/esp
20157
20158 50/push-eax
20159 56/push-esi
20160
20161 (container-type *(ebp+8))
20162 89/<- %esi 0/r32/eax
20163
20164 68/push 0/imm32
20165 68/push 0/imm32
20166 89/<- %eax 4/r32/esp
20167 (find-or-create-typeinfo %esi %eax)
20168
20169 (lookup *eax *(eax+4))
20170
20171
20172
20173
20174
20175 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189 $lookup-or-create-constant:end:
20190
20191 81 0/subop/add %esp 8/imm32
20192
20193 5e/pop-to-esi
20194 58/pop-to-eax
20195
20196 89/<- %esp 5/r32/ebp
20197 5d/pop-to-ebp
20198 c3/return
20199
20200
20201
20202
20203
20204 container-type:
20205
20206 55/push-ebp
20207 89/<- %ebp 4/r32/esp
20208
20209 8b/-> *(ebp+8) 0/r32/eax
20210 (lookup *eax *(eax+4))
20211 (lookup *(eax+8) *(eax+0xc))
20212 {
20213 81 7/subop/compare *(eax+8) 0/imm32
20214 74/jump-if-= break/disp8
20215 (lookup *(eax+0xc) *(eax+0x10))
20216 (lookup *(eax+4) *(eax+8))
20217 }
20218 8b/-> *(eax+4) 0/r32/eax
20219 $container-type:end:
20220
20221 89/<- %esp 5/r32/ebp
20222 5d/pop-to-ebp
20223 c3/return
20224
20225 container?:
20226
20227 55/push-ebp
20228 89/<- %ebp 4/r32/esp
20229
20230 8b/-> *(ebp+8) 0/r32/eax
20231 c1/shift 4/subop/left %eax 2/imm8
20232 3b/compare 0/r32/eax *Primitive-type-ids
20233 0f 9d/set-if->= %al
20234 81 4/subop/and %eax 0xff/imm32
20235 $container?:end:
20236
20237 89/<- %esp 5/r32/ebp
20238 5d/pop-to-ebp
20239 c3/return
20240
20241 find-or-create-typeinfo:
20242
20243 55/push-ebp
20244 89/<- %ebp 4/r32/esp
20245
20246 50/push-eax
20247 51/push-ecx
20248 52/push-edx
20249 57/push-edi
20250
20251 8b/-> *(ebp+0xc) 7/r32/edi
20252
20253 68/push 0/imm32
20254 68/push 0/imm32
20255 89/<- %ecx 4/r32/esp
20256
20257 (find-typeinfo *(ebp+8) %edi)
20258 {
20259
20260 81 7/subop/compare *edi 0/imm32
20261 0f 85/jump-if-!= break/disp32
20262 $find-or-create-typeinfo:create:
20263
20264 (allocate Heap *Typeinfo-size %edi)
20265
20266 (lookup *edi *(edi+4))
20267
20268
20269
20270
20271
20272
20273
20274 8b/-> *(ebp+8) 2/r32/edx
20275 89/<- *eax 2/r32/edx
20276
20277
20278 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
20279
20280 8b/-> *ecx 2/r32/edx
20281 89/<- *(eax+4) 2/r32/edx
20282 8b/-> *(ecx+4) 2/r32/edx
20283 89/<- *(eax+8) 2/r32/edx
20284
20285 8b/-> *_Program-types 1/r32/ecx
20286 89/<- *(eax+0x10) 1/r32/ecx
20287 8b/-> *_Program-types->payload 1/r32/ecx
20288 89/<- *(eax+0x14) 1/r32/ecx
20289
20290 8b/-> *edi 1/r32/ecx
20291 89/<- *_Program-types 1/r32/ecx
20292 8b/-> *(edi+4) 1/r32/ecx
20293 89/<- *_Program-types->payload 1/r32/ecx
20294 }
20295 $find-or-create-typeinfo:end:
20296
20297 81 0/subop/add %esp 8/imm32
20298
20299 5f/pop-to-edi
20300 5a/pop-to-edx
20301 59/pop-to-ecx
20302 58/pop-to-eax
20303
20304 89/<- %esp 5/r32/ebp
20305 5d/pop-to-ebp
20306 c3/return
20307
20308 find-typeinfo:
20309
20310 55/push-ebp
20311 89/<- %ebp 4/r32/esp
20312
20313 50/push-eax
20314 51/push-ecx
20315 52/push-edx
20316 57/push-edi
20317
20318 8b/-> *(ebp+8) 1/r32/ecx
20319
20320 8b/-> *(ebp+0xc) 7/r32/edi
20321
20322 8b/-> *_Program-types 0/r32/eax
20323 89/<- *edi 0/r32/eax
20324 8b/-> *_Program-types->payload 0/r32/eax
20325 89/<- *(edi+4) 0/r32/eax
20326 {
20327 $find-typeinfo:loop:
20328
20329 81 7/subop/compare *edi 0/imm32
20330 74/jump-if-= break/disp8
20331 $find-typeinfo:check:
20332
20333 (lookup *edi *(edi+4))
20334
20335 39/compare *eax 1/r32/ecx
20336 74/jump-if-= break/disp8
20337 $find-typeinfo:continue:
20338
20339 8b/-> *(eax+0x10) 2/r32/edx
20340 89/<- *edi 2/r32/edx
20341 8b/-> *(eax+0x14) 2/r32/edx
20342 89/<- *(edi+4) 2/r32/edx
20343
20344 eb/jump loop/disp8
20345 }
20346 $find-typeinfo:end:
20347
20348 5f/pop-to-edi
20349 5a/pop-to-edx
20350 59/pop-to-ecx
20351 58/pop-to-eax
20352
20353 89/<- %esp 5/r32/ebp
20354 5d/pop-to-ebp
20355 c3/return
20356
20357 find-or-create-typeinfo-output-var:
20358
20359 55/push-ebp
20360 89/<- %ebp 4/r32/esp
20361
20362 50/push-eax
20363 52/push-edx
20364 57/push-edi
20365
20366 68/push 0/imm32
20367 68/push 0/imm32
20368 89/<- %edi 4/r32/esp
20369
20370 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
20371
20372 (lookup *edi *(edi+4))
20373 89/<- %edi 0/r32/eax
20374
20375 {
20376 81 7/subop/compare *(edi+0xc) 0/imm32
20377 0f 85/jump-if-!= break/disp32
20378
20379
20380 68/push 0/imm32
20381 68/push 0/imm32
20382 89/<- %eax 4/r32/esp
20383 (slice-to-string Heap *(ebp+0xc) %eax)
20384
20385 8d/copy-address *(edi+0xc) 2/r32/edx
20386 (new-var Heap *eax *(eax+4) %edx)
20387
20388 81 0/subop/add %esp 8/imm32
20389
20390 (lookup *(edi+0xc) *(edi+0x10))
20391 89/<- %edx 0/r32/eax
20392
20393 8d/copy-address *(edx+8) 0/r32/eax
20394 (allocate Heap *Type-tree-size %eax)
20395 (lookup *(edx+8) *(edx+0xc))
20396 c7 0/subop/copy *eax 1/imm32/true
20397 c7 0/subop/copy *(eax+4) 6/imm32/constant
20398 c7 0/subop/copy *(eax+8) 0/imm32
20399 c7 0/subop/copy *(eax+0xc) 0/imm32
20400 c7 0/subop/copy *(eax+0x10) 0/imm32
20401
20402 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
20403 }
20404
20405 8b/-> *(ebp+0x10) 2/r32/edx
20406 8b/-> *(edi+0xc) 0/r32/eax
20407 89/<- *edx 0/r32/eax
20408 8b/-> *(edi+0x10) 0/r32/eax
20409 89/<- *(edx+4) 0/r32/eax
20410 $find-or-create-typeinfo-output-var:end:
20411
20412 81 0/subop/add %esp 8/imm32
20413
20414 5f/pop-to-edi
20415 5a/pop-to-edx
20416 58/pop-to-eax
20417
20418 89/<- %esp 5/r32/ebp
20419 5d/pop-to-ebp
20420 c3/return
20421
20422 find-or-create-typeinfo-fields:
20423
20424 55/push-ebp
20425 89/<- %ebp 4/r32/esp
20426
20427 50/push-eax
20428 56/push-esi
20429 57/push-edi
20430
20431 8b/-> *(ebp+8) 0/r32/eax
20432 (lookup *(eax+4) *(eax+8))
20433
20434 8b/-> *(ebp+0x10) 7/r32/edi
20435
20436 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
20437 89/<- %esi 0/r32/eax
20438
20439 {
20440 81 7/subop/compare *esi 0/imm32
20441 75/jump-if-!= break/disp8
20442 (allocate Heap *Typeinfo-entry-size %esi)
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458 }
20459
20460
20461 8b/-> *esi 0/r32/eax
20462 89/<- *edi 0/r32/eax
20463 8b/-> *(esi+4) 0/r32/eax
20464 89/<- *(edi+4) 0/r32/eax
20465 $find-or-create-typeinfo-fields:end:
20466
20467 5f/pop-to-edi
20468 5e/pop-to-esi
20469 58/pop-to-eax
20470
20471 89/<- %esp 5/r32/ebp
20472 5d/pop-to-ebp
20473 c3/return
20474
20475 populate-mu-type:
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501 55/push-ebp
20502 89/<- %ebp 4/r32/esp
20503
20504 68/push 0/imm32
20505
20506 50/push-eax
20507 51/push-ecx
20508 52/push-edx
20509 53/push-ebx
20510 56/push-esi
20511 57/push-edi
20512
20513 8b/-> *(ebp+0xc) 7/r32/edi
20514
20515 81 5/subop/subtract %esp 0x200/imm32
20516 68/push 0x200/imm32/size
20517 68/push 0/imm32/read
20518 68/push 0/imm32/write
20519 89/<- %ecx 4/r32/esp
20520
20521 68/push 0/imm32/end
20522 68/push 0/imm32/start
20523 89/<- %edx 4/r32/esp
20524
20525 68/push 0/imm32
20526 68/push 0/imm32
20527 89/<- %esi 4/r32/esp
20528
20529 68/push 0/imm32
20530 68/push 0/imm32
20531 89/<- %ebx 4/r32/esp
20532 {
20533 $populate-mu-type:line-loop:
20534 (clear-stream %ecx)
20535 (read-line-buffered *(ebp+8) %ecx)
20536
20537 81 7/subop/compare *ecx 0/imm32
20538 0f 84/jump-if-= $populate-mu-type:error1/disp32
20539 +-- 6 lines: #? # dump line ------------------------------------------------------------------------------------------------------------------------------------------------------
20545 (next-mu-token %ecx %edx)
20546
20547 (slice-empty? %edx)
20548 3d/compare-eax-and 0/imm32
20549 0f 85/jump-if-!= loop/disp32
20550
20551 (slice-equal? %edx "}")
20552 3d/compare-eax-and 0/imm32
20553 0f 85/jump-if-!= break/disp32
20554 $populate-mu-type:parse-element:
20555
20556
20557
20558
20559 (type-name *edi)
20560 (parse-var-with-type %edx %ecx %esi %eax *(ebp+0x10) *(ebp+0x14))
20561
20562 (lookup *esi *(esi+4))
20563 (lookup *(eax+8) *(eax+0xc))
20564 (mu-addr-type? %eax)
20565 3d/compare-eax-and 0/imm32/false
20566 0f 85/jump-if-!= $populate-mu-type:error2/disp32
20567
20568 (lookup *esi *(esi+4))
20569 (lookup *(eax+8) *(eax+0xc))
20570 (mu-array-type? %eax)
20571 3d/compare-eax-and 0/imm32/false
20572 0f 85/jump-if-!= $populate-mu-type:error3/disp32
20573
20574 (lookup *esi *(esi+4))
20575 (lookup *(eax+8) *(eax+0xc))
20576 (simple-mu-type? %eax 8)
20577 3d/compare-eax-and 0/imm32/false
20578 0f 85/jump-if-!= $populate-mu-type:error4/disp32
20579
20580 (lookup *esi *(esi+4))
20581 (lookup *(eax+8) *(eax+0xc))
20582 (simple-mu-type? %eax 0xc)
20583 3d/compare-eax-and 0/imm32/false
20584 0f 85/jump-if-!= $populate-mu-type:error5/disp32
20585
20586 (lookup *esi *(esi+4))
20587 (lookup *(eax+8) *(eax+0xc))
20588 (mu-stream-type? %eax)
20589 3d/compare-eax-and 0/imm32/false
20590 0f 85/jump-if-!= $populate-mu-type:error6/disp32
20591
20592 51/push-ecx
20593 $populate-mu-type:create-typeinfo-fields:
20594
20595 (find-or-create-typeinfo-fields %edi %edx %ebx)
20596
20597 (lookup *ebx *(ebx+4))
20598 8b/-> *(ebp-4) 1/r32/ecx
20599
20600
20601
20602
20603
20604
20605 89/<- *(eax+8) 1/r32/ecx
20606
20607 ff 0/subop/increment *(ebp-4)
20608 $populate-mu-type:set-input-type:
20609
20610 8b/-> *esi 1/r32/ecx
20611 89/<- *eax 1/r32/ecx
20612 8b/-> *(esi+4) 1/r32/ecx
20613 89/<- *(eax+4) 1/r32/ecx
20614
20615 59/pop-to-ecx
20616 {
20617 $populate-mu-type:create-output-type:
20618
20619 81 7/subop/compare *(eax+0xc) 0/imm32
20620 75/jump-if-!= break/disp8
20621 8d/copy-address *(eax+0xc) 0/r32/eax
20622 (new-literal Heap %edx %eax)
20623 }
20624 e9/jump loop/disp32
20625 }
20626 $populate-mu-type:invalidate-total-size-in-bytes:
20627
20628
20629
20630 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
20631 $populate-mu-type:end:
20632
20633 81 0/subop/add %esp 0x224/imm32
20634
20635 5f/pop-to-edi
20636 5e/pop-to-esi
20637 5b/pop-to-ebx
20638 5a/pop-to-edx
20639 59/pop-to-ecx
20640 58/pop-to-eax
20641
20642 81 0/subop/add %esp 4/imm32
20643
20644 89/<- %esp 5/r32/ebp
20645 5d/pop-to-ebp
20646 c3/return
20647
20648 $populate-mu-type:error1:
20649
20650 (write-buffered *(ebp+0x10) "incomplete type definition '")
20651 (type-name *edi)
20652 (write-buffered *(ebp+0x10) %eax)
20653 (write-buffered *(ebp+0x10) "\n")
20654 (flush *(ebp+0x10))
20655 (stop *(ebp+0x14) 1)
20656
20657
20658 $populate-mu-type:error2:
20659 (write-buffered *(ebp+0x10) "type ")
20660 (type-name *edi)
20661 (write-buffered *(ebp+0x10) %eax)
20662 (write-buffered *(ebp+0x10) ": 'addr' elements not allowed\n")
20663 (flush *(ebp+0x10))
20664 (stop *(ebp+0x14) 1)
20665
20666
20667 $populate-mu-type:error3:
20668 (write-buffered *(ebp+0x10) "type ")
20669 (type-name *edi)
20670 (write-buffered *(ebp+0x10) %eax)
20671 (write-buffered *(ebp+0x10) ": 'array' elements not allowed for now\n")
20672 (flush *(ebp+0x10))
20673 (stop *(ebp+0x14) 1)
20674
20675
20676 $populate-mu-type:error4:
20677 (write-buffered *(ebp+0x10) "type ")
20678 (type-name *edi)
20679 (write-buffered *(ebp+0x10) %eax)
20680 (write-buffered *(ebp+0x10) ": 'byte' elements not allowed\n")
20681 (flush *(ebp+0x10))
20682 (stop *(ebp+0x14) 1)
20683
20684
20685 $populate-mu-type:error5:
20686 (write-buffered *(ebp+0x10) "type ")
20687 (type-name *edi)
20688 (write-buffered *(ebp+0x10) %eax)
20689 (write-buffered *(ebp+0x10) ": 'slice' elements not allowed\n")
20690 (flush *(ebp+0x10))
20691 (stop *(ebp+0x14) 1)
20692
20693
20694 $populate-mu-type:error6:
20695 (write-buffered *(ebp+0x10) "type ")
20696 (type-name *edi)
20697 (write-buffered *(ebp+0x10) %eax)
20698 (write-buffered *(ebp+0x10) ": 'stream' elements not allowed for now\n")
20699 (flush *(ebp+0x10))
20700 (stop *(ebp+0x14) 1)
20701
20702
20703 type-name:
20704
20705 55/push-ebp
20706 89/<- %ebp 4/r32/esp
20707
20708 (index Type-id *(ebp+8))
20709 $type-name:end:
20710
20711 89/<- %esp 5/r32/ebp
20712 5d/pop-to-ebp
20713 c3/return
20714
20715 index:
20716
20717 55/push-ebp
20718 89/<- %ebp 4/r32/esp
20719
20720 56/push-esi
20721
20722
20723 8b/-> *(ebp+8) 6/r32/esi
20724
20725 8b/-> *(ebp+0xc) 0/r32/eax
20726
20727 8b/-> *(esi+eax<<2+0xc) 0/r32/eax
20728 $index:end:
20729
20730 5e/pop-to-esi
20731
20732 89/<- %esp 5/r32/ebp
20733 5d/pop-to-ebp
20734 c3/return
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745 populate-mu-type-sizes:
20746
20747 55/push-ebp
20748 89/<- %ebp 4/r32/esp
20749 $populate-mu-type-sizes:total-sizes:
20750
20751 (lookup *_Program-types *_Program-types->payload)
20752 {
20753
20754 3d/compare-eax-and 0/imm32/null
20755 74/jump-if-= break/disp8
20756 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
20757
20758 (lookup *(eax+0x10) *(eax+0x14))
20759 eb/jump loop/disp8
20760 }
20761 $populate-mu-type-sizes:offsets:
20762
20763 (lookup *_Program-types *_Program-types->payload)
20764 {
20765
20766 3d/compare-eax-and 0/imm32/null
20767 74/jump-if-= break/disp8
20768 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
20769
20770 (lookup *(eax+0x10) *(eax+0x14))
20771 eb/jump loop/disp8
20772 }
20773 $populate-mu-type-sizes:end:
20774
20775 89/<- %esp 5/r32/ebp
20776 5d/pop-to-ebp
20777 c3/return
20778
20779
20780
20781
20782 populate-mu-type-sizes-in-type:
20783
20784 55/push-ebp
20785 89/<- %ebp 4/r32/esp
20786
20787 50/push-eax
20788 51/push-ecx
20789 52/push-edx
20790 56/push-esi
20791 57/push-edi
20792
20793 8b/-> *(ebp+8) 6/r32/esi
20794
20795 81 7/subop/compare *(esi+0xc) 0/imm32
20796 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
20797
20798 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
20799 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
20800
20801 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
20802
20803 bf/copy-to-edi 0/imm32
20804
20805
20806 (lookup *(esi+4) *(esi+8))
20807 89/<- %ecx 0/r32/eax
20808
20809 8b/-> *ecx 2/r32/edx
20810
20811 8d/copy-address *(ecx+0xc) 1/r32/ecx
20812
20813 8d/copy-address *(ecx+edx) 2/r32/edx
20814 {
20815 $populate-mu-type-sizes-in-type:loop:
20816
20817 39/compare %ecx 2/r32/edx
20818 73/jump-if-addr>= break/disp8
20819
20820 (lookup *(ecx+8) *(ecx+0xc))
20821
20822 81 7/subop/compare *eax 0/imm32
20823 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
20824
20825 (lookup *eax *(eax+4))
20826 (compute-size-of-var %eax *(ebp+0xc) *(ebp+0x10))
20827
20828 01/add-to %edi 0/r32/eax
20829
20830 81 0/subop/add %ecx 0x10/imm32
20831
20832 eb/jump loop/disp8
20833 }
20834
20835 89/<- *(esi+0xc) 7/r32/edi
20836 $populate-mu-type-sizes-in-type:end:
20837
20838 5f/pop-to-edi
20839 5e/pop-to-esi
20840 5a/pop-to-edx
20841 59/pop-to-ecx
20842 58/pop-to-eax
20843
20844 89/<- %esp 5/r32/ebp
20845 5d/pop-to-ebp
20846 c3/return
20847
20848 $populate-mu-type-sizes-in-type:abort:
20849 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
20850 (flush *(ebp+0xc))
20851 (stop *(ebp+0x10) 1)
20852
20853
20854
20855
20856 compute-size-of-var:
20857
20858 55/push-ebp
20859 89/<- %ebp 4/r32/esp
20860
20861 51/push-ecx
20862
20863 8b/-> *(ebp+8) 1/r32/ecx
20864 (lookup *(ecx+8) *(ecx+0xc))
20865 89/<- %ecx 0/r32/eax
20866
20867 {
20868 81 7/subop/compare *ecx 0/imm32/false
20869 75/jump-if-!= break/disp8
20870 (lookup *(ecx+4) *(ecx+8))
20871 89/<- %ecx 0/r32/eax
20872 }
20873
20874 (compute-size-of-type-id *(ecx+4) *(ebp+0xc) *(ebp+0x10))
20875 $compute-size-of-var:end:
20876
20877 59/pop-to-ecx
20878
20879 89/<- %esp 5/r32/ebp
20880 5d/pop-to-ebp
20881 c3/return
20882
20883 compute-size-of-type-id:
20884
20885 55/push-ebp
20886 89/<- %ebp 4/r32/esp
20887
20888 51/push-ecx
20889
20890 68/push 0/imm32
20891 68/push 0/imm32
20892 89/<- %ecx 4/r32/esp
20893
20894 8b/-> *(ebp+8) 0/r32/eax
20895
20896 3d/compare-eax-and 0/imm32/literal
20897 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
20898
20899 3d/compare-eax-and 8/imm32/byte
20900 {
20901 75/jump-if-!= break/disp8
20902 b8/copy-to-eax 4/imm32
20903 eb/jump $compute-size-of-type-id:end/disp8
20904 }
20905
20906 3d/compare-eax-and 4/imm32/handle
20907 {
20908 75/jump-if-!= break/disp8
20909 b8/copy-to-eax 8/imm32
20910 eb/jump $compute-size-of-type-id:end/disp8
20911 }
20912
20913 3d/compare-eax-and 0xc/imm32/slice
20914 {
20915 75/jump-if-!= break/disp8
20916 b8/copy-to-eax 8/imm32
20917 eb/jump $compute-size-of-type-id:end/disp8
20918 }
20919
20920
20921 (find-typeinfo %eax %ecx)
20922 {
20923 81 7/subop/compare *ecx 0/imm32
20924 74/jump-if-= break/disp8
20925 $compute-size-of-type-id:user-defined:
20926 (lookup *ecx *(ecx+4))
20927 (populate-mu-type-sizes-in-type %eax *(ebp+0xc) *(ebp+0x10))
20928 8b/-> *(eax+0xc) 0/r32/eax
20929 eb/jump $compute-size-of-type-id:end/disp8
20930 }
20931
20932 b8/copy-to-eax 4/imm32
20933 $compute-size-of-type-id:end:
20934
20935 81 0/subop/add %esp 8/imm32
20936
20937 59/pop-to-ecx
20938
20939 89/<- %esp 5/r32/ebp
20940 5d/pop-to-ebp
20941 c3/return
20942
20943
20944
20945
20946 populate-mu-type-offsets:
20947
20948 55/push-ebp
20949 89/<- %ebp 4/r32/esp
20950
20951 50/push-eax
20952 51/push-ecx
20953 52/push-edx
20954 53/push-ebx
20955 56/push-esi
20956 57/push-edi
20957
20958
20959 bf/copy-to-edi 0/imm32
20960
20961 8b/-> *(ebp+8) 1/r32/ecx
20962 (lookup *(ecx+4) *(ecx+8))
20963 89/<- %ecx 0/r32/eax
20964
20965 8b/-> *ecx 2/r32/edx
20966 c1 5/subop/shift-right-logical %edx 4/imm8
20967
20968 bb/copy-to-ebx 0/imm32
20969 {
20970 $populate-mu-type-offsets:loop:
20971 39/compare %ebx 2/r32/edx
20972 0f 8d/jump-if->= break/disp32
20973
20974
20975
20976
20977
20978
20979
20980 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
20981 89/<- %esi 0/r32/eax
20982
20983 81 7/subop/compare %esi 0/imm32
20984 74/jump-if-= $populate-mu-type-offsets:end/disp8
20985
20986 81 7/subop/compare *esi 0/imm32
20987 74/jump-if-= $populate-mu-type-offsets:end/disp8
20988
20989
20990 (lookup *(esi+0xc) *(esi+0x10))
20991 89/<- *(eax+0x14) 7/r32/edi
20992
20993 (lookup *esi *(esi+4))
20994 (size-of %eax)
20995 01/add-to %edi 0/r32/eax
20996
20997 43/increment-ebx
20998 e9/jump loop/disp32
20999 }
21000 $populate-mu-type-offsets:end:
21001
21002 5f/pop-to-edi
21003 5e/pop-to-esi
21004 5b/pop-to-ebx
21005 5a/pop-to-edx
21006 59/pop-to-ecx
21007 58/pop-to-eax
21008
21009 89/<- %esp 5/r32/ebp
21010 5d/pop-to-ebp
21011 c3/return
21012
21013 locate-typeinfo-entry-with-index:
21014
21015 55/push-ebp
21016 89/<- %ebp 4/r32/esp
21017
21018 51/push-ecx
21019 52/push-edx
21020 53/push-ebx
21021 56/push-esi
21022 57/push-edi
21023
21024 8b/-> *(ebp+8) 6/r32/esi
21025
21026 8d/copy-address *(esi+0xc) 1/r32/ecx
21027
21028 8b/-> *esi 2/r32/edx
21029 8d/copy-address *(ecx+edx) 2/r32/edx
21030 {
21031 $locate-typeinfo-entry-with-index:loop:
21032 39/compare %ecx 2/r32/edx
21033 73/jump-if-addr>= break/disp8
21034
21035 (lookup *(ecx+8) *(ecx+0xc))
21036
21037 8b/-> *(eax+8) 3/r32/ebx
21038
21039
21040
21041
21042
21043
21044 39/compare *(ebp+0xc) 3/r32/ebx
21045 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
21046
21047 81 0/subop/add %ecx 0x10/imm32
21048
21049 eb/jump loop/disp8
21050 }
21051
21052 b8/copy-to-eax 0/imm32
21053 $locate-typeinfo-entry-with-index:end:
21054
21055
21056
21057
21058
21059 5f/pop-to-edi
21060 5e/pop-to-esi
21061 5b/pop-to-ebx
21062 5a/pop-to-edx
21063 59/pop-to-ecx
21064
21065 89/<- %esp 5/r32/ebp
21066 5d/pop-to-ebp
21067 c3/return
21068
21069 dump-typeinfos:
21070
21071 55/push-ebp
21072 89/<- %ebp 4/r32/esp
21073
21074 50/push-eax
21075
21076 (write-buffered Stderr *(ebp+8))
21077 (flush Stderr)
21078
21079 (lookup *_Program-types *_Program-types->payload)
21080 {
21081
21082 3d/compare-eax-and 0/imm32
21083 74/jump-if-= break/disp8
21084 (write-buffered Stderr "---\n")
21085 (flush Stderr)
21086 (dump-typeinfo %eax)
21087
21088 (lookup *(eax+0x10) *(eax+0x14))
21089 eb/jump loop/disp8
21090 }
21091 $dump-typeinfos:end:
21092
21093 58/pop-to-eax
21094
21095 89/<- %esp 5/r32/ebp
21096 5d/pop-to-ebp
21097 c3/return
21098
21099 dump-typeinfo:
21100
21101 55/push-ebp
21102 89/<- %ebp 4/r32/esp
21103
21104 50/push-eax
21105 51/push-ecx
21106 52/push-edx
21107 53/push-ebx
21108 56/push-esi
21109 57/push-edi
21110
21111 8b/-> *(ebp+8) 6/r32/esi
21112
21113 (lookup *(esi+4) *(esi+8))
21114 89/<- %ecx 0/r32/eax
21115 (write-buffered Stderr "id:")
21116 (write-int32-hex-buffered Stderr *esi)
21117 (write-buffered Stderr "\n")
21118 (write-buffered Stderr "fields @ ")
21119 (write-int32-hex-buffered Stderr %ecx)
21120 (write-buffered Stderr Newline)
21121 (flush Stderr)
21122 (write-buffered Stderr " write: ")
21123 (write-int32-hex-buffered Stderr *ecx)
21124 (write-buffered Stderr Newline)
21125 (flush Stderr)
21126 (write-buffered Stderr " read: ")
21127 (write-int32-hex-buffered Stderr *(ecx+4))
21128 (write-buffered Stderr Newline)
21129 (flush Stderr)
21130 (write-buffered Stderr " size: ")
21131 (write-int32-hex-buffered Stderr *(ecx+8))
21132 (write-buffered Stderr Newline)
21133 (flush Stderr)
21134
21135 8b/-> *ecx 2/r32/edx
21136
21137 8d/copy-address *(ecx+0xc) 1/r32/ecx
21138
21139 8d/copy-address *(ecx+edx) 2/r32/edx
21140 {
21141 $dump-typeinfo:loop:
21142
21143 39/compare %ecx 2/r32/edx
21144 0f 83/jump-if-addr>= break/disp32
21145 (write-buffered Stderr " row:\n")
21146 (write-buffered Stderr " key: ")
21147 (write-int32-hex-buffered Stderr *ecx)
21148 (write-buffered Stderr ",")
21149 (write-int32-hex-buffered Stderr *(ecx+4))
21150 (write-buffered Stderr " = '")
21151 (lookup *ecx *(ecx+4))
21152 (write-buffered Stderr %eax)
21153 (write-buffered Stderr "' @ ")
21154 (write-int32-hex-buffered Stderr %eax)
21155 (write-buffered Stderr Newline)
21156 (flush Stderr)
21157 (write-buffered Stderr " value: ")
21158 (write-int32-hex-buffered Stderr *(ecx+8))
21159 (write-buffered Stderr ",")
21160 (write-int32-hex-buffered Stderr *(ecx+0xc))
21161 (write-buffered Stderr " = typeinfo-entry@")
21162 (lookup *(ecx+8) *(ecx+0xc))
21163 (write-int32-hex-buffered Stderr %eax)
21164 (write-buffered Stderr Newline)
21165 (flush Stderr)
21166 (write-buffered Stderr " input var@")
21167 (dump-var 5 %eax)
21168 (lookup *(ecx+8) *(ecx+0xc))
21169 (write-buffered Stderr " index: ")
21170 (write-int32-hex-buffered Stderr *(eax+8))
21171 (write-buffered Stderr Newline)
21172 (flush Stderr)
21173 (write-buffered Stderr " output var@")
21174 8d/copy-address *(eax+0xc) 0/r32/eax
21175 (dump-var 5 %eax)
21176 (flush Stderr)
21177
21178 81 0/subop/add %ecx 0x10/imm32
21179
21180 e9/jump loop/disp32
21181 }
21182 $dump-typeinfo:end:
21183
21184 5f/pop-to-edi
21185 5e/pop-to-esi
21186 5b/pop-to-ebx
21187 5a/pop-to-edx
21188 59/pop-to-ecx
21189 58/pop-to-eax
21190
21191 89/<- %esp 5/r32/ebp
21192 5d/pop-to-ebp
21193 c3/return
21194
21195 dump-var:
21196
21197 55/push-ebp
21198 89/<- %ebp 4/r32/esp
21199
21200 50/push-eax
21201 53/push-ebx
21202
21203 8b/-> *(ebp+0xc) 0/r32/eax
21204
21205 (write-int32-hex-buffered Stderr *eax)
21206 (write-buffered Stderr ",")
21207 (write-int32-hex-buffered Stderr *(eax+4))
21208 (write-buffered Stderr "->")
21209 (lookup *eax *(eax+4))
21210 (write-int32-hex-buffered Stderr %eax)
21211 (write-buffered Stderr Newline)
21212 (flush Stderr)
21213 {
21214 3d/compare-eax-and 0/imm32
21215 0f 84/jump-if-= break/disp32
21216 (emit-indent Stderr *(ebp+8))
21217 (write-buffered Stderr "name: ")
21218 89/<- %ebx 0/r32/eax
21219 (write-int32-hex-buffered Stderr *ebx)
21220 (write-buffered Stderr ",")
21221 (write-int32-hex-buffered Stderr *(ebx+4))
21222 (write-buffered Stderr "->")
21223 (lookup *ebx *(ebx+4))
21224 (write-int32-hex-buffered Stderr %eax)
21225 {
21226 3d/compare-eax-and 0/imm32
21227 74/jump-if-= break/disp8
21228 (write-buffered Stderr Space)
21229 (write-buffered Stderr %eax)
21230 }
21231 (write-buffered Stderr Newline)
21232 (flush Stderr)
21233 (emit-indent Stderr *(ebp+8))
21234 (write-buffered Stderr "block depth: ")
21235 (write-int32-hex-buffered Stderr *(ebx+0x10))
21236 (write-buffered Stderr Newline)
21237 (flush Stderr)
21238 (emit-indent Stderr *(ebp+8))
21239 (write-buffered Stderr "stack offset: ")
21240 (write-int32-hex-buffered Stderr *(ebx+0x14))
21241 (write-buffered Stderr Newline)
21242 (flush Stderr)
21243 (emit-indent Stderr *(ebp+8))
21244 (write-buffered Stderr "reg: ")
21245 (write-int32-hex-buffered Stderr *(ebx+0x18))
21246 (write-buffered Stderr ",")
21247 (write-int32-hex-buffered Stderr *(ebx+0x1c))
21248 (write-buffered Stderr "->")
21249 (flush Stderr)
21250 (lookup *(ebx+0x18) *(ebx+0x1c))
21251 (write-int32-hex-buffered Stderr %eax)
21252 {
21253 3d/compare-eax-and 0/imm32
21254 74/jump-if-= break/disp8
21255 (write-buffered Stderr Space)
21256 (write-buffered Stderr %eax)
21257 }
21258 (write-buffered Stderr Newline)
21259 (flush Stderr)
21260 }
21261 $dump-var:end:
21262
21263 5b/pop-to-ebx
21264 58/pop-to-eax
21265
21266 89/<- %esp 5/r32/ebp
21267 5d/pop-to-ebp
21268 c3/return
21269
21270
21271
21272
21273
21274 check-mu-types:
21275
21276 55/push-ebp
21277 89/<- %ebp 4/r32/esp
21278
21279 50/push-eax
21280
21281 (lookup *_Program-functions *_Program-functions->payload)
21282 {
21283 $check-mu-types:loop:
21284
21285 3d/compare-eax-and 0/imm32
21286 0f 84/jump-if-= break/disp32
21287 +-- 8 lines: #? # dump curr->name ------------------------------------------------------------------------------------------------------------------------------------------------
21295 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
21296
21297 (lookup *(eax+0x20) *(eax+0x24))
21298 e9/jump loop/disp32
21299 }
21300 $check-mu-types:end:
21301
21302 58/pop-to-eax
21303
21304 89/<- %esp 5/r32/ebp
21305 5d/pop-to-ebp
21306 c3/return
21307
21308 check-mu-function:
21309
21310 55/push-ebp
21311 89/<- %ebp 4/r32/esp
21312
21313 50/push-eax
21314 56/push-esi
21315
21316 8b/-> *(ebp+8) 6/r32/esi
21317
21318 (lookup *(esi+0x10) *(esi+0x14))
21319 (check-all-unique-registers %eax %esi *(ebp+0xc) *(ebp+0x10))
21320
21321 (lookup *(esi+0x18) *(esi+0x1c))
21322 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
21323
21324 81 7/subop/compare *(esi+0x10) 0/imm32
21325 74/jump-if-= $check-mu-function:end/disp8
21326
21327 (check-final-stmt-is-return %eax %esi *(ebp+0xc) *(ebp+0x10))
21328 (check-no-breaks %eax %esi *(ebp+0xc) *(ebp+0x10))
21329 $check-mu-function:end:
21330
21331 5e/pop-to-esi
21332 58/pop-to-eax
21333
21334 89/<- %esp 5/r32/ebp
21335 5d/pop-to-ebp
21336 c3/return
21337
21338 check-mu-block:
21339
21340 55/push-ebp
21341 89/<- %ebp 4/r32/esp
21342
21343 50/push-eax
21344
21345 8b/-> *(ebp+8) 0/r32/eax
21346
21347 (lookup *(eax+4) *(eax+8))
21348
21349 {
21350 $check-mu-block:check-empty:
21351 3d/compare-eax-and 0/imm32
21352 0f 84/jump-if-= break/disp32
21353
21354 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21355 }
21356 $check-mu-block:end:
21357
21358 58/pop-to-eax
21359
21360 89/<- %esp 5/r32/ebp
21361 5d/pop-to-ebp
21362 c3/return
21363
21364 check-mu-stmt-list:
21365
21366 55/push-ebp
21367 89/<- %ebp 4/r32/esp
21368
21369 50/push-eax
21370 56/push-esi
21371
21372 8b/-> *(ebp+8) 6/r32/esi
21373 {
21374 $check-mu-stmt-list:loop:
21375 81 7/subop/compare %esi 0/imm32
21376 0f 84/jump-if-= break/disp32
21377
21378 (lookup *esi *(esi+4))
21379 {
21380 $check-mu-stmt-list:check-for-block:
21381 81 7/subop/compare *eax 0/imm32/block
21382 75/jump-if-!= break/disp8
21383 $check-mu-stmt-list:block:
21384 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21385 eb/jump $check-mu-stmt-list:continue/disp8
21386 }
21387 {
21388 $check-mu-stmt-list:check-for-stmt1:
21389 81 7/subop/compare *eax 1/imm32/stmt1
21390 0f 85/jump-if-!= break/disp32
21391 $check-mu-stmt-list:stmt1:
21392 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21393 eb/jump $check-mu-stmt-list:continue/disp8
21394 }
21395 {
21396 $check-mu-stmt-list:check-for-reg-var-def:
21397 81 7/subop/compare *eax 3/imm32/reg-var-def
21398 0f 85/jump-if-!= break/disp32
21399 $check-mu-stmt-list:reg-var-def:
21400 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21401 eb/jump $check-mu-stmt-list:continue/disp8
21402 }
21403 $check-mu-stmt-list:continue:
21404
21405 (lookup *(esi+8) *(esi+0xc))
21406 89/<- %esi 0/r32/eax
21407 e9/jump loop/disp32
21408 }
21409 $check-mu-stmt-list:end:
21410
21411 5e/pop-to-esi
21412 58/pop-to-eax
21413
21414 89/<- %esp 5/r32/ebp
21415 5d/pop-to-ebp
21416 c3/return
21417
21418 check-mu-stmt:
21419
21420 55/push-ebp
21421 89/<- %ebp 4/r32/esp
21422
21423 50/push-eax
21424
21425 (has-primitive-name? *(ebp+8))
21426 3d/compare-eax-and 0/imm32/false
21427 {
21428 74/jump-if-= break/disp8
21429 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21430 e9/jump $check-mu-stmt:end/disp32
21431 }
21432
21433
21434 (lookup *_Program-functions *_Program-functions->payload)
21435 (find-matching-function %eax *(ebp+8))
21436 3d/compare-eax-and 0/imm32
21437 {
21438 74/jump-if-= break/disp8
21439 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21440 eb/jump $check-mu-stmt:end/disp8
21441 }
21442
21443 (lookup *_Program-signatures *_Program-signatures->payload)
21444 (find-matching-function %eax *(ebp+8))
21445 3d/compare-eax-and 0/imm32
21446 {
21447 74/jump-if-= break/disp8
21448 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21449 eb/jump $check-mu-stmt:end/disp8
21450 }
21451
21452 e9/jump $check-mu-stmt:unknown-call/disp32
21453 $check-mu-stmt:end:
21454
21455 58/pop-to-eax
21456
21457 89/<- %esp 5/r32/ebp
21458 5d/pop-to-ebp
21459 c3/return
21460
21461 $check-mu-stmt:unknown-call:
21462 (write-buffered *(ebp+0x10) "unknown function '")
21463 8b/-> *(ebp+8) 0/r32/eax
21464 (lookup *(eax+4) *(eax+8))
21465 (write-buffered *(ebp+0x10) %eax)
21466 (write-buffered *(ebp+0x10) "'\n")
21467 (flush *(ebp+0x10))
21468 (stop *(ebp+0x14) 1)
21469
21470
21471 has-primitive-name?:
21472
21473 55/push-ebp
21474 89/<- %ebp 4/r32/esp
21475
21476 51/push-ecx
21477 56/push-esi
21478
21479 8b/-> *(ebp+8) 6/r32/esi
21480 (lookup *(esi+4) *(esi+8))
21481 89/<- %esi 0/r32/eax
21482
21483 (string-equal? %esi "return")
21484 3d/compare-eax-and 0/imm32/false
21485 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21486
21487 (string-equal? %esi "get")
21488 3d/compare-eax-and 0/imm32/false
21489 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21490
21491 (string-equal? %esi "index")
21492 3d/compare-eax-and 0/imm32/false
21493 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21494
21495 (string-equal? %esi "length")
21496 3d/compare-eax-and 0/imm32/false
21497 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21498
21499 (string-equal? %esi "compute-offset")
21500 3d/compare-eax-and 0/imm32/false
21501 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21502
21503 (string-equal? %esi "copy-object")
21504 3d/compare-eax-and 0/imm32/false
21505 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21506
21507 (string-equal? %esi "clear-object")
21508 3d/compare-eax-and 0/imm32/false
21509 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21510
21511 (string-equal? %esi "allocate")
21512 3d/compare-eax-and 0/imm32/false
21513 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21514
21515 (string-equal? %esi "populate")
21516 3d/compare-eax-and 0/imm32/false
21517 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21518
21519 (string-equal? %esi "populate-stream")
21520 3d/compare-eax-and 0/imm32/false
21521 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21522
21523 (string-equal? %esi "read-from-stream")
21524 3d/compare-eax-and 0/imm32/false
21525 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21526
21527 (string-equal? %esi "write-to-stream")
21528 3d/compare-eax-and 0/imm32/false
21529 0f 85/jump-if-!= $has-primitive-name?:end/disp32
21530
21531 b9/copy-to-ecx Primitives/imm32
21532 {
21533 $has-primitive-name?:loop:
21534
21535 81 7/subop/compare %ecx 0/imm32
21536 74/jump-if-= break/disp8
21537
21538 (lookup *ecx *(ecx+4))
21539
21540
21541
21542 (string-equal? %esi %eax)
21543 3d/compare-eax-and 0/imm32/false
21544 75/jump-if-!= $has-primitive-name?:end/disp8
21545 $has-primitive-name?:next-primitive:
21546
21547 (lookup *(ecx+0x3c) *(ecx+0x40))
21548 89/<- %ecx 0/r32/eax
21549
21550 e9/jump loop/disp32
21551 }
21552
21553 b8/copy-to-eax 0/imm32
21554 $has-primitive-name?:end:
21555
21556 5e/pop-to-esi
21557 59/pop-to-ecx
21558
21559 89/<- %esp 5/r32/ebp
21560 5d/pop-to-ebp
21561 c3/return
21562
21563 check-mu-primitive:
21564
21565 55/push-ebp
21566 89/<- %ebp 4/r32/esp
21567
21568 50/push-eax
21569 51/push-ecx
21570
21571 8b/-> *(ebp+8) 0/r32/eax
21572 (lookup *(eax+4) *(eax+8))
21573 89/<- %ecx 0/r32/eax
21574
21575 {
21576 (string-equal? %ecx "copy")
21577 3d/compare-eax-and 0/imm32/false
21578 74/jump-if-= break/disp8
21579 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21580 e9/jump $check-mu-primitive:end/disp32
21581 }
21582
21583 {
21584 (string-equal? %ecx "copy-to")
21585 3d/compare-eax-and 0/imm32/false
21586 74/jump-if-= break/disp8
21587 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21588 e9/jump $check-mu-primitive:end/disp32
21589 }
21590
21591 {
21592 (string-equal? %ecx "copy-byte")
21593 3d/compare-eax-and 0/imm32/false
21594 74/jump-if-= break/disp8
21595 (check-mu-copy-byte-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21596 e9/jump $check-mu-primitive:end/disp32
21597 }
21598
21599 {
21600 (string-equal? %ecx "copy-byte-to")
21601 3d/compare-eax-and 0/imm32/false
21602 74/jump-if-= break/disp8
21603 (check-mu-copy-byte-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21604 e9/jump $check-mu-primitive:end/disp32
21605 }
21606
21607 {
21608 (string-equal? %ecx "compare")
21609 3d/compare-eax-and 0/imm32/false
21610 74/jump-if-= break/disp8
21611 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21612 e9/jump $check-mu-primitive:end/disp32
21613 }
21614
21615 {
21616 (string-equal? %ecx "address")
21617 3d/compare-eax-and 0/imm32/false
21618 74/jump-if-= break/disp8
21619 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21620 e9/jump $check-mu-primitive:end/disp32
21621 }
21622
21623 {
21624 (string-equal? %ecx "return")
21625 3d/compare-eax-and 0/imm32/false
21626 74/jump-if-= break/disp8
21627 (check-mu-return-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21628 e9/jump $check-mu-primitive:end/disp32
21629 }
21630
21631 {
21632 (string-equal? %ecx "get")
21633 3d/compare-eax-and 0/imm32/false
21634 74/jump-if-= break/disp8
21635 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21636 e9/jump $check-mu-primitive:end/disp32
21637 }
21638
21639 {
21640 (string-equal? %ecx "index")
21641 3d/compare-eax-and 0/imm32/false
21642 74/jump-if-= break/disp8
21643 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21644 e9/jump $check-mu-primitive:end/disp32
21645 }
21646
21647 {
21648 (string-equal? %ecx "length")
21649 3d/compare-eax-and 0/imm32/false
21650 74/jump-if-= break/disp8
21651 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21652 e9/jump $check-mu-primitive:end/disp32
21653 }
21654
21655 {
21656 (string-equal? %ecx "compute-offset")
21657 3d/compare-eax-and 0/imm32/false
21658 74/jump-if-= break/disp8
21659 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21660 e9/jump $check-mu-primitive:end/disp32
21661 }
21662
21663 {
21664 (string-equal? %ecx "copy-object")
21665 3d/compare-eax-and 0/imm32/false
21666 74/jump-if-= break/disp8
21667 (check-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21668 e9/jump $check-mu-primitive:end/disp32
21669 }
21670
21671 {
21672 (string-equal? %ecx "clear-object")
21673 3d/compare-eax-and 0/imm32/false
21674 74/jump-if-= break/disp8
21675 (check-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21676 e9/jump $check-mu-primitive:end/disp32
21677 }
21678
21679 {
21680 (string-equal? %ecx "allocate")
21681 3d/compare-eax-and 0/imm32/false
21682 74/jump-if-= break/disp8
21683 (check-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21684 e9/jump $check-mu-primitive:end/disp32
21685 }
21686
21687 {
21688 (string-equal? %ecx "populate")
21689 3d/compare-eax-and 0/imm32/false
21690 74/jump-if-= break/disp8
21691 (check-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21692 e9/jump $check-mu-primitive:end/disp32
21693 }
21694
21695 {
21696 (string-equal? %ecx "populate-stream")
21697 3d/compare-eax-and 0/imm32/false
21698 74/jump-if-= break/disp8
21699 (check-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21700 e9/jump $check-mu-primitive:end/disp32
21701 }
21702
21703 {
21704 (string-equal? %ecx "read-from-stream")
21705 3d/compare-eax-and 0/imm32/false
21706 74/jump-if-= break/disp8
21707 (check-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21708 e9/jump $check-mu-primitive:end/disp32
21709 }
21710
21711 {
21712 (string-equal? %ecx "write-to-stream")
21713 3d/compare-eax-and 0/imm32/false
21714 74/jump-if-= break/disp8
21715 (check-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21716 e9/jump $check-mu-primitive:end/disp32
21717 }
21718
21719 {
21720 (string-equal? %ecx "convert")
21721 3d/compare-eax-and 0/imm32/false
21722 74/jump-if-= break/disp8
21723 (check-mu-convert-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21724 e9/jump $check-mu-primitive:end/disp32
21725 }
21726
21727 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21728 $check-mu-primitive:end:
21729
21730 59/pop-to-ecx
21731 58/pop-to-eax
21732
21733 89/<- %esp 5/r32/ebp
21734 5d/pop-to-ebp
21735 c3/return
21736
21737
21738 check-mu-numberlike-primitive:
21739
21740 55/push-ebp
21741 89/<- %ebp 4/r32/esp
21742
21743 50/push-eax
21744 51/push-ecx
21745 56/push-esi
21746
21747 8b/-> *(ebp+8) 6/r32/esi
21748
21749 b9/copy-to-ecx 2/imm32
21750
21751
21752 (lookup *(esi+0x14) *(esi+0x18))
21753 {
21754 3d/compare-eax-and 0/imm32
21755 74/jump-if-= break/disp8
21756 $check-mu-numberlike-primitive:output:
21757 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21758 (lookup *(eax+8) *(eax+0xc))
21759 3d/compare-eax-and 0/imm32
21760 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
21761
21762
21763 49/decrement-ecx
21764 }
21765
21766 (lookup *(esi+0xc) *(esi+0x10))
21767 {
21768 3d/compare-eax-and 0/imm32
21769 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
21770 $check-mu-numberlike-primitive:first-inout:
21771 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21772
21773 49/decrement-ecx
21774 }
21775
21776 (lookup *(eax+8) *(eax+0xc))
21777 {
21778 3d/compare-eax-and 0/imm32
21779 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
21780 $check-mu-numberlike-primitive:second-inout:
21781
21782 81 7/subop/compare %ecx 0/imm32
21783 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
21784 $check-mu-numberlike-primitive:second-inout-permitted:
21785 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
21786 }
21787 $check-mu-numberlike-primitive:third-inout:
21788
21789 81 7/subop/compare *(eax+8) 0/imm32
21790 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
21791 $check-mu-numberlike-primitive:end:
21792
21793 5e/pop-to-esi
21794 59/pop-to-ecx
21795 58/pop-to-eax
21796
21797 89/<- %esp 5/r32/ebp
21798 5d/pop-to-ebp
21799 c3/return
21800
21801 $check-mu-numberlike-primitive:error-too-many-inouts:
21802 (write-buffered *(ebp+0x10) "fn ")
21803 8b/-> *(ebp+0xc) 0/r32/eax
21804 (lookup *eax *(eax+4))
21805 (write-buffered *(ebp+0x10) %eax)
21806 (write-buffered *(ebp+0x10) ": stmt ")
21807 (lookup *(esi+4) *(esi+8))
21808 (write-buffered *(ebp+0x10) %eax)
21809 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
21810 (flush *(ebp+0x10))
21811 (stop *(ebp+0x14) 1)
21812
21813
21814 $check-mu-numberlike-primitive:error-too-many-outputs:
21815 (write-buffered *(ebp+0x10) "fn ")
21816 8b/-> *(ebp+0xc) 0/r32/eax
21817 (lookup *eax *(eax+4))
21818 (write-buffered *(ebp+0x10) %eax)
21819 (write-buffered *(ebp+0x10) ": stmt ")
21820 (lookup *(esi+4) *(esi+8))
21821 (write-buffered *(ebp+0x10) %eax)
21822 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
21823 (flush *(ebp+0x10))
21824 (stop *(ebp+0x14) 1)
21825
21826
21827 check-mu-numberlike-arg:
21828
21829 55/push-ebp
21830 89/<- %ebp 4/r32/esp
21831
21832 50/push-eax
21833 56/push-esi
21834
21835 8b/-> *(ebp+8) 0/r32/eax
21836 (lookup *eax *(eax+4))
21837 (lookup *(eax+8) *(eax+0xc))
21838 89/<- %esi 0/r32/eax
21839 $check-mu-numberlike-arg:check-literal:
21840
21841 (simple-mu-type? %esi 0)
21842 3d/compare-eax-and 0/imm32/false
21843 0f 85/jump-if-!= $check-mu-numberlike-arg:end/disp32
21844 $check-mu-numberlike-arg:check-addr:
21845
21846 {
21847 (mu-addr-type? %esi)
21848 3d/compare-eax-and 0/imm32/false
21849 74/jump-if-= break/disp8
21850 8b/-> *(ebp+8) 0/r32/eax
21851 8b/-> *(eax+0x10) 0/r32/eax
21852 3d/compare-eax-and 0/imm32/false
21853 {
21854 74/jump-if-= break/disp8
21855 (lookup *(esi+0xc) *(esi+0x10))
21856
21857 81 7/subop/compare *(eax+0xc) 0/imm32
21858 {
21859 75/jump-if-!= break/disp8
21860 (lookup *(eax+4) *(eax+8))
21861 }
21862 (mu-addr-type? %eax)
21863 3d/compare-eax-and 0/imm32/false
21864 74/jump-if-= $check-mu-numberlike-arg:end/disp8
21865 }
21866 }
21867 $check-mu-numberlike-arg:output-checks:
21868 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
21869 $check-mu-numberlike-arg:end:
21870
21871 5e/pop-to-esi
21872 58/pop-to-eax
21873
21874 89/<- %esp 5/r32/ebp
21875 5d/pop-to-ebp
21876 c3/return
21877
21878 check-mu-numberlike-output:
21879
21880 55/push-ebp
21881 89/<- %ebp 4/r32/esp
21882
21883 50/push-eax
21884
21885 (mu-numberlike-output-var? *(ebp+8))
21886 3d/compare-eax-and 0/imm32/false
21887 0f 84/jump-if-= $check-mu-numberlike-output:fail/disp32
21888 $check-mu-numberlike-output:end:
21889
21890 58/pop-to-eax
21891
21892 89/<- %esp 5/r32/ebp
21893 5d/pop-to-ebp
21894 c3/return
21895
21896 $check-mu-numberlike-output:fail:
21897
21898 (write-buffered *(ebp+0x14) "fn ")
21899 8b/-> *(ebp+0x10) 0/r32/eax
21900 (lookup *eax *(eax+4))
21901 (write-buffered *(ebp+0x14) %eax)
21902 (write-buffered *(ebp+0x14) ": stmt ")
21903 8b/-> *(ebp+0xc) 0/r32/eax
21904 (lookup *(eax+4) *(eax+8))
21905 (write-buffered *(ebp+0x14) %eax)
21906 (write-buffered *(ebp+0x14) ": '")
21907 8b/-> *(ebp+8) 0/r32/eax
21908 (lookup *eax *(eax+4))
21909 (lookup *eax *(eax+4))
21910 (write-buffered *(ebp+0x14) %eax)
21911 (write-buffered *(ebp+0x14) "' must be a non-addr non-offset scalar\n")
21912 (flush *(ebp+0x14))
21913 (stop *(ebp+0x18) 1)
21914
21915
21916 mu-numberlike-output-var?:
21917
21918 55/push-ebp
21919 89/<- %ebp 4/r32/esp
21920
21921 8b/-> *(ebp+8) 0/r32/eax
21922 (lookup *eax *(eax+4))
21923 (lookup *(eax+8) *(eax+0xc))
21924 (mu-numberlike-output? %eax)
21925 $mu-numberlike-output-var?:end:
21926
21927 89/<- %esp 5/r32/ebp
21928 5d/pop-to-ebp
21929 c3/return
21930
21931 mu-numberlike-output?:
21932
21933 55/push-ebp
21934 89/<- %ebp 4/r32/esp
21935
21936 56/push-esi
21937
21938 8b/-> *(ebp+8) 6/r32/esi
21939 $mu-numberlike-output?:check-int:
21940
21941 (simple-mu-type? %esi 1)
21942 3d/compare-eax-and 0/imm32/false
21943 0f 85/jump-if-!= $mu-numberlike-output?:return-true/disp32
21944 $mu-numberlike-output?:check-float:
21945
21946 (simple-mu-type? %esi 0xf)
21947 3d/compare-eax-and 0/imm32/false
21948 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
21949 $mu-numberlike-output?:check-boolean:
21950
21951 (simple-mu-type? %esi 5)
21952 3d/compare-eax-and 0/imm32/false
21953 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
21954 $mu-numberlike-output?:check-byte:
21955
21956 (simple-mu-type? %esi 8)
21957 3d/compare-eax-and 0/imm32/false
21958 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
21959 $mu-numberlike-output?:check-code-point:
21960
21961 (simple-mu-type? %esi 0xd)
21962 3d/compare-eax-and 0/imm32/false
21963 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
21964 $mu-numberlike-output?:check-grapheme:
21965
21966 (simple-mu-type? %esi 0xe)
21967 3d/compare-eax-and 0/imm32/false
21968 75/jump-if-!= $mu-numberlike-output?:return-true/disp8
21969 $mu-numberlike-output?:return-false:
21970 b8/copy-to-eax 0/imm32/false
21971 eb/jump $mu-numberlike-output?:end/disp8
21972 $mu-numberlike-output?:return-true:
21973 b8/copy-to-eax 1/imm32/true
21974 $mu-numberlike-output?:end:
21975
21976 5e/pop-to-esi
21977
21978 89/<- %esp 5/r32/ebp
21979 5d/pop-to-ebp
21980 c3/return
21981
21982 check-mu-copy-stmt:
21983
21984 55/push-ebp
21985 89/<- %ebp 4/r32/esp
21986
21987 50/push-eax
21988 51/push-ecx
21989 52/push-edx
21990 56/push-esi
21991 57/push-edi
21992
21993 81 5/subop/subtract %esp 0x60/imm32
21994 68/push 0x60/imm32/size
21995 68/push 0/imm32/read
21996 68/push 0/imm32/write
21997 89/<- %edx 4/r32/esp
21998 $check-mu-copy-stmt:get-output:
21999
22000 8b/-> *(ebp+8) 6/r32/esi
22001
22002 (lookup *(esi+0x14) *(esi+0x18))
22003 89/<- %edi 0/r32/eax
22004
22005 3d/compare-eax-and 0/imm32
22006 0f 84/jump-if-= $check-mu-copy-stmt:error-no-output/disp32
22007
22008 (lookup *(edi+8) *(edi+0xc))
22009 3d/compare-eax-and 0/imm32
22010 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-outputs/disp32
22011 $check-mu-copy-stmt:get-inout:
22012
22013 (lookup *(esi+0xc) *(esi+0x10))
22014 89/<- %esi 0/r32/eax
22015
22016 3d/compare-eax-and 0/imm32
22017 0f 84/jump-if-= $check-mu-copy-stmt:error-no-inout/disp32
22018
22019 (lookup *(esi+8) *(esi+0xc))
22020 3d/compare-eax-and 0/imm32
22021 0f 85/jump-if-!= $check-mu-copy-stmt:error-too-many-inouts/disp32
22022 $check-mu-copy-stmt:types:
22023
22024 (lookup *esi *(esi+4))
22025 (size-of %eax)
22026 3d/compare-eax-and 4/imm32
22027 0f 8f/jump-if-> $check-mu-copy-stmt:error-inout-too-large/disp32
22028
22029 (lookup *esi *(esi+4))
22030 (lookup *(eax+8) *(eax+0xc))
22031 89/<- %ecx 0/r32/eax
22032
22033 8b/-> *(esi+0x10) 0/r32/eax
22034 3d/compare-eax-and 0/imm32/false
22035 {
22036 74/jump-if-= break/disp8
22037 (lookup *(ecx+0xc) *(ecx+0x10))
22038
22039 81 7/subop/compare *(eax+0xc) 0/imm32
22040 {
22041 75/jump-if-!= break/disp8
22042 (lookup *(eax+4) *(eax+8))
22043 }
22044 89/<- %ecx 0/r32/eax
22045 }
22046
22047 (lookup *edi *(edi+4))
22048 (lookup *(eax+0x18) *(eax+0x1c))
22049 3d/compare-eax-and 0/imm32
22050 0f 84/jump-if-= $check-mu-copy-stmt:error-output-not-in-register/disp32
22051
22052 (lookup *edi *(edi+4))
22053 (lookup *(eax+8) *(eax+0xc))
22054
22055 (type-match? %eax %ecx %edx)
22056 3d/compare-eax-and 0/imm32
22057 0f 85/jump-if-!= $check-mu-copy-stmt:end/disp32
22058
22059 {
22060 (lookup *edi *(edi+4))
22061 (lookup *(eax+8) *(eax+0xc))
22062 (mu-addr-type? %eax)
22063 3d/compare-eax-and 0/imm32/false
22064 74/jump-if-= break/disp8
22065 (lookup *esi *(esi+4))
22066 (lookup *eax *(eax+4))
22067 (string-equal? %eax "0")
22068 3d/compare-eax-and 0/imm32/false
22069 74/jump-if-= break/disp8
22070 e9/jump $check-mu-copy-stmt:end/disp32
22071 }
22072
22073 {
22074 (lookup *edi *(edi+4))
22075 (lookup *(eax+8) *(eax+0xc))
22076 81 7/subop/compare *eax 0/imm32/false
22077 75/jump-if-!= break/disp8
22078 (lookup *(eax+4) *(eax+8))
22079 (simple-mu-type? %eax 7)
22080 3d/compare-eax-and 0/imm32/false
22081 74/jump-if-= break/disp8
22082 (lookup *esi *(esi+4))
22083 (lookup *eax *(eax+4))
22084 (string-equal? %eax "0")
22085 3d/compare-eax-and 0/imm32/false
22086 74/jump-if-= break/disp8
22087 e9/jump $check-mu-copy-stmt:end/disp32
22088 }
22089
22090 {
22091 (lookup *edi *(edi+4))
22092 (lookup *(eax+8) *(eax+0xc))
22093 (simple-mu-type? %eax 8)
22094 3d/compare-eax-and 0/imm32/false
22095 74/jump-if-= break/disp8
22096 (lookup *esi *(esi+4))
22097 (lookup *(eax+8) *(eax+0xc))
22098 (simple-mu-type? %eax 0)
22099 3d/compare-eax-and 0/imm32/false
22100 0f 84/jump-if-= $check-mu-copy-stmt:error-non-literal-to-byte/disp32
22101 eb/jump $check-mu-copy-stmt:end/disp8
22102 }
22103
22104 (check-mu-numberlike-output %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22105 $check-mu-copy-stmt:end:
22106
22107 81 0/subop/add %esp 0x6c/imm32
22108
22109 5f/pop-to-edi
22110 5e/pop-to-esi
22111 5a/pop-to-edx
22112 59/pop-to-ecx
22113 58/pop-to-eax
22114
22115 89/<- %esp 5/r32/ebp
22116 5d/pop-to-ebp
22117 c3/return
22118
22119 $check-mu-copy-stmt:error-no-inout:
22120 (write-buffered *(ebp+0x10) "fn ")
22121 8b/-> *(ebp+0xc) 0/r32/eax
22122 (lookup *eax *(eax+4))
22123 (write-buffered *(ebp+0x10) %eax)
22124 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an inout\n")
22125 (flush *(ebp+0x10))
22126 (stop *(ebp+0x14) 1)
22127
22128
22129 $check-mu-copy-stmt:error-too-many-inouts:
22130 (write-buffered *(ebp+0x10) "fn ")
22131 8b/-> *(ebp+0xc) 0/r32/eax
22132 (lookup *eax *(eax+4))
22133 (write-buffered *(ebp+0x10) %eax)
22134 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one inout\n")
22135 (flush *(ebp+0x10))
22136 (stop *(ebp+0x14) 1)
22137
22138
22139 $check-mu-copy-stmt:error-no-output:
22140 (write-buffered *(ebp+0x10) "fn ")
22141 8b/-> *(ebp+0xc) 0/r32/eax
22142 (lookup *eax *(eax+4))
22143 (write-buffered *(ebp+0x10) %eax)
22144 (write-buffered *(ebp+0x10) ": stmt 'copy' expects an output\n")
22145 (flush *(ebp+0x10))
22146 (stop *(ebp+0x14) 1)
22147
22148
22149 $check-mu-copy-stmt:error-output-not-in-register:
22150 (write-buffered *(ebp+0x10) "fn ")
22151 8b/-> *(ebp+0xc) 0/r32/eax
22152 (lookup *eax *(eax+4))
22153 (write-buffered *(ebp+0x10) %eax)
22154 (write-buffered *(ebp+0x10) ": stmt copy: output '")
22155 (lookup *edi *(edi+4))
22156 (lookup *eax *(eax+4))
22157 (write-buffered *(ebp+0x10) %eax)
22158 (write-buffered *(ebp+0x10) "' not in a register\n")
22159 (flush *(ebp+0x10))
22160 (stop *(ebp+0x14) 1)
22161
22162
22163 $check-mu-copy-stmt:error-too-many-outputs:
22164 (write-buffered *(ebp+0x10) "fn ")
22165 8b/-> *(ebp+0xc) 0/r32/eax
22166 (lookup *eax *(eax+4))
22167 (write-buffered *(ebp+0x10) %eax)
22168 (write-buffered *(ebp+0x10) ": stmt 'copy' must have just one output\n")
22169 (flush *(ebp+0x10))
22170 (stop *(ebp+0x14) 1)
22171
22172
22173 $check-mu-copy-stmt:error-inout-too-large:
22174 (write-buffered *(ebp+0x10) "fn ")
22175 8b/-> *(ebp+0xc) 0/r32/eax
22176 (lookup *eax *(eax+4))
22177 (write-buffered *(ebp+0x10) %eax)
22178 (write-buffered *(ebp+0x10) ": stmt copy: '")
22179 (lookup *esi *(esi+4))
22180 (lookup *eax *(eax+4))
22181 (write-buffered *(ebp+0x10) %eax)
22182 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
22183 (flush *(ebp+0x10))
22184 (stop *(ebp+0x14) 1)
22185
22186
22187 $check-mu-copy-stmt:error-non-literal-to-byte:
22188 (write-buffered *(ebp+0x10) "fn ")
22189 8b/-> *(ebp+0xc) 0/r32/eax
22190 (lookup *eax *(eax+4))
22191 (write-buffered *(ebp+0x10) %eax)
22192 (write-buffered *(ebp+0x10) ": stmt copy: cannot copy non-literal to '")
22193 (lookup *edi *(edi+4))
22194 (lookup *eax *(eax+4))
22195 (write-buffered *(ebp+0x10) %eax)
22196 (write-buffered *(ebp+0x10) "' of type byte; use copy-byte\n")
22197 (flush *(ebp+0x10))
22198 (stop *(ebp+0x14) 1)
22199
22200
22201 check-mu-copy-to-stmt:
22202
22203 55/push-ebp
22204 89/<- %ebp 4/r32/esp
22205
22206 50/push-eax
22207 51/push-ecx
22208 52/push-edx
22209 53/push-ebx
22210 56/push-esi
22211 57/push-edi
22212
22213 81 5/subop/subtract %esp 0x60/imm32
22214 68/push 0x60/imm32/size
22215 68/push 0/imm32/read
22216 68/push 0/imm32/write
22217 89/<- %edx 4/r32/esp
22218
22219 8b/-> *(ebp+8) 6/r32/esi
22220 $check-mu-copy-to-stmt:check-for-output:
22221
22222 (lookup *(esi+0x14) *(esi+0x18))
22223 3d/compare-eax-and 0/imm32
22224 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-too-many-outputs/disp32
22225 $check-mu-copy-to-stmt:get-dest:
22226
22227 (lookup *(esi+0xc) *(esi+0x10))
22228 89/<- %edi 0/r32/eax
22229
22230 3d/compare-eax-and 0/imm32
22231 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22232 $check-mu-copy-to-stmt:get-src:
22233
22234 (lookup *(edi+8) *(edi+0xc))
22235 89/<- %esi 0/r32/eax
22236
22237 3d/compare-eax-and 0/imm32
22238 0f 84/jump-if-= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22239
22240 (lookup *(esi+8) *(esi+0xc))
22241 3d/compare-eax-and 0/imm32
22242 0f 85/jump-if-!= $check-mu-copy-to-stmt:error-incorrect-inouts/disp32
22243 $check-mu-copy-to-stmt:types:
22244
22245 (lookup *esi *(esi+4))
22246 (size-of %eax)
22247 3d/compare-eax-and 4/imm32
22248 0f 8f/jump-if-> $check-mu-copy-to-stmt:error-src-too-large/disp32
22249
22250 (lookup *esi *(esi+4))
22251 (lookup *(eax+8) *(eax+0xc))
22252 89/<- %ecx 0/r32/eax
22253
22254
22255 {
22256 (lookup *esi *(esi+4))
22257 (lookup *(eax+0x8) *(eax+0xc))
22258 (simple-mu-type? %eax 0)
22259 3d/compare-eax-and 0/imm32
22260 75/jump-if-!= break/disp8
22261 (lookup *esi *(esi+4))
22262 (lookup *(eax+0x18) *(eax+0x1c))
22263 3d/compare-eax-and 0/imm32
22264 75/jump-if-!= break/disp8
22265 e9/jump $check-mu-copy-to-stmt:error-src-not-literal-or-in-register/disp32
22266 }
22267
22268 (lookup *edi *(edi+4))
22269 (lookup *(eax+8) *(eax+0xc))
22270 89/<- %ebx 0/r32/eax
22271
22272 $check-mu-copy-to-stmt:check-dest-deref:
22273 8b/-> *(edi+0x10) 0/r32/eax
22274 3d/compare-eax-and 0/imm32/false
22275 {
22276 74/jump-if-= break/disp8
22277 (lookup *(ebx+0xc) *(ebx+0x10))
22278 $check-mu-copy-to-stmt:dest-is-deref:
22279
22280 81 7/subop/compare *(eax+0xc) 0/imm32
22281 {
22282 75/jump-if-!= break/disp8
22283 $check-mu-copy-to-stmt:dest-is-deref2:
22284 (lookup *(eax+4) *(eax+8))
22285 }
22286 89/<- %ebx 0/r32/eax
22287 }
22288
22289 {
22290 $check-mu-copy-to-stmt:final-check-byte:
22291 (simple-mu-type? %ebx 8)
22292 3d/compare-eax-and 0/imm32/false
22293 74/jump-if-= break/disp8
22294 (simple-mu-type? %ecx 0)
22295 3d/compare-eax-and 0/imm32/false
22296 0f 84/jump-if-= $check-mu-copy-to-stmt:error-non-literal-to-byte/disp32
22297 }
22298
22299 (type-match? %ebx %ecx %edx)
22300 3d/compare-eax-and 0/imm32
22301 0f 85/jump-if-!= $check-mu-copy-to-stmt:end/disp32
22302
22303 {
22304 $check-mu-copy-to-stmt:final-check-addr:
22305 (mu-addr-type? %ebx)
22306 3d/compare-eax-and 0/imm32/false
22307 74/jump-if-= break/disp8
22308 (lookup *esi *(esi+4))
22309 (lookup *eax *(eax+4))
22310 (string-equal? %eax "0")
22311 3d/compare-eax-and 0/imm32/false
22312 74/jump-if-= break/disp8
22313 e9/jump $check-mu-copy-to-stmt:end/disp32
22314 }
22315
22316 {
22317 $check-mu-copy-to-stmt:final-check-offset:
22318 81 7/subop/compare *ebx 0/imm32/false
22319 75/jump-if-!= break/disp8
22320 (lookup *(ebx+4) *(ebx+8))
22321 (simple-mu-type? %eax 7)
22322 3d/compare-eax-and 0/imm32/false
22323 74/jump-if-= break/disp8
22324 (lookup *esi *(esi+4))
22325 (lookup *eax *(eax+4))
22326 (string-equal? %eax "0")
22327 3d/compare-eax-and 0/imm32/false
22328 74/jump-if-= break/disp8
22329 e9/jump $check-mu-copy-to-stmt:end/disp32
22330 }
22331
22332 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22333 $check-mu-copy-to-stmt:end:
22334
22335 81 0/subop/add %esp 0x6c/imm32
22336
22337 5f/pop-to-edi
22338 5e/pop-to-esi
22339 5b/pop-to-ebx
22340 5a/pop-to-edx
22341 59/pop-to-ecx
22342 58/pop-to-eax
22343
22344 89/<- %esp 5/r32/ebp
22345 5d/pop-to-ebp
22346 c3/return
22347
22348 $check-mu-copy-to-stmt:error-incorrect-inouts:
22349 (write-buffered *(ebp+0x10) "fn ")
22350 8b/-> *(ebp+0xc) 0/r32/eax
22351 (lookup *eax *(eax+4))
22352 (write-buffered *(ebp+0x10) %eax)
22353 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must have two inouts\n")
22354 (flush *(ebp+0x10))
22355 (stop *(ebp+0x14) 1)
22356
22357
22358 $check-mu-copy-to-stmt:error-too-many-outputs:
22359 (write-buffered *(ebp+0x10) "fn ")
22360 8b/-> *(ebp+0xc) 0/r32/eax
22361 (lookup *eax *(eax+4))
22362 (write-buffered *(ebp+0x10) %eax)
22363 (write-buffered *(ebp+0x10) ": stmt 'copy-to' must not have any outputs\n")
22364 (flush *(ebp+0x10))
22365 (stop *(ebp+0x14) 1)
22366
22367
22368 $check-mu-copy-to-stmt:error-src-not-literal-or-in-register:
22369 (write-buffered *(ebp+0x10) "fn ")
22370 8b/-> *(ebp+0xc) 0/r32/eax
22371 (lookup *eax *(eax+4))
22372 (write-buffered *(ebp+0x10) %eax)
22373 (write-buffered *(ebp+0x10) ": stmt copy-to: source (second inout) is in memory\n")
22374 (flush *(ebp+0x10))
22375 (stop *(ebp+0x14) 1)
22376
22377
22378 $check-mu-copy-to-stmt:error-src-too-large:
22379 (write-buffered *(ebp+0x10) "fn ")
22380 8b/-> *(ebp+0xc) 0/r32/eax
22381 (lookup *eax *(eax+4))
22382 (write-buffered *(ebp+0x10) %eax)
22383 (write-buffered *(ebp+0x10) ": stmt copy-to: '")
22384 (lookup *esi *(esi+4))
22385 (lookup *eax *(eax+4))
22386 (write-buffered *(ebp+0x10) %eax)
22387 (write-buffered *(ebp+0x10) "' is too large to copy\n")
22388 (flush *(ebp+0x10))
22389 (stop *(ebp+0x14) 1)
22390
22391
22392 $check-mu-copy-to-stmt:error-non-literal-to-byte:
22393 (write-buffered *(ebp+0x10) "fn ")
22394 8b/-> *(ebp+0xc) 0/r32/eax
22395 (lookup *eax *(eax+4))
22396 (write-buffered *(ebp+0x10) %eax)
22397 (write-buffered *(ebp+0x10) ": stmt copy-to: cannot copy non-literal to type byte; use copy-byte-to\n")
22398 (flush *(ebp+0x10))
22399 (stop *(ebp+0x14) 1)
22400
22401
22402 check-mu-copy-byte-stmt:
22403
22404 55/push-ebp
22405 89/<- %ebp 4/r32/esp
22406
22407 50/push-eax
22408 51/push-ecx
22409 52/push-edx
22410 56/push-esi
22411 57/push-edi
22412
22413 81 5/subop/subtract %esp 0x60/imm32
22414 68/push 0x60/imm32/size
22415 68/push 0/imm32/read
22416 68/push 0/imm32/write
22417 89/<- %edx 4/r32/esp
22418 $check-mu-copy-byte-stmt:get-output:
22419
22420 8b/-> *(ebp+8) 6/r32/esi
22421
22422 (lookup *(esi+0x14) *(esi+0x18))
22423 89/<- %edi 0/r32/eax
22424
22425 3d/compare-eax-and 0/imm32
22426 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-no-output/disp32
22427
22428 (lookup *(edi+8) *(edi+0xc))
22429 3d/compare-eax-and 0/imm32
22430 0f 85/jump-if-!= $check-mu-copy-byte-stmt:error-too-many-outputs/disp32
22431 $check-mu-copy-byte-stmt:get-inout:
22432
22433 (lookup *(esi+0xc) *(esi+0x10))
22434 89/<- %esi 0/r32/eax
22435
22436 3d/compare-eax-and 0/imm32
22437 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-no-inout/disp32
22438
22439 (lookup *(esi+8) *(esi+0xc))
22440 3d/compare-eax-and 0/imm32
22441 0f 85/jump-if-!= $check-mu-copy-byte-stmt:error-too-many-inouts/disp32
22442 $check-mu-copy-byte-stmt:types:
22443
22444 (lookup *esi *(esi+4))
22445 (size-of %eax)
22446 3d/compare-eax-and 4/imm32
22447 0f 8f/jump-if-> $check-mu-copy-byte-stmt:error-inout-too-large/disp32
22448
22449 (lookup *esi *(esi+4))
22450 (lookup *(eax+8) *(eax+0xc))
22451 89/<- %ecx 0/r32/eax
22452 $check-mu-copy-byte-stmt:check-inout-deref:
22453
22454 8b/-> *(esi+0x10) 0/r32/eax
22455 3d/compare-eax-and 0/imm32/false
22456 {
22457 74/jump-if-= break/disp8
22458 $check-mu-copy-byte-stmt:inout-is-deref:
22459 (lookup *(ecx+0xc) *(ecx+0x10))
22460
22461 81 7/subop/compare *(eax+0xc) 0/imm32
22462 {
22463 75/jump-if-!= break/disp8
22464 $check-mu-copy-byte-stmt:inout-is-deref2:
22465 (lookup *(eax+4) *(eax+8))
22466 }
22467 89/<- %ecx 0/r32/eax
22468 }
22469
22470 (lookup *edi *(edi+4))
22471 (lookup *(eax+0x18) *(eax+0x1c))
22472 3d/compare-eax-and 0/imm32
22473 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-output-not-in-register/disp32
22474
22475 (lookup *edi *(edi+4))
22476 (lookup *(eax+8) *(eax+0xc))
22477
22478 (simple-mu-type? %eax 8)
22479 3d/compare-eax-and 0/imm32
22480 0f 84/jump-if-= $check-mu-copy-byte-stmt:error-invalid-output-type/disp32
22481 $check-mu-copy-byte-stmt:end:
22482
22483 81 0/subop/add %esp 0x6c/imm32
22484
22485 5f/pop-to-edi
22486 5e/pop-to-esi
22487 5a/pop-to-edx
22488 59/pop-to-ecx
22489 58/pop-to-eax
22490
22491 89/<- %esp 5/r32/ebp
22492 5d/pop-to-ebp
22493 c3/return
22494
22495 $check-mu-copy-byte-stmt:error-no-inout:
22496 (write-buffered *(ebp+0x10) "fn ")
22497 8b/-> *(ebp+0xc) 0/r32/eax
22498 (lookup *eax *(eax+4))
22499 (write-buffered *(ebp+0x10) %eax)
22500 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' expects an inout\n")
22501 (flush *(ebp+0x10))
22502 (stop *(ebp+0x14) 1)
22503
22504
22505 $check-mu-copy-byte-stmt:error-too-many-inouts:
22506 (write-buffered *(ebp+0x10) "fn ")
22507 8b/-> *(ebp+0xc) 0/r32/eax
22508 (lookup *eax *(eax+4))
22509 (write-buffered *(ebp+0x10) %eax)
22510 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must have just one inout\n")
22511 (flush *(ebp+0x10))
22512 (stop *(ebp+0x14) 1)
22513
22514
22515 $check-mu-copy-byte-stmt:error-no-output:
22516 (write-buffered *(ebp+0x10) "fn ")
22517 8b/-> *(ebp+0xc) 0/r32/eax
22518 (lookup *eax *(eax+4))
22519 (write-buffered *(ebp+0x10) %eax)
22520 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' expects an output\n")
22521 (flush *(ebp+0x10))
22522 (stop *(ebp+0x14) 1)
22523
22524
22525 $check-mu-copy-byte-stmt:error-output-not-in-register:
22526 (write-buffered *(ebp+0x10) "fn ")
22527 8b/-> *(ebp+0xc) 0/r32/eax
22528 (lookup *eax *(eax+4))
22529 (write-buffered *(ebp+0x10) %eax)
22530 (write-buffered *(ebp+0x10) ": stmt copy-byte: output '")
22531 (lookup *edi *(edi+4))
22532 (lookup *eax *(eax+4))
22533 (write-buffered *(ebp+0x10) %eax)
22534 (write-buffered *(ebp+0x10) "' not in a register\n")
22535 (flush *(ebp+0x10))
22536 (stop *(ebp+0x14) 1)
22537
22538
22539 $check-mu-copy-byte-stmt:error-too-many-outputs:
22540 (write-buffered *(ebp+0x10) "fn ")
22541 8b/-> *(ebp+0xc) 0/r32/eax
22542 (lookup *eax *(eax+4))
22543 (write-buffered *(ebp+0x10) %eax)
22544 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must have just one output\n")
22545 (flush *(ebp+0x10))
22546 (stop *(ebp+0x14) 1)
22547
22548
22549 $check-mu-copy-byte-stmt:error-invalid-output-type:
22550 (write-buffered *(ebp+0x10) "fn ")
22551 8b/-> *(ebp+0xc) 0/r32/eax
22552 (lookup *eax *(eax+4))
22553 (write-buffered *(ebp+0x10) %eax)
22554 (write-buffered *(ebp+0x10) ": stmt 'copy-byte' must write to output of type byte\n")
22555 (flush *(ebp+0x10))
22556 (stop *(ebp+0x14) 1)
22557
22558
22559 $check-mu-copy-byte-stmt:error-inout-too-large:
22560 (write-buffered *(ebp+0x10) "fn ")
22561 8b/-> *(ebp+0xc) 0/r32/eax
22562 (lookup *eax *(eax+4))
22563 (write-buffered *(ebp+0x10) %eax)
22564 (write-buffered *(ebp+0x10) ": stmt copy-byte: '")
22565 (lookup *esi *(esi+4))
22566 (lookup *eax *(eax+4))
22567 (write-buffered *(ebp+0x10) %eax)
22568 (write-buffered *(ebp+0x10) "' is too large to fit in a register\n")
22569 (flush *(ebp+0x10))
22570 (stop *(ebp+0x14) 1)
22571
22572
22573 check-mu-copy-byte-to-stmt:
22574
22575 55/push-ebp
22576 89/<- %ebp 4/r32/esp
22577
22578 50/push-eax
22579 52/push-edx
22580 53/push-ebx
22581 56/push-esi
22582 57/push-edi
22583
22584 81 5/subop/subtract %esp 0x60/imm32
22585 68/push 0x60/imm32/size
22586 68/push 0/imm32/read
22587 68/push 0/imm32/write
22588 89/<- %edx 4/r32/esp
22589
22590 8b/-> *(ebp+8) 6/r32/esi
22591 $check-mu-copy-byte-to-stmt:check-for-output:
22592
22593 (lookup *(esi+0x14) *(esi+0x18))
22594 3d/compare-eax-and 0/imm32
22595 0f 85/jump-if-!= $check-mu-copy-byte-to-stmt:error-too-many-outputs/disp32
22596 $check-mu-copy-byte-to-stmt:get-dest:
22597
22598 (lookup *(esi+0xc) *(esi+0x10))
22599 89/<- %edi 0/r32/eax
22600
22601 3d/compare-eax-and 0/imm32
22602 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22603 $check-mu-copy-byte-to-stmt:get-src:
22604
22605 (lookup *(edi+8) *(edi+0xc))
22606 89/<- %esi 0/r32/eax
22607
22608 3d/compare-eax-and 0/imm32
22609 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22610
22611 (lookup *(esi+8) *(esi+0xc))
22612 3d/compare-eax-and 0/imm32
22613 0f 85/jump-if-!= $check-mu-copy-byte-to-stmt:error-incorrect-inouts/disp32
22614 $check-mu-copy-byte-to-stmt:types:
22615
22616 (lookup *esi *(esi+4))
22617 (size-of %eax)
22618 3d/compare-eax-and 4/imm32
22619 0f 8f/jump-if-> $check-mu-copy-byte-to-stmt:error-src-too-large/disp32
22620
22621 {
22622 (lookup *esi *(esi+4))
22623 (lookup *(eax+0x18) *(eax+0x1c))
22624 3d/compare-eax-and 0/imm32
22625 75/jump-if-!= break/disp8
22626 e9/jump $check-mu-copy-byte-to-stmt:error-src-not-in-register/disp32
22627 }
22628
22629 (lookup *edi *(edi+4))
22630 (lookup *(eax+8) *(eax+0xc))
22631 89/<- %ebx 0/r32/eax
22632
22633 $check-mu-copy-byte-to-stmt:check-dest-deref:
22634 8b/-> *(edi+0x10) 0/r32/eax
22635 3d/compare-eax-and 0/imm32/false
22636 {
22637 74/jump-if-= break/disp8
22638 (lookup *(ebx+0xc) *(ebx+0x10))
22639 $check-mu-copy-byte-to-stmt:dest-is-deref:
22640
22641 81 7/subop/compare *(eax+0xc) 0/imm32
22642 {
22643 75/jump-if-!= break/disp8
22644 $check-mu-copy-byte-to-stmt:dest-is-deref2:
22645 (lookup *(eax+4) *(eax+8))
22646 }
22647 89/<- %ebx 0/r32/eax
22648 }
22649
22650 (simple-mu-type? %ebx 8)
22651 3d/compare-eax-and 0/imm32/false
22652 0f 84/jump-if-= $check-mu-copy-byte-to-stmt:error-invalid-dest-type/disp32
22653 $check-mu-copy-byte-to-stmt:end:
22654
22655 81 0/subop/add %esp 0x6c/imm32
22656
22657 5f/pop-to-edi
22658 5e/pop-to-esi
22659 5b/pop-to-ebx
22660 5a/pop-to-edx
22661 58/pop-to-eax
22662
22663 89/<- %esp 5/r32/ebp
22664 5d/pop-to-ebp
22665 c3/return
22666
22667 $check-mu-copy-byte-to-stmt:error-incorrect-inouts:
22668 (write-buffered *(ebp+0x10) "fn ")
22669 8b/-> *(ebp+0xc) 0/r32/eax
22670 (lookup *eax *(eax+4))
22671 (write-buffered *(ebp+0x10) %eax)
22672 (write-buffered *(ebp+0x10) ": stmt 'copy-byte-to' must have two inouts\n")
22673 (flush *(ebp+0x10))
22674 (stop *(ebp+0x14) 1)
22675
22676
22677 $check-mu-copy-byte-to-stmt:error-too-many-outputs:
22678 (write-buffered *(ebp+0x10) "fn ")
22679 8b/-> *(ebp+0xc) 0/r32/eax
22680 (lookup *eax *(eax+4))
22681 (write-buffered *(ebp+0x10) %eax)
22682 (write-buffered *(ebp+0x10) ": stmt 'copy-byte-to' must not have any outputs\n")
22683 (flush *(ebp+0x10))
22684 (stop *(ebp+0x14) 1)
22685
22686
22687 $check-mu-copy-byte-to-stmt:error-src-not-in-register:
22688 (write-buffered *(ebp+0x10) "fn ")
22689 8b/-> *(ebp+0xc) 0/r32/eax
22690 (lookup *eax *(eax+4))
22691 (write-buffered *(ebp+0x10) %eax)
22692 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: source (second inout) must be in a register\n")
22693 (flush *(ebp+0x10))
22694 (stop *(ebp+0x14) 1)
22695
22696
22697 $check-mu-copy-byte-to-stmt:error-invalid-dest-type:
22698 (write-buffered *(ebp+0x10) "fn ")
22699 8b/-> *(ebp+0xc) 0/r32/eax
22700 (lookup *eax *(eax+4))
22701 (write-buffered *(ebp+0x10) %eax)
22702 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: '")
22703 (lookup *edi *(edi+4))
22704 (lookup *eax *(eax+4))
22705 (write-buffered *(ebp+0x10) %eax)
22706 (write-buffered *(ebp+0x10) "' must be a byte\n")
22707 (flush *(ebp+0x10))
22708 (stop *(ebp+0x14) 1)
22709
22710
22711 $check-mu-copy-byte-to-stmt:error-src-too-large:
22712 (write-buffered *(ebp+0x10) "fn ")
22713 8b/-> *(ebp+0xc) 0/r32/eax
22714 (lookup *eax *(eax+4))
22715 (write-buffered *(ebp+0x10) %eax)
22716 (write-buffered *(ebp+0x10) ": stmt copy-byte-to: '")
22717 (lookup *esi *(esi+4))
22718 (lookup *eax *(eax+4))
22719 (write-buffered *(ebp+0x10) %eax)
22720 (write-buffered *(ebp+0x10) "' is too large to copy\n")
22721 (flush *(ebp+0x10))
22722 (stop *(ebp+0x14) 1)
22723
22724
22725 check-mu-compare-stmt:
22726
22727 55/push-ebp
22728 89/<- %ebp 4/r32/esp
22729
22730 50/push-eax
22731 51/push-ecx
22732 52/push-edx
22733 53/push-ebx
22734 56/push-esi
22735 57/push-edi
22736
22737 81 5/subop/subtract %esp 0x60/imm32
22738 68/push 0x60/imm32/size
22739 68/push 0/imm32/read
22740 68/push 0/imm32/write
22741 89/<- %edx 4/r32/esp
22742
22743 8b/-> *(ebp+8) 6/r32/esi
22744 $check-mu-compare-stmt:check-for-output:
22745
22746 (lookup *(esi+0x14) *(esi+0x18))
22747 3d/compare-eax-and 0/imm32
22748 0f 85/jump-if-!= $check-mu-compare-stmt:error-too-many-outputs/disp32
22749 $check-mu-compare-stmt:get-left:
22750
22751 (lookup *(esi+0xc) *(esi+0x10))
22752 89/<- %edi 0/r32/eax
22753
22754 3d/compare-eax-and 0/imm32
22755 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22756 $check-mu-compare-stmt:get-right:
22757
22758 (lookup *(edi+8) *(edi+0xc))
22759 89/<- %esi 0/r32/eax
22760
22761 3d/compare-eax-and 0/imm32
22762 0f 84/jump-if-= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22763
22764 (lookup *(esi+8) *(esi+0xc))
22765 3d/compare-eax-and 0/imm32
22766 0f 85/jump-if-!= $check-mu-compare-stmt:error-incorrect-inouts/disp32
22767
22768 {
22769 $check-mu-compare-stmt:both-in-mem:
22770 (lookup *esi *(esi+4))
22771 (lookup *(eax+0x8) *(eax+0xc))
22772 (simple-mu-type? %eax 0)
22773 3d/compare-eax-and 0/imm32
22774 0f 85/jump-if-!= break/disp32
22775 (lookup *esi *(esi+4))
22776 (lookup *(eax+0x18) *(eax+0x1c))
22777 3d/compare-eax-and 0/imm32
22778 75/jump-if-!= break/disp8
22779 (lookup *edi *(edi+4))
22780 (lookup *(eax+0x8) *(eax+0xc))
22781 (simple-mu-type? %eax 0)
22782 3d/compare-eax-and 0/imm32
22783 75/jump-if-!= break/disp8
22784 (lookup *edi *(edi+4))
22785 (lookup *(eax+0x18) *(eax+0x1c))
22786 3d/compare-eax-and 0/imm32
22787 75/jump-if-!= break/disp8
22788 e9/jump $check-mu-compare-stmt:error-both-in-memory/disp32
22789 }
22790 $check-mu-compare-stmt:types:
22791
22792 (lookup *esi *(esi+4))
22793 (lookup *(eax+8) *(eax+0xc))
22794 89/<- %ecx 0/r32/eax
22795
22796 8b/-> *(esi+0x10) 0/r32/eax
22797 3d/compare-eax-and 0/imm32/false
22798 {
22799 74/jump-if-= break/disp8
22800 (lookup *(ecx+0xc) *(ecx+0x10))
22801
22802 81 7/subop/compare *(eax+0xc) 0/imm32
22803 {
22804 75/jump-if-!= break/disp8
22805 (lookup *(eax+4) *(eax+8))
22806 }
22807 89/<- %ecx 0/r32/eax
22808 }
22809
22810 (simple-mu-type? %ecx 0x10)
22811 3d/compare-eax-and 0/imm32/false
22812 0f 85/jump-if-!= $check-mu-compare-stmt:error-right-string-literal/disp32
22813
22814 (lookup *esi *(esi+4))
22815 (size-of %eax)
22816 3d/compare-eax-and 4/imm32
22817 0f 8f/jump-if-> $check-mu-compare-stmt:error-right-too-large/disp32
22818
22819 (lookup *edi *(edi+4))
22820 (size-of %eax)
22821 3d/compare-eax-and 4/imm32
22822 0f 8f/jump-if-> $check-mu-compare-stmt:error-left-too-large/disp32
22823
22824 (lookup *edi *(edi+4))
22825 (lookup *(eax+8) *(eax+0xc))
22826 89/<- %ebx 0/r32/eax
22827
22828 8b/-> *(edi+0x10) 0/r32/eax
22829 3d/compare-eax-and 0/imm32/false
22830 {
22831 74/jump-if-= break/disp8
22832 (lookup *(ebx+0xc) *(ebx+0x10))
22833
22834 81 7/subop/compare *(eax+0xc) 0/imm32
22835 {
22836 75/jump-if-!= break/disp8
22837 (lookup *(eax+4) *(eax+8))
22838 }
22839 89/<- %ebx 0/r32/eax
22840 }
22841
22842 (type-match? %ebx %ecx %edx)
22843 3d/compare-eax-and 0/imm32
22844 0f 85/jump-if-!= $check-mu-compare-stmt:end/disp32
22845
22846 {
22847 (lookup *edi *(edi+4))
22848 (lookup *(eax+8) *(eax+0xc))
22849 (mu-addr-type? %eax)
22850 3d/compare-eax-and 0/imm32/false
22851 74/jump-if-= break/disp8
22852 (lookup *esi *(esi+4))
22853 (lookup *eax *(eax+4))
22854 (string-equal? %eax "0")
22855 3d/compare-eax-and 0/imm32/false
22856 74/jump-if-= break/disp8
22857 eb/jump $check-mu-compare-stmt:end/disp8
22858 }
22859
22860 (check-mu-numberlike-arg %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
22861 $check-mu-compare-stmt:end:
22862
22863 81 0/subop/add %esp 0x6c/imm32
22864
22865 5f/pop-to-edi
22866 5e/pop-to-esi
22867 5b/pop-to-ebx
22868 5a/pop-to-edx
22869 59/pop-to-ecx
22870 58/pop-to-eax
22871
22872 89/<- %esp 5/r32/ebp
22873 5d/pop-to-ebp
22874 c3/return
22875
22876 $check-mu-compare-stmt:error-incorrect-inouts:
22877 (write-buffered *(ebp+0x10) "fn ")
22878 8b/-> *(ebp+0xc) 0/r32/eax
22879 (lookup *eax *(eax+4))
22880 (write-buffered *(ebp+0x10) %eax)
22881 (write-buffered *(ebp+0x10) ": stmt 'compare' must have two inouts\n")
22882 (flush *(ebp+0x10))
22883 (stop *(ebp+0x14) 1)
22884
22885
22886 $check-mu-compare-stmt:error-too-many-outputs:
22887 (write-buffered *(ebp+0x10) "fn ")
22888 8b/-> *(ebp+0xc) 0/r32/eax
22889 (lookup *eax *(eax+4))
22890 (write-buffered *(ebp+0x10) %eax)
22891 (write-buffered *(ebp+0x10) ": stmt 'compare' must not have any outputs\n")
22892 (flush *(ebp+0x10))
22893 (stop *(ebp+0x14) 1)
22894
22895
22896 $check-mu-compare-stmt:error-both-in-memory:
22897 (write-buffered *(ebp+0x10) "fn ")
22898 8b/-> *(ebp+0xc) 0/r32/eax
22899 (lookup *eax *(eax+4))
22900 (write-buffered *(ebp+0x10) %eax)
22901 (write-buffered *(ebp+0x10) ": stmt compare: both inouts are in memory\n")
22902 (flush *(ebp+0x10))
22903 (stop *(ebp+0x14) 1)
22904
22905
22906 $check-mu-compare-stmt:error-left-too-large:
22907 (write-buffered *(ebp+0x10) "fn ")
22908 8b/-> *(ebp+0xc) 0/r32/eax
22909 (lookup *eax *(eax+4))
22910 (write-buffered *(ebp+0x10) %eax)
22911 (write-buffered *(ebp+0x10) ": stmt compare: '")
22912 (lookup *edi *(edi+4))
22913 (lookup *eax *(eax+4))
22914 (write-buffered *(ebp+0x10) %eax)
22915 (write-buffered *(ebp+0x10) "' is too large to compare\n")
22916 (flush *(ebp+0x10))
22917 (stop *(ebp+0x14) 1)
22918
22919
22920 $check-mu-compare-stmt:error-right-too-large:
22921 (write-buffered *(ebp+0x10) "fn ")
22922 8b/-> *(ebp+0xc) 0/r32/eax
22923 (lookup *eax *(eax+4))
22924 (write-buffered *(ebp+0x10) %eax)
22925 (write-buffered *(ebp+0x10) ": stmt compare: '")
22926 (lookup *esi *(esi+4))
22927 (lookup *eax *(eax+4))
22928 (write-buffered *(ebp+0x10) %eax)
22929 (write-buffered *(ebp+0x10) "' is too large to compare\n")
22930 (flush *(ebp+0x10))
22931 (stop *(ebp+0x14) 1)
22932
22933
22934 $check-mu-compare-stmt:error-right-string-literal:
22935 (write-buffered *(ebp+0x10) "fn ")
22936 8b/-> *(ebp+0xc) 0/r32/eax
22937 (lookup *eax *(eax+4))
22938 (write-buffered *(ebp+0x10) %eax)
22939 (write-buffered *(ebp+0x10) ": stmt compare: string literal ")
22940 (lookup *esi *(esi+4))
22941 (lookup *eax *(eax+4))
22942 (write-buffered *(ebp+0x10) %eax)
22943 (write-buffered *(ebp+0x10) " is not supported; use the string-equal? function\n")
22944 (flush *(ebp+0x10))
22945 (stop *(ebp+0x14) 1)
22946
22947
22948 check-mu-address-stmt:
22949
22950 55/push-ebp
22951 89/<- %ebp 4/r32/esp
22952
22953 50/push-eax
22954 51/push-ecx
22955 52/push-edx
22956 56/push-esi
22957 57/push-edi
22958 $check-mu-address-stmt:get-output:
22959
22960 8b/-> *(ebp+8) 6/r32/esi
22961
22962 (lookup *(esi+0x14) *(esi+0x18))
22963 89/<- %edi 0/r32/eax
22964
22965 3d/compare-eax-and 0/imm32
22966 0f 84/jump-if-= $check-mu-address-stmt:error-no-output/disp32
22967
22968 (lookup *(edi+8) *(edi+0xc))
22969 3d/compare-eax-and 0/imm32
22970 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-outputs/disp32
22971 $check-mu-address-stmt:get-inout:
22972
22973 (lookup *(esi+0xc) *(esi+0x10))
22974 89/<- %esi 0/r32/eax
22975
22976 3d/compare-eax-and 0/imm32
22977 0f 84/jump-if-= $check-mu-address-stmt:error-no-inout/disp32
22978
22979 (lookup *(esi+8) *(esi+0xc))
22980 3d/compare-eax-and 0/imm32
22981 0f 85/jump-if-!= $check-mu-address-stmt:error-too-many-inouts/disp32
22982 $check-mu-address-stmt:types:
22983
22984 (lookup *edi *(edi+4))
22985 (lookup *(eax+0x18) *(eax+0x1c))
22986 3d/compare-eax-and 0/imm32
22987 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-in-register/disp32
22988
22989 (lookup *edi *(edi+4))
22990 (lookup *(eax+8) *(eax+0xc))
22991 89/<- %edx 0/r32/eax
22992
22993 (mu-addr-type? %edx)
22994 3d/compare-eax-and 0/imm32/false
22995 0f 84/jump-if-= $check-mu-address-stmt:error-output-not-address/disp32
22996
22997 (lookup *(edx+0xc) *(edx+0x10))
22998
22999 81 7/subop/compare *(eax+0xc) 0/imm32
23000 {
23001 75/jump-if-!= break/disp8
23002 (lookup *(eax+4) *(eax+8))
23003 }
23004 89/<- %edx 0/r32/eax
23005
23006 (lookup *esi *(esi+4))
23007 (lookup *(eax+8) *(eax+0xc))
23008 89/<- %ecx 0/r32/eax
23009
23010 8b/-> *(esi+0x10) 0/r32/eax
23011 3d/compare-eax-and 0/imm32/false
23012 {
23013 74/jump-if-= break/disp8
23014 (lookup *(ecx+0xc) *(ecx+0x10))
23015
23016 81 7/subop/compare *(eax+0xc) 0/imm32
23017 {
23018 75/jump-if-!= break/disp8
23019 (lookup *(eax+4) *(eax+8))
23020 }
23021 89/<- %ecx 0/r32/eax
23022 }
23023
23024 (type-equal-ignoring-capacity? %edx %ecx)
23025 3d/compare-eax-and 0/imm32
23026 0f 84/jump-if-= $check-mu-address-stmt:error-type-mismatch/disp32
23027 $check-mu-address-stmt:end:
23028
23029 5f/pop-to-edi
23030 5e/pop-to-esi
23031 5a/pop-to-edx
23032 59/pop-to-ecx
23033 58/pop-to-eax
23034
23035 89/<- %esp 5/r32/ebp
23036 5d/pop-to-ebp
23037 c3/return
23038
23039 $check-mu-address-stmt:error-no-inout:
23040 (write-buffered *(ebp+0x10) "fn ")
23041 8b/-> *(ebp+0xc) 0/r32/eax
23042 (lookup *eax *(eax+4))
23043 (write-buffered *(ebp+0x10) %eax)
23044 (write-buffered *(ebp+0x10) ": stmt 'address' expects an inout\n")
23045 (flush *(ebp+0x10))
23046 (stop *(ebp+0x14) 1)
23047
23048
23049 $check-mu-address-stmt:error-too-many-inouts:
23050 (write-buffered *(ebp+0x10) "fn ")
23051 8b/-> *(ebp+0xc) 0/r32/eax
23052 (lookup *eax *(eax+4))
23053 (write-buffered *(ebp+0x10) %eax)
23054 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one inout\n")
23055 (flush *(ebp+0x10))
23056 (stop *(ebp+0x14) 1)
23057
23058
23059 $check-mu-address-stmt:error-no-output:
23060 (write-buffered *(ebp+0x10) "fn ")
23061 8b/-> *(ebp+0xc) 0/r32/eax
23062 (lookup *eax *(eax+4))
23063 (write-buffered *(ebp+0x10) %eax)
23064 (write-buffered *(ebp+0x10) ": stmt 'address' expects an output\n")
23065 (flush *(ebp+0x10))
23066 (stop *(ebp+0x14) 1)
23067
23068
23069 $check-mu-address-stmt:error-output-not-in-register:
23070 (write-buffered *(ebp+0x10) "fn ")
23071 8b/-> *(ebp+0xc) 0/r32/eax
23072 (lookup *eax *(eax+4))
23073 (write-buffered *(ebp+0x10) %eax)
23074 (write-buffered *(ebp+0x10) ": stmt address: output '")
23075 (lookup *edi *(edi+4))
23076 (lookup *eax *(eax+4))
23077 (write-buffered *(ebp+0x10) %eax)
23078 (write-buffered *(ebp+0x10) "' not in a register\n")
23079 (flush *(ebp+0x10))
23080 (stop *(ebp+0x14) 1)
23081
23082
23083 $check-mu-address-stmt:error-too-many-outputs:
23084 (write-buffered *(ebp+0x10) "fn ")
23085 8b/-> *(ebp+0xc) 0/r32/eax
23086 (lookup *eax *(eax+4))
23087 (write-buffered *(ebp+0x10) %eax)
23088 (write-buffered *(ebp+0x10) ": stmt 'address' must have just one output\n")
23089 (flush *(ebp+0x10))
23090 (stop *(ebp+0x14) 1)
23091
23092
23093 $check-mu-address-stmt:error-output-not-address:
23094 (write-buffered *(ebp+0x10) "fn ")
23095 8b/-> *(ebp+0xc) 0/r32/eax
23096 (lookup *eax *(eax+4))
23097 (write-buffered *(ebp+0x10) %eax)
23098 (write-buffered *(ebp+0x10) ": stmt address: output '")
23099 (lookup *edi *(edi+4))
23100 (lookup *eax *(eax+4))
23101 (write-buffered *(ebp+0x10) %eax)
23102 (write-buffered *(ebp+0x10) "' is not an addr\n")
23103 (flush *(ebp+0x10))
23104 (stop *(ebp+0x14) 1)
23105
23106
23107 $check-mu-address-stmt:error-type-mismatch:
23108 (write-buffered *(ebp+0x10) "fn ")
23109 8b/-> *(ebp+0xc) 0/r32/eax
23110 (lookup *eax *(eax+4))
23111 (write-buffered *(ebp+0x10) %eax)
23112 (write-buffered *(ebp+0x10) ": stmt address: output '")
23113 (lookup *edi *(edi+4))
23114 (lookup *eax *(eax+4))
23115 (write-buffered *(ebp+0x10) %eax)
23116 (write-buffered *(ebp+0x10) "' cannot hold address of '")
23117 (lookup *esi *(esi+4))
23118 (lookup *eax *(eax+4))
23119 (write-buffered *(ebp+0x10) %eax)
23120 (write-buffered *(ebp+0x10) "'\n")
23121 (flush *(ebp+0x10))
23122 (stop *(ebp+0x14) 1)
23123
23124
23125 type-equal-ignoring-capacity?:
23126
23127 55/push-ebp
23128 89/<- %ebp 4/r32/esp
23129
23130 51/push-ecx
23131 52/push-edx
23132 53/push-ebx
23133
23134 8b/-> *(ebp+8) 1/r32/ecx
23135
23136 8b/-> *(ebp+0xc) 3/r32/ebx
23137
23138 81 7/subop/compare *ecx 0/imm32/false
23139 0f 85/jump-if-!= $type-equal-ignoring-capacity?:base-case/disp32
23140
23141 (lookup *(ecx+4) *(ecx+8))
23142 89/<- %edx 0/r32/eax
23143 (lookup *(ebx+4) *(ebx+8))
23144 (type-equal? %edx %eax)
23145 3d/compare-eax-and 0/imm32/false
23146 0f 84/jump-if-= $type-equal-ignoring-capacity?:end/disp32
23147
23148 {
23149 (mu-array? %edx)
23150 3d/compare-eax-and 0/imm32/false
23151 75/jump-if-!= break/disp8
23152 $type-equal-ignoring-capacity?:array:
23153
23154 (lookup *(ecx+0xc) *(ecx+0x10))
23155 (lookup *(eax+4) *(eax+8))
23156 89/<- %ecx 0/r32/eax
23157
23158 (lookup *(ebx+0xc) *(ebx+0x10))
23159 (lookup *(eax+4) *(eax+8))
23160 89/<- %ebx 0/r32/eax
23161 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
23162 }
23163
23164 {
23165 (mu-stream? %edx)
23166 3d/compare-eax-and 0/imm32/false
23167 75/jump-if-!= break/disp8
23168 $type-equal-ignoring-capacity?:stream:
23169
23170 (lookup *(ecx+0xc) *(ecx+0x10))
23171 (lookup *(eax+4) *(eax+8))
23172 89/<- %ecx 0/r32/eax
23173
23174 (lookup *(ebx+0xc) *(ebx+0x10))
23175 (lookup *(eax+4) *(eax+8))
23176 89/<- %ebx 0/r32/eax
23177 eb/jump $type-equal-ignoring-capacity?:base-case/disp8
23178 }
23179 $type-equal-ignoring-capacity?:base-case:
23180
23181 (type-equal? %ecx %ebx)
23182 $type-equal-ignoring-capacity?:end:
23183
23184 5b/pop-to-ebx
23185 5a/pop-to-edx
23186 59/pop-to-ecx
23187
23188 89/<- %esp 5/r32/ebp
23189 5d/pop-to-ebp
23190 c3/return
23191
23192 check-mu-return-stmt:
23193
23194 55/push-ebp
23195 89/<- %ebp 4/r32/esp
23196
23197 50/push-eax
23198 51/push-ecx
23199 52/push-edx
23200 53/push-ebx
23201 56/push-esi
23202 57/push-edi
23203
23204 81 5/subop/subtract %esp 0x60/imm32
23205 68/push 0x60/imm32/size
23206 68/push 0/imm32/read
23207 68/push 0/imm32/write
23208 89/<- %edx 4/r32/esp
23209
23210 8b/-> *(ebp+0xc) 0/r32/eax
23211 (lookup *(eax+0x10) *(eax+0x14))
23212 89/<- %esi 0/r32/eax
23213
23214 89/<- %ebx 0/r32/eax
23215
23216 8b/-> *(ebp+8) 0/r32/eax
23217 (lookup *(eax+0xc) *(eax+0x10))
23218 89/<- %edi 0/r32/eax
23219 {
23220
23221 81 7/subop/compare %ebx 0/imm32
23222 0f 84/jump-if-= break/disp32
23223
23224 81 7/subop/compare %edi 0/imm32
23225 0f 84/jump-if-= $check-mu-return-stmt:error-too-few-inouts/disp32
23226
23227 (lookup *ebx *(ebx+4))
23228 (lookup *(eax+8) *(eax+0xc))
23229 89/<- %ecx 0/r32/eax
23230
23231 (lookup *edi *(edi+4))
23232 (lookup *(eax+8) *(eax+0xc))
23233
23234 81 7/subop/compare *(edi+0x10) 0/imm32/false
23235 {
23236 74/jump-if-= break/disp8
23237 (lookup *(eax+0xc) *(eax+0x10))
23238
23239 81 7/subop/compare *(eax+0xc) 0/imm32
23240 75/jump-if-!= break/disp8
23241 (lookup *(eax+4) *(eax+8))
23242 }
23243
23244 50/push-eax
23245 {
23246 (simple-mu-type? %eax 0)
23247 3d/compare-eax-and 0/imm32/false
23248 74/jump-if-= break/disp8
23249 (simple-mu-type? %ecx 0xf)
23250 3d/compare-eax-and 0/imm32/false
23251 0f 85/jump-if-!= $check-mu-return-stmt:error-literal-to-float/disp32
23252 }
23253 58/pop-to-eax
23254
23255 (type-match? %ecx %eax %edx)
23256 3d/compare-eax-and 0/imm32/false
23257 0f 84/jump-if-= $check-mu-return-stmt:error1/disp32
23258
23259 (register-within-list-with-conflict? %edi %esi %ebx *(ebp+8))
23260 3d/compare-eax-and 0/imm32/false
23261 0f 85/jump-if-!= $check-mu-return-stmt:error2/disp32
23262
23263 (lookup *(ebx+8) *(ebx+0xc))
23264 89/<- %ebx 0/r32/eax
23265
23266 (lookup *(edi+8) *(edi+0xc))
23267 89/<- %edi 0/r32/eax
23268
23269 e9/jump loop/disp32
23270 }
23271
23272 81 7/subop/compare %edi 0/imm32
23273 0f 85/jump-if-!= $check-mu-return-stmt:error-too-many-inouts/disp32
23274 $check-mu-return-stmt:end:
23275
23276 81 0/subop/add %esp 0x6c/imm32
23277
23278 5f/pop-to-edi
23279 5e/pop-to-esi
23280 5b/pop-to-ebx
23281 5a/pop-to-edx
23282 59/pop-to-ecx
23283 58/pop-to-eax
23284
23285 89/<- %esp 5/r32/ebp
23286 5d/pop-to-ebp
23287 c3/return
23288
23289 $check-mu-return-stmt:error1:
23290 (write-buffered *(ebp+0x10) "fn ")
23291 8b/-> *(ebp+0xc) 0/r32/eax
23292 (lookup *eax *(eax+4))
23293 (write-buffered *(ebp+0x10) %eax)
23294 (write-buffered *(ebp+0x10) ": return: '")
23295 (lookup *edi *(edi+4))
23296 (lookup *eax *(eax+4))
23297 (write-buffered *(ebp+0x10) %eax)
23298 (write-buffered *(ebp+0x10) "' has the wrong type\n")
23299 (flush *(ebp+0x10))
23300 (stop *(ebp+0x14) 1)
23301
23302
23303 $check-mu-return-stmt:error2:
23304 (write-buffered *(ebp+0x10) "fn ")
23305 8b/-> *(ebp+0xc) 0/r32/eax
23306 (lookup *eax *(eax+4))
23307 (write-buffered *(ebp+0x10) %eax)
23308 (write-buffered *(ebp+0x10) ": return: '")
23309 (lookup *edi *(edi+4))
23310 (lookup *eax *(eax+4))
23311 (write-buffered *(ebp+0x10) %eax)
23312 (write-buffered *(ebp+0x10) "' is no longer available\n")
23313 (flush *(ebp+0x10))
23314 (stop *(ebp+0x14) 1)
23315
23316
23317 $check-mu-return-stmt:error-literal-to-float:
23318 (write-buffered *(ebp+0x10) "fn ")
23319 8b/-> *(ebp+0xc) 0/r32/eax
23320 (lookup *eax *(eax+4))
23321 (write-buffered *(ebp+0x10) %eax)
23322 (write-buffered *(ebp+0x10) ": return: cannot copy literal '")
23323 (lookup *edi *(edi+4))
23324 (lookup *eax *(eax+4))
23325 (write-buffered *(ebp+0x10) %eax)
23326 (write-buffered *(ebp+0x10) "' to float\n")
23327 (flush *(ebp+0x10))
23328 (stop *(ebp+0x14) 1)
23329
23330
23331 $check-mu-return-stmt:error-too-few-inouts:
23332 (write-buffered *(ebp+0x10) "fn ")
23333 8b/-> *(ebp+0xc) 0/r32/eax
23334 (lookup *eax *(eax+4))
23335 (write-buffered *(ebp+0x10) %eax)
23336 (write-buffered *(ebp+0x10) ": return: too few inouts\n")
23337 (flush *(ebp+0x10))
23338 (stop *(ebp+0x14) 1)
23339
23340
23341 $check-mu-return-stmt:error-too-many-inouts:
23342 (write-buffered *(ebp+0x10) "fn ")
23343 8b/-> *(ebp+0xc) 0/r32/eax
23344 (lookup *eax *(eax+4))
23345 (write-buffered *(ebp+0x10) %eax)
23346 (write-buffered *(ebp+0x10) ": return: too many inouts\n")
23347 (flush *(ebp+0x10))
23348 (stop *(ebp+0x14) 1)
23349
23350
23351 check-all-unique-registers:
23352
23353 55/push-ebp
23354 89/<- %ebp 4/r32/esp
23355
23356 50/push-eax
23357 51/push-ecx
23358 56/push-esi
23359
23360 81 5/subop/subtract %esp 0x60/imm32
23361 68/push 0x60/imm32/size
23362 68/push 0/imm32/read
23363 68/push 0/imm32/write
23364 89/<- %esi 4/r32/esp
23365
23366 8b/-> *(ebp+8) 1/r32/ecx
23367 {
23368
23369 81 7/subop/compare %ecx 0/imm32
23370 0f 84/jump-if-= break/disp32
23371
23372 (lookup *ecx *(ecx+4))
23373 (lookup *(eax+0x18) *(eax+0x1c))
23374
23375 (maybe-get %esi %eax 0xc)
23376 3d/compare-eax-and 0/imm32
23377 0f 85/jump-if-!= $check-all-unique-registers:abort/disp32
23378
23379 (lookup *ecx *(ecx+4))
23380 (lookup *(eax+0x18) *(eax+0x1c))
23381 (get-or-insert %esi %eax 0xc Heap)
23382
23383 (lookup *(ecx+8) *(ecx+0xc))
23384 89/<- %ecx 0/r32/eax
23385 e9/jump loop/disp32
23386 }
23387 $check-all-unique-registers:end:
23388
23389 81 0/subop/add %esp 0x6c/imm32
23390
23391 5e/pop-to-esi
23392 59/pop-to-ecx
23393 58/pop-to-eax
23394
23395 89/<- %esp 5/r32/ebp
23396 5d/pop-to-ebp
23397 c3/return
23398
23399 $check-all-unique-registers:abort:
23400 (write-buffered *(ebp+0x10) "fn ")
23401 8b/-> *(ebp+0xc) 0/r32/eax
23402 (lookup *eax *(eax+4))
23403 (write-buffered *(ebp+0x10) %eax)
23404 (write-buffered *(ebp+0x10) ": outputs must be in unique registers\n")
23405 (flush *(ebp+0x10))
23406 (stop *(ebp+0x14) 1)
23407
23408
23409
23410
23411
23412 register-within-list-with-conflict?:
23413
23414 55/push-ebp
23415 89/<- %ebp 4/r32/esp
23416
23417 51/push-ecx
23418 52/push-edx
23419 53/push-ebx
23420 56/push-esi
23421 57/push-edi
23422
23423 8b/-> *(ebp+8) 0/r32/eax
23424 (lookup *eax *(eax+4))
23425 (lookup *(eax+0x18) *(eax+0x1c))
23426
23427
23428
23429
23430
23431 3d/compare-eax-and 0/imm32
23432 0f 84/jump-if-= $register-within-list-with-conflict?:end/disp32
23433 89/<- %ebx 0/r32/eax
23434
23435 8b/-> *(ebp+0xc) 1/r32/ecx
23436
23437 8b/-> *(ebp+0x10) 2/r32/edx
23438 {
23439
23440 81 7/subop/compare %edi 0/imm32
23441 0f 84/jump-if-= break/disp32
23442
23443 39/compare %ecx 2/r32/edx
23444 0f 84/jump-if-= break/disp32
23445
23446 (lookup *ecx *(ecx+4))
23447 (lookup *(eax+0x18) *(eax+0x1c))
23448
23449 3d/compare-eax-and 0/imm32
23450 74/jump-if-= $register-within-list-with-conflict?:continue/disp8
23451
23452 (string-equal? %eax %ebx)
23453 3d/compare-eax-and 0/imm32/false
23454 {
23455 74/jump-if-= break/disp8
23456
23457
23458
23459 8b/-> *(ebp+0x14) 0/r32/eax
23460 (lookup *(eax+0xc) *(eax+0x10))
23461 (register-conflict? %ebx %eax *(ebp+0xc))
23462 eb/jump $register-within-list-with-conflict?:end/disp8
23463 }
23464 $register-within-list-with-conflict?:continue:
23465
23466 (lookup *(ecx+8) *(ecx+0xc))
23467 89/<- %ecx 0/r32/eax
23468 e9/jump loop/disp32
23469 }
23470
23471 b8/copy-to-eax 0/imm32/false
23472 $register-within-list-with-conflict?:end:
23473
23474 5f/pop-to-edi
23475 5e/pop-to-esi
23476 5b/pop-to-ebx
23477 5a/pop-to-edx
23478 59/pop-to-ecx
23479
23480 89/<- %esp 5/r32/ebp
23481 5d/pop-to-ebp
23482 c3/return
23483
23484
23485
23486
23487
23488 register-conflict?:
23489
23490 55/push-ebp
23491 89/<- %ebp 4/r32/esp
23492
23493 51/push-ecx
23494 52/push-edx
23495 53/push-ebx
23496 56/push-esi
23497 57/push-edi
23498
23499
23500
23501
23502
23503 8b/-> *(ebp+0x10) 7/r32/edi
23504
23505 8b/-> *(ebp+0xc) 6/r32/esi
23506 {
23507
23508 81 7/subop/compare %edi 0/imm32
23509 0f 84/jump-if-= break/disp32
23510
23511 (lookup *edi *(edi+4))
23512 (lookup *(eax+0x18) *(eax+0x1c))
23513 (string-equal? %eax *(ebp+8))
23514 3d/compare-eax-and 0/imm32/false
23515 0f 84/jump-if= $register-conflict?:continue/disp32
23516
23517
23518
23519 (lookup *esi *(esi+4))
23520 (lookup *(eax+0x18) *(eax+0x1c))
23521
23522 3d/compare-eax-and 0/imm32
23523 {
23524 75/jump-if-!= break/disp8
23525
23526
23527 b8/copy-to-eax 1/imm32/true
23528 e9/jump $register-conflict?:end/disp32
23529 }
23530
23531 (string-equal? %eax *(ebp+8))
23532 3d/compare-eax-and 0/imm32/false
23533 0f 94/set-if-= %al
23534
23535
23536
23537
23538 eb/jump $register-conflict?:end/disp8
23539 $register-conflict?:continue:
23540
23541 (lookup *(edi+8) *(edi+0xc))
23542 89/<- %edi 0/r32/eax
23543
23544 (lookup *(esi+8) *(esi+0xc))
23545 89/<- %esi 0/r32/eax
23546 e9/jump loop/disp32
23547 }
23548
23549 (write-buffered Stderr "register-conflict? misused\n")
23550 (flush Stderr)
23551 e8/call syscall_exit/disp32
23552 $register-conflict?:end:
23553
23554 5f/pop-to-edi
23555 5e/pop-to-esi
23556 5b/pop-to-ebx
23557 5a/pop-to-edx
23558 59/pop-to-ecx
23559
23560 89/<- %esp 5/r32/ebp
23561 5d/pop-to-ebp
23562 c3/return
23563
23564 check-final-stmt-is-return:
23565
23566 55/push-ebp
23567 89/<- %ebp 4/r32/esp
23568
23569 50/push-eax
23570 51/push-ecx
23571
23572 8b/-> *(ebp+8) 0/r32/eax
23573 (lookup *(eax+4) *(eax+8))
23574 3d/compare-eax-and 0/imm32
23575 74/jump-if-= $check-final-stmt-is-return:error/disp8
23576 89/<- %ecx 0/r32/eax
23577 {
23578
23579 (lookup *(ecx+8) *(ecx+0xc))
23580 3d/compare-eax-and 0/imm32
23581 74/jump-if-= break/disp8
23582
23583 89/<- %ecx 0/r32/eax
23584 e9/jump loop/disp32
23585 }
23586 $check-final-stmt-is-return:check-tag:
23587
23588 (lookup *ecx *(ecx+4))
23589 81 7/subop/compare *eax 1/imm32/stmt1
23590 75/jump-if-!= $check-final-stmt-is-return:error/disp8
23591 $check-final-stmt-is-return:check-operation:
23592
23593 (lookup *(eax+4) *(eax+8))
23594 (string-equal? %eax "return")
23595 3d/compare-eax-and 0/imm32/false
23596 74/jump-if-= $check-final-stmt-is-return:error/disp8
23597 $check-final-stmt-is-return:end:
23598
23599 59/pop-to-ecx
23600 58/pop-to-eax
23601
23602 89/<- %esp 5/r32/ebp
23603 5d/pop-to-ebp
23604 c3/return
23605
23606 $check-final-stmt-is-return:error:
23607 (write-buffered *(ebp+0x10) "fn ")
23608 8b/-> *(ebp+0xc) 0/r32/eax
23609 (lookup *eax *(eax+4))
23610 (write-buffered *(ebp+0x10) %eax)
23611 (write-buffered *(ebp+0x10) ": final statement should be a 'return'\n")
23612 (flush *(ebp+0x10))
23613 (stop *(ebp+0x14) 1)
23614
23615
23616 check-no-breaks:
23617
23618 55/push-ebp
23619 89/<- %ebp 4/r32/esp
23620
23621 50/push-eax
23622 51/push-ecx
23623
23624 8b/-> *(ebp+8) 0/r32/eax
23625 (lookup *(eax+4) *(eax+8))
23626 3d/compare-eax-and 0/imm32
23627 0f 84/jump-if-= $check-no-breaks:end/disp32
23628 89/<- %ecx 0/r32/eax
23629 {
23630
23631 (lookup *(ecx+8) *(ecx+0xc))
23632 3d/compare-eax-and 0/imm32
23633 74/jump-if-= break/disp8
23634
23635 (lookup *ecx *(ecx+4))
23636 81 7/subop/compare *eax 1/imm32/stmt1
23637 75/jump-if-!= $check-no-breaks:continue/disp8
23638
23639 (lookup *(eax+4) *(eax+8))
23640 (string-starts-with? %eax "break")
23641 3d/compare-eax-and 0/imm32/false
23642 75/jump-if-!= $check-no-breaks:error/disp8
23643 $check-no-breaks:continue:
23644
23645 (lookup *(ecx+8) *(ecx+0xc))
23646 89/<- %ecx 0/r32/eax
23647 e9/jump loop/disp32
23648 }
23649 $check-no-breaks:end:
23650
23651 59/pop-to-ecx
23652 58/pop-to-eax
23653
23654 89/<- %esp 5/r32/ebp
23655 5d/pop-to-ebp
23656 c3/return
23657
23658 $check-no-breaks:error:
23659 (write-buffered *(ebp+0x10) "fn ")
23660 8b/-> *(ebp+0xc) 0/r32/eax
23661 (lookup *eax *(eax+4))
23662 (write-buffered *(ebp+0x10) %eax)
23663 (write-buffered *(ebp+0x10) " has outputs, so you cannot 'break' out of the outermost block. Use 'return'.\n")
23664 (flush *(ebp+0x10))
23665 (stop *(ebp+0x14) 1)
23666
23667
23668 check-mu-get-stmt:
23669
23670 55/push-ebp
23671 89/<- %ebp 4/r32/esp
23672
23673 50/push-eax
23674 51/push-ecx
23675 52/push-edx
23676 53/push-ebx
23677 56/push-esi
23678 57/push-edi
23679
23680 8b/-> *(ebp+8) 6/r32/esi
23681
23682
23683 (lookup *(esi+0xc) *(esi+0x10))
23684 3d/compare-eax-and 0/imm32/false
23685 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
23686 (lookup *eax *(eax+4))
23687 89/<- %ecx 0/r32/eax
23688 $check-mu-get-stmt:check-base:
23689
23690
23691
23692 (lookup *(ecx+8) *(ecx+0xc))
23693 89/<- %ebx 0/r32/eax
23694 {
23695 81 7/subop/compare *ebx 0/imm32/false
23696 0f 85/jump-if-!= break/disp32
23697 $check-mu-get-stmt:base-is-compound:
23698
23699 (lookup *(ebx+4) *(ebx+8))
23700 (simple-mu-type? %eax 2)
23701 3d/compare-eax-and 0/imm32/false
23702 74/jump-if-= break/disp8
23703 $check-mu-get-stmt:base-is-addr:
23704
23705 81 7/subop/compare *(ecx+0x18) 0/imm32
23706 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
23707 $check-mu-get-stmt:base-is-addr-in-register:
23708
23709 (lookup *(ebx+0xc) *(ebx+0x10))
23710 81 7/subop/compare *(eax+0xc) 0/imm32
23711 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
23712 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
23713 (lookup *(eax+4) *(eax+8))
23714 89/<- %ebx 0/r32/eax
23715 }
23716 $check-mu-get-stmt:check-base-typeinfo:
23717
23718 81 7/subop/compare *ebx 0/imm32/false
23719 {
23720 75/jump-if-!= break/disp8
23721 (lookup *(ebx+4) *(ebx+8))
23722 89/<- %ebx 0/r32/eax
23723 }
23724
23725 8b/-> *(ebx+4) 3/r32/ebx
23726 (container? %ebx)
23727 3d/compare-eax-and 0/imm32/false
23728 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
23729
23730
23731 68/push 0/imm32
23732 68/push 0/imm32
23733 89/<- %ecx 4/r32/esp
23734
23735 (find-typeinfo %ebx %ecx)
23736 (lookup *ecx *(ecx+4))
23737
23738 81 0/subop/add %esp 8/imm32
23739
23740 89/<- %edx 0/r32/eax
23741
23742 (lookup *(esi+0xc) *(esi+0x10))
23743 (lookup *(eax+8) *(eax+0xc))
23744 89/<- %ecx 0/r32/eax
23745
23746 3d/compare-eax-and 0/imm32/false
23747 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
23748
23749 (lookup *ecx *(ecx+4))
23750 89/<- %ecx 0/r32/eax
23751
23752 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
23753 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
23754
23755 (lookup *(esi+0xc) *(esi+0x10))
23756 (lookup *(eax+8) *(eax+0xc))
23757 (lookup *(eax+8) *(eax+0xc))
23758 3d/compare-eax-and 0/imm32/false
23759 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
23760
23761 (lookup *(esi+0x14) *(esi+0x18))
23762
23763 3d/compare-eax-and 0/imm32/false
23764 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
23765 (lookup *eax *(eax+4))
23766 89/<- %edi 0/r32/eax
23767 $check-mu-get-stmt:check-output-type:
23768
23769
23770 (lookup *(edi+0x18) *(edi+0x1c))
23771 3d/compare-eax-and 0/imm32
23772 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
23773
23774 (lookup *(edi+8) *(edi+0xc))
23775 81 7/subop/compare *eax 0/imm32/false
23776 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
23777
23778 (lookup *(eax+4) *(eax+8))
23779 (simple-mu-type? %eax 2)
23780 3d/compare-eax-and 0/imm32/false
23781 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
23782 $check-mu-get-stmt:check-output-type-match:
23783
23784 (lookup *(edi+8) *(edi+0xc))
23785 (lookup *(eax+0xc) *(eax+0x10))
23786
23787 81 7/subop/compare *(eax+0xc) 0/imm32/null
23788 {
23789 75/jump-if-!= break/disp8
23790 (lookup *(eax+4) *(eax+8))
23791 }
23792 89/<- %edi 0/r32/eax
23793
23794 (lookup *ecx *(ecx+4))
23795 89/<- %ecx 0/r32/eax
23796
23797 (lookup *(edx+4) *(edx+8))
23798 (get %eax %ecx 0x10)
23799
23800 (lookup *eax *(eax+4))
23801 (lookup *eax *(eax+4))
23802 (lookup *(eax+8) *(eax+0xc))
23803
23804 (type-equal? %edi %eax)
23805 3d/compare-eax-and 0/imm32/false
23806 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
23807
23808 (lookup *(esi+0x14) *(esi+0x18))
23809 (lookup *(eax+8) *(eax+0xc))
23810 3d/compare-eax-and 0/imm32/false
23811 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
23812 $check-mu-get-stmt:end:
23813
23814 5f/pop-to-edi
23815 5e/pop-to-esi
23816 5b/pop-to-ebx
23817 5a/pop-to-edx
23818 59/pop-to-ecx
23819 58/pop-to-eax
23820
23821 89/<- %esp 5/r32/ebp
23822 5d/pop-to-ebp
23823 c3/return
23824
23825 $check-mu-get-stmt:error-too-few-inouts:
23826 (write-buffered *(ebp+0x10) "fn ")
23827 8b/-> *(ebp+0xc) 0/r32/eax
23828 (lookup *eax *(eax+4))
23829 (write-buffered *(ebp+0x10) %eax)
23830 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
23831 (flush *(ebp+0x10))
23832 (stop *(ebp+0x14) 1)
23833
23834
23835 $check-mu-get-stmt:error-too-many-inouts:
23836 (write-buffered *(ebp+0x10) "fn ")
23837 8b/-> *(ebp+0xc) 0/r32/eax
23838 (lookup *eax *(eax+4))
23839 (write-buffered *(ebp+0x10) %eax)
23840 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
23841 (flush *(ebp+0x10))
23842 (stop *(ebp+0x14) 1)
23843
23844
23845 $check-mu-get-stmt:error-too-few-outputs:
23846 (write-buffered *(ebp+0x10) "fn ")
23847 8b/-> *(ebp+0xc) 0/r32/eax
23848 (lookup *eax *(eax+4))
23849 (write-buffered *(ebp+0x10) %eax)
23850 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
23851 (flush *(ebp+0x10))
23852 (stop *(ebp+0x14) 1)
23853
23854
23855 $check-mu-get-stmt:error-too-many-outputs:
23856 (write-buffered *(ebp+0x10) "fn ")
23857 8b/-> *(ebp+0xc) 0/r32/eax
23858 (lookup *eax *(eax+4))
23859 (write-buffered *(ebp+0x10) %eax)
23860 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
23861 (flush *(ebp+0x10))
23862 (stop *(ebp+0x14) 1)
23863
23864
23865 $check-mu-get-stmt:error-bad-base:
23866
23867 (write-buffered *(ebp+0x10) "fn ")
23868 8b/-> *(ebp+0xc) 0/r32/eax
23869 (lookup *eax *(eax+4))
23870 (write-buffered *(ebp+0x10) %eax)
23871 (write-buffered *(ebp+0x10) ": stmt get: var '")
23872 (lookup *(esi+0xc) *(esi+0x10))
23873 (lookup *eax *(eax+4))
23874 (lookup *eax *(eax+4))
23875 (write-buffered *(ebp+0x10) %eax)
23876 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
23877 (flush *(ebp+0x10))
23878 (stop *(ebp+0x14) 1)
23879
23880
23881 $check-mu-get-stmt:error-base-type-addr-but-not-register:
23882 (write-buffered *(ebp+0x10) "fn ")
23883 8b/-> *(ebp+0xc) 0/r32/eax
23884 (lookup *eax *(eax+4))
23885 (write-buffered *(ebp+0x10) %eax)
23886 (write-buffered *(ebp+0x10) ": stmt get: var '")
23887 (lookup *(esi+0xc) *(esi+0x10))
23888 (lookup *eax *(eax+4))
23889 (lookup *eax *(eax+4))
23890 (write-buffered *(ebp+0x10) %eax)
23891 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
23892 (flush *(ebp+0x10))
23893 (stop *(ebp+0x14) 1)
23894
23895
23896 $check-mu-get-stmt:error-bad-field:
23897
23898 (write-buffered *(ebp+0x10) "fn ")
23899 8b/-> *(ebp+0xc) 0/r32/eax
23900 (lookup *eax *(eax+4))
23901 (write-buffered *(ebp+0x10) %eax)
23902 (write-buffered *(ebp+0x10) ": stmt get: type '")
23903
23904 bf/copy-to-edi Type-id/imm32
23905 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
23906 {
23907 81 7/subop/compare %esi 0/imm32
23908 74/jump-if-= break/disp8
23909 (write-buffered *(ebp+0x10) %esi)
23910 }
23911
23912 (write-buffered *(ebp+0x10) "' has no member called '")
23913 (lookup *ecx *(ecx+4))
23914 (write-buffered *(ebp+0x10) %eax)
23915 (write-buffered *(ebp+0x10) "'\n")
23916 (flush *(ebp+0x10))
23917 (stop *(ebp+0x14) 1)
23918
23919
23920 $check-mu-get-stmt:error-output-not-in-register:
23921 (write-buffered *(ebp+0x10) "fn ")
23922 8b/-> *(ebp+0xc) 0/r32/eax
23923 (lookup *eax *(eax+4))
23924 (write-buffered *(ebp+0x10) %eax)
23925 (write-buffered *(ebp+0x10) ": stmt get: output '")
23926 (lookup *edi *(edi+4))
23927 (write-buffered *(ebp+0x10) %eax)
23928 (write-buffered *(ebp+0x10) "' is not in a register\n")
23929 (flush *(ebp+0x10))
23930 (stop *(ebp+0x14) 1)
23931
23932
23933 $check-mu-get-stmt:error-output-type-not-address:
23934 (write-buffered *(ebp+0x10) "fn ")
23935 8b/-> *(ebp+0xc) 0/r32/eax
23936 (lookup *eax *(eax+4))
23937 (write-buffered *(ebp+0x10) %eax)
23938 (write-buffered *(ebp+0x10) ": stmt get: output must be an addr\n")
23939 (flush *(ebp+0x10))
23940 (stop *(ebp+0x14) 1)
23941
23942
23943 $check-mu-get-stmt:error-bad-output-type:
23944 (write-buffered *(ebp+0x10) "fn ")
23945 8b/-> *(ebp+0xc) 0/r32/eax
23946 (lookup *eax *(eax+4))
23947 (write-buffered *(ebp+0x10) %eax)
23948 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
23949 (write-buffered *(ebp+0x10) %ecx)
23950 (write-buffered *(ebp+0x10) "' of type '")
23951 bf/copy-to-edi Type-id/imm32
23952 8b/-> *(edi+ebx<<2+0xc) 6/r32/esi
23953 {
23954 81 7/subop/compare %esi 0/imm32
23955 74/jump-if-= break/disp8
23956 (write-buffered *(ebp+0x10) %esi)
23957 }
23958 (write-buffered *(ebp+0x10) "'\n")
23959 (flush *(ebp+0x10))
23960 (stop *(ebp+0x14) 1)
23961
23962
23963 check-mu-index-stmt:
23964
23965 55/push-ebp
23966 89/<- %ebp 4/r32/esp
23967
23968 50/push-eax
23969 51/push-ecx
23970 52/push-edx
23971 53/push-ebx
23972 56/push-esi
23973 57/push-edi
23974
23975 8b/-> *(ebp+8) 6/r32/esi
23976
23977
23978 (lookup *(esi+0xc) *(esi+0x10))
23979 $check-mu-index-stmt:check-no-inouts:
23980 3d/compare-eax-and 0/imm32
23981 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
23982 (lookup *eax *(eax+4))
23983 89/<- %ecx 0/r32/eax
23984
23985
23986 (lookup *(ecx+8) *(ecx+0xc))
23987 89/<- %ebx 0/r32/eax
23988
23989 81 7/subop/compare *ebx 0/imm32/false
23990 {
23991 74/jump-if-= break/disp8
23992 (simple-mu-type? %ebx 3)
23993 3d/compare-eax-and 0/imm32/false
23994 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-atom-type/disp32
23995 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
23996 }
23997 $check-mu-index-stmt:base-is-compound:
23998
23999 {
24000 (lookup *(ebx+4) *(ebx+8))
24001 (simple-mu-type? %eax 2)
24002 3d/compare-eax-and 0/imm32/false
24003 75/jump-if-!= break/disp8
24004 (lookup *(ebx+4) *(ebx+8))
24005 (simple-mu-type? %eax 3)
24006 3d/compare-eax-and 0/imm32/false
24007 75/jump-if-!= break/disp8
24008 e9/jump $check-mu-index-stmt:error-base-non-array-type/disp32
24009 }
24010
24011 {
24012 (lookup *(ebx+4) *(ebx+8))
24013 (simple-mu-type? %eax 2)
24014 3d/compare-eax-and 0/imm32/false
24015 74/jump-if-= break/disp8
24016 $check-mu-index-stmt:base-is-addr:
24017 (lookup *(ebx+0xc) *(ebx+0x10))
24018 (lookup *(eax+4) *(eax+8))
24019 (simple-mu-type? %eax 3)
24020 3d/compare-eax-and 0/imm32/false
24021 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
24022 $check-mu-index-stmt:check-base-addr-is-register:
24023 81 7/subop/compare *(ecx+0x18) 0/imm32
24024 0f 84/jump-if-= $check-mu-index-stmt:error-base-address-array-type-on-stack/disp32
24025 }
24026
24027 {
24028 (lookup *(ebx+4) *(ebx+8))
24029 (simple-mu-type? %eax 3)
24030 3d/compare-eax-and 0/imm32/false
24031 74/jump-if-= break/disp8
24032 $check-mu-index-stmt:base-is-array:
24033 81 7/subop/compare *(ecx+0x18) 0/imm32
24034 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-type-in-register/disp32
24035 }
24036
24037 {
24038 (lookup *(ebx+4) *(ebx+8))
24039 (simple-mu-type? %eax 2)
24040 3d/compare-eax-and 0/imm32/false
24041 74/jump-if-= break/disp8
24042 (lookup *(ebx+0xc) *(ebx+0x10))
24043 89/<- %ebx 0/r32/eax
24044 }
24045
24046
24047 (lookup *(esi+0xc) *(esi+0x10))
24048 (lookup *(eax+8) *(eax+0xc))
24049 $check-mu-index-stmt:check-single-inout:
24050 3d/compare-eax-and 0/imm32
24051 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
24052 (lookup *eax *(eax+4))
24053 89/<- %ecx 0/r32/eax
24054
24055
24056 (lookup *(ecx+8) *(ecx+0xc))
24057 89/<- %edx 0/r32/eax
24058
24059 81 7/subop/compare *edx 0/imm32/false
24060 {
24061 74/jump-if-= break/disp8
24062 $check-mu-index-stmt:index-type-is-atom:
24063 (simple-mu-type? %edx 0)
24064 3d/compare-eax-and 0/imm32/false
24065 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
24066 (simple-mu-type? %edx 1)
24067 3d/compare-eax-and 0/imm32/false
24068 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
24069 (simple-mu-type? %edx 7)
24070 3d/compare-eax-and 0/imm32/false
24071 0f 85/jump-if-!= $check-mu-index-stmt:error-index-offset-atom-type/disp32
24072 e9/jump $check-mu-index-stmt:error-invalid-index-type/disp32
24073 }
24074
24075 {
24076 75/jump-if-!= break/disp8
24077 $check-mu-index-stmt:index-type-is-non-atom:
24078 (lookup *(edx+4) *(edx+8))
24079 (simple-mu-type? %eax 7)
24080 3d/compare-eax-and 0/imm32/false
24081 0f 84/jump-if-= $check-mu-index-stmt:error-invalid-index-type/disp32
24082 }
24083 $check-mu-index-stmt:index-type-done:
24084
24085 {
24086 (simple-mu-type? %edx 0)
24087 3d/compare-eax-and 0/imm32/false
24088 75/jump-if-!= break/disp8
24089 $check-mu-index-stmt:check-index-in-register:
24090 81 7/subop/compare *(ecx+0x18) 0/imm32
24091 0f 84/jump-if-= $check-mu-index-stmt:error-index-on-stack/disp32
24092 }
24093
24094 {
24095 (simple-mu-type? %edx 1)
24096 3d/compare-eax-and 0/imm32/false
24097 74/jump-if-= break/disp8
24098 $check-mu-index-stmt:check-index-can-be-int:
24099 (lookup *(esi+0xc) *(esi+0x10))
24100 (lookup *eax *(eax+4))
24101 (array-element-size %eax)
24102 3d/compare-eax-and 1/imm32
24103 74/jump-if-= break/disp8
24104 3d/compare-eax-and 2/imm32
24105 74/jump-if-= break/disp8
24106 3d/compare-eax-and 4/imm32
24107 74/jump-if-= break/disp8
24108 3d/compare-eax-and 8/imm32
24109 74/jump-if-= break/disp8
24110 e9/jump $check-mu-index-stmt:error-index-needs-offset/disp32
24111 }
24112
24113 (lookup *(esi+0xc) *(esi+0x10))
24114 (lookup *(eax+8) *(eax+0xc))
24115 (lookup *(eax+8) *(eax+0xc))
24116 3d/compare-eax-and 0/imm32/false
24117 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-inouts/disp32
24118
24119
24120 (lookup *(esi+0x14) *(esi+0x18))
24121 3d/compare-eax-and 0/imm32/false
24122 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-outputs/disp32
24123 (lookup *eax *(eax+4))
24124 89/<- %edi 0/r32/eax
24125
24126
24127 (lookup *(edi+8) *(edi+0xc))
24128 89/<- %edx 0/r32/eax
24129 81 7/subop/compare *edx 0/imm32/false
24130 0f 85/jump-if-!= $check-mu-index-stmt:error-output-type-not-address/disp32
24131
24132 (lookup *(edx+4) *(edx+8))
24133 (simple-mu-type? %eax 2)
24134 3d/compare-eax-and 0/imm32/false
24135 0f 84/jump-if-= $check-mu-index-stmt:error-output-type-not-address/disp32
24136
24137 (type-tail %ebx)
24138 89/<- %ebx 0/r32/eax
24139 (type-tail %edx)
24140 (type-equal? %ebx %eax)
24141 3d/compare-eax-and 0/imm32/false
24142 0f 84/jump-if-= $check-mu-index-stmt:error-bad-output-type/disp32
24143
24144 (lookup *(esi+0x14) *(esi+0x18))
24145 (lookup *(eax+8) *(eax+0xc))
24146 3d/compare-eax-and 0/imm32/false
24147 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-outputs/disp32
24148 $check-mu-index-stmt:end:
24149
24150 5f/pop-to-edi
24151 5e/pop-to-esi
24152 5b/pop-to-ebx
24153 5a/pop-to-edx
24154 59/pop-to-ecx
24155 58/pop-to-eax
24156
24157 89/<- %esp 5/r32/ebp
24158 5d/pop-to-ebp
24159 c3/return
24160
24161 $check-mu-index-stmt:error-base-non-array-type:
24162 (write-buffered *(ebp+0x10) "fn ")
24163 8b/-> *(ebp+0xc) 0/r32/eax
24164 (lookup *eax *(eax+4))
24165 (write-buffered *(ebp+0x10) %eax)
24166 (write-buffered *(ebp+0x10) ": stmt index: var '")
24167 (lookup *ecx *(ecx+4))
24168 (write-buffered *(ebp+0x10) %eax)
24169 (write-buffered *(ebp+0x10) "' is not an array\n")
24170 (flush *(ebp+0x10))
24171 (stop *(ebp+0x14) 1)
24172
24173
24174 $check-mu-index-stmt:error-base-array-atom-type:
24175 (write-buffered *(ebp+0x10) "fn ")
24176 8b/-> *(ebp+0xc) 0/r32/eax
24177 (lookup *eax *(eax+4))
24178 (write-buffered *(ebp+0x10) %eax)
24179 (write-buffered *(ebp+0x10) ": stmt index: array '")
24180 (lookup *ecx *(ecx+4))
24181 (write-buffered *(ebp+0x10) %eax)
24182 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
24183 (flush *(ebp+0x10))
24184 (stop *(ebp+0x14) 1)
24185
24186
24187 $check-mu-index-stmt:error-base-address-array-type-on-stack:
24188 (write-buffered *(ebp+0x10) "fn ")
24189 8b/-> *(ebp+0xc) 0/r32/eax
24190 (lookup *eax *(eax+4))
24191 (write-buffered *(ebp+0x10) %eax)
24192 (write-buffered *(ebp+0x10) ": stmt index: var '")
24193 (lookup *ecx *(ecx+4))
24194 (write-buffered *(ebp+0x10) %eax)
24195 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
24196 (flush *(ebp+0x10))
24197 (stop *(ebp+0x14) 1)
24198
24199
24200 $check-mu-index-stmt:error-base-array-type-in-register:
24201 (write-buffered *(ebp+0x10) "fn ")
24202 8b/-> *(ebp+0xc) 0/r32/eax
24203 (lookup *eax *(eax+4))
24204 (write-buffered *(ebp+0x10) %eax)
24205 (write-buffered *(ebp+0x10) ": stmt index: var '")
24206 (lookup *ecx *(ecx+4))
24207 (write-buffered *(ebp+0x10) %eax)
24208 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
24209 (flush *(ebp+0x10))
24210 (stop *(ebp+0x14) 1)
24211
24212
24213 $check-mu-index-stmt:error-too-few-inouts:
24214 (write-buffered *(ebp+0x10) "fn ")
24215 8b/-> *(ebp+0xc) 0/r32/eax
24216 (lookup *eax *(eax+4))
24217 (write-buffered *(ebp+0x10) %eax)
24218 (write-buffered *(ebp+0x10) ": stmt index: too few inouts (2 required)\n")
24219 (flush *(ebp+0x10))
24220 (stop *(ebp+0x14) 1)
24221
24222
24223 $check-mu-index-stmt:error-invalid-index-type:
24224 (write-buffered *(ebp+0x10) "fn ")
24225 8b/-> *(ebp+0xc) 0/r32/eax
24226 (lookup *eax *(eax+4))
24227 (write-buffered *(ebp+0x10) %eax)
24228 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
24229 (lookup *ecx *(ecx+4))
24230 (write-buffered *(ebp+0x10) %eax)
24231 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
24232 (flush *(ebp+0x10))
24233 (stop *(ebp+0x14) 1)
24234
24235
24236 $check-mu-index-stmt:error-index-offset-atom-type:
24237 (write-buffered *(ebp+0x10) "fn ")
24238 8b/-> *(ebp+0xc) 0/r32/eax
24239 (lookup *eax *(eax+4))
24240 (write-buffered *(ebp+0x10) %eax)
24241 (write-buffered *(ebp+0x10) ": stmt index: offset '")
24242 (lookup *ecx *(ecx+4))
24243 (write-buffered *(ebp+0x10) %eax)
24244 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
24245 (flush *(ebp+0x10))
24246 (stop *(ebp+0x14) 1)
24247
24248
24249 $check-mu-index-stmt:error-index-on-stack:
24250 (write-buffered *(ebp+0x10) "fn ")
24251 8b/-> *(ebp+0xc) 0/r32/eax
24252 (lookup *eax *(eax+4))
24253 (write-buffered *(ebp+0x10) %eax)
24254 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
24255 (lookup *ecx *(ecx+4))
24256 (write-buffered *(ebp+0x10) %eax)
24257 (write-buffered *(ebp+0x10) "' must be in a register\n")
24258 (flush *(ebp+0x10))
24259 (stop *(ebp+0x14) 1)
24260
24261
24262 $check-mu-index-stmt:error-index-needs-offset:
24263 (write-buffered *(ebp+0x10) "fn ")
24264 8b/-> *(ebp+0xc) 0/r32/eax
24265 (lookup *eax *(eax+4))
24266 (write-buffered *(ebp+0x10) %eax)
24267 (write-buffered *(ebp+0x10) ": stmt index: cannot take an int for array '")
24268 (lookup *(esi+0xc) *(esi+0x10))
24269 (lookup *eax *(eax+4))
24270 (lookup *eax *(eax+4))
24271 (write-buffered *(ebp+0x10) %eax)
24272 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
24273 (flush *(ebp+0x10))
24274 (stop *(ebp+0x14) 1)
24275
24276
24277 $check-mu-index-stmt:error-too-many-inouts:
24278 (write-buffered *(ebp+0x10) "fn ")
24279 8b/-> *(ebp+0xc) 0/r32/eax
24280 (lookup *eax *(eax+4))
24281 (write-buffered *(ebp+0x10) %eax)
24282 (write-buffered *(ebp+0x10) ": stmt index: too many inouts (2 required)\n")
24283 (flush *(ebp+0x10))
24284 (stop *(ebp+0x14) 1)
24285
24286
24287 $check-mu-index-stmt:error-too-few-outputs:
24288 (write-buffered *(ebp+0x10) "fn ")
24289 8b/-> *(ebp+0xc) 0/r32/eax
24290 (lookup *eax *(eax+4))
24291 (write-buffered *(ebp+0x10) %eax)
24292 (write-buffered *(ebp+0x10) ": stmt index: must have an output\n")
24293 (flush *(ebp+0x10))
24294 (stop *(ebp+0x14) 1)
24295
24296
24297 $check-mu-index-stmt:error-too-many-outputs:
24298 (write-buffered *(ebp+0x10) "fn ")
24299 8b/-> *(ebp+0xc) 0/r32/eax
24300 (lookup *eax *(eax+4))
24301 (write-buffered *(ebp+0x10) %eax)
24302 (write-buffered *(ebp+0x10) ": stmt index: too many outputs (1 required)\n")
24303 (flush *(ebp+0x10))
24304 (stop *(ebp+0x14) 1)
24305
24306
24307 $check-mu-index-stmt:error-output-not-in-register:
24308 (write-buffered *(ebp+0x10) "fn ")
24309 8b/-> *(ebp+0xc) 0/r32/eax
24310 (lookup *eax *(eax+4))
24311 (write-buffered *(ebp+0x10) %eax)
24312 (write-buffered *(ebp+0x10) ": stmt index: output '")
24313 (lookup *edi *(edi+4))
24314 (write-buffered *(ebp+0x10) %eax)
24315 (write-buffered *(ebp+0x10) "' is not in a register\n")
24316 (flush *(ebp+0x10))
24317 (stop *(ebp+0x14) 1)
24318
24319
24320 $check-mu-index-stmt:error-output-type-not-address:
24321 (write-buffered *(ebp+0x10) "fn ")
24322 8b/-> *(ebp+0xc) 0/r32/eax
24323 (lookup *eax *(eax+4))
24324 (write-buffered *(ebp+0x10) %eax)
24325 (write-buffered *(ebp+0x10) ": stmt index: output '")
24326 (lookup *edi *(edi+4))
24327 (write-buffered *(ebp+0x10) %eax)
24328 (write-buffered *(ebp+0x10) "' must be an addr\n")
24329 (flush *(ebp+0x10))
24330 (stop *(ebp+0x14) 1)
24331
24332
24333 $check-mu-index-stmt:error-bad-output-type:
24334 (write-buffered *(ebp+0x10) "fn ")
24335 8b/-> *(ebp+0xc) 0/r32/eax
24336 (lookup *eax *(eax+4))
24337 (write-buffered *(ebp+0x10) %eax)
24338 (write-buffered *(ebp+0x10) ": stmt index: output '")
24339 (lookup *edi *(edi+4))
24340 (write-buffered *(ebp+0x10) %eax)
24341 (write-buffered *(ebp+0x10) "' does not have the right type\n")
24342 (flush *(ebp+0x10))
24343 (stop *(ebp+0x14) 1)
24344
24345
24346 check-mu-length-stmt:
24347
24348 55/push-ebp
24349 89/<- %ebp 4/r32/esp
24350
24351 50/push-eax
24352 51/push-ecx
24353 52/push-edx
24354 53/push-ebx
24355 56/push-esi
24356 57/push-edi
24357
24358 8b/-> *(ebp+8) 6/r32/esi
24359
24360
24361 (lookup *(esi+0xc) *(esi+0x10))
24362 $check-mu-length-stmt:check-no-inouts:
24363 3d/compare-eax-and 0/imm32
24364 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-inouts/disp32
24365 (lookup *eax *(eax+4))
24366 89/<- %ecx 0/r32/eax
24367
24368
24369 (lookup *(ecx+8) *(ecx+0xc))
24370 89/<- %ebx 0/r32/eax
24371
24372 81 7/subop/compare *ebx 0/imm32/false
24373 {
24374 74/jump-if-= break/disp8
24375 (simple-mu-type? %ebx 3)
24376 3d/compare-eax-and 0/imm32/false
24377 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-atom-type/disp32
24378 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
24379 }
24380 $check-mu-length-stmt:base-is-compound:
24381
24382 {
24383 (lookup *(ebx+4) *(ebx+8))
24384 (simple-mu-type? %eax 2)
24385 3d/compare-eax-and 0/imm32/false
24386 75/jump-if-!= break/disp8
24387 (lookup *(ebx+4) *(ebx+8))
24388 (simple-mu-type? %eax 3)
24389 3d/compare-eax-and 0/imm32/false
24390 75/jump-if-!= break/disp8
24391 e9/jump $check-mu-length-stmt:error-base-non-array-type/disp32
24392 }
24393
24394 {
24395 (lookup *(ebx+4) *(ebx+8))
24396 (simple-mu-type? %eax 2)
24397 3d/compare-eax-and 0/imm32/false
24398 74/jump-if-= break/disp8
24399 $check-mu-length-stmt:base-is-addr:
24400 (lookup *(ebx+0xc) *(ebx+0x10))
24401 (lookup *(eax+4) *(eax+8))
24402 (simple-mu-type? %eax 3)
24403 3d/compare-eax-and 0/imm32/false
24404 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
24405 $check-mu-length-stmt:check-base-addr-is-register:
24406 81 7/subop/compare *(ecx+0x18) 0/imm32
24407 0f 84/jump-if-= $check-mu-length-stmt:error-base-address-array-type-on-stack/disp32
24408 }
24409
24410 {
24411 (lookup *(ebx+4) *(ebx+8))
24412 (simple-mu-type? %eax 3)
24413 3d/compare-eax-and 0/imm32/false
24414 74/jump-if-= break/disp8
24415 $check-mu-length-stmt:base-is-array:
24416 81 7/subop/compare *(ecx+0x18) 0/imm32
24417 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-type-in-register/disp32
24418 }
24419
24420 {
24421 (lookup *(ebx+4) *(ebx+8))
24422 (simple-mu-type? %eax 2)
24423 3d/compare-eax-and 0/imm32/false
24424 74/jump-if-= break/disp8
24425 (lookup *(ebx+0xc) *(ebx+0x10))
24426 89/<- %ebx 0/r32/eax
24427 }
24428
24429 (lookup *(esi+0xc) *(esi+0x10))
24430 (lookup *(eax+8) *(eax+0xc))
24431 3d/compare-eax-and 0/imm32/false
24432 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-inouts/disp32
24433
24434
24435 (lookup *(esi+0x14) *(esi+0x18))
24436 3d/compare-eax-and 0/imm32/false
24437 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-outputs/disp32
24438 (lookup *eax *(eax+4))
24439 89/<- %edi 0/r32/eax
24440
24441
24442 (lookup *(edi+8) *(edi+0xc))
24443 (simple-mu-type? %eax 1)
24444 3d/compare-eax-and 0/imm32/false
24445 0f 84/jump-if-= $check-mu-length-stmt:error-invalid-output-type/disp32
24446
24447 (lookup *(esi+0x14) *(esi+0x18))
24448 (lookup *(eax+8) *(eax+0xc))
24449 3d/compare-eax-and 0/imm32/false
24450 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-outputs/disp32
24451 $check-mu-length-stmt:end:
24452
24453 5f/pop-to-edi
24454 5e/pop-to-esi
24455 5b/pop-to-ebx
24456 5a/pop-to-edx
24457 59/pop-to-ecx
24458 58/pop-to-eax
24459
24460 89/<- %esp 5/r32/ebp
24461 5d/pop-to-ebp
24462 c3/return
24463
24464 $check-mu-length-stmt:error-base-non-array-type:
24465 (write-buffered *(ebp+0x10) "fn ")
24466 8b/-> *(ebp+0xc) 0/r32/eax
24467 (lookup *eax *(eax+4))
24468 (write-buffered *(ebp+0x10) %eax)
24469 (write-buffered *(ebp+0x10) ": stmt length: var '")
24470 (lookup *ecx *(ecx+4))
24471 (write-buffered *(ebp+0x10) %eax)
24472 (write-buffered *(ebp+0x10) "' is not an array\n")
24473 (flush *(ebp+0x10))
24474 (stop *(ebp+0x14) 1)
24475
24476
24477 $check-mu-length-stmt:error-base-array-atom-type:
24478 (write-buffered *(ebp+0x10) "fn ")
24479 8b/-> *(ebp+0xc) 0/r32/eax
24480 (lookup *eax *(eax+4))
24481 (write-buffered *(ebp+0x10) %eax)
24482 (write-buffered *(ebp+0x10) ": stmt length: array '")
24483 (lookup *ecx *(ecx+4))
24484 (write-buffered *(ebp+0x10) %eax)
24485 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
24486 (flush *(ebp+0x10))
24487 (stop *(ebp+0x14) 1)
24488
24489
24490 $check-mu-length-stmt:error-base-address-array-type-on-stack:
24491 (write-buffered *(ebp+0x10) "fn ")
24492 8b/-> *(ebp+0xc) 0/r32/eax
24493 (lookup *eax *(eax+4))
24494 (write-buffered *(ebp+0x10) %eax)
24495 (write-buffered *(ebp+0x10) ": stmt length: var '")
24496 (lookup *ecx *(ecx+4))
24497 (write-buffered *(ebp+0x10) %eax)
24498 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
24499 (flush *(ebp+0x10))
24500 (stop *(ebp+0x14) 1)
24501
24502
24503 $check-mu-length-stmt:error-base-array-type-in-register:
24504 (write-buffered *(ebp+0x10) "fn ")
24505 8b/-> *(ebp+0xc) 0/r32/eax
24506 (lookup *eax *(eax+4))
24507 (write-buffered *(ebp+0x10) %eax)
24508 (write-buffered *(ebp+0x10) ": stmt length: var '")
24509 (lookup *ecx *(ecx+4))
24510 (write-buffered *(ebp+0x10) %eax)
24511 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
24512 (flush *(ebp+0x10))
24513 (stop *(ebp+0x14) 1)
24514
24515
24516 $check-mu-length-stmt:error-too-few-inouts:
24517 (write-buffered *(ebp+0x10) "fn ")
24518 8b/-> *(ebp+0xc) 0/r32/eax
24519 (lookup *eax *(eax+4))
24520 (write-buffered *(ebp+0x10) %eax)
24521 (write-buffered *(ebp+0x10) ": stmt length: too few inouts (1 required)\n")
24522 (flush *(ebp+0x10))
24523 (stop *(ebp+0x14) 1)
24524
24525
24526 $check-mu-length-stmt:error-invalid-index-type:
24527 (write-buffered *(ebp+0x10) "fn ")
24528 8b/-> *(ebp+0xc) 0/r32/eax
24529 (lookup *eax *(eax+4))
24530 (write-buffered *(ebp+0x10) %eax)
24531 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
24532 (lookup *ecx *(ecx+4))
24533 (write-buffered *(ebp+0x10) %eax)
24534 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
24535 (flush *(ebp+0x10))
24536 (stop *(ebp+0x14) 1)
24537
24538
24539 $check-mu-length-stmt:error-index-offset-atom-type:
24540 (write-buffered *(ebp+0x10) "fn ")
24541 8b/-> *(ebp+0xc) 0/r32/eax
24542 (lookup *eax *(eax+4))
24543 (write-buffered *(ebp+0x10) %eax)
24544 (write-buffered *(ebp+0x10) ": stmt length: offset '")
24545 (lookup *ecx *(ecx+4))
24546 (write-buffered *(ebp+0x10) %eax)
24547 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
24548 (flush *(ebp+0x10))
24549 (stop *(ebp+0x14) 1)
24550
24551
24552 $check-mu-length-stmt:error-index-on-stack:
24553 (write-buffered *(ebp+0x10) "fn ")
24554 8b/-> *(ebp+0xc) 0/r32/eax
24555 (lookup *eax *(eax+4))
24556 (write-buffered *(ebp+0x10) %eax)
24557 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
24558 (lookup *ecx *(ecx+4))
24559 (write-buffered *(ebp+0x10) %eax)
24560 (write-buffered *(ebp+0x10) "' must be in a register\n")
24561 (flush *(ebp+0x10))
24562 (stop *(ebp+0x14) 1)
24563
24564
24565 $check-mu-length-stmt:error-index-needs-offset:
24566 (write-buffered *(ebp+0x10) "fn ")
24567 8b/-> *(ebp+0xc) 0/r32/eax
24568 (lookup *eax *(eax+4))
24569 (write-buffered *(ebp+0x10) %eax)
24570 (write-buffered *(ebp+0x10) ": stmt length: cannot take an int for array '")
24571 (lookup *(esi+0xc) *(esi+0x10))
24572 (lookup *eax *(eax+4))
24573 (lookup *eax *(eax+4))
24574 (write-buffered *(ebp+0x10) %eax)
24575 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
24576 (flush *(ebp+0x10))
24577 (stop *(ebp+0x14) 1)
24578
24579
24580 $check-mu-length-stmt:error-too-many-inouts:
24581 (write-buffered *(ebp+0x10) "fn ")
24582 8b/-> *(ebp+0xc) 0/r32/eax
24583 (lookup *eax *(eax+4))
24584 (write-buffered *(ebp+0x10) %eax)
24585 (write-buffered *(ebp+0x10) ": stmt length: too many inouts (1 required)\n")
24586 (flush *(ebp+0x10))
24587 (stop *(ebp+0x14) 1)
24588
24589
24590 $check-mu-length-stmt:error-too-few-outputs:
24591 (write-buffered *(ebp+0x10) "fn ")
24592 8b/-> *(ebp+0xc) 0/r32/eax
24593 (lookup *eax *(eax+4))
24594 (write-buffered *(ebp+0x10) %eax)
24595 (write-buffered *(ebp+0x10) ": stmt length: must have an output\n")
24596 (flush *(ebp+0x10))
24597 (stop *(ebp+0x14) 1)
24598
24599
24600 $check-mu-length-stmt:error-too-many-outputs:
24601 (write-buffered *(ebp+0x10) "fn ")
24602 8b/-> *(ebp+0xc) 0/r32/eax
24603 (lookup *eax *(eax+4))
24604 (write-buffered *(ebp+0x10) %eax)
24605 (write-buffered *(ebp+0x10) ": stmt length: too many outputs (1 required)\n")
24606 (flush *(ebp+0x10))
24607 (stop *(ebp+0x14) 1)
24608
24609
24610 $check-mu-length-stmt:error-output-not-in-register:
24611 (write-buffered *(ebp+0x10) "fn ")
24612 8b/-> *(ebp+0xc) 0/r32/eax
24613 (lookup *eax *(eax+4))
24614 (write-buffered *(ebp+0x10) %eax)
24615 (write-buffered *(ebp+0x10) ": stmt length: output '")
24616 (lookup *edi *(edi+4))
24617 (write-buffered *(ebp+0x10) %eax)
24618 (write-buffered *(ebp+0x10) "' is not in a register\n")
24619 (flush *(ebp+0x10))
24620 (stop *(ebp+0x14) 1)
24621
24622
24623 $check-mu-length-stmt:error-invalid-output-type:
24624 (write-buffered *(ebp+0x10) "fn ")
24625 8b/-> *(ebp+0xc) 0/r32/eax
24626 (lookup *eax *(eax+4))
24627 (write-buffered *(ebp+0x10) %eax)
24628 (write-buffered *(ebp+0x10) ": stmt length: output '")
24629 (lookup *edi *(edi+4))
24630 (write-buffered *(ebp+0x10) %eax)
24631 (write-buffered *(ebp+0x10) "' does not have the right type\n")
24632 (flush *(ebp+0x10))
24633 (stop *(ebp+0x14) 1)
24634
24635
24636 check-mu-compute-offset-stmt:
24637
24638 55/push-ebp
24639 89/<- %ebp 4/r32/esp
24640
24641 50/push-eax
24642 51/push-ecx
24643 52/push-edx
24644 53/push-ebx
24645 56/push-esi
24646 57/push-edi
24647
24648 8b/-> *(ebp+8) 6/r32/esi
24649
24650
24651 (lookup *(esi+0xc) *(esi+0x10))
24652 $check-mu-compute-offset-stmt:check-no-inouts:
24653 3d/compare-eax-and 0/imm32
24654 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
24655 (lookup *eax *(eax+4))
24656 89/<- %ecx 0/r32/eax
24657
24658
24659 (lookup *(ecx+8) *(ecx+0xc))
24660 89/<- %ebx 0/r32/eax
24661
24662 81 7/subop/compare *ebx 0/imm32/false
24663 {
24664 74/jump-if-= break/disp8
24665 (simple-mu-type? %ebx 3)
24666 3d/compare-eax-and 0/imm32/false
24667 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-base-array-atom-type/disp32
24668 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24669 }
24670 $check-mu-compute-offset-stmt:base-is-compound:
24671
24672 {
24673 (lookup *(ebx+4) *(ebx+8))
24674 (simple-mu-type? %eax 2)
24675 3d/compare-eax-and 0/imm32/false
24676 75/jump-if-!= break/disp8
24677 (lookup *(ebx+4) *(ebx+8))
24678 (simple-mu-type? %eax 3)
24679 3d/compare-eax-and 0/imm32/false
24680 75/jump-if-!= break/disp8
24681 e9/jump $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24682 }
24683
24684 {
24685 (lookup *(ebx+4) *(ebx+8))
24686 (simple-mu-type? %eax 2)
24687 3d/compare-eax-and 0/imm32/false
24688 74/jump-if-= break/disp8
24689 $check-mu-compute-offset-stmt:base-is-addr:
24690 (lookup *(ebx+0xc) *(ebx+0x10))
24691 (lookup *(eax+4) *(eax+8))
24692 (simple-mu-type? %eax 3)
24693 3d/compare-eax-and 0/imm32/false
24694 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
24695 }
24696
24697 {
24698 (lookup *(ebx+4) *(ebx+8))
24699 (simple-mu-type? %eax 2)
24700 3d/compare-eax-and 0/imm32/false
24701 74/jump-if-= break/disp8
24702 (lookup *(ebx+0xc) *(ebx+0x10))
24703 89/<- %ebx 0/r32/eax
24704 }
24705
24706
24707 (lookup *(esi+0xc) *(esi+0x10))
24708 (lookup *(eax+8) *(eax+0xc))
24709 $check-mu-compute-offset-stmt:check-single-inout:
24710 3d/compare-eax-and 0/imm32
24711 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
24712 (lookup *eax *(eax+4))
24713 89/<- %ecx 0/r32/eax
24714
24715
24716 (lookup *(ecx+8) *(ecx+0xc))
24717 89/<- %edx 0/r32/eax
24718
24719 81 7/subop/compare *edx 0/imm32/false
24720 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
24721 {
24722 $check-mu-compute-offset-stmt:index-type-is-atom:
24723 (simple-mu-type? %edx 0)
24724 3d/compare-eax-and 0/imm32/false
24725 75/jump-if-!= break/disp8
24726 (simple-mu-type? %edx 1)
24727 3d/compare-eax-and 0/imm32/false
24728 75/jump-if-!= break/disp8
24729 e9/jump $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
24730 }
24731
24732 (lookup *(esi+0xc) *(esi+0x10))
24733 (lookup *(eax+8) *(eax+0xc))
24734 (lookup *(eax+8) *(eax+0xc))
24735 3d/compare-eax-and 0/imm32/false
24736 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-inouts/disp32
24737
24738
24739 (lookup *(esi+0x14) *(esi+0x18))
24740 3d/compare-eax-and 0/imm32/false
24741 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-outputs/disp32
24742 (lookup *eax *(eax+4))
24743 89/<- %edi 0/r32/eax
24744
24745
24746 (lookup *(edi+8) *(edi+0xc))
24747 89/<- %edx 0/r32/eax
24748 81 7/subop/compare *edx 0/imm32/false
24749 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
24750
24751 (lookup *(edx+4) *(edx+8))
24752 (simple-mu-type? %eax 7)
24753 3d/compare-eax-and 0/imm32/false
24754 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
24755
24756 (type-tail %ebx)
24757 89/<- %ebx 0/r32/eax
24758 (type-tail %edx)
24759 (type-equal? %ebx %eax)
24760 3d/compare-eax-and 0/imm32/false
24761 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-bad-output-type/disp32
24762
24763 (lookup *(esi+0x14) *(esi+0x18))
24764 (lookup *(eax+8) *(eax+0xc))
24765 3d/compare-eax-and 0/imm32/false
24766 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-outputs/disp32
24767 $check-mu-compute-offset-stmt:end:
24768
24769 5f/pop-to-edi
24770 5e/pop-to-esi
24771 5b/pop-to-ebx
24772 5a/pop-to-edx
24773 59/pop-to-ecx
24774 58/pop-to-eax
24775
24776 89/<- %esp 5/r32/ebp
24777 5d/pop-to-ebp
24778 c3/return
24779
24780 $check-mu-compute-offset-stmt:error-base-non-array-type:
24781 (write-buffered *(ebp+0x10) "fn ")
24782 8b/-> *(ebp+0xc) 0/r32/eax
24783 (lookup *eax *(eax+4))
24784 (write-buffered *(ebp+0x10) %eax)
24785 (write-buffered *(ebp+0x10) ": stmt compute-offset: var '")
24786 (lookup *ecx *(ecx+4))
24787 (write-buffered *(ebp+0x10) %eax)
24788 (write-buffered *(ebp+0x10) "' is not an array\n")
24789 (flush *(ebp+0x10))
24790 (stop *(ebp+0x14) 1)
24791
24792
24793 $check-mu-compute-offset-stmt:error-base-array-atom-type:
24794 (write-buffered *(ebp+0x10) "fn ")
24795 8b/-> *(ebp+0xc) 0/r32/eax
24796 (lookup *eax *(eax+4))
24797 (write-buffered *(ebp+0x10) %eax)
24798 (write-buffered *(ebp+0x10) ": stmt compute-offset: array '")
24799 (lookup *ecx *(ecx+4))
24800 (write-buffered *(ebp+0x10) %eax)
24801 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
24802 (flush *(ebp+0x10))
24803 (stop *(ebp+0x14) 1)
24804
24805
24806 $check-mu-compute-offset-stmt:error-too-few-inouts:
24807 (write-buffered *(ebp+0x10) "fn ")
24808 8b/-> *(ebp+0xc) 0/r32/eax
24809 (lookup *eax *(eax+4))
24810 (write-buffered *(ebp+0x10) %eax)
24811 (write-buffered *(ebp+0x10) ": stmt compute-offset: too few inouts (2 required)\n")
24812 (flush *(ebp+0x10))
24813 (stop *(ebp+0x14) 1)
24814
24815
24816 $check-mu-compute-offset-stmt:error-invalid-index-type:
24817 (write-buffered *(ebp+0x10) "fn ")
24818 8b/-> *(ebp+0xc) 0/r32/eax
24819 (lookup *eax *(eax+4))
24820 (write-buffered *(ebp+0x10) %eax)
24821 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
24822 (lookup *ecx *(ecx+4))
24823 (write-buffered *(ebp+0x10) %eax)
24824 (write-buffered *(ebp+0x10) "' must be an int\n")
24825 (flush *(ebp+0x10))
24826 (stop *(ebp+0x14) 1)
24827
24828
24829 $check-mu-compute-offset-stmt:error-index-offset-atom-type:
24830 (write-buffered *(ebp+0x10) "fn ")
24831 8b/-> *(ebp+0xc) 0/r32/eax
24832 (lookup *eax *(eax+4))
24833 (write-buffered *(ebp+0x10) %eax)
24834 (write-buffered *(ebp+0x10) ": stmt compute-offset: offset '")
24835 (lookup *ecx *(ecx+4))
24836 (write-buffered *(ebp+0x10) %eax)
24837 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
24838 (flush *(ebp+0x10))
24839 (stop *(ebp+0x14) 1)
24840
24841
24842 $check-mu-compute-offset-stmt:error-index-on-stack:
24843 (write-buffered *(ebp+0x10) "fn ")
24844 8b/-> *(ebp+0xc) 0/r32/eax
24845 (lookup *eax *(eax+4))
24846 (write-buffered *(ebp+0x10) %eax)
24847 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
24848 (lookup *ecx *(ecx+4))
24849 (write-buffered *(ebp+0x10) %eax)
24850 (write-buffered *(ebp+0x10) "' must be in a register\n")
24851 (flush *(ebp+0x10))
24852 (stop *(ebp+0x14) 1)
24853
24854
24855 $check-mu-compute-offset-stmt:error-too-many-inouts:
24856 (write-buffered *(ebp+0x10) "fn ")
24857 8b/-> *(ebp+0xc) 0/r32/eax
24858 (lookup *eax *(eax+4))
24859 (write-buffered *(ebp+0x10) %eax)
24860 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many inouts (2 required)\n")
24861 (flush *(ebp+0x10))
24862 (stop *(ebp+0x14) 1)
24863
24864
24865 $check-mu-compute-offset-stmt:error-too-few-outputs:
24866 (write-buffered *(ebp+0x10) "fn ")
24867 8b/-> *(ebp+0xc) 0/r32/eax
24868 (lookup *eax *(eax+4))
24869 (write-buffered *(ebp+0x10) %eax)
24870 (write-buffered *(ebp+0x10) ": stmt compute-offset: must have an output\n")
24871 (flush *(ebp+0x10))
24872 (stop *(ebp+0x14) 1)
24873
24874
24875 $check-mu-compute-offset-stmt:error-too-many-outputs:
24876 (write-buffered *(ebp+0x10) "fn ")
24877 8b/-> *(ebp+0xc) 0/r32/eax
24878 (lookup *eax *(eax+4))
24879 (write-buffered *(ebp+0x10) %eax)
24880 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many outputs (1 required)\n")
24881 (flush *(ebp+0x10))
24882 (stop *(ebp+0x14) 1)
24883
24884
24885 $check-mu-compute-offset-stmt:error-output-not-in-register:
24886 (write-buffered *(ebp+0x10) "fn ")
24887 8b/-> *(ebp+0xc) 0/r32/eax
24888 (lookup *eax *(eax+4))
24889 (write-buffered *(ebp+0x10) %eax)
24890 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
24891 (lookup *edi *(edi+4))
24892 (write-buffered *(ebp+0x10) %eax)
24893 (write-buffered *(ebp+0x10) "' is not in a register\n")
24894 (flush *(ebp+0x10))
24895 (stop *(ebp+0x14) 1)
24896
24897
24898 $check-mu-compute-offset-stmt:error-output-type-not-offset:
24899 (write-buffered *(ebp+0x10) "fn ")
24900 8b/-> *(ebp+0xc) 0/r32/eax
24901 (lookup *eax *(eax+4))
24902 (write-buffered *(ebp+0x10) %eax)
24903 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
24904 (lookup *edi *(edi+4))
24905 (write-buffered *(ebp+0x10) %eax)
24906 (write-buffered *(ebp+0x10) "' must be an offset\n")
24907 (flush *(ebp+0x10))
24908 (stop *(ebp+0x14) 1)
24909
24910
24911 $check-mu-compute-offset-stmt:error-bad-output-type:
24912 (write-buffered *(ebp+0x10) "fn ")
24913 8b/-> *(ebp+0xc) 0/r32/eax
24914 (lookup *eax *(eax+4))
24915 (write-buffered *(ebp+0x10) %eax)
24916 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
24917 (lookup *edi *(edi+4))
24918 (write-buffered *(ebp+0x10) %eax)
24919 (write-buffered *(ebp+0x10) "' does not have the right type\n")
24920 (flush *(ebp+0x10))
24921 (stop *(ebp+0x14) 1)
24922
24923
24924 check-mu-copy-object-stmt:
24925
24926 55/push-ebp
24927 89/<- %ebp 4/r32/esp
24928
24929 50/push-eax
24930 51/push-ecx
24931 53/push-ebx
24932 56/push-esi
24933 57/push-edi
24934
24935 8b/-> *(ebp+8) 6/r32/esi
24936 $check-mu-copy-object-stmt:check-for-output:
24937
24938 (lookup *(esi+0x14) *(esi+0x18))
24939 3d/compare-eax-and 0/imm32
24940 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-too-many-outputs/disp32
24941 $check-mu-copy-object-stmt:get-left:
24942
24943 (lookup *(esi+0xc) *(esi+0x10))
24944 89/<- %edi 0/r32/eax
24945
24946 3d/compare-eax-and 0/imm32
24947 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
24948 $check-mu-copy-object-stmt:get-src:
24949
24950 (lookup *(edi+8) *(edi+0xc))
24951 89/<- %esi 0/r32/eax
24952
24953 3d/compare-eax-and 0/imm32
24954 0f 84/jump-if-= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
24955
24956 (lookup *(esi+8) *(esi+0xc))
24957 3d/compare-eax-and 0/imm32
24958 0f 85/jump-if-!= $check-mu-copy-object-stmt:error-incorrect-inouts/disp32
24959 $check-mu-copy-object-stmt:types:
24960
24961 (lookup *esi *(esi+4))
24962 (lookup *(eax+8) *(eax+0xc))
24963 89/<- %ecx 0/r32/eax
24964
24965 8b/-> *(esi+0x10) 0/r32/eax
24966 3d/compare-eax-and 0/imm32/false
24967 {
24968 74/jump-if-= break/disp8
24969 (lookup *(ecx+0xc) *(ecx+0x10))
24970
24971 81 7/subop/compare *(eax+0xc) 0/imm32
24972 {
24973 75/jump-if-!= break/disp8
24974 (lookup *(eax+4) *(eax+8))
24975 }
24976 89/<- %ecx 0/r32/eax
24977 }
24978
24979 (mu-addr-type? %ecx)
24980 3d/compare-eax-and 0/imm32/false
24981 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
24982
24983 (lookup *edi *(edi+4))
24984 (lookup *(eax+8) *(eax+0xc))
24985 89/<- %ebx 0/r32/eax
24986
24987 8b/-> *(edi+0x10) 0/r32/eax
24988 3d/compare-eax-and 0/imm32/false
24989 {
24990 74/jump-if-= break/disp8
24991 (lookup *(ebx+0xc) *(ebx+0x10))
24992
24993 81 7/subop/compare *(eax+0xc) 0/imm32
24994 {
24995 75/jump-if-!= break/disp8
24996 (lookup *(eax+4) *(eax+8))
24997 }
24998 89/<- %ebx 0/r32/eax
24999 }
25000
25001 (type-equal? %ecx %ebx)
25002 3d/compare-eax-and 0/imm32
25003 0f 84/jump-if-= $check-mu-copy-object-stmt:error-invalid-types/disp32
25004 $check-mu-copy-object-stmt:end:
25005
25006 5f/pop-to-edi
25007 5e/pop-to-esi
25008 5b/pop-to-ebx
25009 59/pop-to-ecx
25010 58/pop-to-eax
25011
25012 89/<- %esp 5/r32/ebp
25013 5d/pop-to-ebp
25014 c3/return
25015
25016 $check-mu-copy-object-stmt:error-incorrect-inouts:
25017 (write-buffered *(ebp+0x10) "fn ")
25018 8b/-> *(ebp+0xc) 0/r32/eax
25019 (lookup *eax *(eax+4))
25020 (write-buffered *(ebp+0x10) %eax)
25021 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must have two inouts\n")
25022 (flush *(ebp+0x10))
25023 (stop *(ebp+0x14) 1)
25024
25025
25026 $check-mu-copy-object-stmt:error-too-many-outputs:
25027 (write-buffered *(ebp+0x10) "fn ")
25028 8b/-> *(ebp+0xc) 0/r32/eax
25029 (lookup *eax *(eax+4))
25030 (write-buffered *(ebp+0x10) %eax)
25031 (write-buffered *(ebp+0x10) ": stmt 'copy-object' must not have any outputs\n")
25032 (flush *(ebp+0x10))
25033 (stop *(ebp+0x14) 1)
25034
25035
25036 $check-mu-copy-object-stmt:error-invalid-types:
25037 (write-buffered *(ebp+0x10) "fn ")
25038 8b/-> *(ebp+0xc) 0/r32/eax
25039 (lookup *eax *(eax+4))
25040 (write-buffered *(ebp+0x10) %eax)
25041 (write-buffered *(ebp+0x10) ": stmt copy-object: two inouts with identical addr types expected\n")
25042 (flush *(ebp+0x10))
25043 (stop *(ebp+0x14) 1)
25044
25045
25046 check-mu-clear-object-stmt:
25047
25048 55/push-ebp
25049 89/<- %ebp 4/r32/esp
25050
25051 50/push-eax
25052 51/push-ecx
25053 53/push-ebx
25054 56/push-esi
25055 57/push-edi
25056
25057 8b/-> *(ebp+8) 6/r32/esi
25058 $check-mu-clear-object-stmt:check-for-output:
25059
25060 (lookup *(esi+0x14) *(esi+0x18))
25061 3d/compare-eax-and 0/imm32
25062 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-too-many-outputs/disp32
25063 $check-mu-clear-object-stmt:get-left:
25064
25065 (lookup *(esi+0xc) *(esi+0x10))
25066 89/<- %edi 0/r32/eax
25067
25068 3d/compare-eax-and 0/imm32
25069 0f 84/jump-if-= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
25070 $check-mu-clear-object-stmt:get-src:
25071
25072 (lookup *(edi+8) *(edi+0xc))
25073 3d/compare-eax-and 0/imm32
25074 0f 85/jump-if-!= $check-mu-clear-object-stmt:error-incorrect-inouts/disp32
25075 $check-mu-clear-object-stmt:types:
25076
25077 (lookup *edi *(edi+4))
25078 (lookup *(eax+8) *(eax+0xc))
25079 89/<- %ecx 0/r32/eax
25080
25081 8b/-> *(edi+0x10) 0/r32/eax
25082 3d/compare-eax-and 0/imm32/false
25083 {
25084 74/jump-if-= break/disp8
25085 (lookup *(ecx+0xc) *(ecx+0x10))
25086
25087 81 7/subop/compare *(eax+0xc) 0/imm32
25088 {
25089 75/jump-if-!= break/disp8
25090 (lookup *(eax+4) *(eax+8))
25091 }
25092 89/<- %ecx 0/r32/eax
25093 }
25094
25095 (mu-addr-type? %ecx)
25096 3d/compare-eax-and 0/imm32/false
25097 0f 84/jump-if-= $check-mu-clear-object-stmt:error-invalid-type/disp32
25098 $check-mu-clear-object-stmt:end:
25099
25100 5f/pop-to-edi
25101 5e/pop-to-esi
25102 5b/pop-to-ebx
25103 59/pop-to-ecx
25104 58/pop-to-eax
25105
25106 89/<- %esp 5/r32/ebp
25107 5d/pop-to-ebp
25108 c3/return
25109
25110 $check-mu-clear-object-stmt:error-incorrect-inouts:
25111 (write-buffered *(ebp+0x10) "fn ")
25112 8b/-> *(ebp+0xc) 0/r32/eax
25113 (lookup *eax *(eax+4))
25114 (write-buffered *(ebp+0x10) %eax)
25115 (write-buffered *(ebp+0x10) ": stmt 'clear-object' must have a single inout\n")
25116 (flush *(ebp+0x10))
25117 (stop *(ebp+0x14) 1)
25118
25119
25120 $check-mu-clear-object-stmt:error-too-many-outputs:
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 'clear-object' must not have any outputs\n")
25126 (flush *(ebp+0x10))
25127 (stop *(ebp+0x14) 1)
25128
25129
25130 $check-mu-clear-object-stmt:error-invalid-type:
25131 (write-buffered *(ebp+0x10) "fn ")
25132 8b/-> *(ebp+0xc) 0/r32/eax
25133 (lookup *eax *(eax+4))
25134 (write-buffered *(ebp+0x10) %eax)
25135 (write-buffered *(ebp+0x10) ": stmt clear-object: inout must have an addr type\n")
25136 (flush *(ebp+0x10))
25137 (stop *(ebp+0x14) 1)
25138
25139
25140 check-mu-allocate-stmt:
25141
25142 55/push-ebp
25143 89/<- %ebp 4/r32/esp
25144
25145 50/push-eax
25146 53/push-ebx
25147 56/push-esi
25148 57/push-edi
25149
25150 8b/-> *(ebp+8) 6/r32/esi
25151 $check-mu-allocate-stmt:check-for-output:
25152
25153 (lookup *(esi+0x14) *(esi+0x18))
25154 3d/compare-eax-and 0/imm32
25155 0f 85/jump-if-!= $check-mu-allocate-stmt:error-too-many-outputs/disp32
25156 $check-mu-allocate-stmt:get-target:
25157
25158 (lookup *(esi+0xc) *(esi+0x10))
25159 89/<- %edi 0/r32/eax
25160
25161 3d/compare-eax-and 0/imm32
25162 0f 84/jump-if-= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
25163
25164 (lookup *(edi+8) *(edi+0xc))
25165 3d/compare-eax-and 0/imm32
25166 0f 85/jump-if-!= $check-mu-allocate-stmt:error-incorrect-inouts/disp32
25167 $check-mu-allocate-stmt:check-type:
25168
25169 (lookup *edi *(edi+4))
25170 (lookup *(eax+8) *(eax+0xc))
25171 89/<- %ebx 0/r32/eax
25172
25173 8b/-> *(edi+0x10) 0/r32/eax
25174 3d/compare-eax-and 0/imm32/false
25175 {
25176 74/jump-if-= break/disp8
25177 (lookup *(ebx+0xc) *(ebx+0x10))
25178
25179 81 7/subop/compare *(eax+0xc) 0/imm32
25180 {
25181 75/jump-if-!= break/disp8
25182 (lookup *(eax+4) *(eax+8))
25183 }
25184 89/<- %ebx 0/r32/eax
25185 }
25186
25187 (mu-addr-type? %ebx)
25188 3d/compare-eax-and 0/imm32/false
25189 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
25190
25191 (lookup *(ebx+0xc) *(ebx+0x10))
25192 81 7/subop/compare *eax 0/imm32/false
25193 0f 85/jump-if-!= $check-mu-allocate-stmt:error-invalid-type/disp32
25194
25195 (lookup *(eax+4) *(eax+8))
25196 (simple-mu-type? %eax 4)
25197 3d/compare-eax-and 0/imm32/false
25198 0f 84/jump-if-= $check-mu-allocate-stmt:error-invalid-type/disp32
25199 $check-mu-allocate-stmt:end:
25200
25201 5f/pop-to-edi
25202 5e/pop-to-esi
25203 5b/pop-to-ebx
25204 58/pop-to-eax
25205
25206 89/<- %esp 5/r32/ebp
25207 5d/pop-to-ebp
25208 c3/return
25209
25210 $check-mu-allocate-stmt:error-incorrect-inouts:
25211 (write-buffered *(ebp+0x10) "fn ")
25212 8b/-> *(ebp+0xc) 0/r32/eax
25213 (lookup *eax *(eax+4))
25214 (write-buffered *(ebp+0x10) %eax)
25215 (write-buffered *(ebp+0x10) ": stmt 'allocate' must have a single inout\n")
25216 (flush *(ebp+0x10))
25217 (stop *(ebp+0x14) 1)
25218
25219
25220 $check-mu-allocate-stmt:error-too-many-outputs:
25221 (write-buffered *(ebp+0x10) "fn ")
25222 8b/-> *(ebp+0xc) 0/r32/eax
25223 (lookup *eax *(eax+4))
25224 (write-buffered *(ebp+0x10) %eax)
25225 (write-buffered *(ebp+0x10) ": stmt 'allocate' must not have any outputs\n")
25226 (flush *(ebp+0x10))
25227 (stop *(ebp+0x14) 1)
25228
25229
25230 $check-mu-allocate-stmt:error-invalid-type:
25231 (write-buffered *(ebp+0x10) "fn ")
25232 8b/-> *(ebp+0xc) 0/r32/eax
25233 (lookup *eax *(eax+4))
25234 (write-buffered *(ebp+0x10) %eax)
25235 (write-buffered *(ebp+0x10) ": stmt allocate: inout '")
25236 (lookup *edi *(edi+4))
25237 (lookup *eax *(eax+4))
25238 (write-buffered *(ebp+0x10) %eax)
25239 (write-buffered *(ebp+0x10) "' must have type (addr handle ...)\n")
25240 (flush *(ebp+0x10))
25241 (stop *(ebp+0x14) 1)
25242
25243
25244 check-mu-populate-stmt:
25245
25246 55/push-ebp
25247 89/<- %ebp 4/r32/esp
25248
25249 50/push-eax
25250 53/push-ebx
25251 56/push-esi
25252 57/push-edi
25253
25254 8b/-> *(ebp+8) 6/r32/esi
25255 $check-mu-populate-stmt:check-for-output:
25256
25257 (lookup *(esi+0x14) *(esi+0x18))
25258 3d/compare-eax-and 0/imm32
25259 0f 85/jump-if-!= $check-mu-populate-stmt:error-too-many-outputs/disp32
25260 $check-mu-populate-stmt:get-target:
25261
25262 (lookup *(esi+0xc) *(esi+0x10))
25263 89/<- %edi 0/r32/eax
25264
25265 3d/compare-eax-and 0/imm32
25266 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25267 $check-mu-populate-stmt:get-length:
25268
25269 (lookup *(edi+8) *(edi+0xc))
25270 89/<- %esi 0/r32/eax
25271
25272 3d/compare-eax-and 0/imm32
25273 0f 84/jump-if-= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25274
25275 (lookup *(esi+8) *(esi+0xc))
25276 3d/compare-eax-and 0/imm32
25277 0f 85/jump-if-!= $check-mu-populate-stmt:error-incorrect-inouts/disp32
25278 $check-mu-populate-stmt:check-target-type:
25279
25280 (lookup *edi *(edi+4))
25281 (lookup *(eax+8) *(eax+0xc))
25282 89/<- %ebx 0/r32/eax
25283 $check-mu-populate-stmt:check-target-type-deref:
25284
25285 8b/-> *(edi+0x10) 0/r32/eax
25286 3d/compare-eax-and 0/imm32/false
25287 {
25288 74/jump-if-= break/disp8
25289 (lookup *(ebx+0xc) *(ebx+0x10))
25290
25291 81 7/subop/compare *(eax+0xc) 0/imm32
25292 {
25293 75/jump-if-!= break/disp8
25294 (lookup *(eax+4) *(eax+8))
25295 }
25296 89/<- %ebx 0/r32/eax
25297 }
25298 $check-mu-populate-stmt:check-target-type-addr:
25299
25300 (mu-addr-type? %ebx)
25301 3d/compare-eax-and 0/imm32/false
25302 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25303
25304 (lookup *(ebx+0xc) *(ebx+0x10))
25305 89/<- %ebx 0/r32/eax
25306 81 7/subop/compare *ebx 0/imm32/false
25307 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
25308 $check-mu-populate-stmt:check-target-type-handle:
25309
25310 (lookup *(ebx+4) *(ebx+8))
25311 (simple-mu-type? %eax 4)
25312 3d/compare-eax-and 0/imm32/false
25313 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25314
25315 (lookup *(ebx+0xc) *(ebx+0x10))
25316 89/<- %ebx 0/r32/eax
25317 81 7/subop/compare *ebx 0/imm32/false
25318 0f 85/jump-if-!= $check-mu-populate-stmt:error-invalid-target-type/disp32
25319 $check-mu-populate-stmt:check-target-type-array:
25320
25321 (lookup *(ebx+4) *(ebx+8))
25322 (simple-mu-type? %eax 3)
25323 3d/compare-eax-and 0/imm32/false
25324 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-target-type/disp32
25325 $check-mu-populate-stmt:check-length-type:
25326 (lookup *esi *(esi+4))
25327 (lookup *(eax+8) *(eax+0xc))
25328 89/<- %ebx 0/r32/eax
25329 (simple-mu-type? %ebx 0)
25330 3d/compare-eax-and 0/imm32/false
25331 75/jump-if-!= $check-mu-populate-stmt:end/disp8
25332 (simple-mu-type? %ebx 1)
25333 3d/compare-eax-and 0/imm32/false
25334 0f 84/jump-if-= $check-mu-populate-stmt:error-invalid-length-type/disp32
25335 $check-mu-populate-stmt:end:
25336
25337 5f/pop-to-edi
25338 5e/pop-to-esi
25339 5b/pop-to-ebx
25340 58/pop-to-eax
25341
25342 89/<- %esp 5/r32/ebp
25343 5d/pop-to-ebp
25344 c3/return
25345
25346 $check-mu-populate-stmt:error-incorrect-inouts:
25347 (write-buffered *(ebp+0x10) "fn ")
25348 8b/-> *(ebp+0xc) 0/r32/eax
25349 (lookup *eax *(eax+4))
25350 (write-buffered *(ebp+0x10) %eax)
25351 (write-buffered *(ebp+0x10) ": stmt 'populate' must have two inouts\n")
25352 (flush *(ebp+0x10))
25353 (stop *(ebp+0x14) 1)
25354
25355
25356 $check-mu-populate-stmt:error-too-many-outputs:
25357 (write-buffered *(ebp+0x10) "fn ")
25358 8b/-> *(ebp+0xc) 0/r32/eax
25359 (lookup *eax *(eax+4))
25360 (write-buffered *(ebp+0x10) %eax)
25361 (write-buffered *(ebp+0x10) ": stmt 'populate' must not have any outputs\n")
25362 (flush *(ebp+0x10))
25363 (stop *(ebp+0x14) 1)
25364
25365
25366 $check-mu-populate-stmt:error-invalid-target-type:
25367 (write-buffered *(ebp+0x10) "fn ")
25368 8b/-> *(ebp+0xc) 0/r32/eax
25369 (lookup *eax *(eax+4))
25370 (write-buffered *(ebp+0x10) %eax)
25371 (write-buffered *(ebp+0x10) ": stmt populate: first inout '")
25372 (lookup *edi *(edi+4))
25373 (lookup *eax *(eax+4))
25374 (write-buffered *(ebp+0x10) %eax)
25375 (write-buffered *(ebp+0x10) "' must have type (addr handle array ...)\n")
25376 (flush *(ebp+0x10))
25377 (stop *(ebp+0x14) 1)
25378
25379
25380 $check-mu-populate-stmt:error-invalid-length-type:
25381 (write-buffered *(ebp+0x10) "fn ")
25382 8b/-> *(ebp+0xc) 0/r32/eax
25383 (lookup *eax *(eax+4))
25384 (write-buffered *(ebp+0x10) %eax)
25385 (write-buffered *(ebp+0x10) ": stmt populate: second inout '")
25386 (lookup *esi *(esi+4))
25387 (lookup *eax *(eax+4))
25388 (write-buffered *(ebp+0x10) %eax)
25389 (write-buffered *(ebp+0x10) "' must be an int\n")
25390 (flush *(ebp+0x10))
25391 (stop *(ebp+0x14) 1)
25392
25393
25394 check-mu-populate-stream-stmt:
25395
25396 55/push-ebp
25397 89/<- %ebp 4/r32/esp
25398
25399 50/push-eax
25400 53/push-ebx
25401 56/push-esi
25402 57/push-edi
25403
25404 8b/-> *(ebp+8) 6/r32/esi
25405 $check-mu-populate-stream-stmt:check-for-output:
25406
25407 (lookup *(esi+0x14) *(esi+0x18))
25408 3d/compare-eax-and 0/imm32
25409 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-too-many-outputs/disp32
25410 $check-mu-populate-stream-stmt:get-target:
25411
25412 (lookup *(esi+0xc) *(esi+0x10))
25413 89/<- %edi 0/r32/eax
25414
25415 3d/compare-eax-and 0/imm32
25416 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25417 $check-mu-populate-stream-stmt:get-length:
25418
25419 (lookup *(edi+8) *(edi+0xc))
25420 89/<- %esi 0/r32/eax
25421
25422 3d/compare-eax-and 0/imm32
25423 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25424
25425 (lookup *(esi+8) *(esi+0xc))
25426 3d/compare-eax-and 0/imm32
25427 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-incorrect-inouts/disp32
25428 $check-mu-populate-stream-stmt:check-target-type:
25429
25430 (lookup *edi *(edi+4))
25431 (lookup *(eax+8) *(eax+0xc))
25432 89/<- %ebx 0/r32/eax
25433 $check-mu-populate-stream-stmt:check-target-type-deref:
25434
25435 8b/-> *(edi+0x10) 0/r32/eax
25436 3d/compare-eax-and 0/imm32/false
25437 {
25438 74/jump-if-= break/disp8
25439 (lookup *(ebx+0xc) *(ebx+0x10))
25440
25441 81 7/subop/compare *(eax+0xc) 0/imm32
25442 {
25443 75/jump-if-!= break/disp8
25444 (lookup *(eax+4) *(eax+8))
25445 }
25446 89/<- %ebx 0/r32/eax
25447 }
25448 $check-mu-populate-stream-stmt:check-target-type-addr:
25449
25450 (mu-addr-type? %ebx)
25451 3d/compare-eax-and 0/imm32/false
25452 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25453
25454 (lookup *(ebx+0xc) *(ebx+0x10))
25455 89/<- %ebx 0/r32/eax
25456 81 7/subop/compare *ebx 0/imm32/false
25457 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25458 $check-mu-populate-stream-stmt:check-target-type-handle:
25459
25460 (lookup *(ebx+4) *(ebx+8))
25461 (simple-mu-type? %eax 4)
25462 3d/compare-eax-and 0/imm32/false
25463 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25464
25465 (lookup *(ebx+0xc) *(ebx+0x10))
25466 89/<- %ebx 0/r32/eax
25467 81 7/subop/compare *ebx 0/imm32/false
25468 0f 85/jump-if-!= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25469 $check-mu-populate-stream-stmt:check-target-type-stream:
25470
25471 (lookup *(ebx+4) *(ebx+8))
25472 (simple-mu-type? %eax 0xb)
25473 3d/compare-eax-and 0/imm32/false
25474 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-target-type/disp32
25475 $check-mu-populate-stream-stmt:check-length-type:
25476 (lookup *esi *(esi+4))
25477 (lookup *(eax+8) *(eax+0xc))
25478 89/<- %ebx 0/r32/eax
25479 (simple-mu-type? %ebx 0)
25480 3d/compare-eax-and 0/imm32/false
25481 75/jump-if-!= $check-mu-populate-stream-stmt:end/disp8
25482 (simple-mu-type? %ebx 1)
25483 3d/compare-eax-and 0/imm32/false
25484 0f 84/jump-if-= $check-mu-populate-stream-stmt:error-invalid-length-type/disp32
25485 $check-mu-populate-stream-stmt:end:
25486
25487 5f/pop-to-edi
25488 5e/pop-to-esi
25489 5b/pop-to-ebx
25490 58/pop-to-eax
25491
25492 89/<- %esp 5/r32/ebp
25493 5d/pop-to-ebp
25494 c3/return
25495
25496 $check-mu-populate-stream-stmt:error-incorrect-inouts:
25497 (write-buffered *(ebp+0x10) "fn ")
25498 8b/-> *(ebp+0xc) 0/r32/eax
25499 (lookup *eax *(eax+4))
25500 (write-buffered *(ebp+0x10) %eax)
25501 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must have two inouts\n")
25502 (flush *(ebp+0x10))
25503 (stop *(ebp+0x14) 1)
25504
25505
25506 $check-mu-populate-stream-stmt:error-too-many-outputs:
25507 (write-buffered *(ebp+0x10) "fn ")
25508 8b/-> *(ebp+0xc) 0/r32/eax
25509 (lookup *eax *(eax+4))
25510 (write-buffered *(ebp+0x10) %eax)
25511 (write-buffered *(ebp+0x10) ": stmt 'populate-stream' must not have any outputs\n")
25512 (flush *(ebp+0x10))
25513 (stop *(ebp+0x14) 1)
25514
25515
25516 $check-mu-populate-stream-stmt:error-invalid-target-type:
25517 (write-buffered *(ebp+0x10) "fn ")
25518 8b/-> *(ebp+0xc) 0/r32/eax
25519 (lookup *eax *(eax+4))
25520 (write-buffered *(ebp+0x10) %eax)
25521 (write-buffered *(ebp+0x10) ": stmt populate-stream: first inout '")
25522 (lookup *edi *(edi+4))
25523 (lookup *eax *(eax+4))
25524 (write-buffered *(ebp+0x10) %eax)
25525 (write-buffered *(ebp+0x10) "' must have type (addr handle stream ...)\n")
25526 (flush *(ebp+0x10))
25527 (stop *(ebp+0x14) 1)
25528
25529
25530 $check-mu-populate-stream-stmt:error-invalid-length-type:
25531 (write-buffered *(ebp+0x10) "fn ")
25532 8b/-> *(ebp+0xc) 0/r32/eax
25533 (lookup *eax *(eax+4))
25534 (write-buffered *(ebp+0x10) %eax)
25535 (write-buffered *(ebp+0x10) ": stmt populate-stream: second inout '")
25536 (lookup *esi *(esi+4))
25537 (lookup *eax *(eax+4))
25538 (write-buffered *(ebp+0x10) %eax)
25539 (write-buffered *(ebp+0x10) "' must be an int\n")
25540 (flush *(ebp+0x10))
25541 (stop *(ebp+0x14) 1)
25542
25543
25544 check-mu-read-from-stream-stmt:
25545
25546 55/push-ebp
25547 89/<- %ebp 4/r32/esp
25548
25549 50/push-eax
25550 51/push-ecx
25551 52/push-edx
25552 53/push-ebx
25553 56/push-esi
25554 57/push-edi
25555
25556 8b/-> *(ebp+8) 6/r32/esi
25557
25558
25559 (lookup *(esi+0xc) *(esi+0x10))
25560 $check-mu-read-from-stream-stmt:check-no-inouts:
25561 3d/compare-eax-and 0/imm32
25562 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
25563 (lookup *eax *(eax+4))
25564 89/<- %ecx 0/r32/eax
25565
25566
25567 (lookup *(ecx+8) *(ecx+0xc))
25568 89/<- %ebx 0/r32/eax
25569 $check-mu-read-from-stream-stmt:check-base-is-compound:
25570
25571 81 7/subop/compare *ebx 0/imm32/false
25572 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25573 $check-mu-read-from-stream-stmt:check-base-is-addr:
25574
25575 (lookup *(ebx+4) *(ebx+8))
25576 (simple-mu-type? %eax 2)
25577 3d/compare-eax-and 0/imm32/false
25578 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25579 $check-mu-read-from-stream-stmt:check-base-is-addr-to-stream:
25580
25581 (lookup *(ebx+0xc) *(ebx+0x10))
25582 89/<- %ebx 0/r32/eax
25583
25584 (lookup *(eax+4) *(eax+8))
25585 (simple-mu-type? %eax 0xb)
25586 3d/compare-eax-and 0/imm32/false
25587 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
25588
25589
25590 (lookup *(esi+0xc) *(esi+0x10))
25591 (lookup *(eax+8) *(eax+0xc))
25592 $check-mu-read-from-stream-stmt:check-single-inout:
25593 3d/compare-eax-and 0/imm32
25594 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
25595 (lookup *eax *(eax+4))
25596 89/<- %ecx 0/r32/eax
25597
25598 (lookup *(ecx+8) *(ecx+0xc))
25599 89/<- %edx 0/r32/eax
25600
25601 $check-mu-read-from-stream-stmt:check-target-is-compound:
25602 81 7/subop/compare *edx 0/imm32/false
25603 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
25604 $check-mu-read-from-stream-stmt:check-target-type:
25605
25606 (lookup *(edx+4) *(edx+8))
25607 (simple-mu-type? %eax 2)
25608 3d/compare-eax-and 0/imm32/false
25609 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
25610
25611 (type-tail %ebx)
25612 89/<- %ebx 0/r32/eax
25613 (type-tail %edx)
25614 (type-equal? %ebx %eax)
25615 3d/compare-eax-and 0/imm32/false
25616 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-target-type/disp32
25617 $check-mu-read-from-stream-stmt:check-too-many-inouts:
25618
25619 (lookup *(esi+0xc) *(esi+0x10))
25620 (lookup *(eax+8) *(eax+0xc))
25621 (lookup *(eax+8) *(eax+0xc))
25622 3d/compare-eax-and 0/imm32/false
25623 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-too-many-inouts/disp32
25624 $check-mu-read-from-stream-stmt:check-unexpected-output:
25625
25626 (lookup *(esi+0x14) *(esi+0x18))
25627 3d/compare-eax-and 0/imm32/false
25628 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-unexpected-output/disp32
25629 $check-mu-read-from-stream-stmt:end:
25630
25631 5f/pop-to-edi
25632 5e/pop-to-esi
25633 5b/pop-to-ebx
25634 5a/pop-to-edx
25635 59/pop-to-ecx
25636 58/pop-to-eax
25637
25638 89/<- %esp 5/r32/ebp
25639 5d/pop-to-ebp
25640 c3/return
25641
25642 $check-mu-read-from-stream-stmt:error-invalid-base-type:
25643 (write-buffered *(ebp+0x10) "fn ")
25644 8b/-> *(ebp+0xc) 0/r32/eax
25645 (lookup *eax *(eax+4))
25646 (write-buffered *(ebp+0x10) %eax)
25647 (write-buffered *(ebp+0x10) ": stmt read-from-stream: var '")
25648 (lookup *ecx *(ecx+4))
25649 (write-buffered *(ebp+0x10) %eax)
25650 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
25651 (flush *(ebp+0x10))
25652 (stop *(ebp+0x14) 1)
25653
25654
25655 $check-mu-read-from-stream-stmt:error-too-few-inouts:
25656 (write-buffered *(ebp+0x10) "fn ")
25657 8b/-> *(ebp+0xc) 0/r32/eax
25658 (lookup *eax *(eax+4))
25659 (write-buffered *(ebp+0x10) %eax)
25660 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too few inouts (2 required)\n")
25661 (flush *(ebp+0x10))
25662 (stop *(ebp+0x14) 1)
25663
25664
25665 $check-mu-read-from-stream-stmt:error-target-type-not-address:
25666 (write-buffered *(ebp+0x10) "fn ")
25667 8b/-> *(ebp+0xc) 0/r32/eax
25668 (lookup *eax *(eax+4))
25669 (write-buffered *(ebp+0x10) %eax)
25670 (write-buffered *(ebp+0x10) ": stmt read-from-stream: target '")
25671 (lookup *ecx *(ecx+4))
25672 (write-buffered *(ebp+0x10) %eax)
25673 (write-buffered *(ebp+0x10) "' must be an addr\n")
25674 (flush *(ebp+0x10))
25675 (stop *(ebp+0x14) 1)
25676
25677
25678 $check-mu-read-from-stream-stmt:error-invalid-target-type:
25679 (write-buffered *(ebp+0x10) "fn ")
25680 8b/-> *(ebp+0xc) 0/r32/eax
25681 (lookup *eax *(eax+4))
25682 (write-buffered *(ebp+0x10) %eax)
25683 (write-buffered *(ebp+0x10) ": stmt read-from-stream: second inout '")
25684 (lookup *ecx *(ecx+4))
25685 (write-buffered *(ebp+0x10) %eax)
25686 (write-buffered *(ebp+0x10) "' does not have the right type\n")
25687 (flush *(ebp+0x10))
25688 (stop *(ebp+0x14) 1)
25689
25690
25691 $check-mu-read-from-stream-stmt:error-too-many-inouts:
25692 (write-buffered *(ebp+0x10) "fn ")
25693 8b/-> *(ebp+0xc) 0/r32/eax
25694 (lookup *eax *(eax+4))
25695 (write-buffered *(ebp+0x10) %eax)
25696 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too many inouts (2 required)\n")
25697 (flush *(ebp+0x10))
25698 (stop *(ebp+0x14) 1)
25699
25700
25701 $check-mu-read-from-stream-stmt:error-unexpected-output:
25702 (write-buffered *(ebp+0x10) "fn ")
25703 8b/-> *(ebp+0xc) 0/r32/eax
25704 (lookup *eax *(eax+4))
25705 (write-buffered *(ebp+0x10) %eax)
25706 (write-buffered *(ebp+0x10) ": stmt read-from-stream: unexpected output\n")
25707 (flush *(ebp+0x10))
25708 (stop *(ebp+0x14) 1)
25709
25710
25711 check-mu-write-to-stream-stmt:
25712
25713 55/push-ebp
25714 89/<- %ebp 4/r32/esp
25715
25716 50/push-eax
25717 51/push-ecx
25718 52/push-edx
25719 53/push-ebx
25720 56/push-esi
25721 57/push-edi
25722
25723 8b/-> *(ebp+8) 6/r32/esi
25724
25725
25726 (lookup *(esi+0xc) *(esi+0x10))
25727 $check-mu-write-to-stream-stmt:check-no-inouts:
25728 3d/compare-eax-and 0/imm32
25729 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
25730 (lookup *eax *(eax+4))
25731 89/<- %ecx 0/r32/eax
25732
25733
25734 (lookup *(ecx+8) *(ecx+0xc))
25735 89/<- %ebx 0/r32/eax
25736 $check-mu-write-to-stream-stmt:check-base-is-compound:
25737
25738 81 7/subop/compare *ebx 0/imm32/false
25739 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25740 $check-mu-write-to-stream-stmt:check-base-is-addr:
25741
25742 (lookup *(ebx+4) *(ebx+8))
25743 (simple-mu-type? %eax 2)
25744 3d/compare-eax-and 0/imm32/false
25745 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25746 $check-mu-write-to-stream-stmt:check-base-is-addr-to-stream:
25747
25748 (lookup *(ebx+0xc) *(ebx+0x10))
25749 89/<- %ebx 0/r32/eax
25750
25751 (lookup *(eax+4) *(eax+8))
25752 (simple-mu-type? %eax 0xb)
25753 3d/compare-eax-and 0/imm32/false
25754 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
25755
25756
25757 (lookup *(esi+0xc) *(esi+0x10))
25758 (lookup *(eax+8) *(eax+0xc))
25759 $check-mu-write-to-stream-stmt:check-single-inout:
25760 3d/compare-eax-and 0/imm32
25761 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
25762 (lookup *eax *(eax+4))
25763 89/<- %ecx 0/r32/eax
25764
25765 (lookup *(ecx+8) *(ecx+0xc))
25766 89/<- %edx 0/r32/eax
25767
25768 $check-mu-write-to-stream-stmt:check-target-is-compound:
25769 81 7/subop/compare *edx 0/imm32/false
25770 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
25771 $check-mu-write-to-stream-stmt:check-target-type:
25772
25773 (lookup *(edx+4) *(edx+8))
25774 (simple-mu-type? %eax 2)
25775 3d/compare-eax-and 0/imm32/false
25776 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
25777
25778 (type-tail %ebx)
25779 89/<- %ebx 0/r32/eax
25780 (type-tail %edx)
25781 (type-equal? %ebx %eax)
25782 3d/compare-eax-and 0/imm32/false
25783 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-target-type/disp32
25784 $check-mu-write-to-stream-stmt:check-too-many-inouts:
25785
25786 (lookup *(esi+0xc) *(esi+0x10))
25787 (lookup *(eax+8) *(eax+0xc))
25788 (lookup *(eax+8) *(eax+0xc))
25789 3d/compare-eax-and 0/imm32/false
25790 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-too-many-inouts/disp32
25791 $check-mu-write-to-stream-stmt:check-unexpected-output:
25792
25793 (lookup *(esi+0x14) *(esi+0x18))
25794 3d/compare-eax-and 0/imm32/false
25795 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-unexpected-output/disp32
25796 $check-mu-write-to-stream-stmt:end:
25797
25798 5f/pop-to-edi
25799 5e/pop-to-esi
25800 5b/pop-to-ebx
25801 5a/pop-to-edx
25802 59/pop-to-ecx
25803 58/pop-to-eax
25804
25805 89/<- %esp 5/r32/ebp
25806 5d/pop-to-ebp
25807 c3/return
25808
25809 $check-mu-write-to-stream-stmt:error-invalid-base-type:
25810 (write-buffered *(ebp+0x10) "fn ")
25811 8b/-> *(ebp+0xc) 0/r32/eax
25812 (lookup *eax *(eax+4))
25813 (write-buffered *(ebp+0x10) %eax)
25814 (write-buffered *(ebp+0x10) ": stmt write-to-stream: var '")
25815 (lookup *ecx *(ecx+4))
25816 (write-buffered *(ebp+0x10) %eax)
25817 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
25818 (flush *(ebp+0x10))
25819 (stop *(ebp+0x14) 1)
25820
25821
25822 $check-mu-write-to-stream-stmt:error-too-few-inouts:
25823 (write-buffered *(ebp+0x10) "fn ")
25824 8b/-> *(ebp+0xc) 0/r32/eax
25825 (lookup *eax *(eax+4))
25826 (write-buffered *(ebp+0x10) %eax)
25827 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too few inouts (2 required)\n")
25828 (flush *(ebp+0x10))
25829 (stop *(ebp+0x14) 1)
25830
25831
25832 $check-mu-write-to-stream-stmt:error-target-type-not-address:
25833 (write-buffered *(ebp+0x10) "fn ")
25834 8b/-> *(ebp+0xc) 0/r32/eax
25835 (lookup *eax *(eax+4))
25836 (write-buffered *(ebp+0x10) %eax)
25837 (write-buffered *(ebp+0x10) ": stmt write-to-stream: target '")
25838 (lookup *ecx *(ecx+4))
25839 (write-buffered *(ebp+0x10) %eax)
25840 (write-buffered *(ebp+0x10) "' must be an addr\n")
25841 (flush *(ebp+0x10))
25842 (stop *(ebp+0x14) 1)
25843
25844
25845 $check-mu-write-to-stream-stmt:error-invalid-target-type:
25846 (write-buffered *(ebp+0x10) "fn ")
25847 8b/-> *(ebp+0xc) 0/r32/eax
25848 (lookup *eax *(eax+4))
25849 (write-buffered *(ebp+0x10) %eax)
25850 (write-buffered *(ebp+0x10) ": stmt write-to-stream: second inout '")
25851 (lookup *ecx *(ecx+4))
25852 (write-buffered *(ebp+0x10) %eax)
25853 (write-buffered *(ebp+0x10) "' does not have the right type\n")
25854 (flush *(ebp+0x10))
25855 (stop *(ebp+0x14) 1)
25856
25857
25858 $check-mu-write-to-stream-stmt:error-too-many-inouts:
25859 (write-buffered *(ebp+0x10) "fn ")
25860 8b/-> *(ebp+0xc) 0/r32/eax
25861 (lookup *eax *(eax+4))
25862 (write-buffered *(ebp+0x10) %eax)
25863 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too many inouts (2 required)\n")
25864 (flush *(ebp+0x10))
25865 (stop *(ebp+0x14) 1)
25866
25867
25868 $check-mu-write-to-stream-stmt:error-unexpected-output:
25869 (write-buffered *(ebp+0x10) "fn ")
25870 8b/-> *(ebp+0xc) 0/r32/eax
25871 (lookup *eax *(eax+4))
25872 (write-buffered *(ebp+0x10) %eax)
25873 (write-buffered *(ebp+0x10) ": stmt write-to-stream: unexpected output\n")
25874 (flush *(ebp+0x10))
25875 (stop *(ebp+0x14) 1)
25876
25877
25878 check-mu-convert-stmt:
25879
25880 55/push-ebp
25881 89/<- %ebp 4/r32/esp
25882
25883 50/push-eax
25884 51/push-ecx
25885 52/push-edx
25886 56/push-esi
25887 57/push-edi
25888 $check-mu-convert-stmt:get-output:
25889
25890 8b/-> *(ebp+8) 6/r32/esi
25891
25892 (lookup *(esi+0x14) *(esi+0x18))
25893 89/<- %edi 0/r32/eax
25894
25895 3d/compare-eax-and 0/imm32
25896 0f 84/jump-if-= $check-mu-convert-stmt:error-no-output/disp32
25897
25898 (lookup *(edi+8) *(edi+0xc))
25899 3d/compare-eax-and 0/imm32
25900 0f 85/jump-if-!= $check-mu-convert-stmt:error-too-many-outputs/disp32
25901 $check-mu-convert-stmt:get-inout:
25902
25903 (lookup *(esi+0xc) *(esi+0x10))
25904 89/<- %esi 0/r32/eax
25905
25906 3d/compare-eax-and 0/imm32
25907 0f 84/jump-if-= $check-mu-convert-stmt:error-no-inout/disp32
25908
25909 (lookup *(esi+8) *(esi+0xc))
25910 3d/compare-eax-and 0/imm32
25911 0f 85/jump-if-!= $check-mu-convert-stmt:error-too-many-inouts/disp32
25912 $check-mu-convert-stmt:types:
25913
25914 (lookup *esi *(esi+4))
25915 (lookup *(eax+8) *(eax+0xc))
25916 89/<- %ecx 0/r32/eax
25917
25918 8b/-> *(esi+0x10) 0/r32/eax
25919 3d/compare-eax-and 0/imm32/false
25920 {
25921 74/jump-if-= break/disp8
25922 (lookup *(ecx+0xc) *(ecx+0x10))
25923
25924 81 7/subop/compare *(eax+0xc) 0/imm32
25925 {
25926 75/jump-if-!= break/disp8
25927 (lookup *(eax+4) *(eax+8))
25928 }
25929 89/<- %ecx 0/r32/eax
25930 }
25931
25932 {
25933 (simple-mu-type? %ecx 1)
25934 3d/compare-eax-and 0/imm32/false
25935 75/jump-if-!= break/disp8
25936 (simple-mu-type? %ecx 0xf)
25937 3d/compare-eax-and 0/imm32/false
25938 75/jump-if-!= break/disp8
25939 e9/jump $check-mu-convert-stmt:error-invalid-inout-type/disp32
25940 }
25941
25942 (lookup *edi *(edi+4))
25943 (lookup *(eax+0x18) *(eax+0x1c))
25944 3d/compare-eax-and 0/imm32
25945 0f 84/jump-if-= $check-mu-convert-stmt:error-output-not-in-register/disp32
25946
25947 (lookup *edi *(edi+4))
25948 (lookup *(eax+8) *(eax+0xc))
25949 89/<- %edx 0/r32/eax
25950
25951 {
25952 (simple-mu-type? %edx 1)
25953 3d/compare-eax-and 0/imm32/false
25954 75/jump-if-!= break/disp8
25955 (simple-mu-type? %edx 0xf)
25956 3d/compare-eax-and 0/imm32/false
25957 75/jump-if-!= break/disp8
25958 e9/jump $check-mu-convert-stmt:error-invalid-output-type/disp32
25959 }
25960
25961 {
25962 (simple-mu-type? %edx 1)
25963 3d/compare-eax-and 0/imm32/false
25964 74/jump-if-= break/disp8
25965 (simple-mu-type? %ecx 1)
25966 3d/compare-eax-and 0/imm32/false
25967 74/jump-if-= break/disp8
25968 e9/jump $check-mu-convert-stmt:error-int-to-int/disp32
25969 }
25970
25971 {
25972 (simple-mu-type? %edx 0xf)
25973 3d/compare-eax-and 0/imm32/false
25974 74/jump-if-= break/disp8
25975 (simple-mu-type? %ecx 0xf)
25976 3d/compare-eax-and 0/imm32/false
25977 74/jump-if-= break/disp8
25978 e9/jump $check-mu-convert-stmt:error-float-to-float/disp32
25979 }
25980 $check-mu-convert-stmt:end:
25981
25982 5f/pop-to-edi
25983 5e/pop-to-esi
25984 5a/pop-to-edx
25985 59/pop-to-ecx
25986 58/pop-to-eax
25987
25988 89/<- %esp 5/r32/ebp
25989 5d/pop-to-ebp
25990 c3/return
25991
25992 $check-mu-convert-stmt:error-no-inout:
25993 (write-buffered *(ebp+0x10) "fn ")
25994 8b/-> *(ebp+0xc) 0/r32/eax
25995 (lookup *eax *(eax+4))
25996 (write-buffered *(ebp+0x10) %eax)
25997 (write-buffered *(ebp+0x10) ": stmt 'convert' expects an inout\n")
25998 (flush *(ebp+0x10))
25999 (stop *(ebp+0x14) 1)
26000
26001
26002 $check-mu-convert-stmt:error-too-many-inouts:
26003 (write-buffered *(ebp+0x10) "fn ")
26004 8b/-> *(ebp+0xc) 0/r32/eax
26005 (lookup *eax *(eax+4))
26006 (write-buffered *(ebp+0x10) %eax)
26007 (write-buffered *(ebp+0x10) ": stmt 'convert' must have just one inout\n")
26008 (flush *(ebp+0x10))
26009 (stop *(ebp+0x14) 1)
26010
26011
26012 $check-mu-convert-stmt:error-no-output:
26013 (write-buffered *(ebp+0x10) "fn ")
26014 8b/-> *(ebp+0xc) 0/r32/eax
26015 (lookup *eax *(eax+4))
26016 (write-buffered *(ebp+0x10) %eax)
26017 (write-buffered *(ebp+0x10) ": stmt 'convert' expects an output\n")
26018 (flush *(ebp+0x10))
26019 (stop *(ebp+0x14) 1)
26020
26021
26022 $check-mu-convert-stmt:error-output-not-in-register:
26023 (write-buffered *(ebp+0x10) "fn ")
26024 8b/-> *(ebp+0xc) 0/r32/eax
26025 (lookup *eax *(eax+4))
26026 (write-buffered *(ebp+0x10) %eax)
26027 (write-buffered *(ebp+0x10) ": stmt convert: output '")
26028 (lookup *edi *(edi+4))
26029 (lookup *eax *(eax+4))
26030 (write-buffered *(ebp+0x10) %eax)
26031 (write-buffered *(ebp+0x10) "' not in a register\n")
26032 (flush *(ebp+0x10))
26033 (stop *(ebp+0x14) 1)
26034
26035
26036 $check-mu-convert-stmt:error-too-many-outputs:
26037 (write-buffered *(ebp+0x10) "fn ")
26038 8b/-> *(ebp+0xc) 0/r32/eax
26039 (lookup *eax *(eax+4))
26040 (write-buffered *(ebp+0x10) %eax)
26041 (write-buffered *(ebp+0x10) ": stmt 'convert' must have just one output\n")
26042 (flush *(ebp+0x10))
26043 (stop *(ebp+0x14) 1)
26044
26045
26046 $check-mu-convert-stmt:error-invalid-inout-type:
26047 (write-buffered *(ebp+0x10) "fn ")
26048 8b/-> *(ebp+0xc) 0/r32/eax
26049 (lookup *eax *(eax+4))
26050 (write-buffered *(ebp+0x10) %eax)
26051 (write-buffered *(ebp+0x10) ": stmt convert: inout '")
26052 (lookup *esi *(esi+4))
26053 (lookup *eax *(eax+4))
26054 (write-buffered *(ebp+0x10) %eax)
26055 (write-buffered *(ebp+0x10) "' must be an int or float\n")
26056 (flush *(ebp+0x10))
26057 (stop *(ebp+0x14) 1)
26058
26059
26060 $check-mu-convert-stmt:error-invalid-output-type:
26061 (write-buffered *(ebp+0x10) "fn ")
26062 8b/-> *(ebp+0xc) 0/r32/eax
26063 (lookup *eax *(eax+4))
26064 (write-buffered *(ebp+0x10) %eax)
26065 (write-buffered *(ebp+0x10) ": stmt convert: output '")
26066 (lookup *edi *(edi+4))
26067 (lookup *eax *(eax+4))
26068 (write-buffered *(ebp+0x10) %eax)
26069 (write-buffered *(ebp+0x10) "' must be an int or float\n")
26070 (flush *(ebp+0x10))
26071 (stop *(ebp+0x14) 1)
26072
26073
26074 $check-mu-convert-stmt:error-int-to-int:
26075 (write-buffered *(ebp+0x10) "fn ")
26076 8b/-> *(ebp+0xc) 0/r32/eax
26077 (lookup *eax *(eax+4))
26078 (write-buffered *(ebp+0x10) %eax)
26079 (write-buffered *(ebp+0x10) ": stmt convert: no need to convert int to int\n")
26080 (flush *(ebp+0x10))
26081 (stop *(ebp+0x14) 1)
26082
26083
26084 $check-mu-convert-stmt:error-float-to-float:
26085 (write-buffered *(ebp+0x10) "fn ")
26086 8b/-> *(ebp+0xc) 0/r32/eax
26087 (lookup *eax *(eax+4))
26088 (write-buffered *(ebp+0x10) %eax)
26089 (write-buffered *(ebp+0x10) ": stmt convert: no need to convert float to float\n")
26090 (flush *(ebp+0x10))
26091 (stop *(ebp+0x14) 1)
26092
26093
26094 check-mu-call:
26095
26096 55/push-ebp
26097 89/<- %ebp 4/r32/esp
26098
26099 68/push 0/imm32
26100
26101 81 5/subop/subtract %esp 0x60/imm32
26102 68/push 0x60/imm32/size
26103 68/push 0/imm32/read
26104 68/push 0/imm32/write
26105
26106 89/<- *(ebp-4) 4/r32/esp
26107 (clear-stream *(ebp-4))
26108
26109 50/push-eax
26110 51/push-ecx
26111 52/push-edx
26112 53/push-ebx
26113 56/push-esi
26114 57/push-edi
26115
26116 8b/-> *(ebp+8) 6/r32/esi
26117
26118 8b/-> *(ebp+0xc) 7/r32/edi
26119
26120 (lookup *(esi+0xc) *(esi+0x10))
26121 89/<- %ecx 0/r32/eax
26122
26123 (lookup *(edi+8) *(edi+0xc))
26124 89/<- %edx 0/r32/eax
26125 {
26126 $check-mu-call:check-for-inouts:
26127
26128 81 7/subop/compare %ecx 0/imm32
26129 0f 84/jump-if-= break/disp32
26130
26131 81 7/subop/compare %edx 0/imm32
26132 0f 84/jump-if-= break/disp32
26133 $check-mu-call:check-null-addr:
26134
26135 (lookup *ecx *(ecx+4))
26136 (lookup *eax *(eax+4))
26137 (string-equal? %eax "0")
26138 3d/compare-eax-and 0/imm32/false
26139 0f 85/jump-if-!= $check-mu-call:continue-to-next-inout/disp32
26140 $check-mu-call:check-inout-type:
26141
26142 (lookup *ecx *(ecx+4))
26143 (lookup *(eax+8) *(eax+0xc))
26144 89/<- %ebx 0/r32/eax
26145
26146 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26147 {
26148 74/jump-if-= break/disp8
26149 (lookup *(ebx+0xc) *(ebx+0x10))
26150 89/<- %ebx 0/r32/eax
26151
26152 81 7/subop/compare *(ebx+0xc) 0/imm32
26153 75/jump-if-!= break/disp8
26154 (lookup *(ebx+4) *(ebx+8))
26155 89/<- %ebx 0/r32/eax
26156 }
26157
26158 (lookup *edx *(edx+4))
26159
26160 (lookup *(eax+8) *(eax+0xc))
26161
26162 (type-match? %eax %ebx *(ebp-4))
26163 3d/compare-eax-and 0/imm32/false
26164 {
26165 0f 85/jump-if-!= break/disp32
26166 (write-buffered *(ebp+0x14) "fn ")
26167 8b/-> *(ebp+0x10) 0/r32/eax
26168 (lookup *eax *(eax+4))
26169 (write-buffered *(ebp+0x14) %eax)
26170 (write-buffered *(ebp+0x14) ": call ")
26171 (lookup *edi *(edi+4))
26172 (write-buffered *(ebp+0x14) %eax)
26173 (write-buffered *(ebp+0x14) ": type for inout '")
26174 (lookup *ecx *(ecx+4))
26175 (lookup *eax *(eax+4))
26176 (write-buffered *(ebp+0x14) %eax)
26177 (write-buffered *(ebp+0x14) "' is not right\n")
26178 (flush *(ebp+0x14))
26179 (stop *(ebp+0x18) 1)
26180 }
26181 $check-mu-call:continue-to-next-inout:
26182
26183 (lookup *(ecx+8) *(ecx+0xc))
26184 89/<- %ecx 0/r32/eax
26185
26186 (lookup *(edx+8) *(edx+0xc))
26187 89/<- %edx 0/r32/eax
26188
26189 e9/jump loop/disp32
26190 }
26191 $check-mu-call:check-inout-count:
26192
26193 39/compare %ecx 2/r32/edx
26194 {
26195 0f 84/jump-if-= break/disp32
26196
26197
26198 {
26199 81 7/subop/compare %ecx 0/imm32
26200 0f 84/jump-if-= break/disp32
26201 (write-buffered *(ebp+0x14) "fn ")
26202 8b/-> *(ebp+0x10) 0/r32/eax
26203 (lookup *eax *(eax+4))
26204 (write-buffered *(ebp+0x14) %eax)
26205 (write-buffered *(ebp+0x14) ": call ")
26206 (lookup *edi *(edi+4))
26207 (write-buffered *(ebp+0x14) %eax)
26208 (write-buffered *(ebp+0x14) ": too many inouts\n")
26209 (flush *(ebp+0x14))
26210 (stop *(ebp+0x18) 1)
26211 }
26212
26213 {
26214 81 7/subop/compare %edx 0/imm32
26215 0f 84/jump-if-= break/disp32
26216 (write-buffered *(ebp+0x14) "fn ")
26217 8b/-> *(ebp+0x10) 0/r32/eax
26218 (lookup *eax *(eax+4))
26219 (write-buffered *(ebp+0x14) %eax)
26220 (write-buffered *(ebp+0x14) ": call ")
26221 (lookup *edi *(edi+4))
26222 (write-buffered *(ebp+0x14) %eax)
26223 (write-buffered *(ebp+0x14) ": too few inouts\n")
26224 (flush *(ebp+0x14))
26225 (stop *(ebp+0x18) 1)
26226 }
26227 }
26228 $check-mu-call:check-outputs:
26229
26230 (lookup *(esi+0x14) *(esi+0x18))
26231 89/<- %ecx 0/r32/eax
26232
26233 (lookup *(edi+0x10) *(edi+0x14))
26234 89/<- %edx 0/r32/eax
26235 {
26236 $check-mu-call:check-for-outputs:
26237
26238 81 7/subop/compare %ecx 0/imm32
26239 0f 84/jump-if-= break/disp32
26240
26241 81 7/subop/compare %edx 0/imm32
26242 0f 84/jump-if-= break/disp32
26243 $check-mu-call:check-output-type:
26244
26245 (lookup *ecx *(ecx+4))
26246
26247 (lookup *(eax+8) *(eax+0xc))
26248 89/<- %ebx 0/r32/eax
26249
26250 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26251 {
26252 74/jump-if-= break/disp8
26253 (lookup *(ebx+0xc) *(ebx+0x10))
26254 89/<- %ebx 0/r32/eax
26255 }
26256
26257 (lookup *edx *(edx+4))
26258
26259 (lookup *(eax+8) *(eax+0xc))
26260
26261 (type-match? %eax %ebx *(ebp-4))
26262 3d/compare-eax-and 0/imm32/false
26263 {
26264 0f 85/jump-if-!= break/disp32
26265 (write-buffered *(ebp+0x14) "fn ")
26266 8b/-> *(ebp+0x10) 0/r32/eax
26267 (lookup *eax *(eax+4))
26268 (write-buffered *(ebp+0x14) %eax)
26269 (write-buffered *(ebp+0x14) ": call ")
26270 (lookup *edi *(edi+4))
26271 (write-buffered *(ebp+0x14) %eax)
26272 (write-buffered *(ebp+0x14) ": type for output '")
26273 (lookup *ecx *(ecx+4))
26274 (lookup *eax *(eax+4))
26275 (write-buffered *(ebp+0x14) %eax)
26276 (write-buffered *(ebp+0x14) "' is not right\n")
26277 (flush *(ebp+0x14))
26278 (stop *(ebp+0x18) 1)
26279 }
26280 $check-mu-call:check-output-register:
26281
26282 (lookup *ecx *(ecx+4))
26283
26284 (lookup *(eax+18) *(eax+0x1c))
26285 89/<- %ebx 0/r32/eax
26286
26287 3d/compare-eax-and 0/imm32
26288 {
26289 0f 85/jump-if-!= break/disp32
26290 (write-buffered *(ebp+0x14) "fn ")
26291 8b/-> *(ebp+0x10) 0/r32/eax
26292 (lookup *eax *(eax+4))
26293 (write-buffered *(ebp+0x14) %eax)
26294 (write-buffered *(ebp+0x14) ": call ")
26295 (lookup *edi *(edi+4))
26296 (write-buffered *(ebp+0x14) %eax)
26297 (write-buffered *(ebp+0x14) ": output '")
26298 (lookup *ecx *(ecx+4))
26299 (lookup *eax *(eax+4))
26300 (write-buffered *(ebp+0x14) %eax)
26301 (write-buffered *(ebp+0x14) "' is not in a register\n")
26302 (flush *(ebp+0x14))
26303 (stop *(ebp+0x18) 1)
26304 }
26305
26306 (lookup *edx *(edx+4))
26307
26308 (lookup *(eax+18) *(eax+0x1c))
26309
26310 (string-equal? %eax %ebx)
26311 3d/compare-eax-and 0/imm32/false
26312 {
26313 0f 85/jump-if-!= break/disp32
26314 (write-buffered *(ebp+0x14) "fn ")
26315 8b/-> *(ebp+0x10) 0/r32/eax
26316 (lookup *eax *(eax+4))
26317 (write-buffered *(ebp+0x14) %eax)
26318 (write-buffered *(ebp+0x14) ": call ")
26319 (lookup *edi *(edi+4))
26320 (write-buffered *(ebp+0x14) %eax)
26321 (write-buffered *(ebp+0x14) ": register for output '")
26322 (lookup *ecx *(ecx+4))
26323 (lookup *eax *(eax+4))
26324 (write-buffered *(ebp+0x14) %eax)
26325 (write-buffered *(ebp+0x14) "' is not right\n")
26326 (flush *(ebp+0x14))
26327 (stop *(ebp+0x18) 1)
26328 }
26329 $check-mu-call:continue-to-next-output:
26330
26331 (lookup *(ecx+8) *(ecx+0xc))
26332 89/<- %ecx 0/r32/eax
26333
26334 (lookup *(edx+8) *(edx+0xc))
26335 89/<- %edx 0/r32/eax
26336
26337 e9/jump loop/disp32
26338 }
26339 $check-mu-call:check-output-count:
26340
26341 39/compare %ecx 2/r32/edx
26342 {
26343 0f 84/jump-if-= break/disp32
26344
26345
26346 {
26347 81 7/subop/compare %ecx 0/imm32
26348 0f 84/jump-if-= break/disp32
26349 (write-buffered *(ebp+0x14) "fn ")
26350 8b/-> *(ebp+0x10) 0/r32/eax
26351 (lookup *eax *(eax+4))
26352 (write-buffered *(ebp+0x14) %eax)
26353 (write-buffered *(ebp+0x14) ": call ")
26354 (lookup *edi *(edi+4))
26355 (write-buffered *(ebp+0x14) %eax)
26356 (write-buffered *(ebp+0x14) ": too many outputs\n")
26357 (flush *(ebp+0x14))
26358 (stop *(ebp+0x18) 1)
26359 }
26360
26361 {
26362 81 7/subop/compare %edx 0/imm32
26363 0f 84/jump-if-= break/disp32
26364 (write-buffered *(ebp+0x14) "fn ")
26365 8b/-> *(ebp+0x10) 0/r32/eax
26366 (lookup *eax *(eax+4))
26367 (write-buffered *(ebp+0x14) %eax)
26368 (write-buffered *(ebp+0x14) ": call ")
26369 (lookup *edi *(edi+4))
26370 (write-buffered *(ebp+0x14) %eax)
26371 (write-buffered *(ebp+0x14) ": too few outputs\n")
26372 (flush *(ebp+0x14))
26373 (stop *(ebp+0x18) 1)
26374 }
26375 }
26376 $check-mu-call:end:
26377
26378 5f/pop-to-edi
26379 5e/pop-to-esi
26380 5b/pop-to-ebx
26381 5a/pop-to-edx
26382 59/pop-to-ecx
26383 58/pop-to-eax
26384
26385 81 0/subop/add %esp 0x70/imm32
26386
26387 89/<- %esp 5/r32/ebp
26388 5d/pop-to-ebp
26389 c3/return
26390
26391
26392 type-match?:
26393
26394 55/push-ebp
26395 89/<- %ebp 4/r32/esp
26396
26397 {
26398 $type-match?:check-literal-int:
26399 (simple-mu-type? *(ebp+0xc) 0)
26400 3d/compare-eax-and 0/imm32/false
26401 74/jump-if-= break/disp8
26402 (mu-numberlike-output? *(ebp+8))
26403 3d/compare-eax-and 0/imm32/false
26404 74/jump-if-= break/disp8
26405 b8/copy-to-eax 1/imm32/true
26406 e9/jump $type-match?:end/disp32
26407 }
26408
26409 {
26410 $type-match?:check-literal-string:
26411 (simple-mu-type? *(ebp+0xc) 0x10)
26412 3d/compare-eax-and 0/imm32/false
26413 74/jump-if-= break/disp8
26414 (mu-string-type? *(ebp+8))
26415 3d/compare-eax-and 0/imm32/false
26416 74/jump-if-= break/disp8
26417 b8/copy-to-eax 1/imm32/true
26418 e9/jump $type-match?:end/disp32
26419 }
26420 $type-match?:baseline:
26421
26422 (type-component-match? *(ebp+8) *(ebp+0xc) *(ebp+0x10))
26423 $type-match?:end:
26424
26425 89/<- %esp 5/r32/ebp
26426 5d/pop-to-ebp
26427 c3/return
26428
26429 type-component-match?:
26430
26431 55/push-ebp
26432 89/<- %ebp 4/r32/esp
26433
26434 51/push-ecx
26435 52/push-edx
26436 53/push-ebx
26437
26438 8b/-> *(ebp+8) 1/r32/ecx
26439
26440 8b/-> *(ebp+0xc) 2/r32/edx
26441 $type-component-match?:compare-addr:
26442
26443 8b/-> %ecx 0/r32/eax
26444 39/compare %edx 0/r32/eax
26445 b8/copy-to-eax 1/imm32/true
26446 0f 84/jump-if-= $type-component-match?:end/disp32
26447
26448 b8/copy-to-eax 0/imm32/false
26449 81 7/subop/compare %ecx 0/imm32
26450 0f 84/jump-if-= $type-component-match?:end/disp32
26451
26452 81 7/subop/compare %edx 0/imm32
26453 0f 84/jump-if-= $type-component-match?:end/disp32
26454
26455 {
26456 $type-component-match?:check-type-parameter:
26457 81 7/subop/compare *ecx 0/imm32/false
26458 74/jump-if-= break/disp8
26459 81 7/subop/compare *(ecx+4) 0xa/imm32/type-parameter
26460 75/jump-if-!= break/disp8
26461 $type-component-match?:type-parameter:
26462 (type-parameter-match? *(ecx+8) *(ecx+0xc) %edx *(ebp+0x10))
26463 e9/jump $type-component-match?:end/disp32
26464 }
26465
26466 {
26467 $type-component-match?:check-list-type-parameter:
26468
26469 81 7/subop/compare *ecx 0/imm32/false
26470 75/jump-if-!= break/disp8
26471
26472 81 7/subop/compare *(ecx+0xc) 0/imm32
26473 75/jump-if-!= break/disp8
26474
26475 (lookup *(ecx+4) *(ecx+8))
26476 81 7/subop/compare *eax 0/imm32/false
26477 74/jump-if-= break/disp8
26478 81 7/subop/compare *(eax+4) 0xa/imm32/type-parameter
26479 75/jump-if-!= break/disp8
26480 $type-component-match?:list-type-parameter:
26481 (type-parameter-match? *(eax+8) *(eax+0xc) %edx *(ebp+0x10))
26482 e9/jump $type-component-match?:end/disp32
26483 }
26484 $type-component-match?:compare-atom-state:
26485
26486 8b/-> *ecx 3/r32/ebx
26487 39/compare *edx 3/r32/ebx
26488 b8/copy-to-eax 0/imm32/false
26489 0f 85/jump-if-!= $type-component-match?:end/disp32
26490
26491 {
26492 $type-component-match?:check-atom:
26493 81 7/subop/compare %ebx 0/imm32/false
26494 74/jump-if-= break/disp8
26495 $type-component-match?:is-atom:
26496 8b/-> *(ecx+4) 0/r32/eax
26497 39/compare *(edx+4) 0/r32/eax
26498 0f 94/set-if-= %al
26499 81 4/subop/and %eax 0xff/imm32
26500 e9/jump $type-component-match?:end/disp32
26501 }
26502 $type-component-match?:check-left:
26503
26504 (lookup *(ecx+4) *(ecx+8))
26505 89/<- %ebx 0/r32/eax
26506 (lookup *(edx+4) *(edx+8))
26507 (type-component-match? %ebx %eax *(ebp+0x10))
26508 3d/compare-eax-and 0/imm32/false
26509 74/jump-if-= $type-component-match?:end/disp8
26510 $type-component-match?:check-right:
26511
26512 (lookup *(ecx+0xc) *(ecx+0x10))
26513 89/<- %ebx 0/r32/eax
26514 (lookup *(edx+0xc) *(edx+0x10))
26515 (type-component-match? %ebx %eax *(ebp+0x10))
26516 $type-component-match?:end:
26517
26518 5b/pop-to-ebx
26519 5a/pop-to-edx
26520 59/pop-to-ecx
26521
26522 89/<- %esp 5/r32/ebp
26523 5d/pop-to-ebp
26524 c3/return
26525
26526 type-parameter-match?:
26527
26528 55/push-ebp
26529 89/<- %ebp 4/r32/esp
26530
26531 51/push-ecx
26532
26533 (get-or-insert-handle *(ebp+0x14) *(ebp+8) *(ebp+0xc) 0xc)
26534
26535 {
26536 81 7/subop/compare *eax 0/imm32
26537 75/jump-if-!= break/disp8
26538 8b/-> *(ebp+0x10) 1/r32/ecx
26539 89/<- *eax 1/r32/ecx
26540 }
26541
26542 (type-equal? *(ebp+0x10) *eax)
26543 $type-parameter-match?:end:
26544
26545 59/pop-to-ecx
26546
26547 89/<- %esp 5/r32/ebp
26548 5d/pop-to-ebp
26549 c3/return
26550
26551 size-of:
26552
26553 55/push-ebp
26554 89/<- %ebp 4/r32/esp
26555
26556 51/push-ecx
26557
26558 8b/-> *(ebp+8) 1/r32/ecx
26559
26560
26561
26562
26563
26564
26565
26566 (lookup *(ecx+8) *(ecx+0xc))
26567 89/<- %ecx 0/r32/eax
26568
26569 {
26570 (mu-array? %ecx)
26571 3d/compare-eax-and 0/imm32/false
26572 74/jump-if-= break/disp8
26573 (size-of-array %ecx)
26574 eb/jump $size-of:end/disp8
26575 }
26576
26577 {
26578 (mu-stream? %ecx)
26579 3d/compare-eax-and 0/imm32/false
26580 74/jump-if-= break/disp8
26581 (size-of-stream %ecx)
26582 eb/jump $size-of:end/disp8
26583 }
26584
26585 {
26586 81 7/subop/compare *ecx 0/imm32/false
26587 75/jump-if-!= break/disp8
26588 (lookup *(ecx+4) *(ecx+8))
26589 89/<- %ecx 0/r32/eax
26590 }
26591
26592 (size-of-type-id *(ecx+4))
26593 $size-of:end:
26594
26595 59/pop-to-ecx
26596
26597 89/<- %esp 5/r32/ebp
26598 5d/pop-to-ebp
26599 c3/return
26600
26601 size-of-deref:
26602
26603 55/push-ebp
26604 89/<- %ebp 4/r32/esp
26605
26606 51/push-ecx
26607
26608 8b/-> *(ebp+8) 1/r32/ecx
26609 (lookup *(ecx+8) *(ecx+0xc))
26610 89/<- %ecx 0/r32/eax
26611
26612
26613 (lookup *(ecx+0xc) *(ecx+0x10))
26614 89/<- %ecx 0/r32/eax
26615
26616 {
26617 (mu-array? %ecx)
26618 3d/compare-eax-and 0/imm32/false
26619 74/jump-if-= break/disp8
26620 (size-of-array %ecx)
26621 eb/jump $size-of-deref:end/disp8
26622 }
26623
26624 {
26625 (mu-stream? %ecx)
26626 3d/compare-eax-and 0/imm32/false
26627 74/jump-if-= break/disp8
26628 (size-of-stream %ecx)
26629 eb/jump $size-of-deref:end/disp8
26630 }
26631
26632 {
26633 81 7/subop/compare *ecx 0/imm32/false
26634 75/jump-if-!= break/disp8
26635 (lookup *(ecx+4) *(ecx+8))
26636 89/<- %ecx 0/r32/eax
26637 }
26638
26639 (size-of-type-id *(ecx+4))
26640 $size-of-deref:end:
26641
26642 59/pop-to-ecx
26643
26644 89/<- %esp 5/r32/ebp
26645 5d/pop-to-ebp
26646 c3/return
26647
26648 mu-array?:
26649
26650 55/push-ebp
26651 89/<- %ebp 4/r32/esp
26652
26653 51/push-ecx
26654
26655 8b/-> *(ebp+8) 1/r32/ecx
26656
26657 81 7/subop/compare *ecx 0/imm32/false
26658 75/jump-if-!= $mu-array?:return-false/disp8
26659
26660 (lookup *(ecx+4) *(ecx+8))
26661 81 7/subop/compare *eax 0/imm32/false
26662 74/jump-if-= $mu-array?:return-false/disp8
26663
26664 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
26665 0f 94/set-if-= %al
26666 81 4/subop/and %eax 0xff/imm32
26667 eb/jump $mu-array?:end/disp8
26668 $mu-array?:return-false:
26669 b8/copy-to-eax 0/imm32/false
26670 $mu-array?:end:
26671
26672 59/pop-to-ecx
26673
26674 89/<- %esp 5/r32/ebp
26675 5d/pop-to-ebp
26676 c3/return
26677
26678
26679 size-of-array:
26680
26681 55/push-ebp
26682 89/<- %ebp 4/r32/esp
26683
26684 51/push-ecx
26685 52/push-edx
26686
26687 8b/-> *(ebp+8) 1/r32/ecx
26688
26689 (lookup *(ecx+0xc) *(ecx+0x10))
26690 89/<- %ecx 0/r32/eax
26691
26692 (lookup *(ecx+4) *(ecx+8))
26693 8b/-> *(eax+4) 2/r32/edx
26694
26695
26696 (lookup *(ecx+0xc) *(ecx+0x10))
26697 (lookup *(eax+4) *(eax+8))
26698 8b/-> *(eax+8) 1/r32/ecx
26699
26700 (size-of-type-id-as-array-element %edx)
26701 f7 4/subop/multiply-into-edx-eax %ecx
26702 05/add-to-eax 4/imm32
26703
26704 $size-of-array:end:
26705
26706 5a/pop-to-edx
26707 59/pop-to-ecx
26708
26709 89/<- %esp 5/r32/ebp
26710 5d/pop-to-ebp
26711 c3/return
26712
26713 mu-stream?:
26714
26715 55/push-ebp
26716 89/<- %ebp 4/r32/esp
26717
26718 51/push-ecx
26719
26720 8b/-> *(ebp+8) 1/r32/ecx
26721
26722 81 7/subop/compare *ecx 0/imm32/false
26723 75/jump-if-!= $mu-stream?:return-false/disp8
26724
26725 (lookup *(ecx+4) *(ecx+8))
26726 81 7/subop/compare *eax 0/imm32/false
26727 74/jump-if-= $mu-stream?:return-false/disp8
26728
26729 81 7/subop/compare *(eax+4) 0xb/imm32/stream-type-id
26730 0f 94/set-if-= %al
26731 81 4/subop/and %eax 0xff/imm32
26732 eb/jump $mu-stream?:end/disp8
26733 $mu-stream?:return-false:
26734 b8/copy-to-eax 0/imm32/false
26735 $mu-stream?:end:
26736
26737 59/pop-to-ecx
26738
26739 89/<- %esp 5/r32/ebp
26740 5d/pop-to-ebp
26741 c3/return
26742
26743
26744 size-of-stream:
26745
26746 55/push-ebp
26747 89/<- %ebp 4/r32/esp
26748
26749 (size-of-array *(ebp+8))
26750 05/add-to-eax 8/imm32
26751 $size-of-stream:end:
26752
26753 89/<- %esp 5/r32/ebp
26754 5d/pop-to-ebp
26755 c3/return
26756
26757 size-of-type-id:
26758
26759 55/push-ebp
26760 89/<- %ebp 4/r32/esp
26761
26762 51/push-ecx
26763
26764 68/push 0/imm32
26765 68/push 0/imm32
26766 89/<- %ecx 4/r32/esp
26767
26768 8b/-> *(ebp+8) 0/r32/eax
26769
26770 3d/compare-eax-and 0/imm32
26771 0f 84/jump-if-= $size-of-type-id:end/disp32
26772
26773 3d/compare-eax-and 8/imm32/byte
26774 {
26775 75/jump-if-!= break/disp8
26776 b8/copy-to-eax 4/imm32
26777 eb/jump $size-of-type-id:end/disp8
26778 }
26779
26780 3d/compare-eax-and 4/imm32/handle
26781 {
26782 75/jump-if-!= break/disp8
26783 b8/copy-to-eax 8/imm32
26784 eb/jump $size-of-type-id:end/disp8
26785 }
26786
26787 3d/compare-eax-and 0xc/imm32/slice
26788 {
26789 75/jump-if-!= break/disp8
26790 b8/copy-to-eax 8/imm32
26791 eb/jump $size-of-type-id:end/disp8
26792 }
26793
26794
26795 (find-typeinfo %eax %ecx)
26796 {
26797 81 7/subop/compare *ecx 0/imm32
26798 74/jump-if-= break/disp8
26799 $size-of-type-id:user-defined:
26800 (lookup *ecx *(ecx+4))
26801 8b/-> *(eax+0xc) 0/r32/eax
26802 eb/jump $size-of-type-id:end/disp8
26803 }
26804
26805 b8/copy-to-eax 4/imm32
26806 $size-of-type-id:end:
26807
26808 81 0/subop/add %esp 8/imm32
26809
26810 59/pop-to-ecx
26811
26812 89/<- %esp 5/r32/ebp
26813 5d/pop-to-ebp
26814 c3/return
26815
26816
26817
26818
26819 type-tail:
26820
26821 55/push-ebp
26822 89/<- %ebp 4/r32/esp
26823
26824 51/push-ecx
26825
26826 b8/copy-to-eax 0/imm32
26827
26828 8b/-> *(ebp+8) 1/r32/ecx
26829 $type-tail:check-atom:
26830
26831 81 7/subop/compare *ecx 0/imm32/false
26832 0f 85/jump-if-!= $type-tail:end/disp32
26833
26834 (lookup *(ecx+0xc) *(ecx+0x10))
26835 89/<- %ecx 0/r32/eax
26836 $type-tail:check-singleton:
26837
26838 {
26839 81 7/subop/compare *(ecx+0xc) 0/imm32
26840 75/jump-if-!= break/disp8
26841 (lookup *(ecx+4) *(ecx+8))
26842 e9/jump $type-tail:end/disp32
26843 }
26844
26845 {
26846 $type-tail:check-array-capacity:
26847 (lookup *(ecx+0xc) *(ecx+0x10))
26848 81 7/subop/compare *eax 0/imm32/false
26849 75/jump-if-!= break/disp8
26850 $type-tail:check-array-capacity-1:
26851 (lookup *(eax+4) *(eax+8))
26852 3d/compare-eax-and 0/imm32
26853 74/jump-if-= break/disp8
26854 $type-tail:check-array-capacity-2:
26855 (simple-mu-type? %eax 9)
26856 3d/compare-eax-and 0/imm32/false
26857 74/jump-if-= break/disp8
26858 $type-tail:array-capacity:
26859 (lookup *(ecx+4) *(ecx+8))
26860 eb/jump $type-tail:end/disp8
26861 }
26862 $type-tail:check-compound-left:
26863
26864 (lookup *(ecx+4) *(ecx+8))
26865 81 7/subop/compare *eax 0/imm32/false
26866 74/jump-if-= $type-tail:end/disp8
26867 $type-tail:return-tail:
26868
26869 89/<- %eax 1/r32/ecx
26870 $type-tail:end:
26871
26872 59/pop-to-ecx
26873
26874 89/<- %esp 5/r32/ebp
26875 5d/pop-to-ebp
26876 c3/return
26877
26878 type-equal?:
26879
26880 55/push-ebp
26881 89/<- %ebp 4/r32/esp
26882
26883 51/push-ecx
26884 52/push-edx
26885 53/push-ebx
26886
26887 8b/-> *(ebp+8) 1/r32/ecx
26888
26889 8b/-> *(ebp+0xc) 2/r32/edx
26890 $type-equal?:compare-addr:
26891
26892 8b/-> %ecx 0/r32/eax
26893 39/compare %edx 0/r32/eax
26894 b8/copy-to-eax 1/imm32/true
26895 0f 84/jump-if-= $type-equal?:end/disp32
26896 $type-equal?:compare-null-a:
26897
26898 b8/copy-to-eax 0/imm32/false
26899 81 7/subop/compare %ecx 0/imm32
26900 0f 84/jump-if-= $type-equal?:end/disp32
26901 $type-equal?:compare-null-b:
26902
26903 81 7/subop/compare %edx 0/imm32
26904 0f 84/jump-if-= $type-equal?:end/disp32
26905 $type-equal?:compare-atom-state:
26906
26907 8b/-> *ecx 3/r32/ebx
26908 39/compare *edx 3/r32/ebx
26909 b8/copy-to-eax 0/imm32/false
26910 0f 85/jump-if-!= $type-equal?:end/disp32
26911
26912 {
26913 $type-equal?:check-atom:
26914 81 7/subop/compare %ebx 0/imm32/false
26915 74/jump-if-= break/disp8
26916 $type-equal?:is-atom:
26917 8b/-> *(ecx+4) 0/r32/eax
26918 39/compare *(edx+4) 0/r32/eax
26919 0f 94/set-if-= %al
26920 81 4/subop/and %eax 0xff/imm32
26921 e9/jump $type-equal?:end/disp32
26922 }
26923 $type-equal?:check-left:
26924
26925 (lookup *(ecx+4) *(ecx+8))
26926 89/<- %ebx 0/r32/eax
26927 (lookup *(edx+4) *(edx+8))
26928 (type-equal? %eax %ebx)
26929 3d/compare-eax-and 0/imm32/false
26930 74/jump-if-= $type-equal?:end/disp8
26931 $type-equal?:check-right:
26932
26933 (lookup *(ecx+0xc) *(ecx+0x10))
26934 89/<- %ebx 0/r32/eax
26935 (lookup *(edx+0xc) *(edx+0x10))
26936 (type-equal? %eax %ebx)
26937 $type-equal?:end:
26938
26939 5b/pop-to-ebx
26940 5a/pop-to-edx
26941 59/pop-to-ecx
26942
26943 89/<- %esp 5/r32/ebp
26944 5d/pop-to-ebp
26945 c3/return
26946
26947
26948
26949
26950
26951 == data
26952
26953
26954 Curr-local-stack-offset:
26955 0/imm32
26956
26957 == code
26958
26959
26960
26961
26962
26963
26964 emit-subx:
26965
26966 55/push-ebp
26967 89/<- %ebp 4/r32/esp
26968
26969 50/push-eax
26970
26971 (lookup *_Program-functions *_Program-functions->payload)
26972 {
26973
26974 3d/compare-eax-and 0/imm32
26975 0f 84/jump-if-= break/disp32
26976 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
26977
26978 (lookup *(eax+0x20) *(eax+0x24))
26979 e9/jump loop/disp32
26980 }
26981 $emit-subx:end:
26982
26983 58/pop-to-eax
26984
26985 89/<- %esp 5/r32/ebp
26986 5d/pop-to-ebp
26987 c3/return
26988
26989 emit-subx-function:
26990
26991 55/push-ebp
26992 89/<- %ebp 4/r32/esp
26993
26994 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
26995
26996 50/push-eax
26997 51/push-ecx
26998 52/push-edx
26999
27000 c7 0/subop/copy *Curr-block-depth 1/imm32
27001 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
27002
27003 8b/-> *(ebp+0xc) 1/r32/ecx
27004
27005 81 5/subop/subtract %esp 0xc00/imm32
27006 68/push 0xc00/imm32/size
27007 68/push 0/imm32/top
27008 89/<- %edx 4/r32/esp
27009
27010 (lookup *ecx *(ecx+4))
27011
27012 (write-buffered *(ebp+8) %eax)
27013 (write-buffered *(ebp+8) ":\n")
27014 (emit-subx-prologue *(ebp+8))
27015
27016 (lookup *(ecx+0x18) *(ecx+0x1c))
27017
27018 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
27019 (emit-subx-epilogue *(ebp+8))
27020
27021
27022 $emit-subx-function:end:
27023
27024 81 0/subop/add %esp 0xc08/imm32
27025
27026 5a/pop-to-edx
27027 59/pop-to-ecx
27028 58/pop-to-eax
27029
27030 89/<- %esp 5/r32/ebp
27031 5d/pop-to-ebp
27032 c3/return
27033
27034 populate-mu-type-offsets-in-inouts:
27035
27036 55/push-ebp
27037 89/<- %ebp 4/r32/esp
27038
27039 50/push-eax
27040 51/push-ecx
27041 52/push-edx
27042 53/push-ebx
27043 57/push-edi
27044
27045 ba/copy-to-edx 8/imm32
27046
27047 8b/-> *(ebp+8) 1/r32/ecx
27048 (lookup *(ecx+8) *(ecx+0xc))
27049 89/<- %ecx 0/r32/eax
27050 {
27051 $populate-mu-type-offsets-in-inouts:loop:
27052 81 7/subop/compare %ecx 0/imm32
27053 74/jump-if-= break/disp8
27054
27055 (lookup *ecx *(ecx+4))
27056 89/<- %ebx 0/r32/eax
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067 89/<- *(ebx+0x14) 2/r32/edx
27068
27069 (size-of %ebx)
27070 01/add-to %edx 0/r32/eax
27071
27072 (lookup *(ecx+8) *(ecx+0xc))
27073 89/<- %ecx 0/r32/eax
27074
27075 eb/jump loop/disp8
27076 }
27077 $populate-mu-type-offsets-in-inouts:end:
27078
27079 5f/pop-to-edi
27080 5b/pop-to-ebx
27081 5a/pop-to-edx
27082 59/pop-to-ecx
27083 58/pop-to-eax
27084
27085 89/<- %esp 5/r32/ebp
27086 5d/pop-to-ebp
27087 c3/return
27088
27089 emit-subx-stmt-list:
27090
27091 55/push-ebp
27092 89/<- %ebp 4/r32/esp
27093
27094 50/push-eax
27095 51/push-ecx
27096 53/push-ebx
27097 56/push-esi
27098
27099 8b/-> *(ebp+0xc) 6/r32/esi
27100
27101 {
27102 $emit-subx-stmt-list:loop:
27103 81 7/subop/compare %esi 0/imm32
27104 0f 84/jump-if-= break/disp32
27105
27106 (lookup *esi *(esi+4))
27107 89/<- %ecx 0/r32/eax
27108 {
27109 $emit-subx-stmt-list:check-for-block:
27110 81 7/subop/compare *ecx 0/imm32/block
27111 75/jump-if-!= break/disp8
27112 $emit-subx-stmt-list:block:
27113 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27114 }
27115 {
27116 $emit-subx-stmt-list:check-for-stmt:
27117 81 7/subop/compare *ecx 1/imm32/stmt1
27118 0f 85/jump-if-!= break/disp32
27119 $emit-subx-stmt-list:stmt1:
27120 {
27121 (mu-branch? %ecx)
27122 3d/compare-eax-and 0/imm32/false
27123 0f 84/jump-if-= break/disp32
27124 $emit-subx-stmt-list:branch-stmt:
27125 +-- 25 lines: # unconditional return ----------------------------------------------------------------------------------------------------------------------------------------------------
27150 +-- 27 lines: # unconditional loops -----------------------------------------------------------------------------------------------------------------------------------------------------
27177 +-- 16 lines: # unconditional breaks ----------------------------------------------------------------------------------------------------------------------------------------------------
27193 +-- 38 lines: # simple conditional branches without a target ----------------------------------------------------------------------------------------------------------------------------
27231 +-- 19 lines: # conditional branches with an explicit target ----------------------------------------------------------------------------------------------------------------------------
27250 }
27251 $emit-subx-stmt-list:1-to-1:
27252 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27253 e9/jump $emit-subx-stmt-list:continue/disp32
27254 }
27255 {
27256 $emit-subx-stmt-list:check-for-var-def:
27257 81 7/subop/compare *ecx 2/imm32/var-def
27258 75/jump-if-!= break/disp8
27259 $emit-subx-stmt-list:var-def:
27260 (emit-subx-var-def *(ebp+8) %ecx)
27261 (push *(ebp+0x10) *(ecx+4))
27262 (push *(ebp+0x10) *(ecx+8))
27263 (push *(ebp+0x10) 0)
27264
27265 eb/jump $emit-subx-stmt-list:continue/disp8
27266 }
27267 {
27268 $emit-subx-stmt-list:check-for-reg-var-def:
27269 81 7/subop/compare *ecx 3/imm32/reg-var-def
27270 0f 85/jump-if-!= break/disp32
27271 $emit-subx-stmt-list:reg-var-def:
27272
27273 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27274
27275 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
27276
27277 eb/jump $emit-subx-stmt-list:continue/disp8
27278 }
27279 $emit-subx-stmt-list:continue:
27280
27281 (lookup *(esi+8) *(esi+0xc))
27282 89/<- %esi 0/r32/eax
27283 e9/jump loop/disp32
27284 }
27285 $emit-subx-stmt-list:emit-cleanup:
27286 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
27287 $emit-subx-stmt-list:clean-up:
27288 (clean-up-stack-offset-state *(ebp+0x10) *Curr-block-depth)
27289 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
27290 $emit-subx-stmt-list:end:
27291
27292 5e/pop-to-esi
27293 5b/pop-to-ebx
27294 59/pop-to-ecx
27295 58/pop-to-eax
27296
27297 89/<- %esp 5/r32/ebp
27298 5d/pop-to-ebp
27299 c3/return
27300
27301
27302 push-output-and-maybe-emit-spill:
27303
27304 55/push-ebp
27305 89/<- %ebp 4/r32/esp
27306
27307 50/push-eax
27308 51/push-ecx
27309 52/push-edx
27310
27311 8b/-> *(ebp+0xc) 1/r32/ecx
27312
27313 (lookup *(ecx+0x14) *(ecx+0x18))
27314
27315
27316 (lookup *eax *(eax+4))
27317 89/<- %ecx 0/r32/eax
27318
27319 8b/-> *Curr-block-depth 0/r32/eax
27320 89/<- *(ecx+0x10) 0/r32/eax
27321
27322
27323
27324
27325
27326
27327
27328
27329 81 7/subop/compare *(ecx+0x18) 0/imm32
27330 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
27331
27332 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
27333 89/<- %edx 0/r32/eax
27334 3d/compare-eax-and 0/imm32/false
27335 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
27336 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
27337 89/<- %edx 0/r32/eax
27338
27339 3d/compare-eax-and 0/imm32/false
27340 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
27341
27342
27343 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
27344
27345 (lookup *(ecx+0x18) *(ecx+0x1c))
27346 (emit-push-register *(ebp+8) %eax)
27347 $push-output-and-maybe-emit-spill:push:
27348 8b/-> *(ebp+0xc) 1/r32/ecx
27349 (lookup *(ecx+0x14) *(ecx+0x18))
27350
27351 (push *(ebp+0x10) *eax)
27352 (push *(ebp+0x10) *(eax+4))
27353 (push *(ebp+0x10) %edx)
27354 $push-output-and-maybe-emit-spill:end:
27355
27356 5a/pop-to-edx
27357 59/pop-to-ecx
27358 58/pop-to-eax
27359
27360 89/<- %esp 5/r32/ebp
27361 5d/pop-to-ebp
27362 c3/return
27363
27364 $push-output-and-maybe-emit-spill:abort:
27365
27366 (write-buffered *(ebp+0x1c) "var '")
27367 (write-buffered *(ebp+0x1c) *eax)
27368 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
27369 (flush *(ebp+0x1c))
27370 (stop *(ebp+0x20) 1)
27371
27372
27373 emit-subx-cleanup-and-unconditional-nonlocal-branch:
27374
27375 55/push-ebp
27376 89/<- %ebp 4/r32/esp
27377
27378 50/push-eax
27379 51/push-ecx
27380
27381 8b/-> *(ebp+0xc) 1/r32/ecx
27382
27383 (lookup *(ecx+0xc) *(ecx+0x10))
27384 (lookup *eax *(eax+4))
27385 (lookup *eax *(eax+4))
27386
27387 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
27388
27389 (emit-indent *(ebp+8) *Curr-block-depth)
27390 (write-buffered *(ebp+8) "e9/jump ")
27391 (write-buffered *(ebp+8) %eax)
27392 (lookup *(ecx+4) *(ecx+8))
27393 (string-starts-with? %eax "break")
27394 3d/compare-eax-and 0/imm32/false
27395 {
27396 74/jump-if-= break/disp8
27397 (write-buffered *(ebp+8) ":break/disp32\n")
27398 eb/jump $emit-subx-cleanup-and-unconditional-nonlocal-branch:end/disp8
27399 }
27400 (write-buffered *(ebp+8) ":loop/disp32\n")
27401 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
27402
27403 59/pop-to-ecx
27404 58/pop-to-eax
27405
27406 89/<- %esp 5/r32/ebp
27407 5d/pop-to-ebp
27408 c3/return
27409
27410 emit-outputs:
27411
27412 55/push-ebp
27413 89/<- %ebp 4/r32/esp
27414
27415 50/push-eax
27416 51/push-ecx
27417 56/push-esi
27418 57/push-edi
27419
27420 8b/-> *(ebp+0xc) 0/r32/eax
27421 (lookup *(eax+0xc) *(eax+0x10))
27422 89/<- %esi 0/r32/eax
27423
27424 8b/-> *(ebp+0x10) 0/r32/eax
27425 (lookup *(eax+0x10) *(eax+0x14))
27426 89/<- %edi 0/r32/eax
27427 {
27428 $emit-outputs:loop:
27429 81 7/subop/compare %esi 0/imm32
27430 0f 84/jump-if-= break/disp32
27431
27432
27433 (lookup *edi *(edi+4))
27434 (lookup *(eax+0x18) *(eax+0x1c))
27435 89/<- %ecx 0/r32/eax
27436
27437 8a/copy-byte *(ecx+4) 0/r32/AL
27438 81 4/subop/and %eax 0xff/imm32
27439 3d/compare-eax-and 0x78/imm32/x
27440 {
27441 75/jump-if-!= break/disp8
27442 (emit-float-output *(ebp+8) %esi %ecx)
27443 eb/jump $emit-outputs:continue/disp8
27444 }
27445
27446 (emit-int-output *(ebp+8) %esi %ecx)
27447 $emit-outputs:continue:
27448
27449 (lookup *(esi+8) *(esi+0xc))
27450 89/<- %esi 0/r32/eax
27451
27452 (lookup *(edi+8) *(edi+0xc))
27453 89/<- %edi 0/r32/eax
27454
27455 e9/jump loop/disp32
27456 }
27457 $emit-outputs:end:
27458
27459 5f/pop-to-edi
27460 5e/pop-to-esi
27461 59/pop-to-ecx
27462 58/pop-to-eax
27463
27464 89/<- %esp 5/r32/ebp
27465 5d/pop-to-ebp
27466 c3/return
27467
27468 emit-int-output:
27469
27470 55/push-ebp
27471 89/<- %ebp 4/r32/esp
27472
27473 50/push-eax
27474 51/push-ecx
27475
27476 8b/-> *(ebp+0xc) 0/r32/eax
27477 (lookup *eax *(eax+4))
27478 89/<- %ecx 0/r32/eax
27479
27480 (lookup *(ecx+8) *(ecx+0xc))
27481 (simple-mu-type? %eax 0)
27482 {
27483 3d/compare-eax-and 0/imm32/false
27484 0f 84/jump-if-= break/disp32
27485 (emit-indent *(ebp+8) *Curr-block-depth)
27486 (write-buffered *(ebp+8) "c7 0/subop/copy %")
27487 (write-buffered *(ebp+8) *(ebp+0x10))
27488 (write-buffered *(ebp+8) " ")
27489 (lookup *ecx *(ecx+4))
27490 (write-buffered *(ebp+8) %eax)
27491 (write-buffered *(ebp+8) "/imm32\n")
27492 e9/jump $emit-int-output:end/disp32
27493 }
27494
27495 (emit-indent *(ebp+8) *Curr-block-depth)
27496 (write-buffered *(ebp+8) "8b/->")
27497 (emit-subx-var-as-rm32 *(ebp+8) *(ebp+0xc))
27498 (write-buffered *(ebp+8) " ")
27499 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
27500 (write-int32-hex-buffered *(ebp+8) *eax)
27501 (write-buffered *(ebp+8) "/r32\n")
27502 $emit-int-output:end:
27503
27504 59/pop-to-ecx
27505 58/pop-to-eax
27506
27507 89/<- %esp 5/r32/ebp
27508 5d/pop-to-ebp
27509 c3/return
27510
27511 emit-float-output:
27512
27513 55/push-ebp
27514 89/<- %ebp 4/r32/esp
27515
27516 50/push-eax
27517
27518 (emit-indent *(ebp+8) *Curr-block-depth)
27519 (write-buffered *(ebp+8) "f3 0f 10/->")
27520 (emit-subx-var-as-rm32 *(ebp+8) *(ebp+0xc))
27521 (write-buffered *(ebp+8) " ")
27522 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
27523 (write-int32-hex-buffered *(ebp+8) *eax)
27524 (write-buffered *(ebp+8) "/x32\n")
27525 $emit-float-output:end:
27526
27527 58/pop-to-eax
27528
27529 89/<- %esp 5/r32/ebp
27530 5d/pop-to-ebp
27531 c3/return
27532
27533 mu-branch?:
27534
27535 55/push-ebp
27536 89/<- %ebp 4/r32/esp
27537
27538 51/push-ecx
27539
27540 8b/-> *(ebp+8) 1/r32/ecx
27541 (lookup *(ecx+4) *(ecx+8))
27542 89/<- %ecx 0/r32/eax
27543
27544 (string-starts-with? %ecx "loop")
27545 3d/compare-eax-and 0/imm32/false
27546 75/jump-if-not-equal $mu-branch?:end/disp8
27547
27548 (string-starts-with? %ecx "break")
27549 3d/compare-eax-and 0/imm32/false
27550 75/jump-if-not-equal $mu-branch?:end/disp8
27551
27552 (string-starts-with? %ecx "return")
27553 $mu-branch?:end:
27554
27555 59/pop-to-ecx
27556
27557 89/<- %esp 5/r32/ebp
27558 5d/pop-to-ebp
27559 c3/return
27560
27561 emit-reverse-break:
27562
27563 55/push-ebp
27564 89/<- %ebp 4/r32/esp
27565
27566 50/push-eax
27567
27568 8b/-> *(ebp+0xc) 0/r32/eax
27569
27570 (lookup *(eax+4) *(eax+8))
27571 (get Reverse-branch %eax 0x10 "reverse-branch: ")
27572 (emit-indent *(ebp+8) *Curr-block-depth)
27573 (lookup *eax *(eax+4))
27574 (write-buffered *(ebp+8) %eax)
27575 (write-buffered *(ebp+8) " break/disp32\n")
27576 $emit-reverse-break:end:
27577
27578 58/pop-to-eax
27579
27580 89/<- %esp 5/r32/ebp
27581 5d/pop-to-ebp
27582 c3/return
27583
27584 == data
27585
27586
27587 Reverse-branch:
27588
27589 0x1c0/imm32/write
27590 0/imm32/read
27591 0x1c0/imm32/size
27592
27593 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
27594 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
27595 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
27596 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
27597 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
27598 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
27599 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
27600 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
27601 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_8f_jump_label/imm32
27602 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_8f_jump_label/imm32
27603 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
27604 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
27605 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27606 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27607 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27608 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27609 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27610 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27611 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27612 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27613 0x11/imm32/alloc-id _string-break-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27614 0x11/imm32/alloc-id _string-loop-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
27615 0x11/imm32/alloc-id _string-break-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27616 0x11/imm32/alloc-id _string-loop-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
27617 0x11/imm32/alloc-id _string-break-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27618 0x11/imm32/alloc-id _string-loop-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
27619 0x11/imm32/alloc-id _string-break-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27620 0x11/imm32/alloc-id _string-loop-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
27621
27622 == code
27623
27624 emit-unconditional-jump-to-depth:
27625
27626 55/push-ebp
27627 89/<- %ebp 4/r32/esp
27628
27629 50/push-eax
27630 51/push-ecx
27631 52/push-edx
27632 53/push-ebx
27633 56/push-esi
27634
27635 8b/-> *(ebp+0xc) 1/r32/ecx
27636
27637 8b/-> *ecx 0/r32/eax
27638
27639 8d/copy-address *(ecx+eax-4) 6/r32/esi
27640
27641 8d/copy-address *(ecx+8) 1/r32/ecx
27642
27643 8b/-> *(ebp+0x10) 2/r32/edx
27644 {
27645 $emit-unconditional-jump-to-depth:loop:
27646
27647 39/compare %esi 1/r32/ecx
27648 0f 82/jump-if-addr< break/disp32
27649
27650 (lookup *esi *(esi+4))
27651 89/<- %ebx 0/r32/eax
27652
27653 39/compare *(ebx+0x10) 2/r32/edx
27654 0f 8c/jump-if-< break/disp32
27655 {
27656 $emit-unconditional-jump-to-depth:check:
27657
27658 39/compare *(ebx+0x10) 2/r32/edx
27659 0f 85/jump-if-!= break/disp32
27660 $emit-unconditional-jump-to-depth:depth-found:
27661
27662 (size-of %ebx)
27663 3d/compare-eax-and 0/imm32
27664 0f 85/jump-if-!= break/disp32
27665 $emit-unconditional-jump-to-depth:label-found:
27666
27667 (emit-indent *(ebp+8) *Curr-block-depth)
27668 (write-buffered *(ebp+8) "e9/jump ")
27669 (lookup *ebx *(ebx+4))
27670 (write-buffered *(ebp+8) %eax)
27671 (write-buffered *(ebp+8) ":")
27672 (write-buffered *(ebp+8) *(ebp+0x14))
27673 (write-buffered *(ebp+8) "/disp32\n")
27674 eb/jump $emit-unconditional-jump-to-depth:end/disp8
27675 }
27676
27677 81 5/subop/subtract %esi 0xc/imm32
27678 e9/jump loop/disp32
27679 }
27680
27681 $emit-unconditional-jump-to-depth:end:
27682
27683 5e/pop-to-esi
27684 5b/pop-to-ebx
27685 5a/pop-to-edx
27686 59/pop-to-ecx
27687 58/pop-to-eax
27688
27689 89/<- %esp 5/r32/ebp
27690 5d/pop-to-ebp
27691 c3/return
27692
27693
27694
27695 emit-cleanup-code-until-depth:
27696
27697 55/push-ebp
27698 89/<- %ebp 4/r32/esp
27699
27700 50/push-eax
27701 51/push-ecx
27702 52/push-edx
27703 53/push-ebx
27704 56/push-esi
27705
27706
27707
27708 8b/-> *(ebp+0xc) 1/r32/ecx
27709
27710 8b/-> *ecx 6/r32/esi
27711
27712 8d/copy-address *(ecx+esi-4) 6/r32/esi
27713
27714 81 0/subop/add %ecx 8/imm32
27715
27716 8b/-> *(ebp+0x10) 2/r32/edx
27717 {
27718 $emit-cleanup-code-until-depth:loop:
27719
27720 39/compare %esi 1/r32/ecx
27721 0f 82/jump-if-addr< break/disp32
27722
27723 (lookup *esi *(esi+4))
27724 89/<- %ebx 0/r32/eax
27725
27726
27727
27728
27729
27730
27731 39/compare *(ebx+0x10) 2/r32/edx
27732 0f 8c/jump-if-< break/disp32
27733
27734 81 7/subop/compare *(ebx+0x18) 0/imm32
27735 {
27736 0f 84/jump-if-= break/disp32
27737 {
27738 $emit-cleanup-code-until-depth:check-for-previous-spill:
27739 8b/-> *(esi+8) 0/r32/eax
27740 3d/compare-eax-and 0/imm32/false
27741 74/jump-if-= break/disp8
27742 $emit-cleanup-code-until-depth:reclaim-var-in-register:
27743 (lookup *(ebx+0x18) *(ebx+0x1c))
27744 (emit-pop-register *(ebp+8) %eax)
27745 }
27746 eb/jump $emit-cleanup-code-until-depth:continue/disp8
27747 }
27748
27749 {
27750 75/jump-if-!= break/disp8
27751 $emit-cleanup-code-until-depth:var-on-stack:
27752 (size-of %ebx)
27753
27754 3d/compare-eax-and 0/imm32
27755 74/jump-if-= break/disp8
27756 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
27757 (emit-indent *(ebp+8) *Curr-block-depth)
27758 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
27759 (write-int32-hex-buffered *(ebp+8) %eax)
27760 (write-buffered *(ebp+8) "/imm32\n")
27761 }
27762 $emit-cleanup-code-until-depth:continue:
27763
27764 81 5/subop/subtract %esi 0xc/imm32
27765 e9/jump loop/disp32
27766 }
27767 $emit-cleanup-code-until-depth:end:
27768
27769 5e/pop-to-esi
27770 5b/pop-to-ebx
27771 5a/pop-to-edx
27772 59/pop-to-ecx
27773 58/pop-to-eax
27774
27775 89/<- %esp 5/r32/ebp
27776 5d/pop-to-ebp
27777 c3/return
27778
27779
27780
27781 emit-cleanup-code-for-non-outputs:
27782
27783 55/push-ebp
27784 89/<- %ebp 4/r32/esp
27785
27786 50/push-eax
27787 51/push-ecx
27788 52/push-edx
27789 53/push-ebx
27790 56/push-esi
27791 57/push-edi
27792
27793 8b/-> *(ebp+0xc) 1/r32/ecx
27794
27795 8b/-> *ecx 6/r32/esi
27796
27797 8d/copy-address *(ecx+esi-4) 6/r32/esi
27798
27799 81 0/subop/add %ecx 8/imm32
27800 {
27801 $emit-cleanup-code-for-non-outputs:loop:
27802
27803 39/compare %esi 1/r32/ecx
27804 0f 82/jump-if-addr< break/disp32
27805
27806 (lookup *esi *(esi+4))
27807 89/<- %ebx 0/r32/eax
27808
27809 81 7/subop/compare *(ebx+0x18) 0/imm32
27810 {
27811 0f 84/jump-if-= break/disp32
27812 {
27813 $emit-cleanup-code-for-non-outputs:check-for-previous-spill:
27814 8b/-> *(esi+8) 0/r32/eax
27815 3d/compare-eax-and 0/imm32/false
27816 0f 84/jump-if-= break/disp32
27817 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register:
27818
27819 (lookup *(ebx+0x18) *(ebx+0x1c))
27820 89/<- %edi 0/r32/eax
27821
27822 (reg-in-function-outputs? *(ebp+0x10) %edi)
27823 3d/compare-eax-and 0/imm32/false
27824 {
27825 75/jump-if-!= break/disp8
27826 (emit-pop-register *(ebp+8) %edi)
27827 eb/jump $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done/disp8
27828 }
27829
27830 (emit-indent *(ebp+8) *Curr-block-depth)
27831 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
27832 }
27833 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done:
27834 eb/jump $emit-cleanup-code-for-non-outputs:continue/disp8
27835 }
27836
27837 {
27838 75/jump-if-!= break/disp8
27839 $emit-cleanup-code-for-non-outputs:var-on-stack:
27840 (size-of %ebx)
27841
27842 3d/compare-eax-and 0/imm32
27843 74/jump-if-= break/disp8
27844 $emit-cleanup-code-for-non-outputs:reclaim-var-on-stack:
27845 (emit-indent *(ebp+8) *Curr-block-depth)
27846 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
27847 (write-int32-hex-buffered *(ebp+8) %eax)
27848 (write-buffered *(ebp+8) "/imm32\n")
27849 }
27850 $emit-cleanup-code-for-non-outputs:continue:
27851
27852 81 5/subop/subtract %esi 0xc/imm32
27853 e9/jump loop/disp32
27854 }
27855 $emit-cleanup-code-for-non-outputs:end:
27856
27857 5f/pop-to-edi
27858 5e/pop-to-esi
27859 5b/pop-to-ebx
27860 5a/pop-to-edx
27861 59/pop-to-ecx
27862 58/pop-to-eax
27863
27864 89/<- %esp 5/r32/ebp
27865 5d/pop-to-ebp
27866 c3/return
27867
27868 emit-push-register:
27869
27870 55/push-ebp
27871 89/<- %ebp 4/r32/esp
27872
27873 8b/-> *(ebp+0xc) 0/r32/eax
27874
27875 8a/copy-byte *(eax+4) 0/r32/AL
27876 81 4/subop/and %eax 0xff/imm32
27877
27878 {
27879 3d/compare-eax-and 0x78/imm32/x
27880 0f 85/jump-if-!= break/disp32
27881
27882 (emit-indent *(ebp+8) *Curr-block-depth)
27883 (write-buffered *(ebp+8) "81 5/subop/subtract %esp 4/imm32\n")
27884 (emit-indent *(ebp+8) *Curr-block-depth)
27885 (write-buffered *(ebp+8) "f3 0f 11/<- *esp ")
27886
27887 8b/-> *(ebp+0xc) 0/r32/eax
27888 8a/copy-byte *(eax+7) 0/r32/AL
27889 81 4/subop/and %eax 0xff/imm32
27890 (write-byte-buffered *(ebp+8) %eax)
27891 (write-buffered *(ebp+8) "/x32\n")
27892 e9/jump $emit-push-register:end/disp32
27893 }
27894
27895 (emit-indent *(ebp+8) *Curr-block-depth)
27896 (write-buffered *(ebp+8) "ff 6/subop/push %")
27897 (write-buffered *(ebp+8) *(ebp+0xc))
27898 (write-buffered *(ebp+8) Newline)
27899 $emit-push-register:end:
27900
27901 89/<- %esp 5/r32/ebp
27902 5d/pop-to-ebp
27903 c3/return
27904
27905 emit-pop-register:
27906
27907 55/push-ebp
27908 89/<- %ebp 4/r32/esp
27909
27910 50/push-eax
27911
27912 8b/-> *(ebp+0xc) 0/r32/eax
27913
27914 8a/copy-byte *(eax+4) 0/r32/AL
27915 81 4/subop/and %eax 0xff/imm32
27916
27917 {
27918 3d/compare-eax-and 0x78/imm32/x
27919 0f 85/jump-if-!= break/disp32
27920
27921 (emit-indent *(ebp+8) *Curr-block-depth)
27922 (write-buffered *(ebp+8) "f3 0f 10/-> *esp ")
27923
27924 8b/-> *(ebp+0xc) 0/r32/eax
27925 8a/copy-byte *(eax+7) 0/r32/AL
27926 81 4/subop/and %eax 0xff/imm32
27927 (write-byte-buffered *(ebp+8) %eax)
27928 (write-buffered *(ebp+8) "/x32\n")
27929 (emit-indent *(ebp+8) *Curr-block-depth)
27930 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
27931 e9/jump $emit-pop-register:end/disp32
27932 }
27933
27934 (emit-indent *(ebp+8) *Curr-block-depth)
27935 (write-buffered *(ebp+8) "8f 0/subop/pop %")
27936 (write-buffered *(ebp+8) *(ebp+0xc))
27937 (write-buffered *(ebp+8) Newline)
27938 $emit-pop-register:end:
27939
27940 58/pop-to-eax
27941
27942 89/<- %esp 5/r32/ebp
27943 5d/pop-to-ebp
27944 c3/return
27945
27946
27947
27948 emit-cleanup-code-until-target:
27949
27950 55/push-ebp
27951 89/<- %ebp 4/r32/esp
27952
27953 50/push-eax
27954 51/push-ecx
27955 52/push-edx
27956 53/push-ebx
27957
27958 8b/-> *(ebp+0xc) 1/r32/ecx
27959
27960 8b/-> *ecx 0/r32/eax
27961
27962 8d/copy-address *(ecx+eax-4) 2/r32/edx
27963
27964 81 0/subop/add %ecx 8/imm32
27965 {
27966 $emit-cleanup-code-until-target:loop:
27967
27968 39/compare %edx 1/r32/ecx
27969 0f 82/jump-if-addr< break/disp32
27970
27971 (lookup *edx *(edx+4))
27972 89/<- %ebx 0/r32/eax
27973
27974 (lookup *ebx *(ebx+4))
27975 (string-equal? %eax *(ebp+0x10))
27976 3d/compare-eax-and 0/imm32/false
27977 0f 85/jump-if-!= break/disp32
27978
27979 81 7/subop/compare *(ebx+0x18) 0/imm32
27980 {
27981 0f 84/jump-if-= break/disp32
27982 {
27983 $emit-cleanup-code-until-target:check-for-previous-spill:
27984 8b/-> *(edx+8) 0/r32/eax
27985 3d/compare-eax-and 0/imm32/false
27986 74/jump-if-= break/disp8
27987 $emit-cleanup-code-until-target:reclaim-var-in-register:
27988 (lookup *(ebx+0x18) *(ebx+0x1c))
27989 (emit-pop-register *(ebp+8) %eax)
27990 }
27991 eb/jump $emit-cleanup-code-until-target:continue/disp8
27992 }
27993
27994 {
27995 75/jump-if-!= break/disp8
27996 $emit-cleanup-code-until-target:reclaim-var-on-stack:
27997 (size-of %ebx)
27998
27999 3d/compare-eax-and 0/imm32
28000 74/jump-if-= break/disp8
28001
28002 (emit-indent *(ebp+8) *Curr-block-depth)
28003 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
28004 (write-int32-hex-buffered *(ebp+8) %eax)
28005 (write-buffered *(ebp+8) "/imm32\n")
28006 }
28007 $emit-cleanup-code-until-target:continue:
28008
28009 81 5/subop/subtract %edx 0xc/imm32
28010 e9/jump loop/disp32
28011 }
28012 $emit-cleanup-code-until-target:end:
28013
28014 5b/pop-to-ebx
28015 5a/pop-to-edx
28016 59/pop-to-ecx
28017 58/pop-to-eax
28018
28019 89/<- %esp 5/r32/ebp
28020 5d/pop-to-ebp
28021 c3/return
28022
28023
28024
28025 clean-up-stack-offset-state:
28026
28027 55/push-ebp
28028 89/<- %ebp 4/r32/esp
28029
28030 50/push-eax
28031 51/push-ecx
28032 52/push-edx
28033 53/push-ebx
28034 56/push-esi
28035
28036 8b/-> *(ebp+8) 1/r32/ecx
28037
28038 8b/-> *ecx 6/r32/esi
28039
28040 8d/copy-address *(ecx+esi-4) 6/r32/esi
28041
28042 81 0/subop/add %ecx 8/imm32
28043
28044 8b/-> *(ebp+0xc) 2/r32/edx
28045 {
28046 $clean-up-stack-offset-state:loop:
28047
28048 39/compare %esi 1/r32/ecx
28049 0f 82/jump-if-addr< break/disp32
28050
28051 (lookup *esi *(esi+4))
28052 89/<- %ebx 0/r32/eax
28053
28054 39/compare *(ebx+0x10) 2/r32/edx
28055 0f 8c/jump-if-< break/disp32
28056
28057 81 7/subop/compare *(ebx+0x18) 0/imm32
28058 {
28059 0f 84/jump-if-= break/disp32
28060 {
28061 $clean-up-stack-offset-state:check-for-previous-spill:
28062 8b/-> *(esi+8) 0/r32/eax
28063 3d/compare-eax-and 0/imm32/false
28064 74/jump-if-= break/disp8
28065 $clean-up-stack-offset-state:reclaim-var-in-register:
28066 81 0/subop/add *Curr-local-stack-offset 4/imm32
28067 }
28068 eb/jump $clean-up-stack-offset-state:continue/disp8
28069 }
28070
28071 {
28072 75/jump-if-!= break/disp8
28073 $clean-up-stack-offset-state:var-on-stack:
28074 (size-of %ebx)
28075 01/add-to *Curr-local-stack-offset 0/r32/eax
28076 }
28077 $clean-up-stack-offset-state:continue:
28078
28079 81 5/subop/subtract %esi 0xc/imm32
28080 e9/jump loop/disp32
28081 }
28082 $clean-up-stack-offset-state:end:
28083
28084 5e/pop-to-esi
28085 5b/pop-to-ebx
28086 5a/pop-to-edx
28087 59/pop-to-ecx
28088 58/pop-to-eax
28089
28090 89/<- %esp 5/r32/ebp
28091 5d/pop-to-ebp
28092 c3/return
28093
28094
28095
28096
28097 not-yet-spilled-this-block?:
28098
28099 55/push-ebp
28100 89/<- %ebp 4/r32/esp
28101
28102 51/push-ecx
28103 52/push-edx
28104 53/push-ebx
28105 56/push-esi
28106 57/push-edi
28107
28108 8b/-> *(ebp+0xc) 1/r32/ecx
28109
28110 8b/-> *ecx 0/r32/eax
28111
28112 8d/copy-address *(ecx+eax-4) 2/r32/edx
28113
28114 8d/copy-address *(ecx+8) 1/r32/ecx
28115
28116 8b/-> *(ebp+8) 3/r32/ebx
28117 8b/-> *(ebx+0x10) 3/r32/ebx
28118
28119 8b/-> *(ebp+8) 6/r32/esi
28120 (lookup *(esi+0x18) *(esi+0x1c))
28121 89/<- %esi 0/r32/eax
28122 {
28123 $not-yet-spilled-this-block?:loop:
28124
28125 39/compare %edx 1/r32/ecx
28126 0f 82/jump-if-addr< break/disp32
28127
28128 (lookup *edx *(edx+4))
28129 89/<- %edi 0/r32/eax
28130
28131 39/compare *(edi+0x10) 3/r32/ebx
28132 0f 8c/jump-if-< break/disp32
28133
28134 (lookup *(edi+0x18) *(edi+0x1c))
28135 89/<- %edi 0/r32/eax
28136
28137 {
28138 $not-yet-spilled-this-block?:check-reg:
28139 81 7/subop/compare %edi 0/imm32
28140 0f 84/jump-if-= break/disp32
28141
28142 (string-equal? %esi %edi)
28143 3d/compare-eax-and 0/imm32/false
28144 74/jump-if-= break/disp8
28145 $not-yet-spilled-this-block?:return-false:
28146 b8/copy-to-eax 0/imm32/false
28147 eb/jump $not-yet-spilled-this-block?:end/disp8
28148 }
28149 $not-yet-spilled-this-block?:continue:
28150
28151 81 5/subop/subtract %edx 0xc/imm32
28152 e9/jump loop/disp32
28153 }
28154 $not-yet-spilled-this-block?:return-true:
28155
28156 b8/copy-to-eax 1/imm32/true
28157 $not-yet-spilled-this-block?:end:
28158
28159 5f/pop-to-edi
28160 5e/pop-to-esi
28161 5b/pop-to-ebx
28162 5a/pop-to-edx
28163 59/pop-to-ecx
28164
28165 89/<- %esp 5/r32/ebp
28166 5d/pop-to-ebp
28167 c3/return
28168
28169
28170 will-not-write-some-register?:
28171
28172 55/push-ebp
28173 89/<- %ebp 4/r32/esp
28174
28175 8b/-> *(ebp+8) 0/r32/eax
28176
28177 (lookup *(eax+0x18) *(eax+0x1c))
28178
28179 (find-register *(ebp+0x10) %eax)
28180
28181 {
28182 3d/compare-eax-and 0/imm32
28183 75/jump-if-!= break/disp8
28184 b8/copy-to-eax 1/imm32/true
28185 eb/jump $will-not-write-some-register?:end/disp8
28186 }
28187
28188 (assigns-in-stmts? *(ebp+0xc) %eax)
28189 3d/compare-eax-and 0/imm32/false
28190
28191 0f 94/set-if-= %al
28192 $will-not-write-some-register?:end:
28193
28194 89/<- %esp 5/r32/ebp
28195 5d/pop-to-ebp
28196 c3/return
28197
28198
28199
28200 find-register:
28201
28202 55/push-ebp
28203 89/<- %ebp 4/r32/esp
28204
28205 51/push-ecx
28206
28207 8b/-> *(ebp+8) 1/r32/ecx
28208 (lookup *(ecx+0x10) *(ecx+0x14))
28209 89/<- %ecx 0/r32/eax
28210 {
28211 $find-register:loop:
28212
28213 81 7/subop/compare %ecx 0/imm32
28214 74/jump-if-= break/disp8
28215
28216 (lookup *ecx *(ecx+4))
28217 (lookup *(eax+0x18) *(eax+0x1c))
28218
28219 $find-register:compare:
28220 (string-equal? *(ebp+0xc) %eax)
28221 {
28222 3d/compare-eax-and 0/imm32/false
28223 74/jump-if-= break/disp8
28224 $find-register:found:
28225 (lookup *ecx *(ecx+4))
28226 eb/jump $find-register:end/disp8
28227 }
28228
28229 (lookup *(ecx+8) *(ecx+0xc))
28230 89/<- %ecx 0/r32/eax
28231
28232 eb/jump loop/disp8
28233 }
28234 $find-register:end:
28235
28236 59/pop-to-ecx
28237
28238 89/<- %esp 5/r32/ebp
28239 5d/pop-to-ebp
28240 c3/return
28241
28242 assigns-in-stmts?:
28243
28244 55/push-ebp
28245 89/<- %ebp 4/r32/esp
28246
28247 51/push-ecx
28248
28249 8b/-> *(ebp+8) 1/r32/ecx
28250 {
28251
28252 81 7/subop/compare %ecx 0/imm32
28253 74/jump-if-= break/disp8
28254
28255 (lookup *ecx *(ecx+4))
28256 (assigns-in-stmt? %eax *(ebp+0xc))
28257 3d/compare-eax-and 0/imm32/false
28258 75/jump-if-!= break/disp8
28259
28260 (lookup *(ecx+8) *(ecx+0xc))
28261 89/<- %ecx 0/r32/eax
28262
28263 eb/jump loop/disp8
28264 }
28265 $assigns-in-stmts?:end:
28266
28267 59/pop-to-ecx
28268
28269 89/<- %esp 5/r32/ebp
28270 5d/pop-to-ebp
28271 c3/return
28272
28273 assigns-in-stmt?:
28274
28275 55/push-ebp
28276 89/<- %ebp 4/r32/esp
28277
28278 51/push-ecx
28279
28280 8b/-> *(ebp+8) 1/r32/ecx
28281
28282 {
28283 81 7/subop/compare *ecx 1/imm32/stmt1
28284 75/jump-if-!= break/disp8
28285 (lookup *(ecx+0x14) *(ecx+0x18))
28286 (assigns-in-stmt-vars? %eax *(ebp+0xc))
28287 eb/jump $assigns-in-stmt?:end/disp8
28288 }
28289
28290 {
28291 81 7/subop/compare *ecx 0/imm32/block
28292 75/jump-if-!= break/disp8
28293 (lookup *(ecx+4) *(ecx+8))
28294 (assigns-in-stmts? %eax *(ebp+0xc))
28295 eb/jump $assigns-in-stmt?:end/disp8
28296 }
28297
28298 b8/copy 0/imm32/false
28299 $assigns-in-stmt?:end:
28300
28301 59/pop-to-ecx
28302
28303 89/<- %esp 5/r32/ebp
28304 5d/pop-to-ebp
28305 c3/return
28306
28307 assigns-in-stmt-vars?:
28308
28309 55/push-ebp
28310 89/<- %ebp 4/r32/esp
28311
28312 51/push-ecx
28313
28314 8b/-> *(ebp+8) 1/r32/ecx
28315 {
28316
28317 81 7/subop/compare %ecx 0/imm32
28318 74/jump-if-= break/disp8
28319
28320 (lookup *ecx *(ecx+4))
28321
28322 {
28323 39/compare *(ebp+0xc) 0/r32/eax
28324 75/jump-if-!= break/disp8
28325 81 7/subop/compare *(ecx+0x10) 0/imm32/false
28326 75/jump-if-!= break/disp8
28327 b8/copy-to-eax 1/imm32/true
28328 eb/jump $assigns-in-stmt-vars?:end/disp8
28329 }
28330
28331 (lookup *(ecx+8) *(ecx+0xc))
28332 89/<- %ecx 0/r32/eax
28333
28334 eb/jump loop/disp8
28335 }
28336 $assigns-in-stmt-vars?:end:
28337
28338 59/pop-to-ecx
28339
28340 89/<- %esp 5/r32/ebp
28341 5d/pop-to-ebp
28342 c3/return
28343
28344
28345
28346
28347
28348 same-register-spilled-before?:
28349
28350 55/push-ebp
28351 89/<- %ebp 4/r32/esp
28352
28353 51/push-ecx
28354 52/push-edx
28355 53/push-ebx
28356 56/push-esi
28357 57/push-edi
28358
28359 8b/-> *(ebp+8) 1/r32/ecx
28360
28361 (lookup *(ecx+0x18) *(ecx+0x1c))
28362 89/<- %edx 0/r32/eax
28363
28364 8b/-> *(ecx+0x10) 3/r32/ebx
28365
28366 8b/-> *(ebp+0xc) 1/r32/ecx
28367 81 0/subop/add %ecx 8/imm32
28368
28369
28370
28371 8b/-> *(ebp+0x10) 6/r32/esi
28372
28373 81 5/subop/subtract %esi 8/imm32
28374 {
28375 $same-register-spilled-before?:loop:
28376
28377 39/compare %esi 1/r32/ecx
28378 0f 82/jump-if-addr< break/disp32
28379
28380 (lookup *esi *(esi+4))
28381
28382 39/compare *(eax+0x10) 3/r32/ebx
28383 0f 8c/jump-if-< break/disp32
28384
28385 81 7/subop/compare *(eax+0x18) 0/imm32
28386 74/jump-if-= $same-register-spilled-before?:continue/disp8
28387
28388 (lookup *(eax+0x18) *(eax+0x1c))
28389 (string-equal? %eax %edx)
28390 3d/compare-eax-and 0/imm32/false
28391 b8/copy-to-eax 1/imm32/true
28392 75/jump-if-!= $same-register-spilled-before?:end/disp8
28393 $same-register-spilled-before?:continue:
28394
28395 81 5/subop/subtract %esi 8/imm32
28396 e9/jump loop/disp32
28397 }
28398 $same-register-spilled-before?:false:
28399 b8/copy-to-eax 0/imm32/false
28400 $same-register-spilled-before?:end:
28401
28402 5f/pop-to-edi
28403 5e/pop-to-esi
28404 5b/pop-to-ebx
28405 5a/pop-to-edx
28406 59/pop-to-ecx
28407
28408 89/<- %esp 5/r32/ebp
28409 5d/pop-to-ebp
28410 c3/return
28411
28412
28413 clean-up-blocks:
28414
28415 55/push-ebp
28416 89/<- %ebp 4/r32/esp
28417
28418 50/push-eax
28419 51/push-ecx
28420 56/push-esi
28421
28422 8b/-> *(ebp+8) 6/r32/esi
28423
28424 8b/-> *(ebp+0xc) 1/r32/ecx
28425 {
28426 $clean-up-blocks:reclaim-loop:
28427
28428 8b/-> *esi 0/r32/eax
28429 3d/compare-eax-and 0/imm32
28430 0f 8e/jump-if-<= break/disp32
28431
28432 (lookup *(esi+eax-4) *(esi+eax))
28433
28434 39/compare *(eax+0x10) 1/r32/ecx
28435 0f 8c/jump-if-< break/disp32
28436 (pop %esi)
28437 (pop %esi)
28438 (pop %esi)
28439 e9/jump loop/disp32
28440 }
28441 $clean-up-blocks:end:
28442
28443 5e/pop-to-esi
28444 59/pop-to-ecx
28445 58/pop-to-eax
28446
28447 89/<- %esp 5/r32/ebp
28448 5d/pop-to-ebp
28449 c3/return
28450
28451 reg-in-function-outputs?:
28452
28453 55/push-ebp
28454 89/<- %ebp 4/r32/esp
28455
28456 51/push-ecx
28457
28458 8b/-> *(ebp+8) 0/r32/eax
28459 (lookup *(eax+0x10) *(eax+0x14))
28460 89/<- %ecx 0/r32/eax
28461
28462 {
28463 81 7/subop/compare %ecx 0/imm32
28464 74/jump-if-= break/disp8
28465
28466 (lookup *ecx *(ecx+4))
28467
28468 (lookup *(eax+0x18) *(eax+0x1c))
28469
28470 (string-equal? %eax *(ebp+0xc))
28471 3d/compare-eax-and 0/imm32/false
28472 75/jump-if-!= $reg-in-function-outputs?:end/disp8
28473
28474 (lookup *(ecx+8) *(ecx+0xc))
28475 89/<- %ecx 0/r32/eax
28476
28477 eb/jump loop/disp8
28478 }
28479
28480 b8/copy-to-eax 0/imm32
28481 $reg-in-function-outputs?:end:
28482
28483 59/pop-to-ecx
28484
28485 89/<- %esp 5/r32/ebp
28486 5d/pop-to-ebp
28487 c3/return
28488
28489 emit-subx-var-def:
28490
28491 55/push-ebp
28492 89/<- %ebp 4/r32/esp
28493
28494 50/push-eax
28495 51/push-ecx
28496 52/push-edx
28497
28498 8b/-> *(ebp+0xc) 0/r32/eax
28499
28500 (lookup *(eax+4) *(eax+8))
28501 89/<- %ecx 0/r32/eax
28502
28503 8b/-> *Curr-block-depth 0/r32/eax
28504 89/<- *(ecx+0x10) 0/r32/eax
28505
28506 (size-of %ecx)
28507 89/<- %edx 0/r32/eax
28508
28509 29/subtract-from *Curr-local-stack-offset 2/r32/edx
28510
28511 8b/-> *Curr-local-stack-offset 0/r32/eax
28512 89/<- *(ecx+0x14) 0/r32/eax
28513
28514 {
28515 (lookup *(ecx+8) *(ecx+0xc))
28516 (mu-array? %eax)
28517 3d/compare-eax-and 0/imm32/false
28518 0f 84/jump-if-= break/disp32
28519
28520 81 5/subop/subtract %edx 4/imm32
28521
28522 (emit-array-data-initialization *(ebp+8) %edx)
28523 e9/jump $emit-subx-var-def:end/disp32
28524 }
28525
28526
28527 {
28528 (lookup *(ecx+8) *(ecx+0xc))
28529 (mu-stream? %eax)
28530 3d/compare-eax-and 0/imm32/false
28531 0f 84/jump-if-= break/disp32
28532
28533 81 5/subop/subtract %edx 0xc/imm32
28534 (emit-array-data-initialization *(ebp+8) %edx)
28535
28536 (emit-indent *(ebp+8) *Curr-block-depth)
28537 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28538 (emit-indent *(ebp+8) *Curr-block-depth)
28539 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28540
28541 eb/jump $emit-subx-var-def:end/disp8
28542 }
28543
28544 {
28545 81 7/subop/compare %edx 0/imm32
28546 7e/jump-if-<= break/disp8
28547 (emit-indent *(ebp+8) *Curr-block-depth)
28548 (write-buffered *(ebp+8) "68/push 0/imm32\n")
28549
28550 81 5/subop/subtract %edx 4/imm32
28551
28552 eb/jump loop/disp8
28553 }
28554 $emit-subx-var-def:end:
28555
28556 5a/pop-to-edx
28557 59/pop-to-ecx
28558 58/pop-to-eax
28559
28560 89/<- %esp 5/r32/ebp
28561 5d/pop-to-ebp
28562 c3/return
28563
28564 emit-array-data-initialization:
28565
28566 55/push-ebp
28567 89/<- %ebp 4/r32/esp
28568
28569 (emit-indent *(ebp+8) *Curr-block-depth)
28570 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
28571 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28572 (write-buffered *(ebp+8) ")\n")
28573 (emit-indent *(ebp+8) *Curr-block-depth)
28574 (write-buffered *(ebp+8) "68/push ")
28575 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
28576 (write-buffered *(ebp+8) "/imm32\n")
28577 $emit-array-data-initialization:end:
28578
28579 89/<- %esp 5/r32/ebp
28580 5d/pop-to-ebp
28581 c3/return
28582
28583 emit-subx-stmt:
28584
28585 55/push-ebp
28586 89/<- %ebp 4/r32/esp
28587
28588 50/push-eax
28589 51/push-ecx
28590
28591
28592 8b/-> *(ebp+0xc) 1/r32/ecx
28593 (lookup *(ecx+4) *(ecx+8))
28594 89/<- %ecx 0/r32/eax
28595
28596 {
28597
28598 (string-equal? %ecx "copy-byte")
28599 3d/compare-eax-and 0/imm32/false
28600 0f 84/jump-if-= break/disp32
28601 (translate-mu-copy-byte-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28602 e9/jump $emit-subx-stmt:end/disp32
28603 }
28604
28605
28606 {
28607
28608 (string-equal? %ecx "length")
28609 3d/compare-eax-and 0/imm32/false
28610 0f 84/jump-if-= break/disp32
28611 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28612 e9/jump $emit-subx-stmt:end/disp32
28613 }
28614
28615 {
28616
28617 (string-equal? %ecx "index")
28618 3d/compare-eax-and 0/imm32/false
28619 0f 84/jump-if-= break/disp32
28620 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
28621 e9/jump $emit-subx-stmt:end/disp32
28622 }
28623
28624 {
28625
28626 (string-equal? %ecx "compute-offset")
28627 3d/compare-eax-and 0/imm32/false
28628 0f 84/jump-if-= break/disp32
28629 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28630 e9/jump $emit-subx-stmt:end/disp32
28631 }
28632
28633 {
28634
28635 (string-equal? %ecx "get")
28636 3d/compare-eax-and 0/imm32/false
28637 0f 84/jump-if-= break/disp32
28638 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
28639 e9/jump $emit-subx-stmt:end/disp32
28640 }
28641
28642 {
28643
28644 (string-equal? %ecx "allocate")
28645 3d/compare-eax-and 0/imm32/false
28646 0f 84/jump-if-= break/disp32
28647 (translate-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28648 e9/jump $emit-subx-stmt:end/disp32
28649 }
28650
28651 {
28652
28653 (string-equal? %ecx "copy-object")
28654 3d/compare-eax-and 0/imm32/false
28655 0f 84/jump-if-= break/disp32
28656 (translate-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28657 e9/jump $emit-subx-stmt:end/disp32
28658 }
28659
28660 {
28661
28662 (string-equal? %ecx "clear-object")
28663 3d/compare-eax-and 0/imm32/false
28664 0f 84/jump-if-= break/disp32
28665 (translate-mu-clear-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28666 e9/jump $emit-subx-stmt:end/disp32
28667 }
28668
28669 {
28670
28671 (string-equal? %ecx "populate")
28672 3d/compare-eax-and 0/imm32/false
28673 0f 84/jump-if-= break/disp32
28674 (translate-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28675 e9/jump $emit-subx-stmt:end/disp32
28676 }
28677
28678 {
28679
28680 (string-equal? %ecx "populate-stream")
28681 3d/compare-eax-and 0/imm32/false
28682 0f 84/jump-if-= break/disp32
28683 (translate-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28684 e9/jump $emit-subx-stmt:end/disp32
28685 }
28686
28687 {
28688
28689 (string-equal? %ecx "read-from-stream")
28690 3d/compare-eax-and 0/imm32/false
28691 0f 84/jump-if-= break/disp32
28692 (translate-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28693 e9/jump $emit-subx-stmt:end/disp32
28694 }
28695
28696 {
28697
28698 (string-equal? %ecx "write-to-stream")
28699 3d/compare-eax-and 0/imm32/false
28700 0f 84/jump-if-= break/disp32
28701 (translate-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
28702 e9/jump $emit-subx-stmt:end/disp32
28703 }
28704
28705
28706 (redundant-copy? *(ebp+0xc))
28707 3d/compare-eax-and 0/imm32/false
28708 75/jump-if-!= $emit-subx-stmt:end/disp8
28709
28710 {
28711 $emit-subx-stmt:check-for-primitive:
28712
28713 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
28714 3d/compare-eax-and 0/imm32
28715 74/jump-if-= break/disp8
28716 $emit-subx-stmt:primitive:
28717 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
28718 e9/jump $emit-subx-stmt:end/disp32
28719 }
28720
28721
28722 $emit-subx-stmt:call:
28723 (emit-call *(ebp+8) *(ebp+0xc))
28724 $emit-subx-stmt:end:
28725
28726 59/pop-to-ecx
28727 58/pop-to-eax
28728
28729 89/<- %esp 5/r32/ebp
28730 5d/pop-to-ebp
28731 c3/return
28732
28733 redundant-copy?:
28734
28735 55/push-ebp
28736 89/<- %ebp 4/r32/esp
28737
28738 56/push-esi
28739 57/push-edi
28740
28741 8b/-> *(ebp+8) 6/r32/esi
28742
28743 (lookup *(esi+4) *(esi+8))
28744 (string-equal? %eax "copy")
28745 3d/compare-eax-and 0/imm32/false
28746 0f 84/jump-if-= $redundant-copy?:end/disp32
28747
28748 (lookup *(esi+0x14) *(esi+0x18))
28749 (lookup *eax *(eax+4))
28750 (lookup *(eax+0x18) *(eax+0x1c))
28751
28752 3d/compare-eax-and 0/imm32
28753 74/jump-if-= $redundant-copy?:end/disp8
28754 89/<- %edi 0/r32/eax
28755
28756 (lookup *(esi+0xc) *(esi+0x10))
28757
28758 81 7/subop/compare *(eax+0x10) 0/imm32/false
28759 {
28760 74/jump-if-= break/disp8
28761 b8/copy-to-eax 0/imm32/false
28762 e9/jump $redundant-copy?:end/disp32
28763 }
28764 (lookup *eax *(eax+4))
28765 (lookup *(eax+0x18) *(eax+0x1c))
28766
28767 3d/compare-eax-and 0/imm32
28768 74/jump-if-= $redundant-copy?:end/disp8
28769 (string-equal? %eax %edi)
28770 $redundant-copy?:end:
28771
28772 5f/pop-to-edi
28773 5e/pop-to-esi
28774
28775 89/<- %esp 5/r32/ebp
28776 5d/pop-to-ebp
28777 c3/return
28778
28779 translate-mu-length-stmt:
28780
28781 55/push-ebp
28782 89/<- %ebp 4/r32/esp
28783
28784 50/push-eax
28785 51/push-ecx
28786 52/push-edx
28787 53/push-ebx
28788 56/push-esi
28789
28790 8b/-> *(ebp+0xc) 6/r32/esi
28791
28792 (lookup *(esi+0xc) *(esi+0x10))
28793 (lookup *eax *(eax+4))
28794 89/<- %ebx 0/r32/eax
28795
28796 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
28797 89/<- %ecx 0/r32/eax
28798
28799 (lookup *(esi+0x14) *(esi+0x18))
28800 (lookup *eax *(eax+4))
28801 (lookup *(eax+0x18) *(eax+0x1c))
28802 89/<- %edx 0/r32/eax
28803
28804 {
28805 81 7/subop/compare %ecx 1/imm32
28806 75/jump-if-!= break/disp8
28807 $translate-mu-length-stmt:size-1:
28808 (emit-save-size-to *(ebp+8) %ebx %edx)
28809 e9/jump $translate-mu-length-stmt:end/disp32
28810 }
28811
28812 {
28813 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
28814 3d/compare-eax-and 0/imm32/false
28815 74/jump-if-= break/disp8
28816 81 7/subop/compare %ecx 0xff/imm32
28817 7f/jump-if-> break/disp8
28818 $translate-mu-length-stmt:size-power-of-2:
28819 (emit-save-size-to *(ebp+8) %ebx %edx)
28820 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
28821 e9/jump $translate-mu-length-stmt:end/disp32
28822 }
28823
28824
28825 {
28826 $translate-mu-length-stmt:complex:
28827 (string-equal? %edx "eax")
28828 3d/compare-eax-and 0/imm32/false
28829 75/break-if-!= break/disp8
28830 (emit-indent *(ebp+8) *Curr-block-depth)
28831 (write-buffered *(ebp+8) "50/push-eax\n")
28832 }
28833 {
28834 (string-equal? %edx "ecx")
28835 3d/compare-eax-and 0/imm32/false
28836 75/break-if-!= break/disp8
28837 (emit-indent *(ebp+8) *Curr-block-depth)
28838 (write-buffered *(ebp+8) "51/push-ecx\n")
28839 }
28840 {
28841 (string-equal? %edx "edx")
28842 3d/compare-eax-and 0/imm32/false
28843 75/break-if-!= break/disp8
28844 (emit-indent *(ebp+8) *Curr-block-depth)
28845 (write-buffered *(ebp+8) "52/push-edx\n")
28846 }
28847
28848 (emit-save-size-to *(ebp+8) %ebx "eax")
28849 (emit-indent *(ebp+8) *Curr-block-depth)
28850 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
28851 (emit-indent *(ebp+8) *Curr-block-depth)
28852 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
28853 (write-int32-hex-buffered *(ebp+8) %ecx)
28854 (write-buffered *(ebp+8) "/imm32\n")
28855 (emit-indent *(ebp+8) *Curr-block-depth)
28856 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
28857 {
28858 (string-equal? %edx "eax")
28859 3d/compare-eax-and 0/imm32/false
28860 75/break-if-!= break/disp8
28861 (emit-indent *(ebp+8) *Curr-block-depth)
28862 (write-buffered *(ebp+8) "89/<- %")
28863 (write-buffered *(ebp+8) %edx)
28864 (write-buffered *(ebp+8) " 0/r32/eax\n")
28865 }
28866
28867 {
28868 (string-equal? %edx "edx")
28869 3d/compare-eax-and 0/imm32/false
28870 75/break-if-!= break/disp8
28871 (emit-indent *(ebp+8) *Curr-block-depth)
28872 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
28873 }
28874 {
28875 (string-equal? %edx "ecx")
28876 3d/compare-eax-and 0/imm32/false
28877 75/break-if-!= break/disp8
28878 (emit-indent *(ebp+8) *Curr-block-depth)
28879 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
28880 }
28881 {
28882 (string-equal? %edx "eax")
28883 3d/compare-eax-and 0/imm32/false
28884 75/break-if-!= break/disp8
28885 (emit-indent *(ebp+8) *Curr-block-depth)
28886 (write-buffered *(ebp+8) "58/pop-to-eax\n")
28887 }
28888 $translate-mu-length-stmt:end:
28889
28890 5e/pop-to-esi
28891 5b/pop-to-ebx
28892 5a/pop-to-edx
28893 59/pop-to-ecx
28894 58/pop-to-eax
28895
28896 89/<- %esp 5/r32/ebp
28897 5d/pop-to-ebp
28898 c3/return
28899
28900 array-element-size:
28901
28902 55/push-ebp
28903 89/<- %ebp 4/r32/esp
28904
28905 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
28906 (size-of-type-id-as-array-element %eax)
28907 $array-element-size:end:
28908
28909 89/<- %esp 5/r32/ebp
28910 5d/pop-to-ebp
28911 c3/return
28912
28913 array-element-type-id:
28914
28915
28916 55/push-ebp
28917 89/<- %ebp 4/r32/esp
28918
28919 8b/-> *(ebp+8) 0/r32/eax
28920
28921 (lookup *(eax+8) *(eax+0xc))
28922
28923 3d/compare-eax-with 0/imm32
28924 0f 84/jump-if-== $array-element-type-id:error0/disp32
28925
28926 81 7/subop/compare *eax 0/imm32/false
28927 0f 85/jump-if-!= $array-element-type-id:error1/disp32
28928
28929 {
28930 50/push-eax
28931 (lookup *(eax+4) *(eax+8))
28932 (simple-mu-type? %eax 2)
28933 3d/compare-eax-with 0/imm32/false
28934 58/pop-to-eax
28935 74/jump-if-= break/disp8
28936 $array-element-type-id:skip-addr:
28937 (lookup *(eax+0xc) *(eax+0x10))
28938 }
28939
28940 3d/compare-eax-with 0/imm32
28941 0f 84/jump-if-= $array-element-type-id:error2/disp32
28942
28943 81 7/subop/compare *eax 0/imm32/false
28944 0f 85/jump-if-!= $array-element-type-id:error2/disp32
28945
28946 {
28947 50/push-eax
28948 (lookup *(eax+4) *(eax+8))
28949 (simple-mu-type? %eax 3)
28950 3d/compare-eax-with 0/imm32/false
28951 58/pop-to-eax
28952 $array-element-type-id:no-array:
28953 0f 84/jump-if-= $array-element-type-id:error2/disp32
28954 }
28955 $array-element-type-id:skip-array:
28956
28957 (lookup *(eax+0xc) *(eax+0x10))
28958
28959 3d/compare-eax-with 0/imm32
28960 0f 84/jump-if-= $array-element-type-id:error2/disp32
28961
28962 81 7/subop/compare *eax 0/imm32/false
28963 0f 85/jump-if-!= $array-element-type-id:error2/disp32
28964
28965 (lookup *(eax+4) *(eax+8))
28966
28967
28968 {
28969 81 7/subop/compare *eax 0/imm32/false
28970 75/jump-if-!= break/disp8
28971 (lookup *(eax+4) *(eax+8))
28972 }
28973
28974 8b/-> *(eax+4) 0/r32/eax
28975 $array-element-type-id:end:
28976
28977 89/<- %esp 5/r32/ebp
28978 5d/pop-to-ebp
28979 c3/return
28980
28981 $array-element-type-id:error0:
28982 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
28983 50/push-eax
28984 8b/-> *(ebp+8) 0/r32/eax
28985 (lookup *eax *(eax+4))
28986 (write-buffered *(ebp+0xc) %eax)
28987 58/pop-to-eax
28988 (write-buffered *(ebp+0xc) "' has no type\n")
28989 (flush *(ebp+0xc))
28990 (stop *(ebp+0x10) 1)
28991
28992
28993 $array-element-type-id:error1:
28994 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
28995 50/push-eax
28996 8b/-> *(ebp+8) 0/r32/eax
28997 (lookup *eax *(eax+4))
28998 (write-buffered *(ebp+0xc) %eax)
28999 58/pop-to-eax
29000 (write-buffered *(ebp+0xc) "' has atomic type ")
29001 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
29002 (write-buffered *(ebp+0xc) Newline)
29003 (flush *(ebp+0xc))
29004 (stop *(ebp+0x10) 1)
29005
29006
29007 $array-element-type-id:error2:
29008 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
29009 50/push-eax
29010 8b/-> *(ebp+8) 0/r32/eax
29011 (lookup *eax *(eax+4))
29012 (write-buffered *(ebp+0xc) %eax)
29013 58/pop-to-eax
29014 (write-buffered *(ebp+0xc) "' has non-array type\n")
29015 (flush *(ebp+0xc))
29016 (stop *(ebp+0x10) 1)
29017
29018
29019 size-of-type-id-as-array-element:
29020
29021 55/push-ebp
29022 89/<- %ebp 4/r32/esp
29023
29024 8b/-> *(ebp+8) 0/r32/eax
29025
29026 3d/compare-eax-and 8/imm32/byte
29027 {
29028 75/jump-if-!= break/disp8
29029 b8/copy-to-eax 1/imm32
29030 eb/jump $size-of-type-id-as-array-element:end/disp8
29031 }
29032
29033 (size-of-type-id %eax)
29034 $size-of-type-id-as-array-element:end:
29035
29036 89/<- %esp 5/r32/ebp
29037 5d/pop-to-ebp
29038 c3/return
29039
29040 emit-save-size-to:
29041
29042 55/push-ebp
29043 89/<- %ebp 4/r32/esp
29044
29045 50/push-eax
29046 53/push-ebx
29047
29048 8b/-> *(ebp+0xc) 3/r32/ebx
29049 (emit-indent *(ebp+8) *Curr-block-depth)
29050 (write-buffered *(ebp+8) "8b/-> *")
29051
29052 {
29053 81 7/subop/compare *(ebx+0x18)) 0/imm32
29054 74/jump-if-= break/disp8
29055 $emit-save-size-to:emit-base-from-register:
29056 (lookup *(ebx+0x18) *(ebx+0x1c))
29057 (write-buffered *(ebp+8) %eax)
29058 eb/jump $emit-save-size-to:emit-output/disp8
29059 }
29060
29061 {
29062 81 7/subop/compare *(ebx+0x14)) 0/imm32
29063 74/jump-if-= break/disp8
29064 $emit-save-size-to:emit-base-from-stack:
29065 (write-buffered *(ebp+8) "(ebp+")
29066 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
29067 (write-buffered *(ebp+8) ")")
29068 }
29069 $emit-save-size-to:emit-output:
29070 (write-buffered *(ebp+8) " ")
29071 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
29072 (write-int32-hex-buffered *(ebp+8) *eax)
29073 (write-buffered *(ebp+8) "/r32\n")
29074 $emit-save-size-to:end:
29075
29076 5b/pop-to-ebx
29077 58/pop-to-eax
29078
29079 89/<- %esp 5/r32/ebp
29080 5d/pop-to-ebp
29081 c3/return
29082
29083 emit-divide-by-shift-right:
29084
29085 55/push-ebp
29086 89/<- %ebp 4/r32/esp
29087
29088 50/push-eax
29089
29090 (emit-indent *(ebp+8) *Curr-block-depth)
29091 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
29092 (write-buffered *(ebp+8) *(ebp+0xc))
29093 (write-buffered *(ebp+8) Space)
29094 (num-shift-rights *(ebp+0x10))
29095 (write-int32-hex-buffered *(ebp+8) %eax)
29096 (write-buffered *(ebp+8) "/imm8\n")
29097 $emit-divide-by-shift-right:end:
29098
29099 58/pop-to-eax
29100
29101 89/<- %esp 5/r32/ebp
29102 5d/pop-to-ebp
29103 c3/return
29104
29105 translate-mu-copy-byte-stmt:
29106
29107 55/push-ebp
29108 89/<- %ebp 4/r32/esp
29109
29110 50/push-eax
29111 56/push-esi
29112
29113 8b/-> *(ebp+0xc) 6/r32/esi
29114
29115 (emit-indent *(ebp+8) *Curr-block-depth)
29116 (write-buffered *(ebp+8) "8a/byte->")
29117
29118 (lookup *(esi+0xc) *(esi+0x10))
29119 (emit-subx-var-as-rm32 *(ebp+8) %eax)
29120
29121 (lookup *(esi+0x14) *(esi+0x18))
29122 (lookup *eax *(eax+4))
29123 (lookup *(eax+0x18) *(eax+0x1c))
29124 (maybe-get Mu-registers %eax 0xc)
29125 (write-buffered *(ebp+8) Space)
29126 (write-int32-hex-buffered *(ebp+8) *eax)
29127 (write-buffered *(ebp+8) "/r32\n")
29128
29129 (emit-indent *(ebp+8) *Curr-block-depth)
29130 (write-buffered *(ebp+8) "81 4/subop/and %")
29131 8b/-> *(ebp+0xc) 0/r32/eax
29132 (lookup *(esi+0x14) *(esi+0x18))
29133 (lookup *eax *(eax+4))
29134 (lookup *(eax+0x18) *(eax+0x1c))
29135 (write-buffered *(ebp+8) %eax)
29136 (write-buffered *(ebp+8) " 0xff/imm32\n")
29137 $translate-mu-copy-byte-stmt:end:
29138
29139 5e/pop-to-esi
29140 58/pop-to-eax
29141
29142 89/<- %esp 5/r32/ebp
29143 5d/pop-to-ebp
29144 c3/return
29145
29146
29147 translate-mu-index-stmt:
29148
29149 55/push-ebp
29150 89/<- %ebp 4/r32/esp
29151
29152 53/push-ebx
29153
29154 8b/-> *(ebp+0xc) 3/r32/ebx
29155
29156 (lookup *(ebx+0xc) *(ebx+0x10))
29157 (lookup *eax *(eax+4))
29158 89/<- %ebx 0/r32/eax
29159
29160 (emit-mu-index-bounds-check *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
29161
29162 {
29163 81 7/subop/compare *(ebx+0x18) 0/imm32
29164 74/jump-if-= break/disp8
29165
29166 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
29167 eb/jump $translate-mu-index-stmt:end/disp8
29168 }
29169
29170 {
29171 81 7/subop/compare *(ebx+0x14) 0/imm32
29172 74/jump-if-= break/disp8
29173
29174 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
29175 eb/jump $translate-mu-index-stmt:end/disp8
29176 }
29177 $translate-mu-index-stmt:end:
29178
29179 5b/pop-to-ebx
29180
29181 89/<- %esp 5/r32/ebp
29182 5d/pop-to-ebp
29183 c3/return
29184
29185 $translate-mu-index-stmt:error1:
29186 (write-buffered *(ebp+0x14) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
29187 (flush *(ebp+0x14))
29188 (stop *(ebp+0x18) 1)
29189
29190
29191 $translate-mu-index-stmt:error2:
29192 (write-buffered *(ebp+0x14) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
29193 (flush *(ebp+0x14))
29194 (stop *(ebp+0x18) 1)
29195
29196
29197 emit-mu-index-bounds-check:
29198
29199 55/push-ebp
29200 89/<- %ebp 4/r32/esp
29201
29202 50/push-eax
29203 51/push-ecx
29204 52/push-edx
29205 53/push-ebx
29206
29207 8b/-> *(ebp+0xc) 1/r32/ecx
29208
29209 (emit-indent *(ebp+8) *Curr-block-depth)
29210 (write-buffered *(ebp+8) "(__check-mu-array-bounds ")
29211 $emit-mu-index-bounds-check:compute-base:
29212
29213 (lookup *(ecx+0xc) *(ecx+0x10))
29214 (lookup *eax *(eax+4))
29215 89/<- %ebx 0/r32/eax
29216 $emit-mu-index-bounds-check:emit-index:
29217
29218 (lookup *(ecx+0xc) *(ecx+0x10))
29219 (lookup *(eax+8) *(eax+0xc))
29220 (lookup *eax *(eax+4))
29221 89/<- %edx 0/r32/eax
29222
29223 81 7/subop/compare *(edx+0x18) 0/imm32
29224 {
29225 0f 84/jump-if-= break/disp32
29226 $emit-mu-index-bounds-check:emit-register-index:
29227 (write-buffered *(ebp+8) "%")
29228 (lookup *(edx+0x18) *(edx+0x1c))
29229 (write-buffered *(ebp+8) %eax)
29230 eb/jump $emit-mu-index-bounds-check:index-done/disp8
29231 }
29232
29233 $emit-mu-index-bounds-check:emit-literal-index:
29234 (lookup *(edx+8) *(edx+0xc))
29235 (simple-mu-type? %eax 0)
29236 3d/compare-eax-and 0/imm32/false
29237 {
29238 0f 84/jump-if-= break/disp32
29239 (lookup *edx *(edx+4))
29240 (write-buffered *(ebp+8) %eax)
29241 }
29242 $emit-mu-index-bounds-check:index-done:
29243 (write-buffered *(ebp+8) " ")
29244 $emit-mu-index-bounds-check:emit-element-size:
29245
29246 {
29247 {
29248 (lookup *(edx+8) *(edx+0xc))
29249 (simple-mu-type? %eax 0)
29250 3d/compare-eax-and 0/imm32/false
29251 75/jump-if-!= break/disp8
29252 (lookup *(edx+8) *(edx+0xc))
29253 (simple-mu-type? %eax 1)
29254 3d/compare-eax-and 0/imm32/false
29255 75/jump-if-!= break/disp8
29256 eb/jump $emit-mu-index-bounds-check:emit-element-size-offset/disp8
29257 }
29258 $emit-mu-index-bounds-check:emit-int-register-index:
29259 (array-element-size %ebx *(ebp+0x14) *(ebp+0x18))
29260 (write-int32-hex-buffered *(ebp+8) %eax)
29261 e9/jump $emit-mu-index-bounds-check:emit-base/disp32
29262 }
29263 $emit-mu-index-bounds-check:emit-element-size-offset:
29264
29265 (lookup *(edx+8) *(edx+0xc))
29266 81 7/subop/compare *eax 0/imm32/false
29267 {
29268 75/jump-if-!= break/disp8
29269 (lookup *(eax+4) *(eax+8))
29270 (simple-mu-type? %eax 7)
29271 3d/compare-eax-and 0/imm32/false
29272 {
29273 0f 84/jump-if-= break/disp32
29274 $emit-mu-index-bounds-check:emit-offset-register-index:
29275 (write-buffered *(ebp+8) "1")
29276 }
29277 }
29278 $emit-mu-index-bounds-check:emit-base:
29279
29280 81 7/subop/compare *(ebx+0x18) 0/imm32
29281 {
29282 74/jump-if-= break/disp8
29283 (write-buffered *(ebp+8) " *")
29284 (lookup *(ebx+0x18) *(ebx+0x1c))
29285 (write-buffered *(ebp+8) %eax)
29286 e9/jump $emit-mu-index-bounds-check:emit-function-name/disp32
29287 }
29288
29289 (write-buffered *(ebp+8) " *(ebp+")
29290 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
29291 (write-buffered *(ebp+8) ")")
29292 $emit-mu-index-bounds-check:emit-function-name:
29293
29294 (write-buffered *(ebp+8) " \"")
29295 8b/-> *(ebp+0x10) 1/r32/ecx
29296 (lookup *ecx *(ecx+4))
29297 (write-buffered *(ebp+8) %eax)
29298 (write-buffered *(ebp+8) "\"")
29299 $emit-mu-index-bounds-check:emit-array-name:
29300
29301 (write-buffered *(ebp+8) " \"")
29302 (lookup *ebx *(ebx+4))
29303 (write-buffered *(ebp+8) %eax)
29304 (write-buffered *(ebp+8) "\")\n")
29305 $emit-mu-index-bounds-check:end:
29306
29307 5b/pop-to-ebx
29308 5a/pop-to-edx
29309 59/pop-to-ecx
29310 58/pop-to-eax
29311
29312 89/<- %esp 5/r32/ebp
29313 5d/pop-to-ebp
29314 c3/return
29315
29316 translate-mu-index-stmt-with-array-in-register:
29317
29318 55/push-ebp
29319 89/<- %ebp 4/r32/esp
29320
29321 50/push-eax
29322 51/push-ecx
29323 52/push-edx
29324 53/push-ebx
29325
29326 (emit-indent *(ebp+8) *Curr-block-depth)
29327 (write-buffered *(ebp+8) "8d/copy-address *(")
29328
29329 $translate-mu-index-stmt-with-array-in-register:emit-base:
29330
29331 8b/-> *(ebp+0xc) 1/r32/ecx
29332
29333 (lookup *(ecx+0xc) *(ecx+0x10))
29334 (lookup *eax *(eax+4))
29335 89/<- %ebx 0/r32/eax
29336
29337 (lookup *(ebx+0x18) *(ebx+0x1c))
29338 (write-buffered *(ebp+8) %eax)
29339 (write-buffered *(ebp+8) " + ")
29340
29341 (lookup *(ecx+0xc) *(ecx+0x10))
29342 (lookup *(eax+8) *(eax+0xc))
29343 (lookup *eax *(eax+4))
29344 89/<- %edx 0/r32/eax
29345
29346 81 7/subop/compare *(edx+0x18) 0/imm32
29347 {
29348 0f 84/jump-if-= break/disp32
29349 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
29350
29351 (lookup *(edx+8) *(edx+0xc))
29352 (simple-mu-type? %eax 1)
29353 3d/compare-eax-and 0/imm32/false
29354 {
29355 0f 84/jump-if-= break/disp32
29356 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
29357
29358
29359 (lookup *(edx+0x18) *(edx+0x1c))
29360 (write-buffered *(ebp+8) %eax)
29361 (write-buffered *(ebp+8) "<<")
29362
29363
29364 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29365 (num-shift-rights %eax)
29366 (write-int32-hex-buffered *(ebp+8) %eax)
29367 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
29368 }
29369
29370 (lookup *(edx+8) *(edx+0xc))
29371 81 7/subop/compare *eax 0/imm32/false
29372 0f 85/jump-if-!= $translate-mu-index-stmt:error2/disp32
29373
29374 (lookup *(eax+4) *(eax+8))
29375 (simple-mu-type? %eax 7)
29376 3d/compare-eax-and 0/imm32/false
29377 {
29378 0f 84/jump-if-= break/disp32
29379
29380 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
29381 (lookup *(edx+0x18) *(edx+0x1c))
29382 (write-buffered *(ebp+8) %eax)
29383 }
29384 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
29385 (write-buffered *(ebp+8) " + 4) ")
29386 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
29387 }
29388
29389 (lookup *(edx+8) *(edx+0xc))
29390 (simple-mu-type? %eax 0)
29391 3d/compare-eax-and 0/imm32/false
29392 {
29393 0f 84/jump-if-= break/disp32
29394 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
29395
29396 (lookup *edx *(edx+4))
29397 (parse-hex-int %eax)
29398 89/<- %edx 0/r32/eax
29399
29400 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29401 f7 4/subop/multiply-into-edx-eax %edx
29402
29403 05/add-to-eax 4/imm32
29404
29405
29406 (write-int32-hex-buffered *(ebp+8) %eax)
29407 (write-buffered *(ebp+8) ") ")
29408 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
29409 }
29410
29411 e9/jump $translate-mu-index-stmt:error1/disp32
29412 $translate-mu-index-stmt-with-array-in-register:emit-output:
29413
29414 8b/-> *(ebp+0xc) 1/r32/ecx
29415 (lookup *(ecx+0x14) *(ecx+0x18))
29416 (lookup *eax *(eax+4))
29417 (lookup *(eax+0x18) *(eax+0x1c))
29418 (get Mu-registers %eax 0xc "Mu-registers")
29419 (write-int32-hex-buffered *(ebp+8) *eax)
29420 (write-buffered *(ebp+8) "/r32\n")
29421 $translate-mu-index-stmt-with-array-in-register:end:
29422
29423 5b/pop-to-ebx
29424 5a/pop-to-edx
29425 59/pop-to-ecx
29426 58/pop-to-eax
29427
29428 89/<- %esp 5/r32/ebp
29429 5d/pop-to-ebp
29430 c3/return
29431
29432 translate-mu-index-stmt-with-array-on-stack:
29433
29434 55/push-ebp
29435 89/<- %ebp 4/r32/esp
29436
29437 50/push-eax
29438 51/push-ecx
29439 52/push-edx
29440 53/push-ebx
29441
29442 (emit-indent *(ebp+8) *Curr-block-depth)
29443 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
29444
29445 8b/-> *(ebp+0xc) 0/r32/eax
29446 (lookup *(eax+0xc) *(eax+0x10))
29447 89/<- %edx 0/r32/eax
29448
29449 (lookup *eax *(eax+4))
29450 89/<- %ecx 0/r32/eax
29451
29452 (lookup *(edx+8) *(edx+0xc))
29453
29454 (lookup *eax *(eax+4))
29455 89/<- %edx 0/r32/eax
29456
29457 81 7/subop/compare *(edx+0x18) 0/imm32
29458 {
29459 0f 84/jump-if-= break/disp32
29460 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
29461
29462 (lookup *(edx+8) *(edx+0xc))
29463 (simple-mu-type? %eax 1)
29464 3d/compare-eax-and 0/imm32/false
29465 {
29466 0f 84/jump-if-= break/disp32
29467 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
29468
29469
29470 (lookup *(edx+0x18) *(edx+0x1c))
29471 (write-buffered *(ebp+8) %eax)
29472 (write-buffered *(ebp+8) "<<")
29473
29474
29475 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
29476 (num-shift-rights %eax)
29477 (write-int32-hex-buffered *(ebp+8) %eax)
29478
29479 (write-buffered *(ebp+8) " + ")
29480
29481 8b/-> *(ecx+0x14) 0/r32/eax
29482 05/add-to-eax 4/imm32
29483 (write-int32-hex-buffered *(ebp+8) %eax)
29484 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
29485 }
29486
29487 (lookup *(edx+8) *(edx+0xc))
29488 81 7/subop/compare *eax 0/imm32/false
29489 0f 85/jump-if-!= $translate-mu-index-stmt:error2/disp32
29490
29491 (lookup *(eax+4) *(eax+8))
29492 (simple-mu-type? %eax 7)
29493 3d/compare-eax-and 0/imm32/false
29494 {
29495 0f 84/jump-if-= break/disp32
29496
29497 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
29498 (lookup *(edx+0x18) *(edx+0x1c))
29499 (write-buffered *(ebp+8) %eax)
29500 }
29501 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
29502 (write-buffered *(ebp+8) ") ")
29503 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
29504 }
29505
29506 (lookup *(edx+8) *(edx+0xc))
29507 (simple-mu-type? %eax 0)
29508 3d/compare-eax-and 0/imm32/false
29509 {
29510 0f 84/jump-if-= break/disp32
29511 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
29512
29513 (lookup *edx *(edx+4))
29514 (parse-hex-int %eax)
29515 89/<- %edx 0/r32/eax
29516
29517 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
29518 f7 4/subop/multiply-into-edx-eax %edx
29519
29520 03/add *(ecx+0x14) 0/r32/eax
29521
29522 05/add-to-eax 4/imm32
29523
29524
29525 (write-int32-hex-buffered *(ebp+8) %eax)
29526 (write-buffered *(ebp+8) ") ")
29527 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
29528 }
29529
29530 e9/jump $translate-mu-index-stmt:error1/disp32
29531 $translate-mu-index-stmt-with-array-on-stack:emit-output:
29532
29533 8b/-> *(ebp+0xc) 0/r32/eax
29534 (lookup *(eax+0x14) *(eax+0x18))
29535 (lookup *eax *(eax+4))
29536 (lookup *(eax+0x18) *(eax+0x1c))
29537 (get Mu-registers %eax 0xc "Mu-registers")
29538 (write-int32-hex-buffered *(ebp+8) *eax)
29539 (write-buffered *(ebp+8) "/r32\n")
29540 $translate-mu-index-stmt-with-array-on-stack:end:
29541
29542 5b/pop-to-ebx
29543 5a/pop-to-edx
29544 59/pop-to-ecx
29545 58/pop-to-eax
29546
29547 89/<- %esp 5/r32/ebp
29548 5d/pop-to-ebp
29549 c3/return
29550
29551 translate-mu-compute-index-stmt:
29552
29553 55/push-ebp
29554 89/<- %ebp 4/r32/esp
29555
29556 50/push-eax
29557 51/push-ecx
29558 52/push-edx
29559 53/push-ebx
29560
29561 (emit-indent *(ebp+8) *Curr-block-depth)
29562 (write-buffered *(ebp+8) "69/multiply")
29563
29564 8b/-> *(ebp+0xc) 1/r32/ecx
29565
29566 (lookup *(ecx+0xc) *(ecx+0x10))
29567 89/<- %ebx 0/r32/eax
29568 $translate-mu-compute-index-stmt:emit-index:
29569 (lookup *(ebx+8) *(ebx+0xc))
29570 (emit-subx-var-as-rm32 *(ebp+8) %eax)
29571 (write-buffered *(ebp+8) Space)
29572 $translate-mu-compute-index-stmt:emit-elem-size:
29573
29574 (lookup *ebx *(ebx+4))
29575 89/<- %ebx 0/r32/eax
29576
29577 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
29578 (write-int32-hex-buffered *(ebp+8) %eax)
29579 (write-buffered *(ebp+8) "/imm32 ")
29580 $translate-mu-compute-index-stmt:emit-output:
29581
29582 (lookup *(ecx+0x14) *(ecx+0x18))
29583 (lookup *eax *(eax+4))
29584 (lookup *(eax+0x18) *(eax+0x1c))
29585 (get Mu-registers %eax 0xc "Mu-registers")
29586 (write-int32-hex-buffered *(ebp+8) *eax)
29587 (write-buffered *(ebp+8) "/r32\n")
29588 $translate-mu-compute-index-stmt:end:
29589
29590 5b/pop-to-ebx
29591 5a/pop-to-edx
29592 59/pop-to-ecx
29593 58/pop-to-eax
29594
29595 89/<- %esp 5/r32/ebp
29596 5d/pop-to-ebp
29597 c3/return
29598
29599 translate-mu-get-stmt:
29600
29601 55/push-ebp
29602 89/<- %ebp 4/r32/esp
29603
29604 50/push-eax
29605 51/push-ecx
29606 52/push-edx
29607
29608 (emit-indent *(ebp+8) *Curr-block-depth)
29609 (write-buffered *(ebp+8) "8d/copy-address ")
29610
29611 8b/-> *(ebp+0xc) 1/r32/ecx
29612
29613 (mu-get-offset %ecx)
29614 89/<- %edx 0/r32/eax
29615
29616 (lookup *(ecx+0xc) *(ecx+0x10))
29617 (lookup *eax *(eax+4))
29618
29619 81 7/subop/compare *(eax+0x18) 0/imm32
29620 {
29621 0f 84/jump-if-= break/disp32
29622 $translate-mu-get-stmt:emit-register-input:
29623
29624 (write-buffered *(ebp+8) "*(")
29625 (lookup *(eax+0x18) *(eax+0x1c))
29626 (write-buffered *(ebp+8) %eax)
29627 (write-buffered *(ebp+8) " + ")
29628 (write-int32-hex-buffered *(ebp+8) %edx)
29629 (write-buffered *(ebp+8) ") ")
29630 e9/jump $translate-mu-get-stmt:emit-output/disp32
29631 }
29632
29633 {
29634 $translate-mu-get-stmt:emit-stack-input:
29635
29636 (write-buffered *(ebp+8) "*(ebp+")
29637 03/add *(eax+0x14) 2/r32/edx
29638 (write-int32-hex-buffered *(ebp+8) %edx)
29639 (write-buffered *(ebp+8) ") ")
29640 eb/jump $translate-mu-get-stmt:emit-output/disp8
29641 }
29642 $translate-mu-get-stmt:emit-output:
29643
29644 (lookup *(ecx+0x14) *(ecx+0x18))
29645 (lookup *eax *(eax+4))
29646
29647 (lookup *(eax+0x18) *(eax+0x1c))
29648 (get Mu-registers %eax 0xc "Mu-registers")
29649 (write-int32-hex-buffered *(ebp+8) *eax)
29650 (write-buffered *(ebp+8) "/r32\n")
29651 $translate-mu-get-stmt:end:
29652
29653 5a/pop-to-edx
29654 59/pop-to-ecx
29655 58/pop-to-eax
29656
29657 89/<- %esp 5/r32/ebp
29658 5d/pop-to-ebp
29659 c3/return
29660
29661 translate-mu-copy-object-stmt:
29662
29663 55/push-ebp
29664 89/<- %ebp 4/r32/esp
29665
29666 50/push-eax
29667
29668 (emit-indent *(ebp+8) *Curr-block-depth)
29669 (write-buffered *(ebp+8) "(copy-bytes")
29670
29671 8b/-> *(ebp+0xc) 0/r32/eax
29672
29673 (lookup *(eax+0xc) *(eax+0x10))
29674 (emit-subx-call-operand *(ebp+8) %eax)
29675
29676 (lookup *(eax+8) *(eax+0xc))
29677 (emit-subx-call-operand *(ebp+8) %eax)
29678
29679 (write-buffered *(ebp+8) Space)
29680 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
29681 (write-int32-hex-buffered *(ebp+8) %eax)
29682 (write-buffered *(ebp+8) ")\n")
29683 $translate-mu-copy-object-stmt:end:
29684
29685 58/pop-to-eax
29686
29687 89/<- %esp 5/r32/ebp
29688 5d/pop-to-ebp
29689 c3/return
29690
29691 translate-mu-clear-object-stmt:
29692
29693 55/push-ebp
29694 89/<- %ebp 4/r32/esp
29695
29696 50/push-eax
29697
29698 (emit-indent *(ebp+8) *Curr-block-depth)
29699 (write-buffered *(ebp+8) "(zero-out")
29700
29701 8b/-> *(ebp+0xc) 0/r32/eax
29702
29703 (lookup *(eax+0xc) *(eax+0x10))
29704
29705 (emit-subx-call-operand *(ebp+8) %eax)
29706 (write-buffered *(ebp+8) Space)
29707 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
29708 (write-int32-hex-buffered *(ebp+8) %eax)
29709 (write-buffered *(ebp+8) ")\n")
29710 $translate-mu-clear-object-stmt:end:
29711
29712 58/pop-to-eax
29713
29714 89/<- %esp 5/r32/ebp
29715 5d/pop-to-ebp
29716 c3/return
29717
29718 translate-mu-allocate-stmt:
29719
29720 55/push-ebp
29721 89/<- %ebp 4/r32/esp
29722
29723 50/push-eax
29724 56/push-esi
29725 57/push-edi
29726
29727 8b/-> *(ebp+0xc) 6/r32/esi
29728
29729 (lookup *(esi+0xc) *(esi+0x10))
29730 89/<- %edi 0/r32/eax
29731
29732 (emit-indent *(ebp+8) *Curr-block-depth)
29733 (write-buffered *(ebp+8) "(allocate Heap ")
29734 (addr-handle-payload-size %edi *(ebp+0x10) *(ebp+0x14))
29735 (write-int32-hex-buffered *(ebp+8) %eax)
29736 (emit-subx-call-operand *(ebp+8) %edi)
29737 (write-buffered *(ebp+8) ")\n")
29738 $translate-mu-allocate-stmt:end:
29739
29740 5f/pop-to-edi
29741 5e/pop-to-esi
29742 58/pop-to-eax
29743
29744 89/<- %esp 5/r32/ebp
29745 5d/pop-to-ebp
29746 c3/return
29747
29748 addr-handle-payload-size:
29749
29750 55/push-ebp
29751 89/<- %ebp 4/r32/esp
29752
29753 8b/-> *(ebp+8) 0/r32/eax
29754 (lookup *eax *(eax+4))
29755 (lookup *(eax+8) *(eax+0xc))
29756
29757
29758
29759
29760 $addr-handle-payload-size:skip-addr:
29761 (lookup *(eax+0xc) *(eax+0x10))
29762
29763
29764
29765
29766 $addr-handle-payload-size:skip-handle:
29767 (lookup *(eax+0xc) *(eax+0x10))
29768
29769
29770 81 7/subop/compare *eax 0/imm32/false
29771 {
29772 75/jump-if-!= break/disp8
29773 (lookup *(eax+4) *(eax+8))
29774 }
29775
29776
29777 (size-of-type-id *(eax+4))
29778 $addr-handle-payload-size:end:
29779
29780 89/<- %esp 5/r32/ebp
29781 5d/pop-to-ebp
29782 c3/return
29783
29784 addr-payload-size:
29785
29786 55/push-ebp
29787 89/<- %ebp 4/r32/esp
29788
29789 8b/-> *(ebp+8) 0/r32/eax
29790 (lookup *eax *(eax+4))
29791 (lookup *(eax+8) *(eax+0xc))
29792
29793
29794
29795
29796 $addr-payload-size:skip-addr:
29797 (lookup *(eax+0xc) *(eax+0x10))
29798
29799
29800 81 7/subop/compare *eax 0/imm32/false
29801 {
29802 75/jump-if-!= break/disp8
29803 (lookup *(eax+4) *(eax+8))
29804 }
29805
29806
29807 (size-of-type-id *(eax+4))
29808 $addr-payload-size:end:
29809
29810 89/<- %esp 5/r32/ebp
29811 5d/pop-to-ebp
29812 c3/return
29813
29814 translate-mu-populate-stmt:
29815
29816 55/push-ebp
29817 89/<- %ebp 4/r32/esp
29818
29819 50/push-eax
29820 51/push-ecx
29821 56/push-esi
29822 57/push-edi
29823
29824 8b/-> *(ebp+0xc) 6/r32/esi
29825
29826 (lookup *(esi+0xc) *(esi+0x10))
29827 89/<- %edi 0/r32/eax
29828
29829 (lookup *(edi+8) *(edi+0xc))
29830 89/<- %ecx 0/r32/eax
29831
29832 (emit-indent *(ebp+8) *Curr-block-depth)
29833 (write-buffered *(ebp+8) "(allocate-array2 Heap ")
29834 (addr-handle-array-payload-size %edi *(ebp+0x10) *(ebp+0x14))
29835 (write-int32-hex-buffered *(ebp+8) %eax)
29836 (emit-subx-call-operand *(ebp+8) %ecx)
29837 (emit-subx-call-operand *(ebp+8) %edi)
29838 (write-buffered *(ebp+8) ")\n")
29839 $translate-mu-populate-stmt:end:
29840
29841 5f/pop-to-edi
29842 5e/pop-to-esi
29843 59/pop-to-ecx
29844 58/pop-to-eax
29845
29846 89/<- %esp 5/r32/ebp
29847 5d/pop-to-ebp
29848 c3/return
29849
29850 translate-mu-populate-stream-stmt:
29851
29852 55/push-ebp
29853 89/<- %ebp 4/r32/esp
29854
29855 50/push-eax
29856 51/push-ecx
29857 56/push-esi
29858 57/push-edi
29859
29860 8b/-> *(ebp+0xc) 6/r32/esi
29861
29862 (lookup *(esi+0xc) *(esi+0x10))
29863 89/<- %edi 0/r32/eax
29864
29865 (lookup *(edi+8) *(edi+0xc))
29866 89/<- %ecx 0/r32/eax
29867
29868 (emit-indent *(ebp+8) *Curr-block-depth)
29869 (write-buffered *(ebp+8) "(new-stream Heap ")
29870 (addr-handle-stream-payload-size %edi *(ebp+0x10) *(ebp+0x14))
29871 (write-int32-hex-buffered *(ebp+8) %eax)
29872 (emit-subx-call-operand *(ebp+8) %ecx)
29873 (emit-subx-call-operand *(ebp+8) %edi)
29874 (write-buffered *(ebp+8) ")\n")
29875 $translate-mu-populate-stream-stmt:end:
29876
29877 5f/pop-to-edi
29878 5e/pop-to-esi
29879 59/pop-to-ecx
29880 58/pop-to-eax
29881
29882 89/<- %esp 5/r32/ebp
29883 5d/pop-to-ebp
29884 c3/return
29885
29886 translate-mu-read-from-stream-stmt:
29887
29888 55/push-ebp
29889 89/<- %ebp 4/r32/esp
29890
29891 50/push-eax
29892 51/push-ecx
29893 56/push-esi
29894 57/push-edi
29895
29896 8b/-> *(ebp+0xc) 6/r32/esi
29897
29898 (lookup *(esi+0xc) *(esi+0x10))
29899 89/<- %ecx 0/r32/eax
29900
29901 (lookup *(ecx+8) *(ecx+0xc))
29902 89/<- %edi 0/r32/eax
29903
29904 (emit-indent *(ebp+8) *Curr-block-depth)
29905 (write-buffered *(ebp+8) "(read-from-stream")
29906 (emit-subx-call-operand *(ebp+8) %ecx)
29907 (emit-subx-call-operand *(ebp+8) %edi)
29908 (write-buffered *(ebp+8) Space)
29909 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
29910 (write-int32-hex-buffered *(ebp+8) %eax)
29911 (write-buffered *(ebp+8) ")\n")
29912 $translate-mu-read-from-stream-stmt:end:
29913
29914 5f/pop-to-edi
29915 5e/pop-to-esi
29916 59/pop-to-ecx
29917 58/pop-to-eax
29918
29919 89/<- %esp 5/r32/ebp
29920 5d/pop-to-ebp
29921 c3/return
29922
29923 translate-mu-write-to-stream-stmt:
29924
29925 55/push-ebp
29926 89/<- %ebp 4/r32/esp
29927
29928 50/push-eax
29929 51/push-ecx
29930 56/push-esi
29931 57/push-edi
29932
29933 8b/-> *(ebp+0xc) 6/r32/esi
29934
29935 (lookup *(esi+0xc) *(esi+0x10))
29936 89/<- %ecx 0/r32/eax
29937
29938 (lookup *(ecx+8) *(ecx+0xc))
29939 89/<- %edi 0/r32/eax
29940
29941 (emit-indent *(ebp+8) *Curr-block-depth)
29942 (write-buffered *(ebp+8) "(write-to-stream")
29943 (emit-subx-call-operand *(ebp+8) %ecx)
29944 (flush *(ebp+8))
29945 (emit-subx-call-operand *(ebp+8) %edi)
29946 (flush *(ebp+8))
29947 (write-buffered *(ebp+8) Space)
29948 (flush *(ebp+8))
29949 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
29950 (write-int32-hex-buffered *(ebp+8) %eax)
29951 (write-buffered *(ebp+8) ")\n")
29952 $translate-mu-write-to-stream-stmt:end:
29953
29954 5f/pop-to-edi
29955 5e/pop-to-esi
29956 59/pop-to-ecx
29957 58/pop-to-eax
29958
29959 89/<- %esp 5/r32/ebp
29960 5d/pop-to-ebp
29961 c3/return
29962
29963 addr-handle-array-payload-size:
29964
29965 55/push-ebp
29966 89/<- %ebp 4/r32/esp
29967
29968 8b/-> *(ebp+8) 0/r32/eax
29969 (lookup *eax *(eax+4))
29970 (lookup *(eax+8) *(eax+0xc))
29971
29972
29973
29974
29975 $addr-handle-array-payload-size:skip-addr:
29976 (lookup *(eax+0xc) *(eax+0x10))
29977
29978
29979
29980
29981 $addr-handle-array-payload-size:skip-handle:
29982 (lookup *(eax+0xc) *(eax+0x10))
29983
29984
29985
29986
29987 $addr-handle-array-payload-size:skip-array:
29988 (lookup *(eax+0xc) *(eax+0x10))
29989
29990
29991 81 7/subop/compare *eax 0/imm32/false
29992 {
29993 75/jump-if-!= break/disp8
29994 (lookup *(eax+4) *(eax+8))
29995 }
29996 $addr-handle-array-payload-size:compute-size:
29997
29998
29999 (size-of-type-id-as-array-element *(eax+4))
30000 $addr-handle-array-payload-size:end:
30001
30002 89/<- %esp 5/r32/ebp
30003 5d/pop-to-ebp
30004 c3/return
30005
30006 addr-handle-stream-payload-size:
30007
30008 55/push-ebp
30009 89/<- %ebp 4/r32/esp
30010
30011 8b/-> *(ebp+8) 0/r32/eax
30012 (lookup *eax *(eax+4))
30013 (lookup *(eax+8) *(eax+0xc))
30014
30015
30016
30017
30018 $addr-handle-stream-payload-size:skip-addr:
30019 (lookup *(eax+0xc) *(eax+0x10))
30020
30021
30022
30023
30024 $addr-handle-stream-payload-size:skip-handle:
30025 (lookup *(eax+0xc) *(eax+0x10))
30026
30027
30028
30029
30030 $addr-handle-stream-payload-size:skip-stream:
30031 (lookup *(eax+0xc) *(eax+0x10))
30032
30033
30034 81 7/subop/compare *eax 0/imm32/false
30035 {
30036 75/jump-if-!= break/disp8
30037 (lookup *(eax+4) *(eax+8))
30038 }
30039 $addr-handle-stream-payload-size:compute-size:
30040
30041
30042 (size-of-type-id-as-array-element *(eax+4))
30043 $addr-handle-stream-payload-size:end:
30044
30045 89/<- %esp 5/r32/ebp
30046 5d/pop-to-ebp
30047 c3/return
30048
30049 power-of-2?:
30050
30051
30052 55/push-ebp
30053 89/<- %ebp 4/r32/esp
30054
30055 8b/-> *(ebp+8) 0/r32/eax
30056
30057 3d/compare-eax-with 0/imm32
30058 0f 8c/jump-if-< $power-of-2?:abort/disp32
30059
30060 48/decrement-eax
30061
30062 23/and-> *(ebp+8) 0/r32/eax
30063
30064 3d/compare-eax-and 0/imm32
30065 0f 94/set-byte-if-= %al
30066 81 4/subop/and %eax 0xff/imm32
30067 $power-of-2?:end:
30068
30069 89/<- %esp 5/r32/ebp
30070 5d/pop-to-ebp
30071 c3/return
30072
30073 $power-of-2?:abort:
30074 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
30075 (flush *(ebp+0xc))
30076 (stop *(ebp+0x10) 1)
30077
30078
30079 num-shift-rights:
30080
30081
30082 55/push-ebp
30083 89/<- %ebp 4/r32/esp
30084
30085 51/push-ecx
30086
30087 8b/-> *(ebp+8) 1/r32/ecx
30088
30089 b8/copy-to-eax 0/imm32
30090 {
30091
30092 81 7/subop/compare %ecx 1/imm32
30093 7e/jump-if-<= break/disp8
30094 40/increment-eax
30095 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
30096 eb/jump loop/disp8
30097 }
30098 $num-shift-rights:end:
30099
30100 59/pop-to-ecx
30101
30102 89/<- %esp 5/r32/ebp
30103 5d/pop-to-ebp
30104 c3/return
30105
30106 mu-get-offset:
30107
30108 55/push-ebp
30109 89/<- %ebp 4/r32/esp
30110
30111 8b/-> *(ebp+8) 0/r32/eax
30112 (lookup *(eax+0xc) *(eax+0x10))
30113 (lookup *(eax+8) *(eax+0xc))
30114
30115 (lookup *eax *(eax+4))
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126 8b/-> *(eax+0x14) 0/r32/eax
30127
30128
30129
30130
30131 $emit-get-offset:end:
30132
30133 89/<- %esp 5/r32/ebp
30134 5d/pop-to-ebp
30135 c3/return
30136
30137 emit-subx-block:
30138
30139 55/push-ebp
30140 89/<- %ebp 4/r32/esp
30141
30142 50/push-eax
30143 51/push-ecx
30144 56/push-esi
30145
30146 8b/-> *(ebp+0xc) 6/r32/esi
30147
30148 (lookup *(esi+0xc) *(esi+0x10))
30149 8b/-> *Curr-block-depth 1/r32/ecx
30150 89/<- *(eax+0x10) 1/r32/ecx
30151
30152 (lookup *(esi+4) *(esi+8))
30153
30154 {
30155 $emit-subx-block:check-empty:
30156 3d/compare-eax-and 0/imm32
30157 0f 84/jump-if-= break/disp32
30158 (emit-indent *(ebp+8) *Curr-block-depth)
30159 (write-buffered *(ebp+8) "{\n")
30160
30161 (lookup *(esi+0xc) *(esi+0x10))
30162 89/<- %ecx 0/r32/eax
30163
30164 (lookup *ecx *(ecx+4))
30165 (write-buffered *(ebp+8) %eax)
30166 (write-buffered *(ebp+8) ":loop:\n")
30167 ff 0/subop/increment *Curr-block-depth
30168 (push *(ebp+0x10) *(esi+0xc))
30169 (push *(ebp+0x10) *(esi+0x10))
30170 (push *(ebp+0x10) 0)
30171
30172 (lookup *(esi+4) *(esi+8))
30173 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
30174 (pop *(ebp+0x10))
30175 (pop *(ebp+0x10))
30176 (pop *(ebp+0x10))
30177 ff 1/subop/decrement *Curr-block-depth
30178 (emit-indent *(ebp+8) *Curr-block-depth)
30179 (write-buffered *(ebp+8) "}\n")
30180 (lookup *ecx *(ecx+4))
30181 (write-buffered *(ebp+8) %eax)
30182 (write-buffered *(ebp+8) ":break:\n")
30183 }
30184 $emit-subx-block:end:
30185
30186 5e/pop-to-esi
30187 59/pop-to-ecx
30188 58/pop-to-eax
30189
30190 89/<- %esp 5/r32/ebp
30191 5d/pop-to-ebp
30192 c3/return
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243 == data
30244 Primitives:
30245
30246 _Primitive-increment-eax:
30247
30248 0x11/imm32/alloc-id:fake
30249 _string-increment/imm32/name
30250 0/imm32/no-inouts
30251 0/imm32/no-inouts
30252 0x11/imm32/alloc-id:fake
30253 Single-int-var-in-eax/imm32/outputs
30254 0x11/imm32/alloc-id:fake
30255 _string_40_increment_eax/imm32/subx-name
30256 0/imm32/no-rm32
30257 0/imm32/no-r32
30258 0/imm32/no-imm32
30259 0/imm32/no-imm8
30260 0/imm32/no-disp32
30261 0/imm32/no-xm32
30262 0/imm32/no-x32
30263 0x11/imm32/alloc-id:fake
30264 _Primitive-increment-ecx/imm32/next
30265 _Primitive-increment-ecx:
30266 0x11/imm32/alloc-id:fake:payload
30267
30268 0x11/imm32/alloc-id:fake
30269 _string-increment/imm32/name
30270 0/imm32/no-inouts
30271 0/imm32/no-inouts
30272 0x11/imm32/alloc-id:fake
30273 Single-int-var-in-ecx/imm32/outputs
30274 0x11/imm32/alloc-id:fake
30275 _string_41_increment_ecx/imm32/subx-name
30276 0/imm32/no-rm32
30277 0/imm32/no-r32
30278 0/imm32/no-imm32
30279 0/imm32/no-imm8
30280 0/imm32/no-disp32
30281 0/imm32/no-xm32
30282 0/imm32/no-x32
30283 0x11/imm32/alloc-id:fake
30284 _Primitive-increment-edx/imm32/next
30285 _Primitive-increment-edx:
30286 0x11/imm32/alloc-id:fake:payload
30287
30288 0x11/imm32/alloc-id:fake
30289 _string-increment/imm32/name
30290 0/imm32/no-inouts
30291 0/imm32/no-inouts
30292 0x11/imm32/alloc-id:fake
30293 Single-int-var-in-edx/imm32/outputs
30294 0x11/imm32/alloc-id:fake
30295 _string_42_increment_edx/imm32/subx-name
30296 0/imm32/no-rm32
30297 0/imm32/no-r32
30298 0/imm32/no-imm32
30299 0/imm32/no-imm8
30300 0/imm32/no-disp32
30301 0/imm32/no-xm32
30302 0/imm32/no-x32
30303 0x11/imm32/alloc-id:fake
30304 _Primitive-increment-ebx/imm32/next
30305 _Primitive-increment-ebx:
30306 0x11/imm32/alloc-id:fake:payload
30307
30308 0x11/imm32/alloc-id:fake
30309 _string-increment/imm32/name
30310 0/imm32/no-inouts
30311 0/imm32/no-inouts
30312 0x11/imm32/alloc-id:fake
30313 Single-int-var-in-ebx/imm32/outputs
30314 0x11/imm32/alloc-id:fake
30315 _string_43_increment_ebx/imm32/subx-name
30316 0/imm32/no-rm32
30317 0/imm32/no-r32
30318 0/imm32/no-imm32
30319 0/imm32/no-imm8
30320 0/imm32/no-disp32
30321 0/imm32/no-xm32
30322 0/imm32/no-x32
30323 0x11/imm32/alloc-id:fake
30324 _Primitive-increment-esi/imm32/next
30325 _Primitive-increment-esi:
30326 0x11/imm32/alloc-id:fake:payload
30327
30328 0x11/imm32/alloc-id:fake
30329 _string-increment/imm32/name
30330 0/imm32/no-inouts
30331 0/imm32/no-inouts
30332 0x11/imm32/alloc-id:fake
30333 Single-int-var-in-esi/imm32/outputs
30334 0x11/imm32/alloc-id:fake
30335 _string_46_increment_esi/imm32/subx-name
30336 0/imm32/no-rm32
30337 0/imm32/no-r32
30338 0/imm32/no-imm32
30339 0/imm32/no-imm8
30340 0/imm32/no-disp32
30341 0/imm32/no-xm32
30342 0/imm32/no-x32
30343 0x11/imm32/alloc-id:fake
30344 _Primitive-increment-edi/imm32/next
30345 _Primitive-increment-edi:
30346 0x11/imm32/alloc-id:fake:payload
30347
30348 0x11/imm32/alloc-id:fake
30349 _string-increment/imm32/name
30350 0/imm32/no-inouts
30351 0/imm32/no-inouts
30352 0x11/imm32/alloc-id:fake
30353 Single-int-var-in-edi/imm32/outputs
30354 0x11/imm32/alloc-id:fake
30355 _string_47_increment_edi/imm32/subx-name
30356 0/imm32/no-rm32
30357 0/imm32/no-r32
30358 0/imm32/no-imm32
30359 0/imm32/no-imm8
30360 0/imm32/no-disp32
30361 0/imm32/no-xm32
30362 0/imm32/no-x32
30363 0x11/imm32/alloc-id:fake
30364 _Primitive-decrement-eax/imm32/next
30365 _Primitive-decrement-eax:
30366 0x11/imm32/alloc-id:fake:payload
30367
30368 0x11/imm32/alloc-id:fake
30369 _string-decrement/imm32/name
30370 0/imm32/no-inouts
30371 0/imm32/no-inouts
30372 0x11/imm32/alloc-id:fake
30373 Single-int-var-in-eax/imm32/outputs
30374 0x11/imm32/alloc-id:fake
30375 _string_48_decrement_eax/imm32/subx-name
30376 0/imm32/no-rm32
30377 0/imm32/no-r32
30378 0/imm32/no-imm32
30379 0/imm32/no-imm8
30380 0/imm32/no-disp32
30381 0/imm32/no-xm32
30382 0/imm32/no-x32
30383 0x11/imm32/alloc-id:fake
30384 _Primitive-decrement-ecx/imm32/next
30385 _Primitive-decrement-ecx:
30386 0x11/imm32/alloc-id:fake:payload
30387
30388 0x11/imm32/alloc-id:fake
30389 _string-decrement/imm32/name
30390 0/imm32/no-inouts
30391 0/imm32/no-inouts
30392 0x11/imm32/alloc-id:fake
30393 Single-int-var-in-ecx/imm32/outputs
30394 0x11/imm32/alloc-id:fake
30395 _string_49_decrement_ecx/imm32/subx-name
30396 0/imm32/no-rm32
30397 0/imm32/no-r32
30398 0/imm32/no-imm32
30399 0/imm32/no-imm8
30400 0/imm32/no-disp32
30401 0/imm32/no-xm32
30402 0/imm32/no-x32
30403 0x11/imm32/alloc-id:fake
30404 _Primitive-decrement-edx/imm32/next
30405 _Primitive-decrement-edx:
30406 0x11/imm32/alloc-id:fake:payload
30407
30408 0x11/imm32/alloc-id:fake
30409 _string-decrement/imm32/name
30410 0/imm32/no-inouts
30411 0/imm32/no-inouts
30412 0x11/imm32/alloc-id:fake
30413 Single-int-var-in-edx/imm32/outputs
30414 0x11/imm32/alloc-id:fake
30415 _string_4a_decrement_edx/imm32/subx-name
30416 0/imm32/no-rm32
30417 0/imm32/no-r32
30418 0/imm32/no-imm32
30419 0/imm32/no-imm8
30420 0/imm32/no-disp32
30421 0/imm32/no-xm32
30422 0/imm32/no-x32
30423 0x11/imm32/alloc-id:fake
30424 _Primitive-decrement-ebx/imm32/next
30425 _Primitive-decrement-ebx:
30426 0x11/imm32/alloc-id:fake:payload
30427
30428 0x11/imm32/alloc-id:fake
30429 _string-decrement/imm32/name
30430 0/imm32/no-inouts
30431 0/imm32/no-inouts
30432 0x11/imm32/alloc-id:fake
30433 Single-int-var-in-ebx/imm32/outputs
30434 0x11/imm32/alloc-id:fake
30435 _string_4b_decrement_ebx/imm32/subx-name
30436 0/imm32/no-rm32
30437 0/imm32/no-r32
30438 0/imm32/no-imm32
30439 0/imm32/no-imm8
30440 0/imm32/no-disp32
30441 0/imm32/no-xm32
30442 0/imm32/no-x32
30443 0x11/imm32/alloc-id:fake
30444 _Primitive-decrement-esi/imm32/next
30445 _Primitive-decrement-esi:
30446 0x11/imm32/alloc-id:fake:payload
30447
30448 0x11/imm32/alloc-id:fake
30449 _string-decrement/imm32/name
30450 0/imm32/no-inouts
30451 0/imm32/no-inouts
30452 0x11/imm32/alloc-id:fake
30453 Single-int-var-in-esi/imm32/outputs
30454 0x11/imm32/alloc-id:fake
30455 _string_4e_decrement_esi/imm32/subx-name
30456 0/imm32/no-rm32
30457 0/imm32/no-r32
30458 0/imm32/no-imm32
30459 0/imm32/no-imm8
30460 0/imm32/no-disp32
30461 0/imm32/no-xm32
30462 0/imm32/no-x32
30463 0x11/imm32/alloc-id:fake
30464 _Primitive-decrement-edi/imm32/next
30465 _Primitive-decrement-edi:
30466 0x11/imm32/alloc-id:fake:payload
30467
30468 0x11/imm32/alloc-id:fake
30469 _string-decrement/imm32/name
30470 0/imm32/no-inouts
30471 0/imm32/no-inouts
30472 0x11/imm32/alloc-id:fake
30473 Single-int-var-in-edi/imm32/outputs
30474 0x11/imm32/alloc-id:fake
30475 _string_4f_decrement_edi/imm32/subx-name
30476 0/imm32/no-rm32
30477 0/imm32/no-r32
30478 0/imm32/no-imm32
30479 0/imm32/no-imm8
30480 0/imm32/no-disp32
30481 0/imm32/no-xm32
30482 0/imm32/no-x32
30483 0x11/imm32/alloc-id:fake
30484 _Primitive-increment-mem/imm32/next
30485 _Primitive-increment-mem:
30486 0x11/imm32/alloc-id:fake:payload
30487
30488 0x11/imm32/alloc-id:fake
30489 _string-increment/imm32/name
30490 0x11/imm32/alloc-id:fake
30491 Single-int-var-in-mem/imm32/inouts
30492 0/imm32/no-outputs
30493 0/imm32/no-outputs
30494 0x11/imm32/alloc-id:fake
30495 _string_ff_subop_increment/imm32/subx-name
30496 1/imm32/rm32-is-first-inout
30497 0/imm32/no-r32
30498 0/imm32/no-imm32
30499 0/imm32/no-imm8
30500 0/imm32/no-disp32
30501 0/imm32/no-xm32
30502 0/imm32/no-x32
30503 0x11/imm32/alloc-id:fake
30504 _Primitive-increment-reg/imm32/next
30505 _Primitive-increment-reg:
30506 0x11/imm32/alloc-id:fake:payload
30507
30508 0x11/imm32/alloc-id:fake
30509 _string-increment/imm32/name
30510 0/imm32/no-inouts
30511 0/imm32/no-inouts
30512 0x11/imm32/alloc-id:fake
30513 Single-int-var-in-some-register/imm32/outputs
30514 0x11/imm32/alloc-id:fake
30515 _string_ff_subop_increment/imm32/subx-name
30516 3/imm32/rm32-is-first-output
30517 0/imm32/no-r32
30518 0/imm32/no-imm32
30519 0/imm32/no-imm8
30520 0/imm32/no-disp32
30521 0/imm32/no-xm32
30522 0/imm32/no-x32
30523 0x11/imm32/alloc-id:fake
30524 _Primitive-decrement-mem/imm32/next
30525 _Primitive-decrement-mem:
30526 0x11/imm32/alloc-id:fake:payload
30527
30528 0x11/imm32/alloc-id:fake
30529 _string-decrement/imm32/name
30530 0x11/imm32/alloc-id:fake
30531 Single-int-var-in-mem/imm32/inouts
30532 0/imm32/no-outputs
30533 0/imm32/no-outputs
30534 0x11/imm32/alloc-id:fake
30535 _string_ff_subop_decrement/imm32/subx-name
30536 1/imm32/rm32-is-first-inout
30537 0/imm32/no-r32
30538 0/imm32/no-imm32
30539 0/imm32/no-imm8
30540 0/imm32/no-disp32
30541 0/imm32/no-xm32
30542 0/imm32/no-x32
30543 0x11/imm32/alloc-id:fake
30544 _Primitive-decrement-reg/imm32/next
30545 _Primitive-decrement-reg:
30546 0x11/imm32/alloc-id:fake:payload
30547
30548 0x11/imm32/alloc-id:fake
30549 _string-decrement/imm32/name
30550 0/imm32/no-inouts
30551 0/imm32/no-inouts
30552 0x11/imm32/alloc-id:fake
30553 Single-int-var-in-some-register/imm32/outputs
30554 0x11/imm32/alloc-id:fake
30555 _string_ff_subop_decrement/imm32/subx-name
30556 3/imm32/rm32-is-first-output
30557 0/imm32/no-r32
30558 0/imm32/no-imm32
30559 0/imm32/no-imm8
30560 0/imm32/no-disp32
30561 0/imm32/no-xm32
30562 0/imm32/no-x32
30563 0x11/imm32/alloc-id:fake
30564 _Primitive-add-to-eax/imm32/next
30565
30566 _Primitive-add-to-eax:
30567 0x11/imm32/alloc-id:fake:payload
30568
30569 0x11/imm32/alloc-id:fake
30570 _string-add/imm32/name
30571 0x11/imm32/alloc-id:fake
30572 Single-lit-var/imm32/inouts
30573 0x11/imm32/alloc-id:fake
30574 Single-int-var-in-eax/imm32/outputs
30575 0x11/imm32/alloc-id:fake
30576 _string_05_add_to_eax/imm32/subx-name
30577 0/imm32/no-rm32
30578 0/imm32/no-r32
30579 1/imm32/imm32-is-first-inout
30580 0/imm32/no-imm8
30581 0/imm32/no-disp32
30582 0/imm32/no-xm32
30583 0/imm32/no-x32
30584 0x11/imm32/alloc-id:fake
30585 _Primitive-add-reg-to-reg/imm32/next
30586 _Primitive-add-reg-to-reg:
30587 0x11/imm32/alloc-id:fake:payload
30588
30589 0x11/imm32/alloc-id:fake
30590 _string-add/imm32/name
30591 0x11/imm32/alloc-id:fake
30592 Single-int-var-in-some-register/imm32/inouts
30593 0x11/imm32/alloc-id:fake
30594 Single-int-var-in-some-register/imm32/outputs
30595 0x11/imm32/alloc-id:fake
30596 _string_01_add_to/imm32/subx-name
30597 3/imm32/rm32-is-first-output
30598 1/imm32/r32-is-first-inout
30599 0/imm32/no-imm32
30600 0/imm32/no-imm8
30601 0/imm32/no-disp32
30602 0/imm32/no-xm32
30603 0/imm32/no-x32
30604 0x11/imm32/alloc-id:fake
30605 _Primitive-add-reg-to-mem/imm32/next
30606 _Primitive-add-reg-to-mem:
30607 0x11/imm32/alloc-id:fake:payload
30608
30609 0x11/imm32/alloc-id:fake
30610 _string-add-to/imm32/name
30611 0x11/imm32/alloc-id:fake
30612 Two-args-int-stack-int-reg/imm32/inouts
30613 0/imm32/no-outputs
30614 0/imm32/no-outputs
30615 0x11/imm32/alloc-id:fake
30616 _string_01_add_to/imm32/subx-name
30617 1/imm32/rm32-is-first-inout
30618 2/imm32/r32-is-second-inout
30619 0/imm32/no-imm32
30620 0/imm32/no-imm8
30621 0/imm32/no-disp32
30622 0/imm32/no-xm32
30623 0/imm32/no-x32
30624 0x11/imm32/alloc-id:fake
30625 _Primitive-add-mem-to-reg/imm32/next
30626 _Primitive-add-mem-to-reg:
30627 0x11/imm32/alloc-id:fake:payload
30628
30629 0x11/imm32/alloc-id:fake
30630 _string-add/imm32/name
30631 0x11/imm32/alloc-id:fake
30632 Single-int-var-in-mem/imm32/inouts
30633 0x11/imm32/alloc-id:fake
30634 Single-int-var-in-some-register/imm32/outputs
30635 0x11/imm32/alloc-id:fake
30636 _string_03_add/imm32/subx-name
30637 1/imm32/rm32-is-first-inout
30638 3/imm32/r32-is-first-output
30639 0/imm32/no-imm32
30640 0/imm32/no-imm8
30641 0/imm32/no-disp32
30642 0/imm32/no-xm32
30643 0/imm32/no-x32
30644 0x11/imm32/alloc-id:fake
30645 _Primitive-add-lit-to-reg/imm32/next
30646 _Primitive-add-lit-to-reg:
30647 0x11/imm32/alloc-id:fake:payload
30648
30649 0x11/imm32/alloc-id:fake
30650 _string-add/imm32/name
30651 0x11/imm32/alloc-id:fake
30652 Single-lit-var/imm32/inouts
30653 0x11/imm32/alloc-id:fake
30654 Single-int-var-in-some-register/imm32/outputs
30655 0x11/imm32/alloc-id:fake
30656 _string_81_subop_add/imm32/subx-name
30657 3/imm32/rm32-is-first-output
30658 0/imm32/no-r32
30659 1/imm32/imm32-is-first-inout
30660 0/imm32/no-imm8
30661 0/imm32/no-disp32
30662 0/imm32/no-xm32
30663 0/imm32/no-x32
30664 0x11/imm32/alloc-id:fake
30665 _Primitive-add-lit-to-mem/imm32/next
30666 _Primitive-add-lit-to-mem:
30667 0x11/imm32/alloc-id:fake:payload
30668
30669 0x11/imm32/alloc-id:fake
30670 _string-add-to/imm32/name
30671 0x11/imm32/alloc-id:fake
30672 Int-var-and-literal/imm32/inouts
30673 0/imm32/no-outputs
30674 0/imm32/no-outputs
30675 0x11/imm32/alloc-id:fake
30676 _string_81_subop_add/imm32/subx-name
30677 1/imm32/rm32-is-first-inout
30678 0/imm32/no-r32
30679 2/imm32/imm32-is-second-inout
30680 0/imm32/no-imm8
30681 0/imm32/no-disp32
30682 0/imm32/no-xm32
30683 0/imm32/no-x32
30684 0x11/imm32/alloc-id:fake
30685 _Primitive-subtract-from-eax/imm32/next
30686
30687 _Primitive-subtract-from-eax:
30688 0x11/imm32/alloc-id:fake:payload
30689
30690 0x11/imm32/alloc-id:fake
30691 _string-subtract/imm32/name
30692 0x11/imm32/alloc-id:fake
30693 Single-lit-var/imm32/inouts
30694 0x11/imm32/alloc-id:fake
30695 Single-int-var-in-eax/imm32/outputs
30696 0x11/imm32/alloc-id:fake
30697 _string_2d_subtract_from_eax/imm32/subx-name
30698 0/imm32/no-rm32
30699 0/imm32/no-r32
30700 1/imm32/imm32-is-first-inout
30701 0/imm32/no-imm8
30702 0/imm32/no-disp32
30703 0/imm32/no-xm32
30704 0/imm32/no-x32
30705 0x11/imm32/alloc-id:fake
30706 _Primitive-subtract-reg-from-reg/imm32/next
30707 _Primitive-subtract-reg-from-reg:
30708 0x11/imm32/alloc-id:fake:payload
30709
30710 0x11/imm32/alloc-id:fake
30711 _string-subtract/imm32/name
30712 0x11/imm32/alloc-id:fake
30713 Single-int-var-in-some-register/imm32/inouts
30714 0x11/imm32/alloc-id:fake
30715 Single-int-var-in-some-register/imm32/outputs
30716 0x11/imm32/alloc-id:fake
30717 _string_29_subtract_from/imm32/subx-name
30718 3/imm32/rm32-is-first-output
30719 1/imm32/r32-is-first-inout
30720 0/imm32/no-imm32
30721 0/imm32/no-imm8
30722 0/imm32/no-disp32
30723 0/imm32/no-xm32
30724 0/imm32/no-x32
30725 0x11/imm32/alloc-id:fake
30726 _Primitive-subtract-reg-from-mem/imm32/next
30727 _Primitive-subtract-reg-from-mem:
30728 0x11/imm32/alloc-id:fake:payload
30729
30730 0x11/imm32/alloc-id:fake
30731 _string-subtract-from/imm32/name
30732 0x11/imm32/alloc-id:fake
30733 Two-args-int-stack-int-reg/imm32/inouts
30734 0/imm32/no-outputs
30735 0/imm32/no-outputs
30736 0x11/imm32/alloc-id:fake
30737 _string_29_subtract_from/imm32/subx-name
30738 1/imm32/rm32-is-first-inout
30739 2/imm32/r32-is-second-inout
30740 0/imm32/no-imm32
30741 0/imm32/no-imm8
30742 0/imm32/no-disp32
30743 0/imm32/no-xm32
30744 0/imm32/no-x32
30745 0x11/imm32/alloc-id:fake
30746 _Primitive-subtract-mem-from-reg/imm32/next
30747 _Primitive-subtract-mem-from-reg:
30748 0x11/imm32/alloc-id:fake:payload
30749
30750 0x11/imm32/alloc-id:fake
30751 _string-subtract/imm32/name
30752 0x11/imm32/alloc-id:fake
30753 Single-int-var-in-mem/imm32/inouts
30754 0x11/imm32/alloc-id:fake
30755 Single-int-var-in-some-register/imm32/outputs
30756 0x11/imm32/alloc-id:fake
30757 _string_2b_subtract/imm32/subx-name
30758 1/imm32/rm32-is-first-inout
30759 3/imm32/r32-is-first-output
30760 0/imm32/no-imm32
30761 0/imm32/no-imm8
30762 0/imm32/no-disp32
30763 0/imm32/no-xm32
30764 0/imm32/no-x32
30765 0x11/imm32/alloc-id:fake
30766 _Primitive-subtract-lit-from-reg/imm32/next
30767 _Primitive-subtract-lit-from-reg:
30768 0x11/imm32/alloc-id:fake:payload
30769
30770 0x11/imm32/alloc-id:fake
30771 _string-subtract/imm32/name
30772 0x11/imm32/alloc-id:fake
30773 Single-lit-var/imm32/inouts
30774 0x11/imm32/alloc-id:fake
30775 Single-int-var-in-some-register/imm32/outputs
30776 0x11/imm32/alloc-id:fake
30777 _string_81_subop_subtract/imm32/subx-name
30778 3/imm32/rm32-is-first-output
30779 0/imm32/no-r32
30780 1/imm32/imm32-is-first-inout
30781 0/imm32/no-imm8
30782 0/imm32/no-disp32
30783 0/imm32/no-xm32
30784 0/imm32/no-x32
30785 0x11/imm32/alloc-id:fake
30786 _Primitive-subtract-lit-from-mem/imm32/next
30787 _Primitive-subtract-lit-from-mem:
30788 0x11/imm32/alloc-id:fake:payload
30789
30790 0x11/imm32/alloc-id:fake
30791 _string-subtract-from/imm32/name
30792 0x11/imm32/alloc-id:fake
30793 Int-var-and-literal/imm32/inouts
30794 0/imm32/no-outputs
30795 0/imm32/no-outputs
30796 0x11/imm32/alloc-id:fake
30797 _string_81_subop_subtract/imm32/subx-name
30798 1/imm32/rm32-is-first-inout
30799 0/imm32/no-r32
30800 2/imm32/imm32-is-second-inout
30801 0/imm32/no-imm8
30802 0/imm32/no-disp32
30803 0/imm32/no-xm32
30804 0/imm32/no-x32
30805 0x11/imm32/alloc-id:fake
30806 _Primitive-and-with-eax/imm32/next
30807
30808 _Primitive-and-with-eax:
30809 0x11/imm32/alloc-id:fake:payload
30810
30811 0x11/imm32/alloc-id:fake
30812 _string-and/imm32/name
30813 0x11/imm32/alloc-id:fake
30814 Single-lit-var/imm32/inouts
30815 0x11/imm32/alloc-id:fake
30816 Single-int-var-in-eax/imm32/outputs
30817 0x11/imm32/alloc-id:fake
30818 _string_25_and_with_eax/imm32/subx-name
30819 0/imm32/no-rm32
30820 0/imm32/no-r32
30821 1/imm32/imm32-is-first-inout
30822 0/imm32/no-imm8
30823 0/imm32/no-disp32
30824 0/imm32/no-xm32
30825 0/imm32/no-x32
30826 0x11/imm32/alloc-id:fake
30827 _Primitive-and-reg-with-reg/imm32/next
30828 _Primitive-and-reg-with-reg:
30829 0x11/imm32/alloc-id:fake:payload
30830
30831 0x11/imm32/alloc-id:fake
30832 _string-and/imm32/name
30833 0x11/imm32/alloc-id:fake
30834 Single-int-var-in-some-register/imm32/inouts
30835 0x11/imm32/alloc-id:fake
30836 Single-int-var-in-some-register/imm32/outputs
30837 0x11/imm32/alloc-id:fake
30838 _string_21_and_with/imm32/subx-name
30839 3/imm32/rm32-is-first-output
30840 1/imm32/r32-is-first-inout
30841 0/imm32/no-imm32
30842 0/imm32/no-imm8
30843 0/imm32/no-disp32
30844 0/imm32/no-xm32
30845 0/imm32/no-x32
30846 0x11/imm32/alloc-id:fake
30847 _Primitive-and-reg-with-mem/imm32/next
30848 _Primitive-and-reg-with-mem:
30849 0x11/imm32/alloc-id:fake:payload
30850
30851 0x11/imm32/alloc-id:fake
30852 _string-and-with/imm32/name
30853 0x11/imm32/alloc-id:fake
30854 Two-args-int-stack-int-reg/imm32/inouts
30855 0/imm32/no-outputs
30856 0/imm32/no-outputs
30857 0x11/imm32/alloc-id:fake
30858 _string_21_and_with/imm32/subx-name
30859 1/imm32/rm32-is-first-inout
30860 2/imm32/r32-is-second-inout
30861 0/imm32/no-imm32
30862 0/imm32/no-imm8
30863 0/imm32/no-disp32
30864 0/imm32/no-xm32
30865 0/imm32/no-x32
30866 0x11/imm32/alloc-id:fake
30867 _Primitive-and-mem-with-reg/imm32/next
30868 _Primitive-and-mem-with-reg:
30869 0x11/imm32/alloc-id:fake:payload
30870
30871 0x11/imm32/alloc-id:fake
30872 _string-and/imm32/name
30873 0x11/imm32/alloc-id:fake
30874 Single-int-var-in-mem/imm32/inouts
30875 0x11/imm32/alloc-id:fake
30876 Single-int-var-in-some-register/imm32/outputs
30877 0x11/imm32/alloc-id:fake
30878 _string_23_and/imm32/subx-name
30879 1/imm32/rm32-is-first-inout
30880 3/imm32/r32-is-first-output
30881 0/imm32/no-imm32
30882 0/imm32/no-imm8
30883 0/imm32/no-disp32
30884 0/imm32/no-xm32
30885 0/imm32/no-x32
30886 0x11/imm32/alloc-id:fake
30887 _Primitive-and-lit-with-reg/imm32/next
30888 _Primitive-and-lit-with-reg:
30889 0x11/imm32/alloc-id:fake:payload
30890
30891 0x11/imm32/alloc-id:fake
30892 _string-and/imm32/name
30893 0x11/imm32/alloc-id:fake
30894 Single-lit-var/imm32/inouts
30895 0x11/imm32/alloc-id:fake
30896 Single-int-var-in-some-register/imm32/outputs
30897 0x11/imm32/alloc-id:fake
30898 _string_81_subop_and/imm32/subx-name
30899 3/imm32/rm32-is-first-output
30900 0/imm32/no-r32
30901 1/imm32/imm32-is-first-inout
30902 0/imm32/no-imm8
30903 0/imm32/no-disp32
30904 0/imm32/no-xm32
30905 0/imm32/no-x32
30906 0x11/imm32/alloc-id:fake
30907 _Primitive-and-lit-with-mem/imm32/next
30908 _Primitive-and-lit-with-mem:
30909 0x11/imm32/alloc-id:fake:payload
30910
30911 0x11/imm32/alloc-id:fake
30912 _string-and-with/imm32/name
30913 0x11/imm32/alloc-id:fake
30914 Int-var-and-literal/imm32/inouts
30915 0/imm32/no-outputs
30916 0/imm32/no-outputs
30917 0x11/imm32/alloc-id:fake
30918 _string_81_subop_and/imm32/subx-name
30919 1/imm32/rm32-is-first-inout
30920 0/imm32/no-r32
30921 2/imm32/imm32-is-second-inout
30922 0/imm32/no-imm8
30923 0/imm32/no-disp32
30924 0/imm32/no-xm32
30925 0/imm32/no-x32
30926 0x11/imm32/alloc-id:fake
30927 _Primitive-or-with-eax/imm32/next
30928
30929 _Primitive-or-with-eax:
30930 0x11/imm32/alloc-id:fake:payload
30931
30932 0x11/imm32/alloc-id:fake
30933 _string-or/imm32/name
30934 0x11/imm32/alloc-id:fake
30935 Single-lit-var/imm32/inouts
30936 0x11/imm32/alloc-id:fake
30937 Single-int-var-in-eax/imm32/outputs
30938 0x11/imm32/alloc-id:fake
30939 _string_0d_or_with_eax/imm32/subx-name
30940 0/imm32/no-rm32
30941 0/imm32/no-r32
30942 1/imm32/imm32-is-first-inout
30943 0/imm32/no-imm8
30944 0/imm32/no-disp32
30945 0/imm32/no-xm32
30946 0/imm32/no-x32
30947 0x11/imm32/alloc-id:fake
30948 _Primitive-or-reg-with-reg/imm32/next
30949 _Primitive-or-reg-with-reg:
30950 0x11/imm32/alloc-id:fake:payload
30951
30952 0x11/imm32/alloc-id:fake
30953 _string-or/imm32/name
30954 0x11/imm32/alloc-id:fake
30955 Single-int-var-in-some-register/imm32/inouts
30956 0x11/imm32/alloc-id:fake
30957 Single-int-var-in-some-register/imm32/outputs
30958 0x11/imm32/alloc-id:fake
30959 _string_09_or_with/imm32/subx-name
30960 3/imm32/rm32-is-first-output
30961 1/imm32/r32-is-first-inout
30962 0/imm32/no-imm32
30963 0/imm32/no-imm8
30964 0/imm32/no-disp32
30965 0/imm32/no-xm32
30966 0/imm32/no-x32
30967 0x11/imm32/alloc-id:fake
30968 _Primitive-or-reg-with-mem/imm32/next
30969 _Primitive-or-reg-with-mem:
30970 0x11/imm32/alloc-id:fake:payload
30971
30972 0x11/imm32/alloc-id:fake
30973 _string-or-with/imm32/name
30974 0x11/imm32/alloc-id:fake
30975 Two-args-int-stack-int-reg/imm32/inouts
30976 0/imm32/no-outputs
30977 0/imm32/no-outputs
30978 0x11/imm32/alloc-id:fake
30979 _string_09_or_with/imm32/subx-name
30980 1/imm32/rm32-is-first-inout
30981 2/imm32/r32-is-second-inout
30982 0/imm32/no-imm32
30983 0/imm32/no-imm8
30984 0/imm32/no-disp32
30985 0/imm32/no-xm32
30986 0/imm32/no-x32
30987 0x11/imm32/alloc-id:fake
30988 _Primitive-or-mem-with-reg/imm32/next
30989 _Primitive-or-mem-with-reg:
30990 0x11/imm32/alloc-id:fake:payload
30991
30992 0x11/imm32/alloc-id:fake
30993 _string-or/imm32/name
30994 0x11/imm32/alloc-id:fake
30995 Single-int-var-in-mem/imm32/inouts
30996 0x11/imm32/alloc-id:fake
30997 Single-int-var-in-some-register/imm32/outputs
30998 0x11/imm32/alloc-id:fake
30999 _string_0b_or/imm32/subx-name
31000 1/imm32/rm32-is-first-inout
31001 3/imm32/r32-is-first-output
31002 0/imm32/no-imm32
31003 0/imm32/no-imm8
31004 0/imm32/no-disp32
31005 0/imm32/no-xm32
31006 0/imm32/no-x32
31007 0x11/imm32/alloc-id:fake
31008 _Primitive-or-lit-with-reg/imm32/next
31009 _Primitive-or-lit-with-reg:
31010 0x11/imm32/alloc-id:fake:payload
31011
31012 0x11/imm32/alloc-id:fake
31013 _string-or/imm32/name
31014 0x11/imm32/alloc-id:fake
31015 Single-lit-var/imm32/inouts
31016 0x11/imm32/alloc-id:fake
31017 Single-int-var-in-some-register/imm32/outputs
31018 0x11/imm32/alloc-id:fake
31019 _string_81_subop_or/imm32/subx-name
31020 3/imm32/rm32-is-first-output
31021 0/imm32/no-r32
31022 1/imm32/imm32-is-first-inout
31023 0/imm32/no-imm8
31024 0/imm32/no-disp32
31025 0/imm32/no-xm32
31026 0/imm32/no-x32
31027 0x11/imm32/alloc-id:fake
31028 _Primitive-or-lit-with-mem/imm32/next
31029 _Primitive-or-lit-with-mem:
31030 0x11/imm32/alloc-id:fake:payload
31031
31032 0x11/imm32/alloc-id:fake
31033 _string-or-with/imm32/name
31034 0x11/imm32/alloc-id:fake
31035 Int-var-and-literal/imm32/inouts
31036 0/imm32/no-outputs
31037 0/imm32/no-outputs
31038 0x11/imm32/alloc-id:fake
31039 _string_81_subop_or/imm32/subx-name
31040 1/imm32/rm32-is-first-inout
31041 0/imm32/no-r32
31042 2/imm32/imm32-is-second-inout
31043 0/imm32/no-imm8
31044 0/imm32/no-disp32
31045 0/imm32/no-xm32
31046 0/imm32/no-x32
31047 0x11/imm32/alloc-id:fake
31048 _Primitive-xor-with-eax/imm32/next
31049
31050 _Primitive-xor-with-eax:
31051 0x11/imm32/alloc-id:fake:payload
31052
31053 0x11/imm32/alloc-id:fake
31054 _string-xor/imm32/name
31055 0x11/imm32/alloc-id:fake
31056 Single-lit-var/imm32/inouts
31057 0x11/imm32/alloc-id:fake
31058 Single-int-var-in-eax/imm32/outputs
31059 0x11/imm32/alloc-id:fake
31060 _string_35_xor_with_eax/imm32/subx-name
31061 0/imm32/no-rm32
31062 0/imm32/no-r32
31063 1/imm32/imm32-is-first-inout
31064 0/imm32/no-imm8
31065 0/imm32/no-disp32
31066 0/imm32/no-xm32
31067 0/imm32/no-x32
31068 0x11/imm32/alloc-id:fake
31069 _Primitive-xor-reg-with-reg/imm32/next
31070 _Primitive-xor-reg-with-reg:
31071 0x11/imm32/alloc-id:fake:payload
31072
31073 0x11/imm32/alloc-id:fake
31074 _string-xor/imm32/name
31075 0x11/imm32/alloc-id:fake
31076 Single-int-var-in-some-register/imm32/inouts
31077 0x11/imm32/alloc-id:fake
31078 Single-int-var-in-some-register/imm32/outputs
31079 0x11/imm32/alloc-id:fake
31080 _string_31_xor_with/imm32/subx-name
31081 3/imm32/rm32-is-first-output
31082 1/imm32/r32-is-first-inout
31083 0/imm32/no-imm32
31084 0/imm32/no-imm8
31085 0/imm32/no-disp32
31086 0/imm32/no-xm32
31087 0/imm32/no-x32
31088 0x11/imm32/alloc-id:fake
31089 _Primitive-xor-reg-with-mem/imm32/next
31090 _Primitive-xor-reg-with-mem:
31091 0x11/imm32/alloc-id:fake:payload
31092
31093 0x11/imm32/alloc-id:fake
31094 _string-xor-with/imm32/name
31095 0x11/imm32/alloc-id:fake
31096 Two-args-int-stack-int-reg/imm32/inouts
31097 0/imm32/no-outputs
31098 0/imm32/no-outputs
31099 0x11/imm32/alloc-id:fake
31100 _string_31_xor_with/imm32/subx-name
31101 1/imm32/rm32-is-first-inout
31102 2/imm32/r32-is-second-inout
31103 0/imm32/no-imm32
31104 0/imm32/no-imm8
31105 0/imm32/no-disp32
31106 0/imm32/no-xm32
31107 0/imm32/no-x32
31108 0x11/imm32/alloc-id:fake
31109 _Primitive-xor-mem-with-reg/imm32/next
31110 _Primitive-xor-mem-with-reg:
31111 0x11/imm32/alloc-id:fake:payload
31112
31113 0x11/imm32/alloc-id:fake
31114 _string-xor/imm32/name
31115 0x11/imm32/alloc-id:fake
31116 Single-int-var-in-mem/imm32/inouts
31117 0x11/imm32/alloc-id:fake
31118 Single-int-var-in-some-register/imm32/outputs
31119 0x11/imm32/alloc-id:fake
31120 _string_33_xor/imm32/subx-name
31121 1/imm32/rm32-is-first-inout
31122 3/imm32/r32-is-first-output
31123 0/imm32/no-imm32
31124 0/imm32/no-imm8
31125 0/imm32/no-disp32
31126 0/imm32/no-xm32
31127 0/imm32/no-x32
31128 0x11/imm32/alloc-id:fake
31129 _Primitive-xor-lit-with-reg/imm32/next
31130 _Primitive-xor-lit-with-reg:
31131 0x11/imm32/alloc-id:fake:payload
31132
31133 0x11/imm32/alloc-id:fake
31134 _string-xor/imm32/name
31135 0x11/imm32/alloc-id:fake
31136 Single-lit-var/imm32/inouts
31137 0x11/imm32/alloc-id:fake
31138 Single-int-var-in-some-register/imm32/outputs
31139 0x11/imm32/alloc-id:fake
31140 _string_81_subop_xor/imm32/subx-name
31141 3/imm32/rm32-is-first-output
31142 0/imm32/no-r32
31143 1/imm32/imm32-is-first-inout
31144 0/imm32/no-imm8
31145 0/imm32/no-disp32
31146 0/imm32/no-xm32
31147 0/imm32/no-x32
31148 0x11/imm32/alloc-id:fake
31149 _Primitive-xor-lit-with-mem/imm32/next
31150 _Primitive-xor-lit-with-mem:
31151 0x11/imm32/alloc-id:fake:payload
31152
31153 0x11/imm32/alloc-id:fake
31154 _string-xor-with/imm32/name
31155 0x11/imm32/alloc-id:fake
31156 Int-var-and-literal/imm32/inouts
31157 0/imm32/no-outputs
31158 0/imm32/no-outputs
31159 0x11/imm32/alloc-id:fake
31160 _string_81_subop_xor/imm32/subx-name
31161 1/imm32/rm32-is-first-inout
31162 0/imm32/no-r32
31163 2/imm32/imm32-is-second-inout
31164 0/imm32/no-imm8
31165 0/imm32/no-disp32
31166 0/imm32/no-xm32
31167 0/imm32/no-x32
31168 0x11/imm32/alloc-id:fake
31169 _Primitive-shift-reg-left-by-lit/imm32/next
31170 _Primitive-shift-reg-left-by-lit:
31171 0x11/imm32/alloc-id:fake:payload
31172
31173 0x11/imm32/alloc-id:fake
31174 _string-shift-left/imm32/name
31175 0x11/imm32/alloc-id:fake
31176 Single-lit-var/imm32/inouts
31177 0x11/imm32/alloc-id:fake
31178 Single-int-var-in-some-register/imm32/outputs
31179 0x11/imm32/alloc-id:fake
31180 _string_c1_subop_shift_left/imm32/subx-name
31181 3/imm32/rm32-is-first-output
31182 0/imm32/no-r32
31183 0/imm32/no-imm32
31184 1/imm32/imm8-is-first-inout
31185 0/imm32/no-disp32
31186 0/imm32/no-xm32
31187 0/imm32/no-x32
31188 0x11/imm32/alloc-id:fake
31189 _Primitive-shift-reg-right-by-lit/imm32/next
31190 _Primitive-shift-reg-right-by-lit:
31191 0x11/imm32/alloc-id:fake:payload
31192
31193 0x11/imm32/alloc-id:fake
31194 _string-shift-right/imm32/name
31195 0x11/imm32/alloc-id:fake
31196 Single-lit-var/imm32/inouts
31197 0x11/imm32/alloc-id:fake
31198 Single-int-var-in-some-register/imm32/outputs
31199 0x11/imm32/alloc-id:fake
31200 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
31201 3/imm32/rm32-is-first-output
31202 0/imm32/no-r32
31203 0/imm32/no-imm32
31204 1/imm32/imm8-is-first-inout
31205 0/imm32/no-disp32
31206 0/imm32/no-xm32
31207 0/imm32/no-x32
31208 0x11/imm32/alloc-id:fake
31209 _Primitive-shift-reg-right-signed-by-lit/imm32/next
31210 _Primitive-shift-reg-right-signed-by-lit:
31211 0x11/imm32/alloc-id:fake:payload
31212
31213 0x11/imm32/alloc-id:fake
31214 _string-shift-right-signed/imm32/name
31215 0x11/imm32/alloc-id:fake
31216 Single-lit-var/imm32/inouts
31217 0x11/imm32/alloc-id:fake
31218 Single-int-var-in-some-register/imm32/outputs
31219 0x11/imm32/alloc-id:fake
31220 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
31221 3/imm32/rm32-is-first-output
31222 0/imm32/no-r32
31223 0/imm32/no-imm32
31224 1/imm32/imm8-is-first-inout
31225 0/imm32/no-disp32
31226 0/imm32/no-xm32
31227 0/imm32/no-x32
31228 0x11/imm32/alloc-id:fake
31229 _Primitive-shift-mem-left-by-lit/imm32/next
31230 _Primitive-shift-mem-left-by-lit:
31231 0x11/imm32/alloc-id:fake:payload
31232
31233 0x11/imm32/alloc-id:fake
31234 _string-shift-left/imm32/name
31235 0x11/imm32/alloc-id:fake
31236 Int-var-and-literal/imm32/inouts
31237 0/imm32/no-outputs
31238 0/imm32/no-outputs
31239 0x11/imm32/alloc-id:fake
31240 _string_c1_subop_shift_left/imm32/subx-name
31241 1/imm32/rm32-is-first-inout
31242 0/imm32/no-r32
31243 0/imm32/no-imm32
31244 2/imm32/imm8-is-second-inout
31245 0/imm32/no-disp32
31246 0/imm32/no-xm32
31247 0/imm32/no-x32
31248 0x11/imm32/alloc-id:fake
31249 _Primitive-shift-mem-right-by-lit/imm32/next
31250 _Primitive-shift-mem-right-by-lit:
31251 0x11/imm32/alloc-id:fake:payload
31252
31253 0x11/imm32/alloc-id:fake
31254 _string-shift-right/imm32/name
31255 0x11/imm32/alloc-id:fake
31256 Int-var-and-literal/imm32/inouts
31257 0/imm32/no-outputs
31258 0/imm32/no-outputs
31259 0x11/imm32/alloc-id:fake
31260 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
31261 1/imm32/rm32-is-first-inout
31262 0/imm32/no-r32
31263 0/imm32/no-imm32
31264 2/imm32/imm8-is-second-inout
31265 0/imm32/no-disp32
31266 0/imm32/no-xm32
31267 0/imm32/no-x32
31268 0x11/imm32/alloc-id:fake
31269 _Primitive-shift-mem-right-signed-by-lit/imm32/next
31270 _Primitive-shift-mem-right-signed-by-lit:
31271 0x11/imm32/alloc-id:fake:payload
31272
31273 0x11/imm32/alloc-id:fake
31274 _string-shift-right-signed/imm32/name
31275 0x11/imm32/alloc-id:fake
31276 Int-var-and-literal/imm32/inouts
31277 0/imm32/no-outputs
31278 0/imm32/no-outputs
31279 0x11/imm32/alloc-id:fake
31280 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
31281 1/imm32/rm32-is-first-inout
31282 0/imm32/no-r32
31283 0/imm32/no-imm32
31284 2/imm32/imm8-is-second-inout
31285 0/imm32/no-disp32
31286 0/imm32/no-xm32
31287 0/imm32/no-x32
31288 0x11/imm32/alloc-id:fake
31289 _Primitive-copy-to-eax/imm32/next
31290
31291 _Primitive-copy-to-eax:
31292 0x11/imm32/alloc-id:fake:payload
31293
31294 0x11/imm32/alloc-id:fake
31295 _string-copy/imm32/name
31296 0x11/imm32/alloc-id:fake
31297 Single-lit-var/imm32/inouts
31298 0x11/imm32/alloc-id:fake
31299 Single-int-var-in-eax/imm32/outputs
31300 0x11/imm32/alloc-id:fake
31301 _string_b8_copy_to_eax/imm32/subx-name
31302 0/imm32/no-rm32
31303 0/imm32/no-r32
31304 1/imm32/imm32-is-first-inout
31305 0/imm32/no-imm8
31306 0/imm32/no-disp32
31307 0/imm32/no-xm32
31308 0/imm32/no-x32
31309 0x11/imm32/alloc-id:fake
31310 _Primitive-copy-to-ecx/imm32/next
31311 _Primitive-copy-to-ecx:
31312 0x11/imm32/alloc-id:fake:payload
31313
31314 0x11/imm32/alloc-id:fake
31315 _string-copy/imm32/name
31316 0x11/imm32/alloc-id:fake
31317 Single-lit-var/imm32/inouts
31318 0x11/imm32/alloc-id:fake
31319 Single-int-var-in-ecx/imm32/outputs
31320 0x11/imm32/alloc-id:fake
31321 _string_b9_copy_to_ecx/imm32/subx-name
31322 0/imm32/no-rm32
31323 0/imm32/no-r32
31324 1/imm32/imm32-is-first-inout
31325 0/imm32/no-imm8
31326 0/imm32/no-disp32
31327 0/imm32/no-xm32
31328 0/imm32/no-x32
31329 0x11/imm32/alloc-id:fake
31330 _Primitive-copy-to-edx/imm32/next
31331 _Primitive-copy-to-edx:
31332 0x11/imm32/alloc-id:fake:payload
31333
31334 0x11/imm32/alloc-id:fake
31335 _string-copy/imm32/name
31336 0x11/imm32/alloc-id:fake
31337 Single-lit-var/imm32/inouts
31338 0x11/imm32/alloc-id:fake
31339 Single-int-var-in-edx/imm32/outputs
31340 0x11/imm32/alloc-id:fake
31341 _string_ba_copy_to_edx/imm32/subx-name
31342 0/imm32/no-rm32
31343 0/imm32/no-r32
31344 1/imm32/imm32-is-first-inout
31345 0/imm32/no-imm8
31346 0/imm32/no-disp32
31347 0/imm32/no-xm32
31348 0/imm32/no-x32
31349 0x11/imm32/alloc-id:fake
31350 _Primitive-copy-to-ebx/imm32/next
31351 _Primitive-copy-to-ebx:
31352 0x11/imm32/alloc-id:fake:payload
31353
31354 0x11/imm32/alloc-id:fake
31355 _string-copy/imm32/name
31356 0x11/imm32/alloc-id:fake
31357 Single-lit-var/imm32/inouts
31358 0x11/imm32/alloc-id:fake
31359 Single-int-var-in-ebx/imm32/outputs
31360 0x11/imm32/alloc-id:fake
31361 _string_bb_copy_to_ebx/imm32/subx-name
31362 0/imm32/no-rm32
31363 0/imm32/no-r32
31364 1/imm32/imm32-is-first-inout
31365 0/imm32/no-imm8
31366 0/imm32/no-disp32
31367 0/imm32/no-xm32
31368 0/imm32/no-x32
31369 0x11/imm32/alloc-id:fake
31370 _Primitive-copy-to-esi/imm32/next
31371 _Primitive-copy-to-esi:
31372 0x11/imm32/alloc-id:fake:payload
31373
31374 0x11/imm32/alloc-id:fake
31375 _string-copy/imm32/name
31376 0x11/imm32/alloc-id:fake
31377 Single-lit-var/imm32/inouts
31378 0x11/imm32/alloc-id:fake
31379 Single-int-var-in-esi/imm32/outputs
31380 0x11/imm32/alloc-id:fake
31381 _string_be_copy_to_esi/imm32/subx-name
31382 0/imm32/no-rm32
31383 0/imm32/no-r32
31384 1/imm32/imm32-is-first-inout
31385 0/imm32/no-imm8
31386 0/imm32/no-disp32
31387 0/imm32/no-xm32
31388 0/imm32/no-x32
31389 0x11/imm32/alloc-id:fake
31390 _Primitive-copy-to-edi/imm32/next
31391 _Primitive-copy-to-edi:
31392 0x11/imm32/alloc-id:fake:payload
31393
31394 0x11/imm32/alloc-id:fake
31395 _string-copy/imm32/name
31396 0x11/imm32/alloc-id:fake
31397 Single-lit-var/imm32/inouts
31398 0x11/imm32/alloc-id:fake
31399 Single-int-var-in-edi/imm32/outputs
31400 0x11/imm32/alloc-id:fake
31401 _string_bf_copy_to_edi/imm32/subx-name
31402 0/imm32/no-rm32
31403 0/imm32/no-r32
31404 1/imm32/imm32-is-first-inout
31405 0/imm32/no-imm8
31406 0/imm32/no-disp32
31407 0/imm32/no-xm32
31408 0/imm32/no-x32
31409 0x11/imm32/alloc-id:fake
31410 _Primitive-copy-reg-to-reg/imm32/next
31411 _Primitive-copy-reg-to-reg:
31412 0x11/imm32/alloc-id:fake:payload
31413
31414 0x11/imm32/alloc-id:fake
31415 _string-copy/imm32/name
31416 0x11/imm32/alloc-id:fake
31417 Single-int-var-in-some-register/imm32/inouts
31418 0x11/imm32/alloc-id:fake
31419 Single-int-var-in-some-register/imm32/outputs
31420 0x11/imm32/alloc-id:fake
31421 _string_89_<-/imm32/subx-name
31422 3/imm32/rm32-is-first-output
31423 1/imm32/r32-is-first-inout
31424 0/imm32/no-imm32
31425 0/imm32/no-imm8
31426 0/imm32/no-disp32
31427 0/imm32/no-xm32
31428 0/imm32/no-x32
31429 0x11/imm32/alloc-id:fake
31430 _Primitive-copy-reg-to-mem/imm32/next
31431 _Primitive-copy-reg-to-mem:
31432 0x11/imm32/alloc-id:fake:payload
31433
31434 0x11/imm32/alloc-id:fake
31435 _string-copy-to/imm32/name
31436 0x11/imm32/alloc-id:fake
31437 Two-args-int-stack-int-reg/imm32/inouts
31438 0/imm32/no-outputs
31439 0/imm32/no-outputs
31440 0x11/imm32/alloc-id:fake
31441 _string_89_<-/imm32/subx-name
31442 1/imm32/rm32-is-first-inout
31443 2/imm32/r32-is-second-inout
31444 0/imm32/no-imm32
31445 0/imm32/no-imm8
31446 0/imm32/no-disp32
31447 0/imm32/no-xm32
31448 0/imm32/no-x32
31449 0x11/imm32/alloc-id:fake
31450 _Primitive-copy-mem-to-reg/imm32/next
31451 _Primitive-copy-mem-to-reg:
31452 0x11/imm32/alloc-id:fake:payload
31453
31454 0x11/imm32/alloc-id:fake
31455 _string-copy/imm32/name
31456 0x11/imm32/alloc-id:fake
31457 Single-int-var-in-mem/imm32/inouts
31458 0x11/imm32/alloc-id:fake
31459 Single-int-var-in-some-register/imm32/outputs
31460 0x11/imm32/alloc-id:fake
31461 _string_8b_->/imm32/subx-name
31462 1/imm32/rm32-is-first-inout
31463 3/imm32/r32-is-first-output
31464 0/imm32/no-imm32
31465 0/imm32/no-imm8
31466 0/imm32/no-disp32
31467 0/imm32/no-xm32
31468 0/imm32/no-x32
31469 0x11/imm32/alloc-id:fake
31470 _Primitive-copy-lit-to-reg/imm32/next
31471 _Primitive-copy-lit-to-reg:
31472 0x11/imm32/alloc-id:fake:payload
31473
31474 0x11/imm32/alloc-id:fake
31475 _string-copy/imm32/name
31476 0x11/imm32/alloc-id:fake
31477 Single-lit-var/imm32/inouts
31478 0x11/imm32/alloc-id:fake
31479 Single-int-var-in-some-register/imm32/outputs
31480 0x11/imm32/alloc-id:fake
31481 _string_c7_subop_copy/imm32/subx-name
31482 3/imm32/rm32-is-first-output
31483 0/imm32/no-r32
31484 1/imm32/imm32-is-first-inout
31485 0/imm32/no-imm8
31486 0/imm32/no-disp32
31487 0/imm32/no-xm32
31488 0/imm32/no-x32
31489 0x11/imm32/alloc-id:fake
31490 _Primitive-copy-lit-to-mem/imm32/next
31491 _Primitive-copy-lit-to-mem:
31492 0x11/imm32/alloc-id:fake:payload
31493
31494 0x11/imm32/alloc-id:fake
31495 _string-copy-to/imm32/name
31496 0x11/imm32/alloc-id:fake
31497 Int-var-and-literal/imm32/inouts
31498 0/imm32/no-outputs
31499 0/imm32/no-outputs
31500 0x11/imm32/alloc-id:fake
31501 _string_c7_subop_copy/imm32/subx-name
31502 1/imm32/rm32-is-first-inout
31503 0/imm32/no-r32
31504 2/imm32/imm32-is-second-inout
31505 0/imm32/no-imm8
31506 0/imm32/no-disp32
31507 0/imm32/no-xm32
31508 0/imm32/no-x32
31509 0x11/imm32/alloc-id:fake
31510 _Primitive-copy-byte-from-reg/imm32/next
31511
31512 _Primitive-copy-byte-from-reg:
31513 0x11/imm32/alloc-id:fake:payload
31514
31515 0x11/imm32/alloc-id:fake
31516 _string-copy-byte/imm32/name
31517 0x11/imm32/alloc-id:fake
31518 Single-byte-var-in-some-register/imm32/inouts
31519 0x11/imm32/alloc-id:fake
31520 Single-byte-var-in-some-register/imm32/outputs
31521 0x11/imm32/alloc-id:fake
31522 _string_8a_copy_byte/imm32/subx-name
31523 1/imm32/rm32-is-first-inout
31524 3/imm32/r32-is-first-output
31525 0/imm32/no-imm32
31526 0/imm32/no-imm8
31527 0/imm32/no-disp32
31528 0/imm32/no-xm32
31529 0/imm32/no-x32
31530 0x11/imm32/alloc-id:fake
31531 _Primitive-copy-byte-from-mem/imm32/next
31532 _Primitive-copy-byte-from-mem:
31533 0x11/imm32/alloc-id:fake:payload
31534
31535 0x11/imm32/alloc-id:fake
31536 _string-copy-byte/imm32/name
31537 0x11/imm32/alloc-id:fake
31538 Single-byte-var-in-mem/imm32/inouts
31539 0x11/imm32/alloc-id:fake
31540 Single-byte-var-in-some-register/imm32/outputs
31541 0x11/imm32/alloc-id:fake
31542 _string_8a_copy_byte/imm32/subx-name
31543 1/imm32/rm32-is-first-inout
31544 3/imm32/r32-is-first-output
31545 0/imm32/no-imm32
31546 0/imm32/no-imm8
31547 0/imm32/no-disp32
31548 0/imm32/no-xm32
31549 0/imm32/no-x32
31550 0x11/imm32/alloc-id:fake
31551 _Primitive-copy-byte-to-mem/imm32/next
31552 _Primitive-copy-byte-to-mem:
31553 0x11/imm32/alloc-id:fake:payload
31554
31555 0x11/imm32/alloc-id:fake
31556 _string-copy-byte-to/imm32/name
31557 0x11/imm32/alloc-id:fake
31558 Two-args-byte-stack-byte-reg/imm32/inouts
31559 0/imm32/no-outputs
31560 0/imm32/no-outputs
31561 0x11/imm32/alloc-id:fake
31562 _string_88_copy_byte/imm32/subx-name
31563 1/imm32/rm32-is-first-inout
31564 2/imm32/r32-is-second-inout
31565 0/imm32/no-imm32
31566 0/imm32/no-imm8
31567 0/imm32/no-disp32
31568 0/imm32/no-xm32
31569 0/imm32/no-x32
31570 0x11/imm32/alloc-id:fake
31571 _Primitive-address/imm32/next
31572
31573 _Primitive-address:
31574 0x11/imm32/alloc-id:fake:payload
31575
31576 0x11/imm32/alloc-id:fake
31577 _string-address/imm32/name
31578 0x11/imm32/alloc-id:fake
31579 Single-int-var-in-mem/imm32/inouts
31580 0x11/imm32/alloc-id:fake
31581 Single-addr-var-in-some-register/imm32/outputs
31582 0x11/imm32/alloc-id:fake
31583 _string_8d_copy_address/imm32/subx-name
31584 1/imm32/rm32-is-first-inout
31585 3/imm32/r32-is-first-output
31586 0/imm32/no-imm32
31587 0/imm32/no-imm8
31588 0/imm32/no-disp32
31589 0/imm32/no-xm32
31590 0/imm32/no-x32
31591 0x11/imm32/alloc-id:fake
31592 _Primitive-compare-reg-with-reg/imm32/next
31593
31594 _Primitive-compare-reg-with-reg:
31595 0x11/imm32/alloc-id:fake:payload
31596
31597 0x11/imm32/alloc-id:fake
31598 _string-compare/imm32/name
31599 0x11/imm32/alloc-id:fake
31600 Two-int-args-in-regs/imm32/inouts
31601 0/imm32/no-outputs
31602 0/imm32/no-outputs
31603 0x11/imm32/alloc-id:fake
31604 _string_39_compare->/imm32/subx-name
31605 1/imm32/rm32-is-first-inout
31606 2/imm32/r32-is-second-inout
31607 0/imm32/no-imm32
31608 0/imm32/no-imm8
31609 0/imm32/no-disp32
31610 0/imm32/no-xm32
31611 0/imm32/no-x32
31612 0x11/imm32/alloc-id:fake
31613 _Primitive-compare-mem-with-reg/imm32/next
31614 _Primitive-compare-mem-with-reg:
31615 0x11/imm32/alloc-id:fake:payload
31616
31617 0x11/imm32/alloc-id:fake
31618 _string-compare/imm32/name
31619 0x11/imm32/alloc-id:fake
31620 Two-args-int-stack-int-reg/imm32/inouts
31621 0/imm32/no-outputs
31622 0/imm32/no-outputs
31623 0x11/imm32/alloc-id:fake
31624 _string_39_compare->/imm32/subx-name
31625 1/imm32/rm32-is-first-inout
31626 2/imm32/r32-is-second-inout
31627 0/imm32/no-imm32
31628 0/imm32/no-imm8
31629 0/imm32/no-disp32
31630 0/imm32/no-xm32
31631 0/imm32/no-x32
31632 0x11/imm32/alloc-id:fake
31633 _Primitive-compare-reg-with-mem/imm32/next
31634 _Primitive-compare-reg-with-mem:
31635 0x11/imm32/alloc-id:fake:payload
31636
31637 0x11/imm32/alloc-id:fake
31638 _string-compare/imm32/name
31639 0x11/imm32/alloc-id:fake
31640 Two-args-int-reg-int-stack/imm32/inouts
31641 0/imm32/no-outputs
31642 0/imm32/no-outputs
31643 0x11/imm32/alloc-id:fake
31644 _string_3b_compare<-/imm32/subx-name
31645 2/imm32/rm32-is-second-inout
31646 1/imm32/r32-is-first-inout
31647 0/imm32/no-imm32
31648 0/imm32/no-imm8
31649 0/imm32/no-disp32
31650 0/imm32/no-xm32
31651 0/imm32/no-x32
31652 0x11/imm32/alloc-id:fake
31653 _Primitive-compare-eax-with-literal/imm32/next
31654 _Primitive-compare-eax-with-literal:
31655 0x11/imm32/alloc-id:fake:payload
31656
31657 0x11/imm32/alloc-id:fake
31658 _string-compare/imm32/name
31659 0x11/imm32/alloc-id:fake
31660 Two-args-int-eax-int-literal/imm32/inouts
31661 0/imm32/no-outputs
31662 0/imm32/no-outputs
31663 0x11/imm32/alloc-id:fake
31664 _string_3d_compare_eax_with/imm32/subx-name
31665 0/imm32/no-rm32
31666 0/imm32/no-r32
31667 2/imm32/imm32-is-second-inout
31668 0/imm32/no-imm8
31669 0/imm32/no-disp32
31670 0/imm32/no-xm32
31671 0/imm32/no-x32
31672 0x11/imm32/alloc-id:fake
31673 _Primitive-compare-reg-with-literal/imm32/next
31674 _Primitive-compare-reg-with-literal:
31675 0x11/imm32/alloc-id:fake:payload
31676
31677 0x11/imm32/alloc-id:fake
31678 _string-compare/imm32/name
31679 0x11/imm32/alloc-id:fake
31680 Int-var-in-register-and-literal/imm32/inouts
31681 0/imm32/no-outputs
31682 0/imm32/no-outputs
31683 0x11/imm32/alloc-id:fake
31684 _string_81_subop_compare/imm32/subx-name
31685 1/imm32/rm32-is-first-inout
31686 0/imm32/no-r32
31687 2/imm32/imm32-is-second-inout
31688 0/imm32/no-imm8
31689 0/imm32/no-disp32
31690 0/imm32/no-xm32
31691 0/imm32/no-x32
31692 0x11/imm32/alloc-id:fake
31693 _Primitive-compare-mem-with-literal/imm32/next
31694 _Primitive-compare-mem-with-literal:
31695 0x11/imm32/alloc-id:fake:payload
31696
31697 0x11/imm32/alloc-id:fake
31698 _string-compare/imm32/name
31699 0x11/imm32/alloc-id:fake
31700 Int-var-and-literal/imm32/inouts
31701 0/imm32/no-outputs
31702 0/imm32/no-outputs
31703 0x11/imm32/alloc-id:fake
31704 _string_81_subop_compare/imm32/subx-name
31705 1/imm32/rm32-is-first-inout
31706 0/imm32/no-r32
31707 2/imm32/imm32-is-second-inout
31708 0/imm32/no-imm8
31709 0/imm32/no-disp32
31710 0/imm32/no-xm32
31711 0/imm32/no-x32
31712 0x11/imm32/alloc-id:fake
31713 _Primitive-negate-reg/imm32/next
31714
31715 _Primitive-negate-reg:
31716 0x11/imm32/alloc-id:fake:payload
31717
31718 0x11/imm32/alloc-id:fake
31719 _string-negate/imm32/name
31720 0/imm32/no-inouts
31721 0/imm32/no-inouts
31722 0x11/imm32/alloc-id:fake
31723 Single-int-var-in-some-register/imm32/outputs
31724 0x11/imm32/alloc-id:fake
31725 _string_f7_subop_negate/imm32/subx-name
31726 3/imm32/rm32-is-first-output
31727 0/imm32/no-r32
31728 0/imm32/no-imm32
31729 0/imm32/no-imm8
31730 0/imm32/no-disp32
31731 0/imm32/no-xm32
31732 0/imm32/no-x32
31733 0x11/imm32/alloc-id:fake
31734 _Primitive-negate-mem/imm32/next
31735 _Primitive-negate-mem:
31736 0x11/imm32/alloc-id:fake:payload
31737
31738 0x11/imm32/alloc-id:fake
31739 _string-negate/imm32/name
31740 0x11/imm32/alloc-id:fake
31741 Single-int-var-in-mem/imm32/inouts
31742 0/imm32/no-outputs
31743 0/imm32/no-outputs
31744 0x11/imm32/alloc-id:fake
31745 _string_f7_subop_negate/imm32/subx-name
31746 1/imm32/rm32-is-first-inout
31747 0/imm32/no-r32
31748 0/imm32/no-imm32
31749 0/imm32/no-imm8
31750 0/imm32/no-disp32
31751 0/imm32/no-xm32
31752 0/imm32/no-x32
31753 0x11/imm32/alloc-id:fake
31754 _Primitive-multiply-reg-by-reg/imm32/next
31755
31756 _Primitive-multiply-reg-by-reg:
31757 0x11/imm32/alloc-id:fake:payload
31758
31759 0x11/imm32/alloc-id:fake
31760 _string-multiply/imm32/name
31761 0x11/imm32/alloc-id:fake
31762 Single-int-var-in-some-register/imm32/inouts
31763 0x11/imm32/alloc-id:fake
31764 Single-int-var-in-some-register/imm32/outputs
31765 0x11/imm32/alloc-id:fake
31766 _string_0f_af_multiply/imm32/subx-name
31767 1/imm32/rm32-is-first-inout
31768 3/imm32/r32-is-first-output
31769 0/imm32/no-imm32
31770 0/imm32/no-imm8
31771 0/imm32/no-disp32
31772 0/imm32/no-xm32
31773 0/imm32/no-x32
31774 0x11/imm32/alloc-id:fake
31775 _Primitive-multiply-reg-by-mem/imm32/next
31776 _Primitive-multiply-reg-by-mem:
31777 0x11/imm32/alloc-id:fake:payload
31778
31779 0x11/imm32/alloc-id:fake
31780 _string-multiply/imm32/name
31781 0x11/imm32/alloc-id:fake
31782 Single-int-var-in-mem/imm32/inouts
31783 0x11/imm32/alloc-id:fake
31784 Single-int-var-in-some-register/imm32/outputs
31785 0x11/imm32/alloc-id:fake
31786 _string_0f_af_multiply/imm32/subx-name
31787 1/imm32/rm32-is-first-inout
31788 3/imm32/r32-is-first-output
31789 0/imm32/no-imm32
31790 0/imm32/no-imm8
31791 0/imm32/no-disp32
31792 0/imm32/no-xm32
31793 0/imm32/no-x32
31794 0x11/imm32/alloc-id:fake
31795 _Primitive-convert-mem-to-xreg/imm32/next
31796
31797 _Primitive-convert-mem-to-xreg:
31798 0x11/imm32/alloc-id:fake:payload
31799
31800 0x11/imm32/alloc-id:fake
31801 _string-convert/imm32/name
31802 0x11/imm32/alloc-id:fake
31803 Single-int-var-in-mem/imm32/inouts
31804 0x11/imm32/alloc-id:fake
31805 Single-float-var-in-some-register/imm32/outputs
31806 0x11/imm32/alloc-id:fake
31807 _string_f3_0f_2a_convert_to_float/imm32/subx-name
31808 1/imm32/rm32-is-first-inout
31809 0/imm32/no-r32
31810 0/imm32/no-imm32
31811 0/imm32/no-imm8
31812 0/imm32/no-disp32
31813 0/imm32/no-xm32
31814 3/imm32/x32-is-first-output
31815 0x11/imm32/alloc-id:fake
31816 _Primitive-convert-reg-to-xreg/imm32/next
31817 _Primitive-convert-reg-to-xreg:
31818 0x11/imm32/alloc-id:fake:payload
31819
31820 0x11/imm32/alloc-id:fake
31821 _string-convert/imm32/name
31822 0x11/imm32/alloc-id:fake
31823 Single-int-var-in-some-register/imm32/inouts
31824 0x11/imm32/alloc-id:fake
31825 Single-float-var-in-some-register/imm32/outputs
31826 0x11/imm32/alloc-id:fake
31827 _string_f3_0f_2a_convert_to_float/imm32/subx-name
31828 1/imm32/rm32-is-first-inout
31829 0/imm32/no-r32
31830 0/imm32/no-imm32
31831 0/imm32/no-imm8
31832 0/imm32/no-disp32
31833 0/imm32/no-xm32
31834 3/imm32/x32-is-first-output
31835 0x11/imm32/alloc-id:fake
31836 _Primitive-convert-xmem-to-reg/imm32/next
31837
31838 _Primitive-convert-xmem-to-reg:
31839 0x11/imm32/alloc-id:fake:payload
31840
31841 0x11/imm32/alloc-id:fake
31842 _string-convert/imm32/name
31843 0x11/imm32/alloc-id:fake
31844 Single-float-var-in-mem/imm32/inouts
31845 0x11/imm32/alloc-id:fake
31846 Single-int-var-in-some-register/imm32/outputs
31847 0x11/imm32/alloc-id:fake
31848 _string_f3_0f_2d_convert_to_int/imm32/subx-name
31849 0/imm32/no-rm32
31850 3/imm32/r32-is-first-output
31851 0/imm32/no-imm32
31852 0/imm32/no-imm8
31853 0/imm32/no-disp32
31854 1/imm32/xm32-is-first-inout
31855 0/imm32/no-x32
31856 0x11/imm32/alloc-id:fake
31857 _Primitive-convert-xreg-to-reg/imm32/next
31858 _Primitive-convert-xreg-to-reg:
31859 0x11/imm32/alloc-id:fake:payload
31860
31861 0x11/imm32/alloc-id:fake
31862 _string-convert/imm32/name
31863 0x11/imm32/alloc-id:fake
31864 Single-float-var-in-some-register/imm32/inouts
31865 0x11/imm32/alloc-id:fake
31866 Single-int-var-in-some-register/imm32/outputs
31867 0x11/imm32/alloc-id:fake
31868 _string_f3_0f_2d_convert_to_int/imm32/subx-name
31869 0/imm32/no-rm32
31870 3/imm32/r32-is-first-output
31871 0/imm32/no-imm32
31872 0/imm32/no-imm8
31873 0/imm32/no-disp32
31874 1/imm32/xm32-is-first-inout
31875 0/imm32/no-x32
31876 0x11/imm32/alloc-id:fake
31877 _Primitive-truncate-xmem-to-reg/imm32/next
31878 _Primitive-truncate-xmem-to-reg:
31879 0x11/imm32/alloc-id:fake:payload
31880
31881 0x11/imm32/alloc-id:fake
31882 _string-truncate/imm32/name
31883 0x11/imm32/alloc-id:fake
31884 Single-float-var-in-mem/imm32/inouts
31885 0x11/imm32/alloc-id:fake
31886 Single-int-var-in-some-register/imm32/outputs
31887 0x11/imm32/alloc-id:fake
31888 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
31889 0/imm32/no-rm32
31890 3/imm32/r32-is-first-output
31891 0/imm32/no-imm32
31892 0/imm32/no-imm8
31893 0/imm32/no-disp32
31894 1/imm32/xm32-is-first-inout
31895 0/imm32/no-x32
31896 0x11/imm32/alloc-id:fake
31897 _Primitive-truncate-xreg-to-reg/imm32/next
31898 _Primitive-truncate-xreg-to-reg:
31899 0x11/imm32/alloc-id:fake:payload
31900
31901 0x11/imm32/alloc-id:fake
31902 _string-truncate/imm32/name
31903 0x11/imm32/alloc-id:fake
31904 Single-float-var-in-some-register/imm32/inouts
31905 0x11/imm32/alloc-id:fake
31906 Single-int-var-in-some-register/imm32/outputs
31907 0x11/imm32/alloc-id:fake
31908 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
31909 0/imm32/no-rm32
31910 3/imm32/r32-is-first-output
31911 0/imm32/no-imm32
31912 0/imm32/no-imm8
31913 0/imm32/no-disp32
31914 1/imm32/xm32-is-first-inout
31915 0/imm32/no-x32
31916 0x11/imm32/alloc-id:fake
31917 _Primitive-reinterpret-xmem-as-reg/imm32/next
31918
31919 _Primitive-reinterpret-xmem-as-reg:
31920 0x11/imm32/alloc-id:fake:payload
31921
31922 0x11/imm32/alloc-id:fake
31923 _string-reinterpret/imm32/name
31924 0x11/imm32/alloc-id:fake
31925 Single-float-var-in-mem/imm32/inouts
31926 0x11/imm32/alloc-id:fake
31927 Single-int-var-in-some-register/imm32/outputs
31928 0x11/imm32/alloc-id:fake
31929 _string_8b_->/imm32/subx-name
31930 0/imm32/no-rm32
31931 3/imm32/r32-is-first-output
31932 0/imm32/no-imm32
31933 0/imm32/no-imm8
31934 0/imm32/no-disp32
31935 1/imm32/xm32-is-first-inout
31936 0/imm32/no-x32
31937 0x11/imm32/alloc-id:fake
31938 _Primitive-reinterpret-mem-as-xreg/imm32/next
31939 _Primitive-reinterpret-mem-as-xreg:
31940 0x11/imm32/alloc-id:fake:payload
31941
31942 0x11/imm32/alloc-id:fake
31943 _string-reinterpret/imm32/name
31944 0x11/imm32/alloc-id:fake
31945 Single-int-var-in-mem/imm32/inouts
31946 0x11/imm32/alloc-id:fake
31947 Single-float-var-in-some-register/imm32/outputs
31948 0x11/imm32/alloc-id:fake
31949 _string_f3_0f_10_copy/imm32/subx-name
31950 1/imm32/rm32-is-first-inout
31951 0/imm32/no-r32
31952 0/imm32/no-imm32
31953 0/imm32/no-imm8
31954 0/imm32/no-disp32
31955 0/imm32/no-xm32
31956 3/imm32/x32-is-first-output
31957 0x11/imm32/alloc-id:fake
31958 _Primitive-copy-xreg-to-xreg/imm32/next
31959
31960 _Primitive-copy-xreg-to-xreg:
31961 0x11/imm32/alloc-id:fake:payload
31962
31963 0x11/imm32/alloc-id:fake
31964 _string-copy/imm32/name
31965 0x11/imm32/alloc-id:fake
31966 Single-float-var-in-some-register/imm32/inouts
31967 0x11/imm32/alloc-id:fake
31968 Single-float-var-in-some-register/imm32/outputs
31969 0x11/imm32/alloc-id:fake
31970 _string_f3_0f_11_copy/imm32/subx-name
31971 0/imm32/no-rm32
31972 0/imm32/no-r32
31973 0/imm32/no-imm32
31974 0/imm32/no-imm8
31975 0/imm32/no-disp32
31976 3/imm32/xm32-is-first-output
31977 1/imm32/x32-is-first-inout
31978 0x11/imm32/alloc-id:fake
31979 _Primitive-copy-xreg-to-mem/imm32/next
31980 _Primitive-copy-xreg-to-mem:
31981 0x11/imm32/alloc-id:fake:payload
31982
31983 0x11/imm32/alloc-id:fake
31984 _string-copy-to/imm32/name
31985 0x11/imm32/alloc-id:fake
31986 Two-args-float-stack-float-reg/imm32/inouts
31987 0/imm32/no-outputs
31988 0/imm32/no-outputs
31989 0x11/imm32/alloc-id:fake
31990 _string_f3_0f_11_copy/imm32/subx-name
31991 0/imm32/no-rm32
31992 0/imm32/no-r32
31993 0/imm32/no-imm32
31994 0/imm32/no-imm8
31995 0/imm32/no-disp32
31996 1/imm32/xm32-is-first-inout
31997 2/imm32/x32-is-second-inout
31998 0x11/imm32/alloc-id:fake
31999 _Primitive-copy-mem-to-xreg/imm32/next
32000 _Primitive-copy-mem-to-xreg:
32001 0x11/imm32/alloc-id:fake:payload
32002
32003 0x11/imm32/alloc-id:fake
32004 _string-copy/imm32/name
32005 0x11/imm32/alloc-id:fake
32006 Single-float-var-in-mem/imm32/inouts
32007 0x11/imm32/alloc-id:fake
32008 Single-float-var-in-some-register/imm32/outputs
32009 0x11/imm32/alloc-id:fake
32010 _string_f3_0f_10_copy/imm32/subx-name
32011 0/imm32/no-rm32
32012 0/imm32/no-r32
32013 0/imm32/no-imm32
32014 0/imm32/no-imm8
32015 0/imm32/no-disp32
32016 1/imm32/xm32-is-first-inout
32017 3/imm32/x32-is-first-output
32018 0x11/imm32/alloc-id:fake
32019 _Primitive-address-of-xmem/imm32/next
32020
32021 _Primitive-address-of-xmem:
32022 0x11/imm32/alloc-id:fake:payload
32023
32024 0x11/imm32/alloc-id:fake
32025 _string-address/imm32/name
32026 0x11/imm32/alloc-id:fake
32027 Single-float-var-in-mem/imm32/inouts
32028 0x11/imm32/alloc-id:fake
32029 Single-addr-var-in-some-register/imm32/outputs
32030 0x11/imm32/alloc-id:fake
32031 _string_8d_copy_address/imm32/subx-name
32032 1/imm32/rm32-is-first-inout
32033 3/imm32/r32-is-first-output
32034 0/imm32/no-imm32
32035 0/imm32/no-imm8
32036 0/imm32/no-disp32
32037 0/imm32/no-xm32
32038 0/imm32/no-x32
32039 0x11/imm32/alloc-id:fake
32040 _Primitive-add-xreg-to-xreg/imm32/next
32041
32042 _Primitive-add-xreg-to-xreg:
32043 0x11/imm32/alloc-id:fake:payload
32044
32045 0x11/imm32/alloc-id:fake
32046 _string-add/imm32/name
32047 0x11/imm32/alloc-id:fake
32048 Single-float-var-in-some-register/imm32/inouts
32049 0x11/imm32/alloc-id:fake
32050 Single-float-var-in-some-register/imm32/outputs
32051 0x11/imm32/alloc-id:fake
32052 _string_f3_0f_58_add/imm32/subx-name
32053 0/imm32/no-rm32
32054 0/imm32/no-r32
32055 0/imm32/no-imm32
32056 0/imm32/no-imm8
32057 0/imm32/no-disp32
32058 1/imm32/xm32-is-first-inout
32059 3/imm32/x32-is-first-output
32060 0x11/imm32/alloc-id:fake
32061 _Primitive-add-mem-to-xreg/imm32/next
32062 _Primitive-add-mem-to-xreg:
32063 0x11/imm32/alloc-id:fake:payload
32064
32065 0x11/imm32/alloc-id:fake
32066 _string-add/imm32/name
32067 0x11/imm32/alloc-id:fake
32068 Single-float-var-in-mem/imm32/inouts
32069 0x11/imm32/alloc-id:fake
32070 Single-float-var-in-some-register/imm32/outputs
32071 0x11/imm32/alloc-id:fake
32072 _string_f3_0f_58_add/imm32/subx-name
32073 0/imm32/no-rm32
32074 0/imm32/no-r32
32075 0/imm32/no-imm32
32076 0/imm32/no-imm8
32077 0/imm32/no-disp32
32078 1/imm32/xm32-is-first-inout
32079 3/imm32/x32-is-first-output
32080 0x11/imm32/alloc-id:fake
32081 _Primitive-subtract-xreg-from-xreg/imm32/next
32082
32083 _Primitive-subtract-xreg-from-xreg:
32084 0x11/imm32/alloc-id:fake:payload
32085
32086 0x11/imm32/alloc-id:fake
32087 _string-subtract/imm32/name
32088 0x11/imm32/alloc-id:fake
32089 Single-float-var-in-some-register/imm32/inouts
32090 0x11/imm32/alloc-id:fake
32091 Single-float-var-in-some-register/imm32/outputs
32092 0x11/imm32/alloc-id:fake
32093 _string_f3_0f_5c_subtract/imm32/subx-name
32094 0/imm32/no-rm32
32095 0/imm32/no-r32
32096 0/imm32/no-imm32
32097 0/imm32/no-imm8
32098 0/imm32/no-disp32
32099 1/imm32/xm32-is-first-inout
32100 3/imm32/x32-is-first-output
32101 0x11/imm32/alloc-id:fake
32102 _Primitive-subtract-mem-from-xreg/imm32/next
32103 _Primitive-subtract-mem-from-xreg:
32104 0x11/imm32/alloc-id:fake:payload
32105
32106 0x11/imm32/alloc-id:fake
32107 _string-subtract/imm32/name
32108 0x11/imm32/alloc-id:fake
32109 Single-float-var-in-mem/imm32/inouts
32110 0x11/imm32/alloc-id:fake
32111 Single-float-var-in-some-register/imm32/outputs
32112 0x11/imm32/alloc-id:fake
32113 _string_f3_0f_5c_subtract/imm32/subx-name
32114 0/imm32/no-rm32
32115 0/imm32/no-r32
32116 0/imm32/no-imm32
32117 0/imm32/no-imm8
32118 0/imm32/no-disp32
32119 1/imm32/xm32-is-first-inout
32120 3/imm32/x32-is-first-output
32121 0x11/imm32/alloc-id:fake
32122 _Primitive-multiply-xreg-by-xreg/imm32/next
32123
32124 _Primitive-multiply-xreg-by-xreg:
32125 0x11/imm32/alloc-id:fake:payload
32126
32127 0x11/imm32/alloc-id:fake
32128 _string-multiply/imm32/name
32129 0x11/imm32/alloc-id:fake
32130 Single-float-var-in-some-register/imm32/inouts
32131 0x11/imm32/alloc-id:fake
32132 Single-float-var-in-some-register/imm32/outputs
32133 0x11/imm32/alloc-id:fake
32134 _string_f3_0f_59_multiply/imm32/subx-name
32135 0/imm32/no-rm32
32136 0/imm32/no-r32
32137 0/imm32/no-imm32
32138 0/imm32/no-imm8
32139 0/imm32/no-disp32
32140 1/imm32/xm32-is-first-inout
32141 3/imm32/x32-is-first-output
32142 0x11/imm32/alloc-id:fake
32143 _Primitive-multiply-xreg-by-mem/imm32/next
32144 _Primitive-multiply-xreg-by-mem:
32145 0x11/imm32/alloc-id:fake:payload
32146
32147 0x11/imm32/alloc-id:fake
32148 _string-multiply/imm32/name
32149 0x11/imm32/alloc-id:fake
32150 Single-float-var-in-mem/imm32/inouts
32151 0x11/imm32/alloc-id:fake
32152 Single-float-var-in-some-register/imm32/outputs
32153 0x11/imm32/alloc-id:fake
32154 _string_f3_0f_59_multiply/imm32/subx-name
32155 0/imm32/no-rm32
32156 0/imm32/no-r32
32157 0/imm32/no-imm32
32158 0/imm32/no-imm8
32159 0/imm32/no-disp32
32160 1/imm32/xm32-is-first-inout
32161 3/imm32/x32-is-first-output
32162 0x11/imm32/alloc-id:fake
32163 _Primitive-divide-xreg-by-xreg/imm32/next
32164
32165 _Primitive-divide-xreg-by-xreg:
32166 0x11/imm32/alloc-id:fake:payload
32167
32168 0x11/imm32/alloc-id:fake
32169 _string-divide/imm32/name
32170 0x11/imm32/alloc-id:fake
32171 Single-float-var-in-some-register/imm32/inouts
32172 0x11/imm32/alloc-id:fake
32173 Single-float-var-in-some-register/imm32/outputs
32174 0x11/imm32/alloc-id:fake
32175 _string_f3_0f_5e_divide/imm32/subx-name
32176 0/imm32/no-rm32
32177 0/imm32/no-r32
32178 0/imm32/no-imm32
32179 0/imm32/no-imm8
32180 0/imm32/no-disp32
32181 1/imm32/xm32-is-first-inout
32182 3/imm32/x32-is-first-output
32183 0x11/imm32/alloc-id:fake
32184 _Primitive-divide-xreg-by-mem/imm32/next
32185 _Primitive-divide-xreg-by-mem:
32186 0x11/imm32/alloc-id:fake:payload
32187
32188 0x11/imm32/alloc-id:fake
32189 _string-divide/imm32/name
32190 0x11/imm32/alloc-id:fake
32191 Single-float-var-in-mem/imm32/inouts
32192 0x11/imm32/alloc-id:fake
32193 Single-float-var-in-some-register/imm32/outputs
32194 0x11/imm32/alloc-id:fake
32195 _string_f3_0f_5e_divide/imm32/subx-name
32196 0/imm32/no-rm32
32197 0/imm32/no-r32
32198 0/imm32/no-imm32
32199 0/imm32/no-imm8
32200 0/imm32/no-disp32
32201 1/imm32/xm32-is-first-inout
32202 3/imm32/x32-is-first-output
32203 0x11/imm32/alloc-id:fake
32204 _Primitive-max-xreg-with-xreg/imm32/next
32205
32206 _Primitive-max-xreg-with-xreg:
32207 0x11/imm32/alloc-id:fake:payload
32208
32209 0x11/imm32/alloc-id:fake
32210 _string-max/imm32/name
32211 0x11/imm32/alloc-id:fake
32212 Single-float-var-in-some-register/imm32/inouts
32213 0x11/imm32/alloc-id:fake
32214 Single-float-var-in-some-register/imm32/outputs
32215 0x11/imm32/alloc-id:fake
32216 _string_f3_0f_5f_max/imm32/subx-name
32217 0/imm32/no-rm32
32218 0/imm32/no-r32
32219 0/imm32/no-imm32
32220 0/imm32/no-imm8
32221 0/imm32/no-disp32
32222 1/imm32/xm32-is-first-inout
32223 3/imm32/x32-is-first-output
32224 0x11/imm32/alloc-id:fake
32225 _Primitive-max-xreg-with-mem/imm32/next
32226 _Primitive-max-xreg-with-mem:
32227 0x11/imm32/alloc-id:fake:payload
32228
32229 0x11/imm32/alloc-id:fake
32230 _string-max/imm32/name
32231 0x11/imm32/alloc-id:fake
32232 Single-float-var-in-mem/imm32/inouts
32233 0x11/imm32/alloc-id:fake
32234 Single-float-var-in-some-register/imm32/outputs
32235 0x11/imm32/alloc-id:fake
32236 _string_f3_0f_5f_max/imm32/subx-name
32237 0/imm32/no-rm32
32238 0/imm32/no-r32
32239 0/imm32/no-imm32
32240 0/imm32/no-imm8
32241 0/imm32/no-disp32
32242 1/imm32/xm32-is-first-inout
32243 3/imm32/x32-is-first-output
32244 0x11/imm32/alloc-id:fake
32245 _Primitive-min-xreg-with-xreg/imm32/next
32246
32247 _Primitive-min-xreg-with-xreg:
32248 0x11/imm32/alloc-id:fake:payload
32249
32250 0x11/imm32/alloc-id:fake
32251 _string-min/imm32/name
32252 0x11/imm32/alloc-id:fake
32253 Single-float-var-in-some-register/imm32/inouts
32254 0x11/imm32/alloc-id:fake
32255 Single-float-var-in-some-register/imm32/outputs
32256 0x11/imm32/alloc-id:fake
32257 _string_f3_0f_5d_min/imm32/subx-name
32258 0/imm32/no-rm32
32259 0/imm32/no-r32
32260 0/imm32/no-imm32
32261 0/imm32/no-imm8
32262 0/imm32/no-disp32
32263 1/imm32/xm32-is-first-inout
32264 3/imm32/x32-is-first-output
32265 0x11/imm32/alloc-id:fake
32266 _Primitive-min-xreg-with-mem/imm32/next
32267 _Primitive-min-xreg-with-mem:
32268 0x11/imm32/alloc-id:fake:payload
32269
32270 0x11/imm32/alloc-id:fake
32271 _string-min/imm32/name
32272 0x11/imm32/alloc-id:fake
32273 Single-float-var-in-mem/imm32/inouts
32274 0x11/imm32/alloc-id:fake
32275 Single-float-var-in-some-register/imm32/outputs
32276 0x11/imm32/alloc-id:fake
32277 _string_f3_0f_5d_min/imm32/subx-name
32278 0/imm32/no-rm32
32279 0/imm32/no-r32
32280 0/imm32/no-imm32
32281 0/imm32/no-imm8
32282 0/imm32/no-disp32
32283 1/imm32/xm32-is-first-inout
32284 3/imm32/x32-is-first-output
32285 0x11/imm32/alloc-id:fake
32286 _Primitive-reciprocal-xreg-to-xreg/imm32/next
32287
32288 _Primitive-reciprocal-xreg-to-xreg:
32289 0x11/imm32/alloc-id:fake:payload
32290
32291 0x11/imm32/alloc-id:fake
32292 _string-reciprocal/imm32/name
32293 0x11/imm32/alloc-id:fake
32294 Single-float-var-in-some-register/imm32/inouts
32295 0x11/imm32/alloc-id:fake
32296 Single-float-var-in-some-register/imm32/outputs
32297 0x11/imm32/alloc-id:fake
32298 _string_f3_0f_53_reciprocal/imm32/subx-name
32299 0/imm32/no-rm32
32300 0/imm32/no-r32
32301 0/imm32/no-imm32
32302 0/imm32/no-imm8
32303 0/imm32/no-disp32
32304 1/imm32/xm32-is-first-inout
32305 3/imm32/x32-is-first-output
32306 0x11/imm32/alloc-id:fake
32307 _Primitive-reciprocal-mem-to-xreg/imm32/next
32308 _Primitive-reciprocal-mem-to-xreg:
32309 0x11/imm32/alloc-id:fake:payload
32310
32311 0x11/imm32/alloc-id:fake
32312 _string-reciprocal/imm32/name
32313 0x11/imm32/alloc-id:fake
32314 Single-float-var-in-mem/imm32/inouts
32315 0x11/imm32/alloc-id:fake
32316 Single-float-var-in-some-register/imm32/outputs
32317 0x11/imm32/alloc-id:fake
32318 _string_f3_0f_53_reciprocal/imm32/subx-name
32319 0/imm32/no-rm32
32320 0/imm32/no-r32
32321 0/imm32/no-imm32
32322 0/imm32/no-imm8
32323 0/imm32/no-disp32
32324 1/imm32/xm32-is-first-inout
32325 3/imm32/x32-is-first-output
32326 0x11/imm32/alloc-id:fake
32327 _Primitive-square-root-xreg-to-xreg/imm32/next
32328
32329 _Primitive-square-root-xreg-to-xreg:
32330 0x11/imm32/alloc-id:fake:payload
32331
32332 0x11/imm32/alloc-id:fake
32333 _string-square-root/imm32/name
32334 0x11/imm32/alloc-id:fake
32335 Single-float-var-in-some-register/imm32/inouts
32336 0x11/imm32/alloc-id:fake
32337 Single-float-var-in-some-register/imm32/outputs
32338 0x11/imm32/alloc-id:fake
32339 _string_f3_0f_51_square_root/imm32/subx-name
32340 0/imm32/no-rm32
32341 0/imm32/no-r32
32342 0/imm32/no-imm32
32343 0/imm32/no-imm8
32344 0/imm32/no-disp32
32345 1/imm32/xm32-is-first-inout
32346 3/imm32/x32-is-first-output
32347 0x11/imm32/alloc-id:fake
32348 _Primitive-square-root-mem-to-xreg/imm32/next
32349 _Primitive-square-root-mem-to-xreg:
32350 0x11/imm32/alloc-id:fake:payload
32351
32352 0x11/imm32/alloc-id:fake
32353 _string-square-root/imm32/name
32354 0x11/imm32/alloc-id:fake
32355 Single-float-var-in-mem/imm32/inouts
32356 0x11/imm32/alloc-id:fake
32357 Single-float-var-in-some-register/imm32/outputs
32358 0x11/imm32/alloc-id:fake
32359 _string_f3_0f_51_square_root/imm32/subx-name
32360 0/imm32/no-rm32
32361 0/imm32/no-r32
32362 0/imm32/no-imm32
32363 0/imm32/no-imm8
32364 0/imm32/no-disp32
32365 1/imm32/xm32-is-first-inout
32366 3/imm32/x32-is-first-output
32367 0x11/imm32/alloc-id:fake
32368 _Primitive-inverse-square-root-xreg-to-xreg/imm32/next
32369
32370 _Primitive-inverse-square-root-xreg-to-xreg:
32371 0x11/imm32/alloc-id:fake:payload
32372
32373 0x11/imm32/alloc-id:fake
32374 _string-inverse-square-root/imm32/name
32375 0x11/imm32/alloc-id:fake
32376 Single-float-var-in-some-register/imm32/inouts
32377 0x11/imm32/alloc-id:fake
32378 Single-float-var-in-some-register/imm32/outputs
32379 0x11/imm32/alloc-id:fake
32380 _string_f3_0f_52_inverse_square_root/imm32/subx-name
32381 0/imm32/no-rm32
32382 0/imm32/no-r32
32383 0/imm32/no-imm32
32384 0/imm32/no-imm8
32385 0/imm32/no-disp32
32386 1/imm32/xm32-is-first-inout
32387 3/imm32/x32-is-first-output
32388 0x11/imm32/alloc-id:fake
32389 _Primitive-inverse-square-root-mem-to-xreg/imm32/next
32390 _Primitive-inverse-square-root-mem-to-xreg:
32391 0x11/imm32/alloc-id:fake:payload
32392
32393 0x11/imm32/alloc-id:fake
32394 _string-inverse-square-root/imm32/name
32395 0x11/imm32/alloc-id:fake
32396 Single-float-var-in-mem/imm32/inouts
32397 0x11/imm32/alloc-id:fake
32398 Single-float-var-in-some-register/imm32/outputs
32399 0x11/imm32/alloc-id:fake
32400 _string_f3_0f_52_inverse_square_root/imm32/subx-name
32401 0/imm32/no-rm32
32402 0/imm32/no-r32
32403 0/imm32/no-imm32
32404 0/imm32/no-imm8
32405 0/imm32/no-disp32
32406 1/imm32/xm32-is-first-inout
32407 3/imm32/x32-is-first-output
32408 0x11/imm32/alloc-id:fake
32409 _Primitive-compare-xreg-with-xreg/imm32/next
32410
32411 _Primitive-compare-xreg-with-xreg:
32412 0x11/imm32/alloc-id:fake:payload
32413
32414 0x11/imm32/alloc-id:fake
32415 _string-compare/imm32/name
32416 0x11/imm32/alloc-id:fake
32417 Two-float-args-in-regs/imm32/inouts
32418 0/imm32/no-outputs
32419 0/imm32/no-outputs
32420 0x11/imm32/alloc-id:fake
32421 _string_0f_2f_compare/imm32/subx-name
32422 0/imm32/no-rm32
32423 0/imm32/no-r32
32424 0/imm32/no-imm32
32425 0/imm32/no-imm8
32426 0/imm32/no-disp32
32427 2/imm32/xm32-is-second-inout
32428 1/imm32/x32-is-first-inout
32429 0x11/imm32/alloc-id:fake
32430 _Primitive-compare-xreg-with-mem/imm32/next
32431 _Primitive-compare-xreg-with-mem:
32432 0x11/imm32/alloc-id:fake:payload
32433
32434 0x11/imm32/alloc-id:fake
32435 _string-compare/imm32/name
32436 0x11/imm32/alloc-id:fake
32437 Two-args-float-reg-float-stack/imm32/inouts
32438 0/imm32/no-outputs
32439 0/imm32/no-outputs
32440 0x11/imm32/alloc-id:fake
32441 _string_0f_2f_compare/imm32/subx-name
32442 0/imm32/no-rm32
32443 0/imm32/no-r32
32444 0/imm32/no-imm32
32445 0/imm32/no-imm8
32446 0/imm32/no-disp32
32447 2/imm32/xm32-is-second-inout
32448 1/imm32/x32-is-first-inout
32449 0x11/imm32/alloc-id:fake
32450 _Primitive-break-if-addr</imm32/next
32451
32452 _Primitive-break-if-addr<:
32453 0x11/imm32/alloc-id:fake:payload
32454 0x11/imm32/alloc-id:fake
32455 _string-break-if-addr</imm32/name
32456 0/imm32/no-inouts
32457 0/imm32/no-inouts
32458 0/imm32/no-outputs
32459 0/imm32/no-outputs
32460 0x11/imm32/alloc-id:fake
32461 _string_0f_82_jump_break/imm32/subx-name
32462 0/imm32/no-rm32
32463 0/imm32/no-r32
32464 0/imm32/no-imm32
32465 0/imm32/no-imm8
32466 0/imm32/no-disp32
32467 0/imm32/no-xm32
32468 0/imm32/no-x32
32469 0x11/imm32/alloc-id:fake
32470 _Primitive-break-if-addr>=/imm32/next
32471 _Primitive-break-if-addr>=:
32472 0x11/imm32/alloc-id:fake:payload
32473 0x11/imm32/alloc-id:fake
32474 _string-break-if-addr>=/imm32/name
32475 0/imm32/no-inouts
32476 0/imm32/no-inouts
32477 0/imm32/no-outputs
32478 0/imm32/no-outputs
32479 0x11/imm32/alloc-id:fake
32480 _string_0f_83_jump_break/imm32/subx-name
32481 0/imm32/no-rm32
32482 0/imm32/no-r32
32483 0/imm32/no-imm32
32484 0/imm32/no-imm8
32485 0/imm32/no-disp32
32486 0/imm32/no-xm32
32487 0/imm32/no-x32
32488 0x11/imm32/alloc-id:fake
32489 _Primitive-break-if-=/imm32/next
32490 _Primitive-break-if-=:
32491 0x11/imm32/alloc-id:fake:payload
32492 0x11/imm32/alloc-id:fake
32493 _string-break-if-=/imm32/name
32494 0/imm32/no-inouts
32495 0/imm32/no-inouts
32496 0/imm32/no-outputs
32497 0/imm32/no-outputs
32498 0x11/imm32/alloc-id:fake
32499 _string_0f_84_jump_break/imm32/subx-name
32500 0/imm32/no-rm32
32501 0/imm32/no-r32
32502 0/imm32/no-imm32
32503 0/imm32/no-imm8
32504 0/imm32/no-disp32
32505 0/imm32/no-xm32
32506 0/imm32/no-x32
32507 0x11/imm32/alloc-id:fake
32508 _Primitive-break-if-!=/imm32/next
32509 _Primitive-break-if-!=:
32510 0x11/imm32/alloc-id:fake:payload
32511 0x11/imm32/alloc-id:fake
32512 _string-break-if-!=/imm32/name
32513 0/imm32/no-inouts
32514 0/imm32/no-inouts
32515 0/imm32/no-outputs
32516 0/imm32/no-outputs
32517 0x11/imm32/alloc-id:fake
32518 _string_0f_85_jump_break/imm32/subx-name
32519 0/imm32/no-rm32
32520 0/imm32/no-r32
32521 0/imm32/no-imm32
32522 0/imm32/no-imm8
32523 0/imm32/no-disp32
32524 0/imm32/no-xm32
32525 0/imm32/no-x32
32526 0x11/imm32/alloc-id:fake
32527 _Primitive-break-if-addr<=/imm32/next
32528 _Primitive-break-if-addr<=:
32529 0x11/imm32/alloc-id:fake:payload
32530 0x11/imm32/alloc-id:fake
32531 _string-break-if-addr<=/imm32/name
32532 0/imm32/no-inouts
32533 0/imm32/no-inouts
32534 0/imm32/no-outputs
32535 0/imm32/no-outputs
32536 0x11/imm32/alloc-id:fake
32537 _string_0f_86_jump_break/imm32/subx-name
32538 0/imm32/no-rm32
32539 0/imm32/no-r32
32540 0/imm32/no-imm32
32541 0/imm32/no-imm8
32542 0/imm32/no-disp32
32543 0/imm32/no-xm32
32544 0/imm32/no-x32
32545 0x11/imm32/alloc-id:fake
32546 _Primitive-break-if-addr>/imm32/next
32547 _Primitive-break-if-addr>:
32548 0x11/imm32/alloc-id:fake:payload
32549 0x11/imm32/alloc-id:fake
32550 _string-break-if-addr>/imm32/name
32551 0/imm32/no-inouts
32552 0/imm32/no-inouts
32553 0/imm32/no-outputs
32554 0/imm32/no-outputs
32555 0x11/imm32/alloc-id:fake
32556 _string_0f_87_jump_break/imm32/subx-name
32557 0/imm32/no-rm32
32558 0/imm32/no-r32
32559 0/imm32/no-imm32
32560 0/imm32/no-imm8
32561 0/imm32/no-disp32
32562 0/imm32/no-xm32
32563 0/imm32/no-x32
32564 0x11/imm32/alloc-id:fake
32565 _Primitive-break-if-</imm32/next
32566 _Primitive-break-if-<:
32567 0x11/imm32/alloc-id:fake:payload
32568 0x11/imm32/alloc-id:fake
32569 _string-break-if-</imm32/name
32570 0/imm32/no-inouts
32571 0/imm32/no-inouts
32572 0/imm32/no-outputs
32573 0/imm32/no-outputs
32574 0x11/imm32/alloc-id:fake
32575 _string_0f_8c_jump_break/imm32/subx-name
32576 0/imm32/no-rm32
32577 0/imm32/no-r32
32578 0/imm32/no-imm32
32579 0/imm32/no-imm8
32580 0/imm32/no-disp32
32581 0/imm32/no-xm32
32582 0/imm32/no-x32
32583 0x11/imm32/alloc-id:fake
32584 _Primitive-break-if->=/imm32/next
32585 _Primitive-break-if->=:
32586 0x11/imm32/alloc-id:fake:payload
32587 0x11/imm32/alloc-id:fake
32588 _string-break-if->=/imm32/name
32589 0/imm32/no-inouts
32590 0/imm32/no-inouts
32591 0/imm32/no-outputs
32592 0/imm32/no-outputs
32593 0x11/imm32/alloc-id:fake
32594 _string_0f_8d_jump_break/imm32/subx-name
32595 0/imm32/no-rm32
32596 0/imm32/no-r32
32597 0/imm32/no-imm32
32598 0/imm32/no-imm8
32599 0/imm32/no-disp32
32600 0/imm32/no-xm32
32601 0/imm32/no-x32
32602 0x11/imm32/alloc-id:fake
32603 _Primitive-break-if-<=/imm32/next
32604 _Primitive-break-if-<=:
32605 0x11/imm32/alloc-id:fake:payload
32606 0x11/imm32/alloc-id:fake
32607 _string-break-if-<=/imm32/name
32608 0/imm32/no-inouts
32609 0/imm32/no-inouts
32610 0/imm32/no-outputs
32611 0/imm32/no-outputs
32612 0x11/imm32/alloc-id:fake
32613 _string_0f_8e_jump_break/imm32/subx-name
32614 0/imm32/no-rm32
32615 0/imm32/no-r32
32616 0/imm32/no-imm32
32617 0/imm32/no-imm8
32618 0/imm32/no-disp32
32619 0/imm32/no-xm32
32620 0/imm32/no-x32
32621 0x11/imm32/alloc-id:fake
32622 _Primitive-break-if->/imm32/next
32623 _Primitive-break-if->:
32624 0x11/imm32/alloc-id:fake:payload
32625 0x11/imm32/alloc-id:fake
32626 _string-break-if->/imm32/name
32627 0/imm32/no-inouts
32628 0/imm32/no-inouts
32629 0/imm32/no-outputs
32630 0/imm32/no-outputs
32631 0x11/imm32/alloc-id:fake
32632 _string_0f_8f_jump_break/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 0/imm32/no-xm32
32639 0/imm32/no-x32
32640 0x11/imm32/alloc-id:fake
32641 _Primitive-break/imm32/next
32642 _Primitive-break:
32643 0x11/imm32/alloc-id:fake:payload
32644 0x11/imm32/alloc-id:fake
32645 _string-break/imm32/name
32646 0/imm32/no-inouts
32647 0/imm32/no-inouts
32648 0/imm32/no-outputs
32649 0/imm32/no-outputs
32650 0x11/imm32/alloc-id:fake
32651 _string_e9_jump_break/imm32/subx-name
32652 0/imm32/no-rm32
32653 0/imm32/no-r32
32654 0/imm32/no-imm32
32655 0/imm32/no-imm8
32656 0/imm32/no-disp32
32657 0/imm32/no-xm32
32658 0/imm32/no-x32
32659 0x11/imm32/alloc-id:fake
32660 _Primitive-loop-if-addr</imm32/next
32661 _Primitive-loop-if-addr<:
32662 0x11/imm32/alloc-id:fake:payload
32663 0x11/imm32/alloc-id:fake
32664 _string-loop-if-addr</imm32/name
32665 0/imm32/no-inouts
32666 0/imm32/no-inouts
32667 0/imm32/no-outputs
32668 0/imm32/no-outputs
32669 0x11/imm32/alloc-id:fake
32670 _string_0f_82_jump_loop/imm32/subx-name
32671 0/imm32/no-rm32
32672 0/imm32/no-r32
32673 0/imm32/no-imm32
32674 0/imm32/no-imm8
32675 0/imm32/no-disp32
32676 0/imm32/no-xm32
32677 0/imm32/no-x32
32678 0x11/imm32/alloc-id:fake
32679 _Primitive-loop-if-addr>=/imm32/next
32680 _Primitive-loop-if-addr>=:
32681 0x11/imm32/alloc-id:fake:payload
32682 0x11/imm32/alloc-id:fake
32683 _string-loop-if-addr>=/imm32/name
32684 0/imm32/no-inouts
32685 0/imm32/no-inouts
32686 0/imm32/no-outputs
32687 0/imm32/no-outputs
32688 0x11/imm32/alloc-id:fake
32689 _string_0f_83_jump_loop/imm32/subx-name
32690 0/imm32/no-rm32
32691 0/imm32/no-r32
32692 0/imm32/no-imm32
32693 0/imm32/no-imm8
32694 0/imm32/no-disp32
32695 0/imm32/no-xm32
32696 0/imm32/no-x32
32697 0x11/imm32/alloc-id:fake
32698 _Primitive-loop-if-=/imm32/next
32699 _Primitive-loop-if-=:
32700 0x11/imm32/alloc-id:fake:payload
32701 0x11/imm32/alloc-id:fake
32702 _string-loop-if-=/imm32/name
32703 0/imm32/no-inouts
32704 0/imm32/no-inouts
32705 0/imm32/no-outputs
32706 0/imm32/no-outputs
32707 0x11/imm32/alloc-id:fake
32708 _string_0f_84_jump_loop/imm32/subx-name
32709 0/imm32/no-rm32
32710 0/imm32/no-r32
32711 0/imm32/no-imm32
32712 0/imm32/no-imm8
32713 0/imm32/no-disp32
32714 0/imm32/no-xm32
32715 0/imm32/no-x32
32716 0x11/imm32/alloc-id:fake
32717 _Primitive-loop-if-!=/imm32/next
32718 _Primitive-loop-if-!=:
32719 0x11/imm32/alloc-id:fake:payload
32720 0x11/imm32/alloc-id:fake
32721 _string-loop-if-!=/imm32/name
32722 0/imm32/no-inouts
32723 0/imm32/no-inouts
32724 0/imm32/no-outputs
32725 0/imm32/no-outputs
32726 0x11/imm32/alloc-id:fake
32727 _string_0f_85_jump_loop/imm32/subx-name
32728 0/imm32/no-rm32
32729 0/imm32/no-r32
32730 0/imm32/no-imm32
32731 0/imm32/no-imm8
32732 0/imm32/no-disp32
32733 0/imm32/no-xm32
32734 0/imm32/no-x32
32735 0x11/imm32/alloc-id:fake
32736 _Primitive-loop-if-addr<=/imm32/next
32737 _Primitive-loop-if-addr<=:
32738 0x11/imm32/alloc-id:fake:payload
32739 0x11/imm32/alloc-id:fake
32740 _string-loop-if-addr<=/imm32/name
32741 0/imm32/no-inouts
32742 0/imm32/no-inouts
32743 0/imm32/no-outputs
32744 0/imm32/no-outputs
32745 0x11/imm32/alloc-id:fake
32746 _string_0f_86_jump_loop/imm32/subx-name
32747 0/imm32/no-rm32
32748 0/imm32/no-r32
32749 0/imm32/no-imm32
32750 0/imm32/no-imm8
32751 0/imm32/no-disp32
32752 0/imm32/no-xm32
32753 0/imm32/no-x32
32754 0x11/imm32/alloc-id:fake
32755 _Primitive-loop-if-addr>/imm32/next
32756 _Primitive-loop-if-addr>:
32757 0x11/imm32/alloc-id:fake:payload
32758 0x11/imm32/alloc-id:fake
32759 _string-loop-if-addr>/imm32/name
32760 0/imm32/no-inouts
32761 0/imm32/no-inouts
32762 0/imm32/no-outputs
32763 0/imm32/no-outputs
32764 0x11/imm32/alloc-id:fake
32765 _string_0f_87_jump_loop/imm32/subx-name
32766 0/imm32/no-rm32
32767 0/imm32/no-r32
32768 0/imm32/no-imm32
32769 0/imm32/no-imm8
32770 0/imm32/no-disp32
32771 0/imm32/no-xm32
32772 0/imm32/no-x32
32773 0x11/imm32/alloc-id:fake
32774 _Primitive-loop-if-</imm32/next
32775 _Primitive-loop-if-<:
32776 0x11/imm32/alloc-id:fake:payload
32777 0x11/imm32/alloc-id:fake
32778 _string-loop-if-</imm32/name
32779 0/imm32/no-inouts
32780 0/imm32/no-inouts
32781 0/imm32/no-outputs
32782 0/imm32/no-outputs
32783 0x11/imm32/alloc-id:fake
32784 _string_0f_8c_jump_loop/imm32/subx-name
32785 0/imm32/no-rm32
32786 0/imm32/no-r32
32787 0/imm32/no-imm32
32788 0/imm32/no-imm8
32789 0/imm32/no-disp32
32790 0/imm32/no-xm32
32791 0/imm32/no-x32
32792 0x11/imm32/alloc-id:fake
32793 _Primitive-loop-if->=/imm32/next
32794 _Primitive-loop-if->=:
32795 0x11/imm32/alloc-id:fake:payload
32796 0x11/imm32/alloc-id:fake
32797 _string-loop-if->=/imm32/name
32798 0/imm32/no-inouts
32799 0/imm32/no-inouts
32800 0/imm32/no-outputs
32801 0/imm32/no-outputs
32802 0x11/imm32/alloc-id:fake
32803 _string_0f_8d_jump_loop/imm32/subx-name
32804 0/imm32/no-rm32
32805 0/imm32/no-r32
32806 0/imm32/no-imm32
32807 0/imm32/no-imm8
32808 0/imm32/no-disp32
32809 0/imm32/no-xm32
32810 0/imm32/no-x32
32811 0x11/imm32/alloc-id:fake
32812 _Primitive-loop-if-<=/imm32/next
32813 _Primitive-loop-if-<=:
32814 0x11/imm32/alloc-id:fake:payload
32815 0x11/imm32/alloc-id:fake
32816 _string-loop-if-<=/imm32/name
32817 0/imm32/no-inouts
32818 0/imm32/no-inouts
32819 0/imm32/no-outputs
32820 0/imm32/no-outputs
32821 0x11/imm32/alloc-id:fake
32822 _string_0f_8e_jump_loop/imm32/subx-name
32823 0/imm32/no-rm32
32824 0/imm32/no-r32
32825 0/imm32/no-imm32
32826 0/imm32/no-imm8
32827 0/imm32/no-disp32
32828 0/imm32/no-xm32
32829 0/imm32/no-x32
32830 0x11/imm32/alloc-id:fake
32831 _Primitive-loop-if->/imm32/next
32832 _Primitive-loop-if->:
32833 0x11/imm32/alloc-id:fake:payload
32834 0x11/imm32/alloc-id:fake
32835 _string-loop-if->/imm32/name
32836 0/imm32/no-inouts
32837 0/imm32/no-inouts
32838 0/imm32/no-outputs
32839 0/imm32/no-outputs
32840 0x11/imm32/alloc-id:fake
32841 _string_0f_8f_jump_loop/imm32/subx-name
32842 0/imm32/no-rm32
32843 0/imm32/no-r32
32844 0/imm32/no-imm32
32845 0/imm32/no-imm8
32846 0/imm32/no-disp32
32847 0/imm32/no-xm32
32848 0/imm32/no-x32
32849 0x11/imm32/alloc-id:fake
32850 _Primitive-loop/imm32/next
32851 _Primitive-loop:
32852 0x11/imm32/alloc-id:fake:payload
32853 0x11/imm32/alloc-id:fake
32854 _string-loop/imm32/name
32855 0/imm32/no-inouts
32856 0/imm32/no-inouts
32857 0/imm32/no-outputs
32858 0/imm32/no-outputs
32859 0x11/imm32/alloc-id:fake
32860 _string_e9_jump_loop/imm32/subx-name
32861 0/imm32/no-rm32
32862 0/imm32/no-r32
32863 0/imm32/no-imm32
32864 0/imm32/no-imm8
32865 0/imm32/no-disp32
32866 0/imm32/no-xm32
32867 0/imm32/no-x32
32868 0x11/imm32/alloc-id:fake
32869 _Primitive-break-if-addr<-named/imm32/next
32870
32871 _Primitive-break-if-addr<-named:
32872 0x11/imm32/alloc-id:fake:payload
32873 0x11/imm32/alloc-id:fake
32874 _string-break-if-addr</imm32/name
32875 0x11/imm32/alloc-id:fake
32876 Single-lit-var/imm32/inouts
32877 0/imm32/no-outputs
32878 0/imm32/no-outputs
32879 0x11/imm32/alloc-id:fake
32880 _string_0f_82_jump_label/imm32/subx-name
32881 0/imm32/no-rm32
32882 0/imm32/no-r32
32883 0/imm32/no-imm32
32884 0/imm32/no-imm8
32885 1/imm32/disp32-is-first-inout
32886 0/imm32/no-xm32
32887 0/imm32/no-x32
32888 0x11/imm32/alloc-id:fake
32889 _Primitive-break-if-addr>=-named/imm32/next
32890 _Primitive-break-if-addr>=-named:
32891 0x11/imm32/alloc-id:fake:payload
32892 0x11/imm32/alloc-id:fake
32893 _string-break-if-addr>=/imm32/name
32894 0x11/imm32/alloc-id:fake
32895 Single-lit-var/imm32/inouts
32896 0/imm32/no-outputs
32897 0/imm32/no-outputs
32898 0x11/imm32/alloc-id:fake
32899 _string_0f_83_jump_label/imm32/subx-name
32900 0/imm32/no-rm32
32901 0/imm32/no-r32
32902 0/imm32/no-imm32
32903 0/imm32/no-imm8
32904 1/imm32/disp32-is-first-inout
32905 0/imm32/no-xm32
32906 0/imm32/no-x32
32907 0x11/imm32/alloc-id:fake
32908 _Primitive-break-if-=-named/imm32/next
32909 _Primitive-break-if-=-named:
32910 0x11/imm32/alloc-id:fake:payload
32911 0x11/imm32/alloc-id:fake
32912 _string-break-if-=/imm32/name
32913 0x11/imm32/alloc-id:fake
32914 Single-lit-var/imm32/inouts
32915 0/imm32/no-outputs
32916 0/imm32/no-outputs
32917 0x11/imm32/alloc-id:fake
32918 _string_0f_84_jump_label/imm32/subx-name
32919 0/imm32/no-rm32
32920 0/imm32/no-r32
32921 0/imm32/no-imm32
32922 0/imm32/no-imm8
32923 1/imm32/disp32-is-first-inout
32924 0/imm32/no-xm32
32925 0/imm32/no-x32
32926 0x11/imm32/alloc-id:fake
32927 _Primitive-break-if-!=-named/imm32/next
32928 _Primitive-break-if-!=-named:
32929 0x11/imm32/alloc-id:fake:payload
32930 0x11/imm32/alloc-id:fake
32931 _string-break-if-!=/imm32/name
32932 0x11/imm32/alloc-id:fake
32933 Single-lit-var/imm32/inouts
32934 0/imm32/no-outputs
32935 0/imm32/no-outputs
32936 0x11/imm32/alloc-id:fake
32937 _string_0f_85_jump_label/imm32/subx-name
32938 0/imm32/no-rm32
32939 0/imm32/no-r32
32940 0/imm32/no-imm32
32941 0/imm32/no-imm8
32942 1/imm32/disp32-is-first-inout
32943 0/imm32/no-xm32
32944 0/imm32/no-x32
32945 0x11/imm32/alloc-id:fake
32946 _Primitive-break-if-addr<=-named/imm32/next
32947 _Primitive-break-if-addr<=-named:
32948 0x11/imm32/alloc-id:fake:payload
32949 0x11/imm32/alloc-id:fake
32950 _string-break-if-addr<=/imm32/name
32951 0x11/imm32/alloc-id:fake
32952 Single-lit-var/imm32/inouts
32953 0/imm32/no-outputs
32954 0/imm32/no-outputs
32955 0x11/imm32/alloc-id:fake
32956 _string_0f_86_jump_label/imm32/subx-name
32957 0/imm32/no-rm32
32958 0/imm32/no-r32
32959 0/imm32/no-imm32
32960 0/imm32/no-imm8
32961 1/imm32/disp32-is-first-inout
32962 0/imm32/no-xm32
32963 0/imm32/no-x32
32964 0x11/imm32/alloc-id:fake
32965 _Primitive-break-if-addr>-named/imm32/next
32966 _Primitive-break-if-addr>-named:
32967 0x11/imm32/alloc-id:fake:payload
32968 0x11/imm32/alloc-id:fake
32969 _string-break-if-addr>/imm32/name
32970 0x11/imm32/alloc-id:fake
32971 Single-lit-var/imm32/inouts
32972 0/imm32/no-outputs
32973 0/imm32/no-outputs
32974 0x11/imm32/alloc-id:fake
32975 _string_0f_87_jump_label/imm32/subx-name
32976 0/imm32/no-rm32
32977 0/imm32/no-r32
32978 0/imm32/no-imm32
32979 0/imm32/no-imm8
32980 1/imm32/disp32-is-first-inout
32981 0/imm32/no-xm32
32982 0/imm32/no-x32
32983 0x11/imm32/alloc-id:fake
32984 _Primitive-break-if-<-named/imm32/next
32985 _Primitive-break-if-<-named:
32986 0x11/imm32/alloc-id:fake:payload
32987 0x11/imm32/alloc-id:fake
32988 _string-break-if-</imm32/name
32989 0x11/imm32/alloc-id:fake
32990 Single-lit-var/imm32/inouts
32991 0/imm32/no-outputs
32992 0/imm32/no-outputs
32993 0x11/imm32/alloc-id:fake
32994 _string_0f_8c_jump_label/imm32/subx-name
32995 0/imm32/no-rm32
32996 0/imm32/no-r32
32997 0/imm32/no-imm32
32998 0/imm32/no-imm8
32999 1/imm32/disp32-is-first-inout
33000 0/imm32/no-xm32
33001 0/imm32/no-x32
33002 0x11/imm32/alloc-id:fake
33003 _Primitive-break-if->=-named/imm32/next
33004 _Primitive-break-if->=-named:
33005 0x11/imm32/alloc-id:fake:payload
33006 0x11/imm32/alloc-id:fake
33007 _string-break-if->=/imm32/name
33008 0x11/imm32/alloc-id:fake
33009 Single-lit-var/imm32/inouts
33010 0/imm32/no-outputs
33011 0/imm32/no-outputs
33012 0x11/imm32/alloc-id:fake
33013 _string_0f_8d_jump_label/imm32/subx-name
33014 0/imm32/no-rm32
33015 0/imm32/no-r32
33016 0/imm32/no-imm32
33017 0/imm32/no-imm8
33018 1/imm32/disp32-is-first-inout
33019 0/imm32/no-xm32
33020 0/imm32/no-x32
33021 0x11/imm32/alloc-id:fake
33022 _Primitive-break-if-<=-named/imm32/next
33023 _Primitive-break-if-<=-named:
33024 0x11/imm32/alloc-id:fake:payload
33025 0x11/imm32/alloc-id:fake
33026 _string-break-if-<=/imm32/name
33027 0x11/imm32/alloc-id:fake
33028 Single-lit-var/imm32/inouts
33029 0/imm32/no-outputs
33030 0/imm32/no-outputs
33031 0x11/imm32/alloc-id:fake
33032 _string_0f_8e_jump_label/imm32/subx-name
33033 0/imm32/no-rm32
33034 0/imm32/no-r32
33035 0/imm32/no-imm32
33036 0/imm32/no-imm8
33037 1/imm32/disp32-is-first-inout
33038 0/imm32/no-xm32
33039 0/imm32/no-x32
33040 0x11/imm32/alloc-id:fake
33041 _Primitive-break-if->-named/imm32/next
33042 _Primitive-break-if->-named:
33043 0x11/imm32/alloc-id:fake:payload
33044 0x11/imm32/alloc-id:fake
33045 _string-break-if->/imm32/name
33046 0x11/imm32/alloc-id:fake
33047 Single-lit-var/imm32/inouts
33048 0/imm32/no-outputs
33049 0/imm32/no-outputs
33050 0x11/imm32/alloc-id:fake
33051 _string_0f_8f_jump_label/imm32/subx-name
33052 0/imm32/no-rm32
33053 0/imm32/no-r32
33054 0/imm32/no-imm32
33055 0/imm32/no-imm8
33056 1/imm32/disp32-is-first-inout
33057 0/imm32/no-xm32
33058 0/imm32/no-x32
33059 0x11/imm32/alloc-id:fake
33060 _Primitive-break-named/imm32/next
33061 _Primitive-break-named:
33062 0x11/imm32/alloc-id:fake:payload
33063 0x11/imm32/alloc-id:fake
33064 _string-break/imm32/name
33065 0x11/imm32/alloc-id:fake
33066 Single-lit-var/imm32/inouts
33067 0/imm32/no-outputs
33068 0/imm32/no-outputs
33069 0x11/imm32/alloc-id:fake
33070 _string_e9_jump_label/imm32/subx-name
33071 0/imm32/no-rm32
33072 0/imm32/no-r32
33073 0/imm32/no-imm32
33074 0/imm32/no-imm8
33075 1/imm32/disp32-is-first-inout
33076 0/imm32/no-xm32
33077 0/imm32/no-x32
33078 0x11/imm32/alloc-id:fake
33079 _Primitive-loop-if-addr<-named/imm32/next
33080 _Primitive-loop-if-addr<-named:
33081 0x11/imm32/alloc-id:fake:payload
33082 0x11/imm32/alloc-id:fake
33083 _string-loop-if-addr</imm32/name
33084 0x11/imm32/alloc-id:fake
33085 Single-lit-var/imm32/inouts
33086 0/imm32/no-outputs
33087 0/imm32/no-outputs
33088 0x11/imm32/alloc-id:fake
33089 _string_0f_82_jump_label/imm32/subx-name
33090 0/imm32/no-rm32
33091 0/imm32/no-r32
33092 0/imm32/no-imm32
33093 0/imm32/no-imm8
33094 1/imm32/disp32-is-first-inout
33095 0/imm32/no-xm32
33096 0/imm32/no-x32
33097 0x11/imm32/alloc-id:fake
33098 _Primitive-loop-if-addr>=-named/imm32/next
33099 _Primitive-loop-if-addr>=-named:
33100 0x11/imm32/alloc-id:fake:payload
33101 0x11/imm32/alloc-id:fake
33102 _string-loop-if-addr>=/imm32/name
33103 0x11/imm32/alloc-id:fake
33104 Single-lit-var/imm32/inouts
33105 0/imm32/no-outputs
33106 0/imm32/no-outputs
33107 0x11/imm32/alloc-id:fake
33108 _string_0f_83_jump_label/imm32/subx-name
33109 0/imm32/no-rm32
33110 0/imm32/no-r32
33111 0/imm32/no-imm32
33112 0/imm32/no-imm8
33113 1/imm32/disp32-is-first-inout
33114 0/imm32/no-xm32
33115 0/imm32/no-x32
33116 0x11/imm32/alloc-id:fake
33117 _Primitive-loop-if-=-named/imm32/next
33118 _Primitive-loop-if-=-named:
33119 0x11/imm32/alloc-id:fake:payload
33120 0x11/imm32/alloc-id:fake
33121 _string-loop-if-=/imm32/name
33122 0x11/imm32/alloc-id:fake
33123 Single-lit-var/imm32/inouts
33124 0/imm32/no-outputs
33125 0/imm32/no-outputs
33126 0x11/imm32/alloc-id:fake
33127 _string_0f_84_jump_label/imm32/subx-name
33128 0/imm32/no-rm32
33129 0/imm32/no-r32
33130 0/imm32/no-imm32
33131 0/imm32/no-imm8
33132 1/imm32/disp32-is-first-inout
33133 0/imm32/no-xm32
33134 0/imm32/no-x32
33135 0x11/imm32/alloc-id:fake
33136 _Primitive-loop-if-!=-named/imm32/next
33137 _Primitive-loop-if-!=-named:
33138 0x11/imm32/alloc-id:fake:payload
33139 0x11/imm32/alloc-id:fake
33140 _string-loop-if-!=/imm32/name
33141 0x11/imm32/alloc-id:fake
33142 Single-lit-var/imm32/inouts
33143 0/imm32/no-outputs
33144 0/imm32/no-outputs
33145 0x11/imm32/alloc-id:fake
33146 _string_0f_85_jump_label/imm32/subx-name
33147 0/imm32/no-rm32
33148 0/imm32/no-r32
33149 0/imm32/no-imm32
33150 0/imm32/no-imm8
33151 1/imm32/disp32-is-first-inout
33152 0/imm32/no-xm32
33153 0/imm32/no-x32
33154 0x11/imm32/alloc-id:fake
33155 _Primitive-loop-if-addr<=-named/imm32/next
33156 _Primitive-loop-if-addr<=-named:
33157 0x11/imm32/alloc-id:fake:payload
33158 0x11/imm32/alloc-id:fake
33159 _string-loop-if-addr<=/imm32/name
33160 0x11/imm32/alloc-id:fake
33161 Single-lit-var/imm32/inouts
33162 0/imm32/no-outputs
33163 0/imm32/no-outputs
33164 0x11/imm32/alloc-id:fake
33165 _string_0f_86_jump_label/imm32/subx-name
33166 0/imm32/no-rm32
33167 0/imm32/no-r32
33168 0/imm32/no-imm32
33169 0/imm32/no-imm8
33170 1/imm32/disp32-is-first-inout
33171 0/imm32/no-xm32
33172 0/imm32/no-x32
33173 0x11/imm32/alloc-id:fake
33174 _Primitive-loop-if-addr>-named/imm32/next
33175 _Primitive-loop-if-addr>-named:
33176 0x11/imm32/alloc-id:fake:payload
33177 0x11/imm32/alloc-id:fake
33178 _string-loop-if-addr>/imm32/name
33179 0x11/imm32/alloc-id:fake
33180 Single-lit-var/imm32/inouts
33181 0/imm32/no-outputs
33182 0/imm32/no-outputs
33183 0x11/imm32/alloc-id:fake
33184 _string_0f_87_jump_label/imm32/subx-name
33185 0/imm32/no-rm32
33186 0/imm32/no-r32
33187 0/imm32/no-imm32
33188 0/imm32/no-imm8
33189 1/imm32/disp32-is-first-inout
33190 0/imm32/no-xm32
33191 0/imm32/no-x32
33192 0x11/imm32/alloc-id:fake
33193 _Primitive-loop-if-<-named/imm32/next
33194 _Primitive-loop-if-<-named:
33195 0x11/imm32/alloc-id:fake:payload
33196 0x11/imm32/alloc-id:fake
33197 _string-loop-if-</imm32/name
33198 0x11/imm32/alloc-id:fake
33199 Single-lit-var/imm32/inouts
33200 0/imm32/no-outputs
33201 0/imm32/no-outputs
33202 0x11/imm32/alloc-id:fake
33203 _string_0f_8c_jump_label/imm32/subx-name
33204 0/imm32/no-rm32
33205 0/imm32/no-r32
33206 0/imm32/no-imm32
33207 0/imm32/no-imm8
33208 1/imm32/disp32-is-first-inout
33209 0/imm32/no-xm32
33210 0/imm32/no-x32
33211 0x11/imm32/alloc-id:fake
33212 _Primitive-loop-if->=-named/imm32/next
33213 _Primitive-loop-if->=-named:
33214 0x11/imm32/alloc-id:fake:payload
33215 0x11/imm32/alloc-id:fake
33216 _string-loop-if->=/imm32/name
33217 0x11/imm32/alloc-id:fake
33218 Single-lit-var/imm32/inouts
33219 0/imm32/no-outputs
33220 0/imm32/no-outputs
33221 0x11/imm32/alloc-id:fake
33222 _string_0f_8d_jump_label/imm32/subx-name
33223 0/imm32/no-rm32
33224 0/imm32/no-r32
33225 0/imm32/no-imm32
33226 0/imm32/no-imm8
33227 1/imm32/disp32-is-first-inout
33228 0/imm32/no-xm32
33229 0/imm32/no-x32
33230 0x11/imm32/alloc-id:fake
33231 _Primitive-loop-if-<=-named/imm32/next
33232 _Primitive-loop-if-<=-named:
33233 0x11/imm32/alloc-id:fake:payload
33234 0x11/imm32/alloc-id:fake
33235 _string-loop-if-<=/imm32/name
33236 0x11/imm32/alloc-id:fake
33237 Single-lit-var/imm32/inouts
33238 0/imm32/no-outputs
33239 0/imm32/no-outputs
33240 0x11/imm32/alloc-id:fake
33241 _string_0f_8e_jump_label/imm32/subx-name
33242 0/imm32/no-rm32
33243 0/imm32/no-r32
33244 0/imm32/no-imm32
33245 0/imm32/no-imm8
33246 1/imm32/disp32-is-first-inout
33247 0/imm32/no-xm32
33248 0/imm32/no-x32
33249 0x11/imm32/alloc-id:fake
33250 _Primitive-loop-if->-named/imm32/next
33251 _Primitive-loop-if->-named:
33252 0x11/imm32/alloc-id:fake:payload
33253 0x11/imm32/alloc-id:fake
33254 _string-loop-if->/imm32/name
33255 0x11/imm32/alloc-id:fake
33256 Single-lit-var/imm32/inouts
33257 0/imm32/no-outputs
33258 0/imm32/no-outputs
33259 0x11/imm32/alloc-id:fake
33260 _string_0f_8f_jump_label/imm32/subx-name
33261 0/imm32/no-rm32
33262 0/imm32/no-r32
33263 0/imm32/no-imm32
33264 0/imm32/no-imm8
33265 1/imm32/disp32-is-first-inout
33266 0/imm32/no-xm32
33267 0/imm32/no-x32
33268 0x11/imm32/alloc-id:fake
33269 _Primitive-loop-named/imm32/next
33270 _Primitive-loop-named:
33271 0x11/imm32/alloc-id:fake:payload
33272 0x11/imm32/alloc-id:fake
33273 _string-loop/imm32/name
33274 0x11/imm32/alloc-id:fake
33275 Single-lit-var/imm32/inouts
33276 0/imm32/no-outputs
33277 0/imm32/no-outputs
33278 0x11/imm32/alloc-id:fake
33279 _string_e9_jump_label/imm32/subx-name
33280 0/imm32/no-rm32
33281 0/imm32/no-r32
33282 0/imm32/no-imm32
33283 0/imm32/no-imm8
33284 1/imm32/disp32-is-first-inout
33285 0/imm32/no-xm32
33286 0/imm32/no-x32
33287 0x11/imm32/alloc-id:fake
33288 _Primitive-break-if-float</imm32/next
33289
33290 _Primitive-break-if-float<:
33291 0x11/imm32/alloc-id:fake:payload
33292 0x11/imm32/alloc-id:fake
33293 _string-break-if-float</imm32/name
33294 0/imm32/no-inouts
33295 0/imm32/no-inouts
33296 0/imm32/no-outputs
33297 0/imm32/no-outputs
33298 0x11/imm32/alloc-id:fake
33299 _string_0f_82_jump_break/imm32/subx-name
33300 0/imm32/no-rm32
33301 0/imm32/no-r32
33302 0/imm32/no-imm32
33303 0/imm32/no-imm8
33304 0/imm32/no-disp32
33305 0/imm32/no-xm32
33306 0/imm32/no-x32
33307 0x11/imm32/alloc-id:fake
33308 _Primitive-break-if-float>=/imm32/next
33309 _Primitive-break-if-float>=:
33310 0x11/imm32/alloc-id:fake:payload
33311 0x11/imm32/alloc-id:fake
33312 _string-break-if-float>=/imm32/name
33313 0/imm32/no-inouts
33314 0/imm32/no-inouts
33315 0/imm32/no-outputs
33316 0/imm32/no-outputs
33317 0x11/imm32/alloc-id:fake
33318 _string_0f_83_jump_break/imm32/subx-name
33319 0/imm32/no-rm32
33320 0/imm32/no-r32
33321 0/imm32/no-imm32
33322 0/imm32/no-imm8
33323 0/imm32/no-disp32
33324 0/imm32/no-xm32
33325 0/imm32/no-x32
33326 0x11/imm32/alloc-id:fake
33327 _Primitive-break-if-float<=/imm32/next
33328 _Primitive-break-if-float<=:
33329 0x11/imm32/alloc-id:fake:payload
33330 0x11/imm32/alloc-id:fake
33331 _string-break-if-float<=/imm32/name
33332 0/imm32/no-inouts
33333 0/imm32/no-inouts
33334 0/imm32/no-outputs
33335 0/imm32/no-outputs
33336 0x11/imm32/alloc-id:fake
33337 _string_0f_86_jump_break/imm32/subx-name
33338 0/imm32/no-rm32
33339 0/imm32/no-r32
33340 0/imm32/no-imm32
33341 0/imm32/no-imm8
33342 0/imm32/no-disp32
33343 0/imm32/no-xm32
33344 0/imm32/no-x32
33345 0x11/imm32/alloc-id:fake
33346 _Primitive-break-if-float>/imm32/next
33347 _Primitive-break-if-float>:
33348 0x11/imm32/alloc-id:fake:payload
33349 0x11/imm32/alloc-id:fake
33350 _string-break-if-float>/imm32/name
33351 0/imm32/no-inouts
33352 0/imm32/no-inouts
33353 0/imm32/no-outputs
33354 0/imm32/no-outputs
33355 0x11/imm32/alloc-id:fake
33356 _string_0f_87_jump_break/imm32/subx-name
33357 0/imm32/no-rm32
33358 0/imm32/no-r32
33359 0/imm32/no-imm32
33360 0/imm32/no-imm8
33361 0/imm32/no-disp32
33362 0/imm32/no-xm32
33363 0/imm32/no-x32
33364 0x11/imm32/alloc-id:fake
33365 _Primitive-loop-if-float</imm32/next
33366 _Primitive-loop-if-float<:
33367 0x11/imm32/alloc-id:fake:payload
33368 0x11/imm32/alloc-id:fake
33369 _string-loop-if-float</imm32/name
33370 0/imm32/no-inouts
33371 0/imm32/no-inouts
33372 0/imm32/no-outputs
33373 0/imm32/no-outputs
33374 0x11/imm32/alloc-id:fake
33375 _string_0f_82_jump_loop/imm32/subx-name
33376 0/imm32/no-rm32
33377 0/imm32/no-r32
33378 0/imm32/no-imm32
33379 0/imm32/no-imm8
33380 0/imm32/no-disp32
33381 0/imm32/no-xm32
33382 0/imm32/no-x32
33383 0x11/imm32/alloc-id:fake
33384 _Primitive-loop-if-float>=/imm32/next
33385 _Primitive-loop-if-float>=:
33386 0x11/imm32/alloc-id:fake:payload
33387 0x11/imm32/alloc-id:fake
33388 _string-loop-if-float>=/imm32/name
33389 0/imm32/no-inouts
33390 0/imm32/no-inouts
33391 0/imm32/no-outputs
33392 0/imm32/no-outputs
33393 0x11/imm32/alloc-id:fake
33394 _string_0f_83_jump_loop/imm32/subx-name
33395 0/imm32/no-rm32
33396 0/imm32/no-r32
33397 0/imm32/no-imm32
33398 0/imm32/no-imm8
33399 0/imm32/no-disp32
33400 0/imm32/no-xm32
33401 0/imm32/no-x32
33402 0x11/imm32/alloc-id:fake
33403 _Primitive-loop-if-float<=/imm32/next
33404 _Primitive-loop-if-float<=:
33405 0x11/imm32/alloc-id:fake:payload
33406 0x11/imm32/alloc-id:fake
33407 _string-loop-if-float<=/imm32/name
33408 0/imm32/no-inouts
33409 0/imm32/no-inouts
33410 0/imm32/no-outputs
33411 0/imm32/no-outputs
33412 0x11/imm32/alloc-id:fake
33413 _string_0f_86_jump_loop/imm32/subx-name
33414 0/imm32/no-rm32
33415 0/imm32/no-r32
33416 0/imm32/no-imm32
33417 0/imm32/no-imm8
33418 0/imm32/no-disp32
33419 0/imm32/no-xm32
33420 0/imm32/no-x32
33421 0x11/imm32/alloc-id:fake
33422 _Primitive-loop-if-float>/imm32/next
33423 _Primitive-loop-if-float>:
33424 0x11/imm32/alloc-id:fake:payload
33425 0x11/imm32/alloc-id:fake
33426 _string-loop-if-float>/imm32/name
33427 0/imm32/no-inouts
33428 0/imm32/no-inouts
33429 0/imm32/no-outputs
33430 0/imm32/no-outputs
33431 0x11/imm32/alloc-id:fake
33432 _string_0f_87_jump_loop/imm32/subx-name
33433 0/imm32/no-rm32
33434 0/imm32/no-r32
33435 0/imm32/no-imm32
33436 0/imm32/no-imm8
33437 0/imm32/no-disp32
33438 0/imm32/no-xm32
33439 0/imm32/no-x32
33440 0x11/imm32/alloc-id:fake
33441 _Primitive-break-if-float<-named/imm32/next
33442 _Primitive-break-if-float<-named:
33443 0x11/imm32/alloc-id:fake:payload
33444 0x11/imm32/alloc-id:fake
33445 _string-break-if-float</imm32/name
33446 0x11/imm32/alloc-id:fake
33447 Single-lit-var/imm32/inouts
33448 0/imm32/no-outputs
33449 0/imm32/no-outputs
33450 0x11/imm32/alloc-id:fake
33451 _string_0f_82_jump_label/imm32/subx-name
33452 0/imm32/no-rm32
33453 0/imm32/no-r32
33454 0/imm32/no-imm32
33455 0/imm32/no-imm8
33456 1/imm32/disp32-is-first-inout
33457 0/imm32/no-xm32
33458 0/imm32/no-x32
33459 0x11/imm32/alloc-id:fake
33460 _Primitive-break-if-float>=-named/imm32/next
33461 _Primitive-break-if-float>=-named:
33462 0x11/imm32/alloc-id:fake:payload
33463 0x11/imm32/alloc-id:fake
33464 _string-break-if-float>=/imm32/name
33465 0x11/imm32/alloc-id:fake
33466 Single-lit-var/imm32/inouts
33467 0/imm32/no-outputs
33468 0/imm32/no-outputs
33469 0x11/imm32/alloc-id:fake
33470 _string_0f_83_jump_label/imm32/subx-name
33471 0/imm32/no-rm32
33472 0/imm32/no-r32
33473 0/imm32/no-imm32
33474 0/imm32/no-imm8
33475 1/imm32/disp32-is-first-inout
33476 0/imm32/no-xm32
33477 0/imm32/no-x32
33478 0x11/imm32/alloc-id:fake
33479 _Primitive-break-if-float<=-named/imm32/next
33480 _Primitive-break-if-float<=-named:
33481 0x11/imm32/alloc-id:fake:payload
33482 0x11/imm32/alloc-id:fake
33483 _string-break-if-float<=/imm32/name
33484 0x11/imm32/alloc-id:fake
33485 Single-lit-var/imm32/inouts
33486 0/imm32/no-outputs
33487 0/imm32/no-outputs
33488 0x11/imm32/alloc-id:fake
33489 _string_0f_86_jump_label/imm32/subx-name
33490 0/imm32/no-rm32
33491 0/imm32/no-r32
33492 0/imm32/no-imm32
33493 0/imm32/no-imm8
33494 1/imm32/disp32-is-first-inout
33495 0/imm32/no-xm32
33496 0/imm32/no-x32
33497 0x11/imm32/alloc-id:fake
33498 _Primitive-break-if-float>-named/imm32/next
33499 _Primitive-break-if-float>-named:
33500 0x11/imm32/alloc-id:fake:payload
33501 0x11/imm32/alloc-id:fake
33502 _string-break-if-float>/imm32/name
33503 0x11/imm32/alloc-id:fake
33504 Single-lit-var/imm32/inouts
33505 0/imm32/no-outputs
33506 0/imm32/no-outputs
33507 0x11/imm32/alloc-id:fake
33508 _string_0f_87_jump_label/imm32/subx-name
33509 0/imm32/no-rm32
33510 0/imm32/no-r32
33511 0/imm32/no-imm32
33512 0/imm32/no-imm8
33513 1/imm32/disp32-is-first-inout
33514 0/imm32/no-xm32
33515 0/imm32/no-x32
33516 0x11/imm32/alloc-id:fake
33517 _Primitive-loop-if-float<-named/imm32/next
33518 _Primitive-loop-if-float<-named:
33519 0x11/imm32/alloc-id:fake:payload
33520 0x11/imm32/alloc-id:fake
33521 _string-loop-if-float</imm32/name
33522 0x11/imm32/alloc-id:fake
33523 Single-lit-var/imm32/inouts
33524 0/imm32/no-outputs
33525 0/imm32/no-outputs
33526 0x11/imm32/alloc-id:fake
33527 _string_0f_82_jump_label/imm32/subx-name
33528 0/imm32/no-rm32
33529 0/imm32/no-r32
33530 0/imm32/no-imm32
33531 0/imm32/no-imm8
33532 1/imm32/disp32-is-first-inout
33533 0/imm32/no-xm32
33534 0/imm32/no-x32
33535 0x11/imm32/alloc-id:fake
33536 _Primitive-loop-if-float>=-named/imm32/next
33537 _Primitive-loop-if-float>=-named:
33538 0x11/imm32/alloc-id:fake:payload
33539 0x11/imm32/alloc-id:fake
33540 _string-loop-if-float>=/imm32/name
33541 0x11/imm32/alloc-id:fake
33542 Single-lit-var/imm32/inouts
33543 0/imm32/no-outputs
33544 0/imm32/no-outputs
33545 0x11/imm32/alloc-id:fake
33546 _string_0f_83_jump_label/imm32/subx-name
33547 0/imm32/no-rm32
33548 0/imm32/no-r32
33549 0/imm32/no-imm32
33550 0/imm32/no-imm8
33551 1/imm32/disp32-is-first-inout
33552 0/imm32/no-xm32
33553 0/imm32/no-x32
33554 0x11/imm32/alloc-id:fake
33555 _Primitive-loop-if-float<=-named/imm32/next
33556 _Primitive-loop-if-float<=-named:
33557 0x11/imm32/alloc-id:fake:payload
33558 0x11/imm32/alloc-id:fake
33559 _string-loop-if-float<=/imm32/name
33560 0x11/imm32/alloc-id:fake
33561 Single-lit-var/imm32/inouts
33562 0/imm32/no-outputs
33563 0/imm32/no-outputs
33564 0x11/imm32/alloc-id:fake
33565 _string_0f_86_jump_label/imm32/subx-name
33566 0/imm32/no-rm32
33567 0/imm32/no-r32
33568 0/imm32/no-imm32
33569 0/imm32/no-imm8
33570 1/imm32/disp32-is-first-inout
33571 0/imm32/no-xm32
33572 0/imm32/no-x32
33573 0x11/imm32/alloc-id:fake
33574 _Primitive-loop-if-float>-named/imm32/next
33575 _Primitive-loop-if-float>-named:
33576 0x11/imm32/alloc-id:fake:payload
33577 0x11/imm32/alloc-id:fake
33578 _string-loop-if-float>/imm32/name
33579 0x11/imm32/alloc-id:fake
33580 Single-lit-var/imm32/inouts
33581 0/imm32/no-outputs
33582 0/imm32/no-outputs
33583 0x11/imm32/alloc-id:fake
33584 _string_0f_87_jump_label/imm32/subx-name
33585 0/imm32/no-rm32
33586 0/imm32/no-r32
33587 0/imm32/no-imm32
33588 0/imm32/no-imm8
33589 1/imm32/disp32-is-first-inout
33590 0/imm32/no-xm32
33591 0/imm32/no-x32
33592 0/imm32/next
33593 0/imm32/next
33594
33595
33596 _string-add:
33597 0x11/imm32/alloc-id:fake:payload
33598
33599 0x3/imm32/size
33600 0x61/a 0x64/d 0x64/d
33601 _string-address:
33602 0x11/imm32/alloc-id:fake:payload
33603
33604 0x7/imm32/size
33605 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
33606 _string-add-to:
33607 0x11/imm32/alloc-id:fake:payload
33608
33609 0x6/imm32/size
33610 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
33611 _string-and:
33612 0x11/imm32/alloc-id:fake:payload
33613
33614 0x3/imm32/size
33615 0x61/a 0x6e/n 0x64/d
33616 _string-and-with:
33617 0x11/imm32/alloc-id:fake:payload
33618
33619 0x8/imm32/size
33620 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
33621 _string-break:
33622 0x11/imm32/alloc-id:fake:payload
33623
33624 0x5/imm32/size
33625 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
33626 _string-break-if-<:
33627 0x11/imm32/alloc-id:fake:payload
33628
33629 0xa/imm32/size
33630 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
33631 _string-break-if-<=:
33632 0x11/imm32/alloc-id:fake:payload
33633
33634 0xb/imm32/size
33635 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
33636 _string-break-if-=:
33637 0x11/imm32/alloc-id:fake:payload
33638
33639 0xa/imm32/size
33640 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
33641 _string-break-if->:
33642 0x11/imm32/alloc-id:fake:payload
33643
33644 0xa/imm32/size
33645 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
33646 _string-break-if->=:
33647 0x11/imm32/alloc-id:fake:payload
33648
33649 0xb/imm32/size
33650 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
33651 _string-break-if-!=:
33652 0x11/imm32/alloc-id:fake:payload
33653
33654 0xb/imm32/size
33655 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
33656 _string-break-if-addr<:
33657 0x11/imm32/alloc-id:fake:payload
33658
33659 0xe/imm32/size
33660 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/<
33661 _string-break-if-addr<=:
33662 0x11/imm32/alloc-id:fake:payload
33663
33664 0xf/imm32/size
33665 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/=
33666 _string-break-if-addr>:
33667 0x11/imm32/alloc-id:fake:payload
33668
33669 0xe/imm32/size
33670 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/>
33671 _string-break-if-addr>=:
33672 0x11/imm32/alloc-id:fake:payload
33673
33674 0xf/imm32/size
33675 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/=
33676 _string-break-if-float<:
33677 0x11/imm32/alloc-id:fake:payload
33678
33679 0xf/imm32/size
33680 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/<
33681 _string-break-if-float<=:
33682 0x11/imm32/alloc-id:fake:payload
33683
33684 0x10/imm32/size
33685 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/=
33686 _string-break-if-float>:
33687 0x11/imm32/alloc-id:fake:payload
33688
33689 0xf/imm32/size
33690 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/>
33691 _string-break-if-float>=:
33692 0x11/imm32/alloc-id:fake:payload
33693
33694 0x10/imm32/size
33695 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/=
33696 _string-compare:
33697 0x11/imm32/alloc-id:fake:payload
33698
33699 0x7/imm32/size
33700 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
33701 _string-copy:
33702 0x11/imm32/alloc-id:fake:payload
33703
33704 0x4/imm32/size
33705 0x63/c 0x6f/o 0x70/p 0x79/y
33706 _string-copy-to:
33707 0x11/imm32/alloc-id:fake:payload
33708
33709 0x7/imm32/size
33710 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
33711 _string-copy-byte:
33712 0x11/imm32/alloc-id:fake:payload
33713
33714 0x9/imm32/size
33715 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
33716 _string-copy-byte-to:
33717 0x11/imm32/alloc-id:fake:payload
33718
33719 0xc/imm32/size
33720 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
33721 _string-decrement:
33722 0x11/imm32/alloc-id:fake:payload
33723
33724 0x9/imm32/size
33725 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
33726 _string-increment:
33727 0x11/imm32/alloc-id:fake:payload
33728
33729 0x9/imm32/size
33730 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
33731 _string-loop:
33732 0x11/imm32/alloc-id:fake:payload
33733
33734 0x4/imm32/size
33735 0x6c/l 0x6f/o 0x6f/o 0x70/p
33736 _string-loop-if-<:
33737 0x11/imm32/alloc-id:fake:payload
33738
33739 0x9/imm32/size
33740 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
33741 _string-loop-if-<=:
33742 0x11/imm32/alloc-id:fake:payload
33743
33744 0xa/imm32/size
33745 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
33746 _string-loop-if-=:
33747 0x11/imm32/alloc-id:fake:payload
33748
33749 0x9/imm32/size
33750 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
33751 _string-loop-if->:
33752 0x11/imm32/alloc-id:fake:payload
33753
33754 0x9/imm32/size
33755 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
33756 _string-loop-if->=:
33757 0x11/imm32/alloc-id:fake:payload
33758
33759 0xa/imm32/size
33760 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
33761 _string-loop-if-!=:
33762 0x11/imm32/alloc-id:fake:payload
33763
33764 0xa/imm32/size
33765 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
33766 _string-loop-if-addr<:
33767 0x11/imm32/alloc-id:fake:payload
33768
33769 0xd/imm32/size
33770 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/<
33771 _string-loop-if-addr<=:
33772 0x11/imm32/alloc-id:fake:payload
33773
33774 0xe/imm32/size
33775 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/=
33776 _string-loop-if-addr>:
33777 0x11/imm32/alloc-id:fake:payload
33778
33779 0xd/imm32/size
33780 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/>
33781 _string-loop-if-addr>=:
33782 0x11/imm32/alloc-id:fake:payload
33783
33784 0xe/imm32/size
33785 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/=
33786 _string-loop-if-float<:
33787 0x11/imm32/alloc-id:fake:payload
33788
33789 0xe/imm32/size
33790 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/<
33791 _string-loop-if-float<=:
33792 0x11/imm32/alloc-id:fake:payload
33793
33794 0xf/imm32/size
33795 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/=
33796 _string-loop-if-float>:
33797 0x11/imm32/alloc-id:fake:payload
33798
33799 0xe/imm32/size
33800 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/>
33801 _string-loop-if-float>=:
33802 0x11/imm32/alloc-id:fake:payload
33803
33804 0xf/imm32/size
33805 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/=
33806 _string-multiply:
33807 0x11/imm32/alloc-id:fake:payload
33808
33809 0x8/imm32/size
33810 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
33811 _string-convert:
33812 0x11/imm32/alloc-id:fake:payload
33813
33814 0x7/imm32/size
33815 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t
33816 _string-truncate:
33817 0x11/imm32/alloc-id:fake:payload
33818
33819 0x8/imm32/size
33820 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e
33821 _string-reinterpret:
33822 0x11/imm32/alloc-id:fake:payload
33823
33824 0xb/imm32/size
33825 0x72/r 0x65/e 0x69/i 0x6e/n 0x74/t 0x65/e 0x72/r 0x70/p 0x72/r 0x65/e 0x74/t
33826 _string-divide:
33827 0x11/imm32/alloc-id:fake:payload
33828
33829 0x6/imm32/size
33830 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
33831 _string-max:
33832 0x11/imm32/alloc-id:fake:payload
33833
33834 0x3/imm32/size
33835 0x6d/m 0x61/a 0x78/x
33836 _string-min:
33837 0x11/imm32/alloc-id:fake:payload
33838
33839 0x3/imm32/size
33840 0x6d/m 0x69/i 0x6e/n
33841 _string-reciprocal:
33842 0x11/imm32/alloc-id:fake:payload
33843
33844 0xa/imm32/size
33845 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
33846 _string-square-root:
33847 0x11/imm32/alloc-id:fake:payload
33848
33849 0xb/imm32/size
33850 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
33851 _string-inverse-square-root:
33852 0x11/imm32/alloc-id:fake:payload
33853
33854 0x13/imm32/size
33855 0x69/i 0x6e/n 0x76/v 0x65/e 0x72/r 0x73/s 0x65/e 0x2d/- 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
33856 _string-negate:
33857 0x11/imm32/alloc-id:fake:payload
33858
33859 0x6/imm32/size
33860 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
33861 _string-or:
33862 0x11/imm32/alloc-id:fake:payload
33863
33864 0x2/imm32/size
33865 0x6f/o 0x72/r
33866 _string-or-with:
33867 0x11/imm32/alloc-id:fake:payload
33868
33869 0x7/imm32/size
33870 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
33871 _string-subtract:
33872 0x11/imm32/alloc-id:fake:payload
33873
33874 0x8/imm32/size
33875 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
33876 _string-subtract-from:
33877 0x11/imm32/alloc-id:fake:payload
33878
33879 0xd/imm32/size
33880 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
33881 _string-xor:
33882 0x11/imm32/alloc-id:fake:payload
33883
33884 0x3/imm32/size
33885 0x78/x 0x6f/o 0x72/r
33886 _string-xor-with:
33887 0x11/imm32/alloc-id:fake:payload
33888
33889 0x8/imm32/size
33890 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
33891 _string-shift-left:
33892 0x11/imm32/alloc-id:fake:payload
33893
33894 0xa/imm32/size
33895 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x6c/l 0x65/e 0x66/f 0x74/t
33896 _string-shift-right:
33897 0x11/imm32/alloc-id:fake:payload
33898
33899 0xb/imm32/size
33900 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t
33901 _string-shift-right-signed:
33902 0x11/imm32/alloc-id:fake:payload
33903
33904 0x12/imm32/size
33905 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
33906
33907
33908 _string_01_add_to:
33909 0x11/imm32/alloc-id:fake:payload
33910
33911 0x9/imm32/size
33912 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
33913 _string_03_add:
33914 0x11/imm32/alloc-id:fake:payload
33915
33916 0x6/imm32/size
33917 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
33918 _string_05_add_to_eax:
33919 0x11/imm32/alloc-id:fake:payload
33920
33921 0xd/imm32/size
33922 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
33923 _string_09_or_with:
33924 0x11/imm32/alloc-id:fake:payload
33925
33926 0xa/imm32/size
33927 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
33928 _string_0b_or:
33929 0x11/imm32/alloc-id:fake:payload
33930
33931 0x5/imm32/size
33932 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
33933 _string_0d_or_with_eax:
33934 0x11/imm32/alloc-id:fake:payload
33935
33936 0xe/imm32/size
33937 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
33938 _string_0f_82_jump_label:
33939 0x11/imm32/alloc-id:fake:payload
33940
33941 0x13/imm32/size
33942 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/<
33943 _string_0f_82_jump_break:
33944 0x11/imm32/alloc-id:fake:payload
33945
33946 0x20/imm32/size
33947 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
33948 _string_0f_82_jump_loop:
33949 0x11/imm32/alloc-id:fake:payload
33950
33951 0x1f/imm32/size
33952 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
33953 _string_0f_83_jump_label:
33954 0x11/imm32/alloc-id:fake:payload
33955
33956 0x14/imm32/size
33957 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/=
33958 _string_0f_83_jump_break:
33959 0x11/imm32/alloc-id:fake:payload
33960
33961 0x21/imm32/size
33962 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
33963 _string_0f_83_jump_loop:
33964 0x11/imm32/alloc-id:fake:payload
33965
33966 0x20/imm32/size
33967 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
33968 _string_0f_84_jump_label:
33969 0x11/imm32/alloc-id:fake:payload
33970
33971 0xf/imm32/size
33972 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/=
33973 _string_0f_84_jump_break:
33974 0x11/imm32/alloc-id:fake:payload
33975
33976 0x1c/imm32/size
33977 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
33978 _string_0f_84_jump_loop:
33979 0x11/imm32/alloc-id:fake:payload
33980
33981 0x1b/imm32/size
33982 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
33983 _string_0f_85_jump_label:
33984 0x11/imm32/alloc-id:fake:payload
33985
33986 0x10/imm32/size
33987 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/=
33988 _string_0f_85_jump_break:
33989 0x11/imm32/alloc-id:fake:payload
33990
33991 0x1d/imm32/size
33992 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
33993 _string_0f_85_jump_loop:
33994 0x11/imm32/alloc-id:fake:payload
33995
33996 0x1c/imm32/size
33997 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
33998 _string_0f_86_jump_label:
33999 0x11/imm32/alloc-id:fake:payload
34000
34001 0x14/imm32/size
34002 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/=
34003 _string_0f_86_jump_break:
34004 0x11/imm32/alloc-id:fake:payload
34005
34006 0x21/imm32/size
34007 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
34008 _string_0f_86_jump_loop:
34009 0x11/imm32/alloc-id:fake:payload
34010
34011 0x20/imm32/size
34012 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
34013 _string_0f_87_jump_label:
34014 0x11/imm32/alloc-id:fake:payload
34015
34016 0x13/imm32/size
34017 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/>
34018 _string_0f_87_jump_break:
34019 0x11/imm32/alloc-id:fake:payload
34020
34021 0x20/imm32/size
34022 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
34023 _string_0f_87_jump_loop:
34024 0x11/imm32/alloc-id:fake:payload
34025
34026 0x1f/imm32/size
34027 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
34028 _string_0f_8c_jump_label:
34029 0x11/imm32/alloc-id:fake:payload
34030
34031 0xf/imm32/size
34032 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/<
34033 _string_0f_8c_jump_break:
34034 0x11/imm32/alloc-id:fake:payload
34035
34036 0x1c/imm32/size
34037 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
34038 _string_0f_8c_jump_loop:
34039 0x11/imm32/alloc-id:fake:payload
34040
34041 0x1b/imm32/size
34042 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
34043 _string_0f_8d_jump_label:
34044 0x11/imm32/alloc-id:fake:payload
34045
34046 0x10/imm32/size
34047 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/=
34048 _string_0f_8d_jump_break:
34049 0x11/imm32/alloc-id:fake:payload
34050
34051 0x1d/imm32/size
34052 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
34053 _string_0f_8d_jump_loop:
34054 0x11/imm32/alloc-id:fake:payload
34055
34056 0x1c/imm32/size
34057 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
34058 _string_0f_8e_jump_label:
34059 0x11/imm32/alloc-id:fake:payload
34060
34061 0x10/imm32/size
34062 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/=
34063 _string_0f_8e_jump_break:
34064 0x11/imm32/alloc-id:fake:payload
34065
34066 0x1d/imm32/size
34067 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
34068 _string_0f_8e_jump_loop:
34069 0x11/imm32/alloc-id:fake:payload
34070
34071 0x1c/imm32/size
34072 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
34073 _string_0f_8f_jump_label:
34074 0x11/imm32/alloc-id:fake:payload
34075
34076 0xf/imm32/size
34077 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/>
34078 _string_0f_8f_jump_break:
34079 0x11/imm32/alloc-id:fake:payload
34080
34081 0x1c/imm32/size
34082 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
34083 _string_0f_8f_jump_loop:
34084 0x11/imm32/alloc-id:fake:payload
34085
34086 0x1b/imm32/size
34087 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
34088 _string_0f_af_multiply:
34089 0x11/imm32/alloc-id:fake:payload
34090
34091 0xe/imm32/size
34092 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
34093 _string_f3_0f_2a_convert_to_float:
34094 0x11/imm32/alloc-id:fake:payload
34095
34096 0x19/imm32/size
34097 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
34098 _string_f3_0f_2d_convert_to_int:
34099 0x11/imm32/alloc-id:fake:payload
34100
34101 0x17/imm32/size
34102 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
34103 _string_f3_0f_2c_truncate_to_int:
34104 0x11/imm32/alloc-id:fake:payload
34105
34106 0x18/imm32/size
34107 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
34108 _string_f3_0f_58_add:
34109 0x11/imm32/alloc-id:fake:payload
34110
34111 0xc/imm32/size
34112 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x38/8 0x2f/slash 0x61/a 0x64/d 0x64/d
34113 _string_f3_0f_5c_subtract:
34114 0x11/imm32/alloc-id:fake:payload
34115
34116 0x11/imm32/size
34117 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
34118 _string_f3_0f_59_multiply:
34119 0x11/imm32/alloc-id:fake:payload
34120
34121 0x11/imm32/size
34122 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
34123 _string_f3_0f_5e_divide:
34124 0x11/imm32/alloc-id:fake:payload
34125
34126 0xf/imm32/size
34127 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
34128 _string_f3_0f_53_reciprocal:
34129 0x11/imm32/alloc-id:fake:payload
34130
34131 0x13/imm32/size
34132 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
34133 _string_f3_0f_51_square_root:
34134 0x11/imm32/alloc-id:fake:payload
34135
34136 0x14/imm32/size
34137 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
34138 _string_f3_0f_52_inverse_square_root:
34139 0x11/imm32/alloc-id:fake:payload
34140
34141 0x1c/imm32/size
34142 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
34143 _string_f3_0f_5d_min:
34144 0x11/imm32/alloc-id:fake:payload
34145
34146 0xc/imm32/size
34147 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x64/d 0x2f/slash 0x6d/m 0x69/i 0x6e/n
34148 _string_f3_0f_5f_max:
34149 0x11/imm32/alloc-id:fake:payload
34150
34151 0xc/imm32/size
34152 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x66/f 0x2f/slash 0x6d/m 0x61/a 0x78/x
34153 _string_f3_0f_10_copy:
34154 0x11/imm32/alloc-id:fake:payload
34155
34156 0xd/imm32/size
34157 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
34158 _string_f3_0f_11_copy:
34159 0x11/imm32/alloc-id:fake:payload
34160
34161 0xd/imm32/size
34162 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
34163 _string_0f_2f_compare:
34164 0x11/imm32/alloc-id:fake:payload
34165
34166 0xd/imm32/size
34167 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
34168 _string_21_and_with:
34169 0x11/imm32/alloc-id:fake:payload
34170
34171 0xb/imm32/size
34172 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34173 _string_23_and:
34174 0x11/imm32/alloc-id:fake:payload
34175
34176 0x6/imm32/size
34177 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
34178 _string_25_and_with_eax:
34179 0x11/imm32/alloc-id:fake:payload
34180
34181 0xf/imm32/size
34182 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
34183 _string_29_subtract_from:
34184 0x11/imm32/alloc-id:fake:payload
34185
34186 0x10/imm32/size
34187 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
34188 _string_2b_subtract:
34189 0x11/imm32/alloc-id:fake:payload
34190
34191 0xb/imm32/size
34192 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
34193 _string_2d_subtract_from_eax:
34194 0x11/imm32/alloc-id:fake:payload
34195
34196 0x14/imm32/size
34197 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
34198 _string_31_xor_with:
34199 0x11/imm32/alloc-id:fake:payload
34200
34201 0xb/imm32/size
34202 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
34203 _string_33_xor:
34204 0x11/imm32/alloc-id:fake:payload
34205
34206 0x6/imm32/size
34207 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
34208 _string_35_xor_with_eax:
34209 0x11/imm32/alloc-id:fake:payload
34210
34211 0xf/imm32/size
34212 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
34213 _string_39_compare->:
34214 0x11/imm32/alloc-id:fake:payload
34215
34216 0xc/imm32/size
34217 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
34218 _string_3b_compare<-:
34219 0x11/imm32/alloc-id:fake:payload
34220
34221 0xc/imm32/size
34222 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
34223 _string_3d_compare_eax_with:
34224 0x11/imm32/alloc-id:fake:payload
34225
34226 0x13/imm32/size
34227 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
34228 _string_40_increment_eax:
34229 0x11/imm32/alloc-id:fake:payload
34230
34231 0x10/imm32/size
34232 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
34233 _string_41_increment_ecx:
34234 0x11/imm32/alloc-id:fake:payload
34235
34236 0x10/imm32/size
34237 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
34238 _string_42_increment_edx:
34239 0x11/imm32/alloc-id:fake:payload
34240
34241 0x10/imm32/size
34242 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
34243 _string_43_increment_ebx:
34244 0x11/imm32/alloc-id:fake:payload
34245
34246 0x10/imm32/size
34247 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
34248 _string_46_increment_esi:
34249 0x11/imm32/alloc-id:fake:payload
34250
34251 0x10/imm32/size
34252 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
34253 _string_47_increment_edi:
34254 0x11/imm32/alloc-id:fake:payload
34255
34256 0x10/imm32/size
34257 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
34258 _string_48_decrement_eax:
34259 0x11/imm32/alloc-id:fake:payload
34260
34261 0x10/imm32/size
34262 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
34263 _string_49_decrement_ecx:
34264 0x11/imm32/alloc-id:fake:payload
34265
34266 0x10/imm32/size
34267 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
34268 _string_4a_decrement_edx:
34269 0x11/imm32/alloc-id:fake:payload
34270
34271 0x10/imm32/size
34272 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
34273 _string_4b_decrement_ebx:
34274 0x11/imm32/alloc-id:fake:payload
34275
34276 0x10/imm32/size
34277 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
34278 _string_4e_decrement_esi:
34279 0x11/imm32/alloc-id:fake:payload
34280
34281 0x10/imm32/size
34282 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
34283 _string_4f_decrement_edi:
34284 0x11/imm32/alloc-id:fake:payload
34285
34286 0x10/imm32/size
34287 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
34288 _string_81_subop_add:
34289 0x11/imm32/alloc-id:fake:payload
34290
34291 0xe/imm32/size
34292 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
34293 _string_81_subop_or:
34294 0x11/imm32/alloc-id:fake:payload
34295
34296 0xd/imm32/size
34297 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
34298 _string_81_subop_and:
34299 0x11/imm32/alloc-id:fake:payload
34300
34301 0xe/imm32/size
34302 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
34303 _string_81_subop_subtract:
34304 0x11/imm32/alloc-id:fake:payload
34305
34306 0x13/imm32/size
34307 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
34308 _string_81_subop_xor:
34309 0x11/imm32/alloc-id:fake:payload
34310
34311 0xe/imm32/size
34312 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
34313 _string_81_subop_compare:
34314 0x11/imm32/alloc-id:fake:payload
34315
34316 0x12/imm32/size
34317 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
34318 _string_89_<-:
34319 0x11/imm32/alloc-id:fake:payload
34320
34321 0x5/imm32/size
34322 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
34323 _string_8b_->:
34324 0x11/imm32/alloc-id:fake:payload
34325
34326 0x5/imm32/size
34327 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
34328 _string_8a_copy_byte:
34329 0x11/imm32/alloc-id:fake:payload
34330
34331 0x9/imm32/size
34332 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
34333 _string_88_copy_byte:
34334 0x11/imm32/alloc-id:fake:payload
34335
34336 0x9/imm32/size
34337 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
34338 _string_8d_copy_address:
34339 0x11/imm32/alloc-id:fake:payload
34340
34341 0xf/imm32/size
34342 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
34343 _string_b8_copy_to_eax:
34344 0x11/imm32/alloc-id:fake:payload
34345
34346 0xe/imm32/size
34347 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
34348 _string_b9_copy_to_ecx:
34349 0x11/imm32/alloc-id:fake:payload
34350
34351 0xe/imm32/size
34352 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
34353 _string_ba_copy_to_edx:
34354 0x11/imm32/alloc-id:fake:payload
34355
34356 0xe/imm32/size
34357 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
34358 _string_bb_copy_to_ebx:
34359 0x11/imm32/alloc-id:fake:payload
34360
34361 0xe/imm32/size
34362 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
34363 _string_be_copy_to_esi:
34364 0x11/imm32/alloc-id:fake:payload
34365
34366 0xe/imm32/size
34367 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
34368 _string_bf_copy_to_edi:
34369 0x11/imm32/alloc-id:fake:payload
34370
34371 0xe/imm32/size
34372 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
34373 _string_c7_subop_copy:
34374 0x11/imm32/alloc-id:fake:payload
34375
34376 0xf/imm32/size
34377 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
34378 _string_e9_jump_label:
34379 0x11/imm32/alloc-id:fake:payload
34380
34381 0x7/imm32/size
34382 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
34383 _string_e9_jump_break:
34384 0x11/imm32/alloc-id:fake:payload
34385
34386 0x14/imm32/size
34387 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
34388 _string_e9_jump_loop:
34389 0x11/imm32/alloc-id:fake:payload
34390
34391 0x13/imm32/size
34392 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
34393 _string_f7_subop_negate:
34394 0x11/imm32/alloc-id:fake:payload
34395
34396 0x11/imm32/size
34397 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
34398 _string_ff_subop_increment:
34399 0x11/imm32/alloc-id:fake:payload
34400
34401 0x14/imm32/size
34402 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
34403 _string_ff_subop_decrement:
34404 0x11/imm32/alloc-id:fake:payload
34405
34406 0x14/imm32/size
34407 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
34408 _string_c1_subop_shift_left:
34409 0x11/imm32/alloc-id:fake:payload
34410
34411 0x15/imm32/size
34412 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
34413 _string_c1_subop_shift_right_padding_zeroes:
34414 0x11/imm32/alloc-id:fake:payload
34415
34416 0x25/imm32/size
34417 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
34418 _string_c1_subop_shift_right_preserving_sign:
34419 0x11/imm32/alloc-id:fake:payload
34420
34421 0x26/imm32/size
34422 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
34423
34424 Single-int-var-in-mem:
34425 0x11/imm32/alloc-id:fake:payload
34426 0x11/imm32/alloc-id:fake
34427 Int-var-in-mem/imm32
34428 0/imm32/next
34429 0/imm32/next
34430
34431 Int-var-in-mem:
34432 0x11/imm32/alloc-id:fake:payload
34433 0/imm32/name
34434 0/imm32/name
34435 0x11/imm32/alloc-id:fake
34436 Type-int/imm32
34437 1/imm32/some-block-depth
34438 1/imm32/some-stack-offset
34439 0/imm32/no-register
34440 0/imm32/no-register
34441
34442
34443 Single-byte-var-in-mem:
34444 0x11/imm32/alloc-id:fake:payload
34445 0x11/imm32/alloc-id:fake
34446 Byte-var-in-mem/imm32
34447 0/imm32/next
34448 0/imm32/next
34449
34450
34451 Byte-var-in-mem:
34452 0x11/imm32/alloc-id:fake:payload
34453 0/imm32/name
34454 0/imm32/name
34455 0x11/imm32/alloc-id:fake
34456 Type-byte/imm32
34457 1/imm32/some-block-depth
34458 1/imm32/some-stack-offset
34459 0/imm32/no-register
34460 0/imm32/no-register
34461
34462 Two-args-int-stack-int-reg:
34463 0x11/imm32/alloc-id:fake:payload
34464 0x11/imm32/alloc-id:fake
34465 Int-var-in-mem/imm32
34466 0x11/imm32/alloc-id:fake
34467 Single-int-var-in-some-register/imm32/next
34468
34469 Two-int-args-in-regs:
34470 0x11/imm32/alloc-id:fake:payload
34471 0x11/imm32/alloc-id:fake
34472 Int-var-in-some-register/imm32
34473 0x11/imm32/alloc-id:fake
34474 Single-int-var-in-some-register/imm32/next
34475
34476
34477 Two-args-byte-stack-byte-reg:
34478 0x11/imm32/alloc-id:fake:payload
34479 0x11/imm32/alloc-id:fake
34480 Byte-var-in-mem/imm32
34481 0x11/imm32/alloc-id:fake
34482 Single-byte-var-in-some-register/imm32/next
34483
34484 Two-args-int-reg-int-stack:
34485 0x11/imm32/alloc-id:fake:payload
34486 0x11/imm32/alloc-id:fake
34487 Int-var-in-some-register/imm32
34488 0x11/imm32/alloc-id:fake
34489 Single-int-var-in-mem/imm32/next
34490
34491 Two-args-int-eax-int-literal:
34492 0x11/imm32/alloc-id:fake:payload
34493 0x11/imm32/alloc-id:fake
34494 Int-var-in-eax/imm32
34495 0x11/imm32/alloc-id:fake
34496 Single-lit-var/imm32/next
34497
34498 Int-var-and-literal:
34499 0x11/imm32/alloc-id:fake:payload
34500 0x11/imm32/alloc-id:fake
34501 Int-var-in-mem/imm32
34502 0x11/imm32/alloc-id:fake
34503 Single-lit-var/imm32/next
34504
34505 Int-var-in-register-and-literal:
34506 0x11/imm32/alloc-id:fake:payload
34507 0x11/imm32/alloc-id:fake
34508 Int-var-in-some-register/imm32
34509 0x11/imm32/alloc-id:fake
34510 Single-lit-var/imm32/next
34511
34512 Two-float-args-in-regs:
34513 0x11/imm32/alloc-id:fake:payload
34514 0x11/imm32/alloc-id:fake
34515 Float-var-in-some-register/imm32
34516 0x11/imm32/alloc-id:fake
34517 Single-float-var-in-some-register/imm32/next
34518
34519 Two-args-float-reg-float-stack:
34520 0x11/imm32/alloc-id:fake:payload
34521 0x11/imm32/alloc-id:fake
34522 Float-var-in-some-register/imm32
34523 0x11/imm32/alloc-id:fake
34524 Single-float-var-in-mem/imm32/next
34525
34526 Two-args-float-stack-float-reg:
34527 0x11/imm32/alloc-id:fake:payload
34528 0x11/imm32/alloc-id:fake
34529 Float-var-in-mem/imm32
34530 0x11/imm32/alloc-id:fake
34531 Single-float-var-in-some-register/imm32/next
34532
34533 Single-int-var-in-some-register:
34534 0x11/imm32/alloc-id:fake:payload
34535 0x11/imm32/alloc-id:fake
34536 Int-var-in-some-register/imm32
34537 0/imm32/next
34538 0/imm32/next
34539
34540 Single-addr-var-in-some-register:
34541 0x11/imm32/alloc-id:fake:payload
34542 0x11/imm32/alloc-id:fake
34543 Addr-var-in-some-register/imm32
34544 0/imm32/next
34545 0/imm32/next
34546
34547 Single-byte-var-in-some-register:
34548 0x11/imm32/alloc-id:fake:payload
34549 0x11/imm32/alloc-id:fake
34550 Byte-var-in-some-register/imm32
34551 0/imm32/next
34552 0/imm32/next
34553
34554 Int-var-in-some-register:
34555 0x11/imm32/alloc-id:fake:payload
34556 0/imm32/name
34557 0/imm32/name
34558 0x11/imm32/alloc-id:fake
34559 Type-int/imm32
34560 1/imm32/some-block-depth
34561 0/imm32/no-stack-offset
34562 0x11/imm32/alloc-id:fake
34563 Any-register/imm32
34564
34565 Any-register:
34566 0x11/imm32/alloc-id:fake:payload
34567 1/imm32/size
34568
34569 2a/asterisk
34570
34571 Addr-var-in-some-register:
34572 0x11/imm32/alloc-id:fake:payload
34573 0/imm32/name
34574 0/imm32/name
34575 0x11/imm32/alloc-id:fake
34576 Type-addr/imm32
34577 1/imm32/some-block-depth
34578 0/imm32/no-stack-offset
34579 0x11/imm32/alloc-id:fake
34580 Any-register/imm32
34581
34582 Byte-var-in-some-register:
34583 0x11/imm32/alloc-id:fake:payload
34584 0/imm32/name
34585 0/imm32/name
34586 0x11/imm32/alloc-id:fake
34587 Type-byte/imm32
34588 1/imm32/some-block-depth
34589 0/imm32/no-stack-offset
34590 0x11/imm32/alloc-id:fake
34591 Any-register/imm32
34592
34593 Single-int-var-in-eax:
34594 0x11/imm32/alloc-id:fake:payload
34595 0x11/imm32/alloc-id:fake
34596 Int-var-in-eax/imm32
34597 0/imm32/next
34598 0/imm32/next
34599
34600 Int-var-in-eax:
34601 0x11/imm32/alloc-id:fake:payload
34602 0/imm32/name
34603 0/imm32/name
34604 0x11/imm32/alloc-id:fake
34605 Type-int/imm32
34606 1/imm32/some-block-depth
34607 0/imm32/no-stack-offset
34608 0x11/imm32/alloc-id:fake
34609 $Mu-register-eax/imm32
34610
34611 Single-int-var-in-ecx:
34612 0x11/imm32/alloc-id:fake:payload
34613 0x11/imm32/alloc-id:fake
34614 Int-var-in-ecx/imm32
34615 0/imm32/next
34616 0/imm32/next
34617
34618 Int-var-in-ecx:
34619 0x11/imm32/alloc-id:fake:payload
34620 0/imm32/name
34621 0/imm32/name
34622 0x11/imm32/alloc-id:fake
34623 Type-int/imm32
34624 1/imm32/some-block-depth
34625 0/imm32/no-stack-offset
34626 0x11/imm32/alloc-id:fake
34627 $Register-ecx/imm32/register
34628
34629 Single-int-var-in-edx:
34630 0x11/imm32/alloc-id:fake:payload
34631 0x11/imm32/alloc-id:fake
34632 Int-var-in-edx/imm32
34633 0/imm32/next
34634 0/imm32/next
34635
34636 Int-var-in-edx:
34637 0x11/imm32/alloc-id:fake:payload
34638 0/imm32/name
34639 0/imm32/name
34640 0x11/imm32/alloc-id:fake
34641 Type-int/imm32
34642 1/imm32/some-block-depth
34643 0/imm32/no-stack-offset
34644 0x11/imm32/alloc-id:fake
34645 $Register-edx/imm32/register
34646
34647 Single-int-var-in-ebx:
34648 0x11/imm32/alloc-id:fake:payload
34649 0x11/imm32/alloc-id:fake
34650 Int-var-in-ebx/imm32
34651 0/imm32/next
34652 0/imm32/next
34653
34654 Int-var-in-ebx:
34655 0x11/imm32/alloc-id:fake:payload
34656 0/imm32/name
34657 0/imm32/name
34658 0x11/imm32/alloc-id:fake
34659 Type-int/imm32
34660 1/imm32/some-block-depth
34661 0/imm32/no-stack-offset
34662 0x11/imm32/alloc-id:fake
34663 $Register-ebx/imm32/register
34664
34665 Single-int-var-in-esi:
34666 0x11/imm32/alloc-id:fake:payload
34667 0x11/imm32/alloc-id:fake
34668 Int-var-in-esi/imm32
34669 0/imm32/next
34670 0/imm32/next
34671
34672 Int-var-in-esi:
34673 0x11/imm32/alloc-id:fake:payload
34674 0/imm32/name
34675 0/imm32/name
34676 0x11/imm32/alloc-id:fake
34677 Type-int/imm32
34678 1/imm32/some-block-depth
34679 0/imm32/no-stack-offset
34680 0x11/imm32/alloc-id:fake
34681 $Register-esi/imm32/register
34682
34683 Single-int-var-in-edi:
34684 0x11/imm32/alloc-id:fake:payload
34685 0x11/imm32/alloc-id:fake
34686 Int-var-in-edi/imm32
34687 0/imm32/next
34688 0/imm32/next
34689
34690 Int-var-in-edi:
34691 0x11/imm32/alloc-id:fake:payload
34692 0/imm32/name
34693 0/imm32/name
34694 0x11/imm32/alloc-id:fake
34695 Type-int/imm32
34696 1/imm32/some-block-depth
34697 0/imm32/no-stack-offset
34698 0x11/imm32/alloc-id:fake
34699 $Register-edi/imm32/register
34700
34701 Single-lit-var:
34702 0x11/imm32/alloc-id:fake:payload
34703 0x11/imm32/alloc-id:fake
34704 Lit-var/imm32
34705 0/imm32/next
34706 0/imm32/next
34707
34708 Lit-var:
34709 0x11/imm32/alloc-id:fake:payload
34710 0/imm32/name
34711 0/imm32/name
34712 0x11/imm32/alloc-id:fake
34713 Type-literal/imm32
34714 1/imm32/some-block-depth
34715 0/imm32/no-stack-offset
34716 0/imm32/no-register
34717 0/imm32/no-register
34718
34719 Single-float-var-in-mem:
34720 0x11/imm32/alloc-id:fake:payload
34721 0x11/imm32/alloc-id:fake
34722 Float-var-in-mem/imm32
34723 0/imm32/next
34724 0/imm32/next
34725
34726 Float-var-in-mem:
34727 0x11/imm32/alloc-id:fake:payload
34728 0/imm32/name
34729 0/imm32/name
34730 0x11/imm32/alloc-id:fake
34731 Type-float/imm32
34732 1/imm32/some-block-depth
34733 1/imm32/some-stack-offset
34734 0/imm32/no-register
34735 0/imm32/no-register
34736
34737 Single-float-var-in-some-register:
34738 0x11/imm32/alloc-id:fake:payload
34739 0x11/imm32/alloc-id:fake
34740 Float-var-in-some-register/imm32
34741 0/imm32/next
34742 0/imm32/next
34743
34744 Float-var-in-some-register:
34745 0x11/imm32/alloc-id:fake:payload
34746 0/imm32/name
34747 0/imm32/name
34748 0x11/imm32/alloc-id:fake
34749 Type-float/imm32
34750 1/imm32/some-block-depth
34751 0/imm32/no-stack-offset
34752 0x11/imm32/alloc-id:fake
34753 Any-register/imm32
34754
34755 Type-int:
34756 0x11/imm32/alloc-id:fake:payload
34757 1/imm32/is-atom
34758 1/imm32/value:int
34759 0/imm32/left:unused
34760 0/imm32/right:null
34761 0/imm32/right:null
34762
34763 Type-literal:
34764 0x11/imm32/alloc-id:fake:payload
34765 1/imm32/is-atom
34766 0/imm32/value:literal
34767 0/imm32/left:unused
34768 0/imm32/right:null
34769 0/imm32/right:null
34770
34771 Type-addr:
34772 0x11/imm32/alloc-id:fake:payload
34773 1/imm32/is-atom
34774 2/imm32/value:addr
34775 0/imm32/left:unused
34776 0/imm32/right:null
34777 0/imm32/right:null
34778
34779 Type-byte:
34780 0x11/imm32/alloc-id:fake:payload
34781 1/imm32/is-atom
34782 8/imm32/value:byte
34783 0/imm32/left:unused
34784 0/imm32/right:null
34785 0/imm32/right:null
34786
34787 Type-float:
34788 0x11/imm32/alloc-id:fake:payload
34789 1/imm32/is-atom
34790 0xf/imm32/value:float
34791 0/imm32/left:unused
34792 0/imm32/right:null
34793 0/imm32/right:null
34794
34795 == code
34796 emit-subx-primitive:
34797
34798 55/push-ebp
34799 89/<- %ebp 4/r32/esp
34800
34801 50/push-eax
34802 51/push-ecx
34803
34804 8b/-> *(ebp+0x10) 1/r32/ecx
34805
34806 (emit-indent *(ebp+8) *Curr-block-depth)
34807 (lookup *(ecx+0x18) *(ecx+0x1c))
34808 (write-buffered *(ebp+8) %eax)
34809
34810 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
34811
34812 (emit-subx-rm32 *(ebp+8) *(ecx+0x34) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
34813
34814 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
34815
34816 (emit-subx-x32 *(ebp+8) *(ecx+0x38) *(ebp+0xc))
34817
34818 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
34819
34820 (emit-subx-imm8 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
34821
34822 (emit-subx-disp32 *(ebp+8) *(ecx+0x30) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
34823 (write-buffered *(ebp+8) Newline)
34824 $emit-subx-primitive:end:
34825
34826 59/pop-to-ecx
34827 58/pop-to-eax
34828
34829 89/<- %esp 5/r32/ebp
34830 5d/pop-to-ebp
34831 c3/return
34832
34833 emit-subx-rm32:
34834
34835 55/push-ebp
34836 89/<- %ebp 4/r32/esp
34837
34838 50/push-eax
34839
34840 81 7/subop/compare *(ebp+0xc) 0/imm32
34841 74/jump-if-= $emit-subx-rm32:end/disp8
34842
34843 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
34844 (emit-subx-var-as-rm32 *(ebp+8) %eax)
34845 $emit-subx-rm32:end:
34846
34847 58/pop-to-eax
34848
34849 89/<- %esp 5/r32/ebp
34850 5d/pop-to-ebp
34851 c3/return
34852
34853 get-stmt-operand-from-arg-location:
34854
34855 55/push-ebp
34856 89/<- %ebp 4/r32/esp
34857
34858 51/push-ecx
34859
34860 8b/-> *(ebp+0xc) 0/r32/eax
34861
34862 8b/-> *(ebp+8) 1/r32/ecx
34863
34864 {
34865 3d/compare-eax-and 1/imm32
34866 75/jump-if-!= break/disp8
34867 $get-stmt-operand-from-arg-location:1:
34868 (lookup *(ecx+0xc) *(ecx+0x10))
34869 eb/jump $get-stmt-operand-from-arg-location:end/disp8
34870 }
34871
34872 {
34873 3d/compare-eax-and 2/imm32
34874 75/jump-if-!= break/disp8
34875 $get-stmt-operand-from-arg-location:2:
34876 (lookup *(ecx+0xc) *(ecx+0x10))
34877 (lookup *(eax+8) *(eax+0xc))
34878 eb/jump $get-stmt-operand-from-arg-location:end/disp8
34879 }
34880
34881 {
34882 3d/compare-eax-and 3/imm32
34883 75/jump-if-!= break/disp8
34884 $get-stmt-operand-from-arg-location:3:
34885 (lookup *(ecx+0x14) *(ecx+0x18))
34886 eb/jump $get-stmt-operand-from-arg-location:end/disp8
34887 }
34888
34889 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
34890 $get-stmt-operand-from-arg-location:end:
34891
34892 59/pop-to-ecx
34893
34894 89/<- %esp 5/r32/ebp
34895 5d/pop-to-ebp
34896 c3/return
34897
34898 $get-stmt-operand-from-arg-location:abort:
34899
34900 (write-buffered *(ebp+0x10) "invalid arg-location ")
34901 (write-int32-hex-buffered *(ebp+0x10) %eax)
34902 (write-buffered *(ebp+0x10) Newline)
34903 (flush *(ebp+0x10))
34904 (stop *(ebp+0x14) 1)
34905
34906
34907 emit-subx-r32:
34908
34909 55/push-ebp
34910 89/<- %ebp 4/r32/esp
34911
34912 50/push-eax
34913 51/push-ecx
34914
34915 81 7/subop/compare *(ebp+0xc) 0/imm32
34916 0f 84/jump-if-= $emit-subx-r32:end/disp32
34917
34918 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
34919 (lookup *eax *(eax+4))
34920 (lookup *(eax+0x18) *(eax+0x1c))
34921
34922
34923
34924
34925 (maybe-get Mu-registers %eax 0xc)
34926 (write-buffered *(ebp+8) Space)
34927 (write-int32-hex-buffered *(ebp+8) *eax)
34928 (write-buffered *(ebp+8) "/r32")
34929 $emit-subx-r32:end:
34930
34931 59/pop-to-ecx
34932 58/pop-to-eax
34933
34934 89/<- %esp 5/r32/ebp
34935 5d/pop-to-ebp
34936 c3/return
34937
34938 emit-subx-x32:
34939
34940 55/push-ebp
34941 89/<- %ebp 4/r32/esp
34942
34943 50/push-eax
34944 51/push-ecx
34945
34946 81 7/subop/compare *(ebp+0xc) 0/imm32
34947 0f 84/jump-if-= $emit-subx-x32:end/disp32
34948
34949 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
34950 (lookup *eax *(eax+4))
34951 (lookup *(eax+0x18) *(eax+0x1c))
34952
34953
34954
34955
34956 (maybe-get Mu-registers %eax 0xc)
34957 (write-buffered *(ebp+8) Space)
34958 (write-int32-hex-buffered *(ebp+8) *eax)
34959 (write-buffered *(ebp+8) "/x32")
34960 $emit-subx-x32:end:
34961
34962 59/pop-to-ecx
34963 58/pop-to-eax
34964
34965 89/<- %esp 5/r32/ebp
34966 5d/pop-to-ebp
34967 c3/return
34968
34969 emit-subx-imm32:
34970
34971 55/push-ebp
34972 89/<- %ebp 4/r32/esp
34973
34974 50/push-eax
34975 51/push-ecx
34976
34977 81 7/subop/compare *(ebp+0xc) 0/imm32
34978 0f 84/jump-if-= $emit-subx-imm32:end/disp32
34979
34980 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
34981 (lookup *eax *(eax+4))
34982 (lookup *eax *(eax+4))
34983 (write-buffered *(ebp+8) Space)
34984 (write-buffered *(ebp+8) %eax)
34985 (write-buffered *(ebp+8) "/imm32")
34986 $emit-subx-imm32:end:
34987
34988 59/pop-to-ecx
34989 58/pop-to-eax
34990
34991 89/<- %esp 5/r32/ebp
34992 5d/pop-to-ebp
34993 c3/return
34994
34995 emit-subx-imm8:
34996
34997 55/push-ebp
34998 89/<- %ebp 4/r32/esp
34999
35000 50/push-eax
35001 51/push-ecx
35002
35003 81 7/subop/compare *(ebp+0xc) 0/imm32
35004 0f 84/jump-if-= $emit-subx-imm32:end/disp32
35005
35006 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
35007 (lookup *eax *(eax+4))
35008 (lookup *eax *(eax+4))
35009 (write-buffered *(ebp+8) Space)
35010 (write-buffered *(ebp+8) %eax)
35011 (write-buffered *(ebp+8) "/imm8")
35012 $emit-subx-imm8:end:
35013
35014 59/pop-to-ecx
35015 58/pop-to-eax
35016
35017 89/<- %esp 5/r32/ebp
35018 5d/pop-to-ebp
35019 c3/return
35020
35021 emit-subx-disp32:
35022
35023 55/push-ebp
35024 89/<- %ebp 4/r32/esp
35025
35026 50/push-eax
35027 51/push-ecx
35028
35029 81 7/subop/compare *(ebp+0xc) 0/imm32
35030 0f 84/jump-if-= $emit-subx-disp32:end/disp32
35031
35032 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
35033 (lookup *eax *(eax+4))
35034 (lookup *eax *(eax+4))
35035 (write-buffered *(ebp+8) Space)
35036 (write-buffered *(ebp+8) %eax)
35037
35038
35039 8b/-> *(ebp+0x10) 0/r32/eax
35040 (lookup *(eax+4) *(eax+8))
35041 89/<- %ecx 0/r32/eax
35042 {
35043 (string-starts-with? %ecx "break")
35044 3d/compare-eax-and 0/imm32/false
35045 74/jump-if-= break/disp8
35046 (write-buffered *(ebp+8) ":break")
35047 }
35048
35049 {
35050 (string-starts-with? %ecx "loop")
35051 3d/compare-eax-and 0/imm32/false
35052 74/jump-if-= break/disp8
35053 (write-buffered *(ebp+8) ":loop")
35054 }
35055 (write-buffered *(ebp+8) "/disp32")
35056 $emit-subx-disp32:end:
35057
35058 59/pop-to-ecx
35059 58/pop-to-eax
35060
35061 89/<- %esp 5/r32/ebp
35062 5d/pop-to-ebp
35063 c3/return
35064
35065 emit-call:
35066
35067 55/push-ebp
35068 89/<- %ebp 4/r32/esp
35069
35070 50/push-eax
35071 51/push-ecx
35072
35073 (emit-indent *(ebp+8) *Curr-block-depth)
35074 (write-buffered *(ebp+8) "(")
35075
35076 8b/-> *(ebp+0xc) 1/r32/ecx
35077
35078 (lookup *(ecx+4) *(ecx+8))
35079 (write-buffered *(ebp+8) %eax)
35080
35081
35082 (lookup *(ecx+0xc) *(ecx+0x10))
35083 {
35084
35085 3d/compare-eax-and 0/imm32
35086 74/jump-if-= break/disp8
35087
35088 (emit-subx-call-operand *(ebp+8) %eax)
35089
35090 (lookup *(eax+8) *(eax+0xc))
35091 eb/jump loop/disp8
35092 }
35093
35094 (write-buffered *(ebp+8) ")\n")
35095 $emit-call:end:
35096
35097 59/pop-to-ecx
35098 58/pop-to-eax
35099
35100 89/<- %esp 5/r32/ebp
35101 5d/pop-to-ebp
35102 c3/return
35103
35104 emit-subx-call-operand:
35105
35106
35107 55/push-ebp
35108 89/<- %ebp 4/r32/esp
35109
35110 50/push-eax
35111 51/push-ecx
35112 56/push-esi
35113
35114 8b/-> *(ebp+0xc) 1/r32/ecx
35115
35116 (lookup *ecx *(ecx+4))
35117 89/<- %esi 0/r32/eax
35118
35119 {
35120 $emit-subx-call-operand:check-for-register-direct:
35121 81 7/subop/compare *(esi+0x18) 0/imm32
35122 74/jump-if-= break/disp8
35123 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35124 75/jump-if-!= break/disp8
35125 $emit-subx-call-operand:register-direct:
35126 (write-buffered *(ebp+8) " %")
35127 (lookup *(esi+0x18) *(esi+0x1c))
35128 (write-buffered *(ebp+8) %eax)
35129 e9/jump $emit-subx-call-operand:end/disp32
35130 }
35131
35132 {
35133 $emit-subx-call-operand:check-for-register-indirect:
35134 81 7/subop/compare *(esi+0x18) 0/imm32
35135 74/jump-if-= break/disp8
35136 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35137 74/jump-if-= break/disp8
35138 $emit-subx-call-operand:register-indirect:
35139 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
35140 e9/jump $emit-subx-call-operand:end/disp32
35141 }
35142
35143 {
35144 81 7/subop/compare *(esi+0x14) 0/imm32
35145 74/jump-if-= break/disp8
35146 $emit-subx-call-operand:stack:
35147 (emit-subx-call-operand-stack *(ebp+8) %esi)
35148 e9/jump $emit-subx-call-operand:end/disp32
35149 }
35150
35151 {
35152 (lookup *(esi+8) *(esi+0xc))
35153 81 7/subop/compare *(eax+4) 0/imm32
35154 75/jump-if-!= break/disp8
35155 $emit-subx-call-operand:literal:
35156 (write-buffered *(ebp+8) Space)
35157 (lookup *esi *(esi+4))
35158 (write-buffered *(ebp+8) %eax)
35159 e9/jump $emit-subx-call-operand:end/disp32
35160 }
35161
35162 {
35163 (lookup *(esi+8) *(esi+0xc))
35164 81 7/subop/compare *(eax+4) 0x10/imm32
35165 75/jump-if-!= break/disp8
35166 $emit-subx-call-operand:literal-string:
35167 (write-buffered *(ebp+8) Space)
35168 (lookup *esi *(esi+4))
35169 (write-buffered *(ebp+8) %eax)
35170 }
35171 $emit-subx-call-operand:end:
35172
35173 5e/pop-to-esi
35174 59/pop-to-ecx
35175 58/pop-to-eax
35176
35177 89/<- %esp 5/r32/ebp
35178 5d/pop-to-ebp
35179 c3/return
35180
35181 emit-subx-call-operand-register-indirect:
35182
35183 55/push-ebp
35184 89/<- %ebp 4/r32/esp
35185
35186 50/push-eax
35187 51/push-ecx
35188 56/push-esi
35189
35190 8b/-> *(ebp+0xc) 6/r32/esi
35191
35192 (size-of-deref %esi)
35193 89/<- %ecx 0/r32/eax
35194
35195 (lookup *(esi+0x18) *(esi+0x1c))
35196 89/<- %esi 0/r32/eax
35197
35198
35199 b8/copy-to-eax 0/imm32
35200 {
35201 $emit-subx-call-operand-register-indirect:loop:
35202
35203 39/compare %eax 1/r32/ecx
35204 7d/jump-if->= break/disp8
35205
35206 (write-buffered *(ebp+8) " *(")
35207 (write-buffered *(ebp+8) %esi)
35208 (write-buffered *(ebp+8) "+")
35209 (write-int32-hex-buffered *(ebp+8) %eax)
35210 (write-buffered *(ebp+8) ")")
35211
35212 05/add-to-eax 4/imm32
35213
35214 eb/jump loop/disp8
35215 }
35216 $emit-subx-call-operand-register-indirect:end:
35217
35218 5e/pop-to-esi
35219 59/pop-to-ecx
35220 58/pop-to-eax
35221
35222 89/<- %esp 5/r32/ebp
35223 5d/pop-to-ebp
35224 c3/return
35225
35226 emit-subx-call-operand-stack:
35227
35228 55/push-ebp
35229 89/<- %ebp 4/r32/esp
35230
35231 50/push-eax
35232 51/push-ecx
35233 56/push-esi
35234
35235 8b/-> *(ebp+0xc) 6/r32/esi
35236
35237 8b/-> *(esi+0x14) 1/r32/ecx
35238
35239 (size-of %esi)
35240
35241 01/add-to %eax 1/r32/ecx
35242 {
35243 $emit-subx-call-operand-stack:loop:
35244
35245 39/compare %ecx 0/r32/eax
35246 7d/jump-if->= break/disp8
35247
35248 (write-buffered *(ebp+8) " *(ebp+")
35249 (write-int32-hex-buffered *(ebp+8) %ecx)
35250 (write-buffered *(ebp+8) ")")
35251
35252 81 0/subop/add %ecx 4/imm32
35253
35254 eb/jump loop/disp8
35255 }
35256 $emit-subx-call-operand-stack:end:
35257
35258 5e/pop-to-esi
35259 59/pop-to-ecx
35260 58/pop-to-eax
35261
35262 89/<- %esp 5/r32/ebp
35263 5d/pop-to-ebp
35264 c3/return
35265
35266 emit-subx-var-as-rm32:
35267
35268 55/push-ebp
35269 89/<- %ebp 4/r32/esp
35270
35271 50/push-eax
35272 51/push-ecx
35273 56/push-esi
35274
35275 8b/-> *(ebp+0xc) 1/r32/ecx
35276
35277 (lookup *ecx *(ecx+4))
35278 89/<- %esi 0/r32/eax
35279
35280 {
35281 $emit-subx-var-as-rm32:check-for-register-indirect:
35282 81 7/subop/compare *(esi+0x18) 0/imm32
35283 74/jump-if-= break/disp8
35284 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35285 74/jump-if-= break/disp8
35286 $emit-subx-var-as-rm32:register-indirect:
35287 (write-buffered *(ebp+8) " *")
35288 (lookup *(esi+0x18) *(esi+0x1c))
35289 (write-buffered *(ebp+8) %eax)
35290 e9/jump $emit-subx-var-as-rm32:end/disp32
35291 }
35292
35293 {
35294 $emit-subx-var-as-rm32:check-for-register-direct:
35295 81 7/subop/compare *(esi+0x18) 0/imm32
35296 74/jump-if-= break/disp8
35297 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35298 75/jump-if-!= break/disp8
35299 $emit-subx-var-as-rm32:register-direct:
35300 (write-buffered *(ebp+8) " %")
35301 (lookup *(esi+0x18) *(esi+0x1c))
35302 (write-buffered *(ebp+8) %eax)
35303 e9/jump $emit-subx-var-as-rm32:end/disp32
35304 }
35305
35306 {
35307 81 7/subop/compare *(esi+0x14) 0/imm32
35308 74/jump-if-= break/disp8
35309 $emit-subx-var-as-rm32:stack:
35310 (write-buffered *(ebp+8) Space)
35311 (write-buffered *(ebp+8) "*(ebp+")
35312 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
35313 (write-buffered *(ebp+8) ")")
35314 }
35315 $emit-subx-var-as-rm32:end:
35316
35317 5e/pop-to-esi
35318 59/pop-to-ecx
35319 58/pop-to-eax
35320
35321 89/<- %esp 5/r32/ebp
35322 5d/pop-to-ebp
35323 c3/return
35324
35325 find-matching-primitive:
35326
35327 55/push-ebp
35328 89/<- %ebp 4/r32/esp
35329
35330 51/push-ecx
35331
35332 8b/-> *(ebp+8) 1/r32/ecx
35333 {
35334 $find-matching-primitive:loop:
35335
35336 81 7/subop/compare %ecx 0/imm32
35337 74/jump-if-= break/disp8
35338
35339 {
35340 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
35341 3d/compare-eax-and 0/imm32/false
35342 74/jump-if-= break/disp8
35343 89/<- %eax 1/r32/ecx
35344 eb/jump $find-matching-primitive:end/disp8
35345 }
35346 $find-matching-primitive:next-primitive:
35347
35348 (lookup *(ecx+0x3c) *(ecx+0x40))
35349 89/<- %ecx 0/r32/eax
35350
35351 e9/jump loop/disp32
35352 }
35353
35354 b8/copy-to-eax 0/imm32
35355 $find-matching-primitive:end:
35356
35357 59/pop-to-ecx
35358
35359 89/<- %esp 5/r32/ebp
35360 5d/pop-to-ebp
35361 c3/return
35362
35363 mu-stmt-matches-primitive?:
35364
35365
35366
35367
35368
35369
35370 55/push-ebp
35371 89/<- %ebp 4/r32/esp
35372
35373 51/push-ecx
35374 52/push-edx
35375 53/push-ebx
35376 56/push-esi
35377 57/push-edi
35378
35379 8b/-> *(ebp+8) 1/r32/ecx
35380
35381 8b/-> *(ebp+0xc) 2/r32/edx
35382 {
35383 $mu-stmt-matches-primitive?:check-name:
35384
35385
35386 (lookup *(ecx+4) *(ecx+8))
35387 89/<- %esi 0/r32/eax
35388
35389 (lookup *edx *(edx+4))
35390
35391
35392
35393 89/<- %edi 0/r32/eax
35394 (string-equal? %esi %edi)
35395 3d/compare-eax-and 0/imm32/false
35396 75/jump-if-!= break/disp8
35397 b8/copy-to-eax 0/imm32
35398 e9/jump $mu-stmt-matches-primitive?:end/disp32
35399 }
35400
35401 (lookup *(ecx+0xc) *(ecx+0x10))
35402 89/<- %esi 0/r32/eax
35403
35404 (lookup *(edx+8) *(edx+0xc))
35405 89/<- %edi 0/r32/eax
35406 {
35407 $mu-stmt-matches-primitive?:inouts-loop:
35408
35409 {
35410 $mu-stmt-matches-primitive?:check-both-inouts-null:
35411 81 7/subop/compare %esi 0/imm32
35412 75/jump-if-!= break/disp8
35413 $mu-stmt-matches-primitive?:stmt-inout-null:
35414 81 7/subop/compare %edi 0/imm32
35415 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
35416 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
35417
35418 b8/copy-to-eax 0/imm32/false
35419 e9/jump $mu-stmt-matches-primitive?:end/disp32
35420 }
35421
35422 {
35423 $mu-stmt-matches-primitive?:check-prim-inout-null:
35424 81 7/subop/compare %edi 0/imm32
35425 75/jump-if-!= break/disp8
35426 $mu-stmt-matches-primitive?:prim-inout-null:
35427 b8/copy-to-eax 0/imm32/false
35428 e9/jump $mu-stmt-matches-primitive?:end/disp32
35429 }
35430
35431 {
35432 $mu-stmt-matches-primitive?:check-inouts-match:
35433 (lookup *edi *(edi+4))
35434 (operand-matches-primitive? %esi %eax)
35435 3d/compare-eax-and 0/imm32/false
35436 75/jump-if-!= break/disp8
35437 $mu-stmt-matches-primitive?:inouts-match:
35438 b8/copy-to-eax 0/imm32/false
35439 e9/jump $mu-stmt-matches-primitive?:end/disp32
35440 }
35441 $mu-stmt-matches-primitive?:next-inout:
35442
35443 (lookup *(esi+8) *(esi+0xc))
35444 89/<- %esi 0/r32/eax
35445
35446 (lookup *(edi+8) *(edi+0xc))
35447 89/<- %edi 0/r32/eax
35448
35449 e9/jump loop/disp32
35450 }
35451 $mu-stmt-matches-primitive?:check-outputs:
35452
35453 (lookup *(ecx+0x14) *(ecx+0x18))
35454 89/<- %esi 0/r32/eax
35455
35456 (lookup *(edx+0x10) *(edx+0x14))
35457 89/<- %edi 0/r32/eax
35458 {
35459 $mu-stmt-matches-primitive?:outputs-loop:
35460
35461 {
35462 $mu-stmt-matches-primitive?:check-both-outputs-null:
35463 81 7/subop/compare %esi 0/imm32
35464 75/jump-if-!= break/disp8
35465 {
35466 $mu-stmt-matches-primitive?:stmt-output-null:
35467 81 7/subop/compare %edi 0/imm32
35468 75/jump-if-!= break/disp8
35469 $mu-stmt-matches-primitive?:both-outputs-null:
35470
35471 b8/copy-to-eax 1/imm32
35472 e9/jump $mu-stmt-matches-primitive?:end/disp32
35473 }
35474 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
35475
35476 b8/copy-to-eax 0/imm32
35477 e9/jump $mu-stmt-matches-primitive?:end/disp32
35478 }
35479
35480 {
35481 $mu-stmt-matches-primitive?:check-prim-output-null:
35482 81 7/subop/compare %edi 0/imm32
35483 75/jump-if-!= break/disp8
35484 $mu-stmt-matches-primitive?:prim-output-is-null:
35485 b8/copy-to-eax 0/imm32
35486 e9/jump $mu-stmt-matches-primitive?:end/disp32
35487 }
35488
35489 {
35490 $mu-stmt-matches-primitive?:check-outputs-match:
35491 (lookup *edi *(edi+4))
35492 (operand-matches-primitive? %esi %eax)
35493 3d/compare-eax-and 0/imm32/false
35494 75/jump-if-!= break/disp8
35495 $mu-stmt-matches-primitive?:outputs-match:
35496 b8/copy-to-eax 0/imm32
35497 e9/jump $mu-stmt-matches-primitive?:end/disp32
35498 }
35499 $mu-stmt-matches-primitive?:next-output:
35500
35501 (lookup *(esi+8) *(esi+0xc))
35502 89/<- %esi 0/r32/eax
35503
35504 (lookup *(edi+8) *(edi+0xc))
35505 89/<- %edi 0/r32/eax
35506
35507 e9/jump loop/disp32
35508 }
35509 $mu-stmt-matches-primitive?:return-true:
35510 b8/copy-to-eax 1/imm32
35511 $mu-stmt-matches-primitive?:end:
35512
35513 5f/pop-to-edi
35514 5e/pop-to-esi
35515 5b/pop-to-ebx
35516 5a/pop-to-edx
35517 59/pop-to-ecx
35518
35519 89/<- %esp 5/r32/ebp
35520 5d/pop-to-ebp
35521 c3/return
35522
35523 operand-matches-primitive?:
35524
35525 55/push-ebp
35526 89/<- %ebp 4/r32/esp
35527
35528 51/push-ecx
35529 52/push-edx
35530 53/push-ebx
35531 56/push-esi
35532 57/push-edi
35533
35534 8b/-> *(ebp+8) 1/r32/ecx
35535
35536 (lookup *ecx *(ecx+4))
35537 89/<- %esi 0/r32/eax
35538
35539 8b/-> *(ebp+0xc) 7/r32/edi
35540 $operand-matches-primitive?:check-type:
35541
35542
35543 (lookup *(esi+8) *(esi+0xc))
35544 89/<- %ebx 0/r32/eax
35545
35546 {
35547 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35548 74/jump-if-= break/disp8
35549 $operand-matches-primitive?:is-deref:
35550
35551 (lookup *(ebx+0xc) *(ebx+0x10))
35552
35553 81 7/subop/compare *eax 0/imm32/false
35554 {
35555 75/jump-if-!= break/disp8
35556 (lookup *(eax+4) *(eax+8))
35557 }
35558
35559 89/<- %ebx 0/r32/eax
35560 }
35561
35562 (lookup *(edi+8) *(edi+0xc))
35563 (subx-type-category-match? %ebx %eax)
35564 3d/compare-eax-and 0/imm32/false
35565 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
35566 {
35567 $operand-matches-primitive?:check-register:
35568
35569 {
35570 81 7/subop/compare *(edi+0x18) 0/imm32
35571 0f 85/jump-if-!= break/disp32
35572 81 7/subop/compare *(esi+0x18) 0/imm32
35573 74/jump-if-= break/disp8
35574 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35575 74/jump-if-= break/disp8
35576 $operand-matches-primitive?:var-deref-match:
35577 e9/jump $operand-matches-primitive?:return-true/disp32
35578 }
35579
35580 {
35581 81 7/subop/compare *(edi+0x18) 0/imm32
35582 0f 84/jump-if-= break/disp32
35583 81 7/subop/compare *(esi+0x18) 0/imm32
35584 0f 84/jump-if-= break/disp32
35585 81 7/subop/compare *(ecx+0x10) 0/imm32/false
35586 74/jump-if-= break/disp8
35587 $operand-matches-primitive?:var-deref-no-match:
35588 e9/jump $operand-matches-primitive?:return-false/disp32
35589 }
35590
35591 {
35592
35593
35594 (lookup *(esi+0x18) *(esi+0x1c))
35595 89/<- %ebx 0/r32/eax
35596
35597 (lookup *(edi+0x18) *(edi+0x1c))
35598 89/<- %ecx 0/r32/eax
35599
35600 39/compare %ecx 3/r32/ebx
35601 74/jump-if-= break/disp8
35602 $operand-matches-primitive?:var-register-no-match:
35603
35604 81 7/subop/compare %ebx 0/imm32
35605 74/jump-if-= $operand-matches-primitive?:return-false/disp8
35606 81 7/subop/compare %ecx 0/imm32
35607 74/jump-if-= $operand-matches-primitive?:return-false/disp8
35608
35609 (string-equal? %ecx "*")
35610 3d/compare-eax-and 0/imm32/false
35611 75/jump-if-!= break/disp8
35612 $operand-matches-primitive?:wildcard-no-match:
35613
35614 (string-equal? %ecx %ebx)
35615 3d/compare-eax-and 0/imm32/false
35616 74/jump-if-= $operand-matches-primitive?:return-false/disp8
35617 }
35618 }
35619 $operand-matches-primitive?:return-true:
35620 b8/copy-to-eax 1/imm32/true
35621 eb/jump $operand-matches-primitive?:end/disp8
35622 $operand-matches-primitive?:return-false:
35623 b8/copy-to-eax 0/imm32/false
35624 $operand-matches-primitive?:end:
35625
35626 5f/pop-to-edi
35627 5e/pop-to-esi
35628 5b/pop-to-ebx
35629 5a/pop-to-edx
35630 59/pop-to-ecx
35631
35632 89/<- %esp 5/r32/ebp
35633 5d/pop-to-ebp
35634 c3/return
35635
35636 find-matching-function:
35637
35638 55/push-ebp
35639 89/<- %ebp 4/r32/esp
35640
35641 51/push-ecx
35642
35643 8b/-> *(ebp+8) 1/r32/ecx
35644 {
35645
35646 81 7/subop/compare %ecx 0/imm32
35647 74/jump-if-= break/disp8
35648
35649
35650
35651 {
35652 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
35653 3d/compare-eax-and 0/imm32/false
35654 74/jump-if-= break/disp8
35655 89/<- %eax 1/r32/ecx
35656 eb/jump $find-matching-function:end/disp8
35657 }
35658
35659 (lookup *(ecx+0x20) *(ecx+0x24))
35660 89/<- %ecx 0/r32/eax
35661
35662 eb/jump loop/disp8
35663 }
35664
35665 b8/copy-to-eax 0/imm32
35666 $find-matching-function:end:
35667
35668 59/pop-to-ecx
35669
35670 89/<- %esp 5/r32/ebp
35671 5d/pop-to-ebp
35672 c3/return
35673
35674
35675 mu-stmt-matches-function?:
35676
35677 55/push-ebp
35678 89/<- %ebp 4/r32/esp
35679
35680 51/push-ecx
35681
35682
35683 8b/-> *(ebp+8) 0/r32/eax
35684 (lookup *(eax+4) *(eax+8))
35685 89/<- %ecx 0/r32/eax
35686
35687 8b/-> *(ebp+0xc) 0/r32/eax
35688 (lookup *eax *(eax+4))
35689 (string-equal? %eax %ecx)
35690 $mu-stmt-matches-function?:end:
35691
35692 59/pop-to-ecx
35693
35694 89/<- %esp 5/r32/ebp
35695 5d/pop-to-ebp
35696 c3/return
35697
35698
35699
35700 subx-type-category-match?:
35701
35702 55/push-ebp
35703 89/<- %ebp 4/r32/esp
35704
35705 51/push-ecx
35706
35707 (type-category *(ebp+8))
35708 89/<- %ecx 0/r32/eax
35709
35710 (type-category *(ebp+0xc))
35711
35712 39/compare %eax 1/r32/ecx
35713 0f 94/set-byte-if-= %al
35714 81 4/subop/and %eax 0xff/imm32
35715 $subx-type-category-match?:end:
35716
35717 59/pop-to-ecx
35718
35719 89/<- %esp 5/r32/ebp
35720 5d/pop-to-ebp
35721 c3/return
35722
35723 type-category:
35724
35725 55/push-ebp
35726 89/<- %ebp 4/r32/esp
35727
35728 51/push-ecx
35729
35730 (simple-mu-type? *(ebp+8) 0)
35731 89/<- %ecx 0/r32/eax
35732
35733 (simple-mu-type? *(ebp+8) 0xf)
35734
35735 c1/shift 4/subop/left %ecx 1/imm8
35736 09/or %eax 1/r32/ecx
35737 $type-category:end:
35738
35739 59/pop-to-ecx
35740
35741 89/<- %esp 5/r32/ebp
35742 5d/pop-to-ebp
35743 c3/return
35744
35745 simple-mu-type?:
35746
35747 55/push-ebp
35748 89/<- %ebp 4/r32/esp
35749
35750 51/push-ecx
35751
35752 8b/-> *(ebp+0xc) 1/r32/ecx
35753
35754 8b/-> *(ebp+8) 0/r32/eax
35755 39/compare *(eax+4) 1/r32/ecx
35756 0f 94/set-byte-if-= %al
35757 81 4/subop/and %eax 0xff/imm32
35758 $simple-mu-type?:end:
35759
35760 59/pop-to-ecx
35761
35762 89/<- %esp 5/r32/ebp
35763 5d/pop-to-ebp
35764 c3/return
35765
35766 mu-addr-type?:
35767
35768 55/push-ebp
35769 89/<- %ebp 4/r32/esp
35770
35771 8b/-> *(ebp+8) 0/r32/eax
35772
35773 81 7/subop/compare *eax 0/imm32/false
35774 {
35775 75/jump-if-!= break/disp8
35776 (lookup *(eax+4) *(eax+8))
35777 }
35778
35779 81 7/subop/compare *(eax+4) 2/imm32/addr
35780 0f 94/set-byte-if-= %al
35781 81 4/subop/and %eax 0xff/imm32
35782 $mu-addr-type?:end:
35783
35784 89/<- %esp 5/r32/ebp
35785 5d/pop-to-ebp
35786 c3/return
35787
35788 mu-array-type?:
35789
35790 55/push-ebp
35791 89/<- %ebp 4/r32/esp
35792
35793 8b/-> *(ebp+8) 0/r32/eax
35794
35795 81 7/subop/compare *eax 0/imm32/false
35796 {
35797 75/jump-if-!= break/disp8
35798 (lookup *(eax+4) *(eax+8))
35799 }
35800
35801 81 7/subop/compare *(eax+4) 3/imm32/array
35802 0f 94/set-byte-if-= %al
35803 81 4/subop/and %eax 0xff/imm32
35804 $mu-array-type?:end:
35805
35806 89/<- %esp 5/r32/ebp
35807 5d/pop-to-ebp
35808 c3/return
35809
35810 mu-string-type?:
35811
35812 55/push-ebp
35813 89/<- %ebp 4/r32/esp
35814
35815 56/push-esi
35816
35817 8b/-> *(ebp+8) 6/r32/esi
35818
35819 81 7/subop/compare *esi 0/imm32/false
35820 0f 85/jump-if-!= $mu-string-type?:return-false/disp32
35821
35822 (mu-addr-type? %esi)
35823 3d/compare-eax-with 0/imm32/false
35824 0f 84/jump-if-= $mu-string-type?:end/disp32
35825
35826 (lookup *(esi+0xc) *(esi+0x10))
35827 (mu-array-type? %eax)
35828 3d/compare-eax-with 0/imm32/false
35829 74/jump-if-= $mu-string-type?:end/disp8
35830
35831 (lookup *(esi+0xc) *(esi+0x10))
35832 (lookup *(eax+0xc) *(eax+0x10))
35833
35834 81 7/subop/compare *eax 0/imm32/false
35835 75/jump-if-!= $mu-string-type?:return-false/disp8
35836
35837 (lookup *(eax+4) *(eax+8))
35838 (simple-mu-type? %eax 8)
35839 eb/jump $mu-string-type?:end/disp8
35840 $mu-string-type?:return-false:
35841 b8/copy-to-eax 0/imm32/false
35842 $mu-string-type?:end:
35843
35844 5e/pop-to-esi
35845
35846 89/<- %esp 5/r32/ebp
35847 5d/pop-to-ebp
35848 c3/return
35849
35850 mu-stream-type?:
35851
35852 55/push-ebp
35853 89/<- %ebp 4/r32/esp
35854
35855 8b/-> *(ebp+8) 0/r32/eax
35856
35857 81 7/subop/compare *eax 0/imm32/false
35858 {
35859 75/jump-if-!= break/disp8
35860 (lookup *(eax+4) *(eax+8))
35861 }
35862
35863 81 7/subop/compare *(eax+4) 0xb/imm32/stream
35864 0f 94/set-byte-if-= %al
35865 81 4/subop/and %eax 0xff/imm32
35866 $mu-stream-type?:end:
35867
35868 89/<- %esp 5/r32/ebp
35869 5d/pop-to-ebp
35870 c3/return
35871
35872 test-emit-subx-stmt-primitive:
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889 55/push-ebp
35890 89/<- %ebp 4/r32/esp
35891
35892 (clear-stream _test-output-stream)
35893 (clear-stream $_test-output-buffered-file->buffer)
35894
35895 $test-emit-subx-stmt-primitive:initialize-type:
35896
35897 68/push 0/imm32/right:null
35898 68/push 0/imm32/right:null
35899 68/push 0/imm32/left:unused
35900 68/push 1/imm32/value:int
35901 68/push 1/imm32/is-atom?:true
35902 68/push 0x11/imm32/alloc-id:fake:payload
35903 89/<- %ecx 4/r32/esp
35904 $test-emit-subx-stmt-primitive:initialize-var:
35905
35906 68/push 0/imm32/no-register
35907 68/push 0/imm32/no-register
35908 68/push -8/imm32/stack-offset
35909 68/push 1/imm32/block-depth
35910 51/push-ecx/type
35911 68/push 0x11/imm32/alloc-id:fake
35912 68/push 0/imm32/name
35913 68/push 0/imm32/name
35914 68/push 0x11/imm32/alloc-id:fake:payload
35915 89/<- %ecx 4/r32/esp
35916 $test-emit-subx-stmt-primitive:initialize-var-name:
35917
35918 8d/copy-address *(ecx+4) 0/r32/eax
35919 (copy-array Heap "foo" %eax)
35920 $test-emit-subx-stmt-primitive:initialize-stmt-var:
35921
35922 68/push 0/imm32/is-deref:false
35923 68/push 0/imm32/next
35924 68/push 0/imm32/next
35925 51/push-ecx/var-foo
35926 68/push 0x11/imm32/alloc-id:fake
35927 68/push 0x11/imm32/alloc-id:fake:payload
35928 89/<- %ebx 4/r32/esp
35929 $test-emit-subx-stmt-primitive:initialize-stmt:
35930
35931 68/push 0/imm32/no-outputs
35932 68/push 0/imm32/no-outputs
35933 53/push-ebx/inouts
35934 68/push 0x11/imm32/alloc-id:fake
35935 68/push 0/imm32/operation
35936 68/push 0/imm32/operation
35937 68/push 1/imm32/tag
35938 89/<- %esi 4/r32/esp
35939 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
35940
35941 8d/copy-address *(esi+4) 0/r32/eax
35942 (copy-array Heap "increment" %eax)
35943 $test-emit-subx-stmt-primitive:initialize-primitive:
35944
35945 68/push 0/imm32/next
35946 68/push 0/imm32/next
35947 68/push 0/imm32/no-x32
35948 68/push 0/imm32/no-xm32
35949 68/push 0/imm32/no-disp32
35950 68/push 0/imm32/no-imm8
35951 68/push 0/imm32/no-imm32
35952 68/push 0/imm32/no-r32
35953 68/push 1/imm32/rm32-is-first-inout
35954 68/push 0/imm32/subx-name
35955 68/push 0/imm32/subx-name
35956 68/push 0/imm32/no-outputs
35957 68/push 0/imm32/no-outputs
35958 53/push-ebx/inouts
35959 68/push 0x11/imm32/alloc-id:fake
35960 68/push 0/imm32/name
35961 68/push 0/imm32/name
35962 89/<- %ebx 4/r32/esp
35963 $test-emit-subx-stmt-primitive:initialize-primitive-name:
35964
35965 (copy-array Heap "increment" %ebx)
35966 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
35967
35968 8d/copy-address *(ebx+0x18) 0/r32/eax
35969 (copy-array Heap "ff 0/subop/increment" %eax)
35970
35971 c7 0/subop/copy *Curr-block-depth 0/imm32
35972 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
35973 (flush _test-output-buffered-file)
35974 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
35980
35981 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
35982
35983 89/<- %esp 5/r32/ebp
35984 5d/pop-to-ebp
35985 c3/return
35986
35987 test-emit-subx-stmt-primitive-register:
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004 55/push-ebp
36005 89/<- %ebp 4/r32/esp
36006
36007 (clear-stream _test-output-stream)
36008 (clear-stream $_test-output-buffered-file->buffer)
36009 $test-emit-subx-stmt-primitive-register:initialize-type:
36010
36011 68/push 0/imm32/right:null
36012 68/push 0/imm32/right:null
36013 68/push 0/imm32/left:unused
36014 68/push 1/imm32/value:int
36015 68/push 1/imm32/is-atom?:true
36016 68/push 0x11/imm32/alloc-id:fake:payload
36017 89/<- %ecx 4/r32/esp
36018 $test-emit-subx-stmt-primitive-register:initialize-var:
36019
36020 68/push 0/imm32/register
36021 68/push 0/imm32/register
36022 68/push 0/imm32/no-stack-offset
36023 68/push 1/imm32/block-depth
36024 51/push-ecx
36025 68/push 0x11/imm32/alloc-id:fake
36026 68/push 0/imm32/name
36027 68/push 0/imm32/name
36028 68/push 0x11/imm32/alloc-id:fake:payload
36029 89/<- %ecx 4/r32/esp
36030 $test-emit-subx-stmt-primitive-register:initialize-var-name:
36031
36032 8d/copy-address *(ecx+4) 0/r32/eax
36033 (copy-array Heap "foo" %eax)
36034 $test-emit-subx-stmt-primitive-register:initialize-var-register:
36035
36036 8d/copy-address *(ecx+0x1c) 0/r32/eax
36037 (copy-array Heap "eax" %eax)
36038 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
36039
36040 68/push 0/imm32/is-deref:false
36041 68/push 0/imm32/next
36042 68/push 0/imm32/next
36043 51/push-ecx/var-foo
36044 68/push 0x11/imm32/alloc-id:fake
36045 68/push 0x11/imm32/alloc-id:fake:payload
36046 89/<- %ebx 4/r32/esp
36047 $test-emit-subx-stmt-primitive-register:initialize-stmt:
36048
36049 53/push-ebx/outputs
36050 68/push 0x11/imm32/alloc-id:fake
36051 68/push 0/imm32/no-inouts
36052 68/push 0/imm32/no-inouts
36053 68/push 0/imm32/operation
36054 68/push 0/imm32/operation
36055 68/push 1/imm32
36056 89/<- %esi 4/r32/esp
36057 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
36058
36059 8d/copy-address *(esi+4) 0/r32/eax
36060 (copy-array Heap "increment" %eax)
36061 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
36062
36063 68/push 0/imm32/register
36064 68/push 0/imm32/register
36065 68/push 0/imm32/no-stack-offset
36066 68/push 1/imm32/block-depth
36067 ff 6/subop/push *(ecx+0x10)
36068 68/push 0x11/imm32/alloc-id:fake
36069 68/push 0/imm32/name
36070 68/push 0/imm32/name
36071 68/push 0x11/imm32/alloc-id:fake:payload
36072 89/<- %ebx 4/r32/esp
36073 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
36074
36075 8d/copy-address *(ebx+4) 0/r32/eax
36076 (copy-array Heap "dummy" %eax)
36077 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
36078
36079 8d/copy-address *(ebx+0x1c) 0/r32/eax
36080 (copy-array Heap "*" %eax)
36081 $test-emit-subx-stmt-primitive-register:initialize-var-list:
36082
36083 68/push 0/imm32/next
36084 68/push 0/imm32/next
36085 53/push-ebx/formal-var
36086 68/push 0x11/imm32/alloc-id:fake
36087 68/push 0x11/imm32/alloc-id:fake:payload
36088 89/<- %ebx 4/r32/esp
36089 $test-emit-subx-stmt-primitive-register:initialize-primitive:
36090
36091 68/push 0/imm32/next
36092 68/push 0/imm32/next
36093 68/push 0/imm32/no-x32
36094 68/push 0/imm32/no-xm32
36095 68/push 0/imm32/no-disp32
36096 68/push 0/imm32/no-imm8
36097 68/push 0/imm32/no-imm32
36098 68/push 0/imm32/no-r32
36099 68/push 3/imm32/rm32-is-first-output
36100 68/push 0/imm32/subx-name
36101 68/push 0/imm32/subx-name
36102 53/push-ebx/outputs
36103 68/push 0x11/imm32/alloc-id:fake
36104 68/push 0/imm32/no-inouts
36105 68/push 0/imm32/no-inouts
36106 68/push 0/imm32/name
36107 68/push 0/imm32/name
36108 89/<- %ebx 4/r32/esp
36109 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
36110
36111 (copy-array Heap "increment" %ebx)
36112 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
36113
36114 8d/copy-address *(ebx+0x18) 0/r32/eax
36115 (copy-array Heap "ff 0/subop/increment" %eax)
36116
36117 c7 0/subop/copy *Curr-block-depth 0/imm32
36118 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
36119 (flush _test-output-buffered-file)
36120 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36126
36127 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
36128
36129 89/<- %esp 5/r32/ebp
36130 5d/pop-to-ebp
36131 c3/return
36132
36133 test-emit-subx-stmt-select-primitive:
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153 55/push-ebp
36154 89/<- %ebp 4/r32/esp
36155
36156 (clear-stream _test-output-stream)
36157 (clear-stream $_test-output-buffered-file->buffer)
36158 $test-emit-subx-stmt-select-primitive:initialize-type:
36159
36160 68/push 0/imm32/right:null
36161 68/push 0/imm32/right:null
36162 68/push 0/imm32/left:unused
36163 68/push 1/imm32/value:int
36164 68/push 1/imm32/is-atom?:true
36165 68/push 0x11/imm32/alloc-id:fake:payload
36166 89/<- %ecx 4/r32/esp
36167 $test-emit-subx-stmt-select-primitive:initialize-var:
36168
36169 68/push 0/imm32/register
36170 68/push 0/imm32/register
36171 68/push 0/imm32/no-stack-offset
36172 68/push 1/imm32/block-depth
36173 51/push-ecx
36174 68/push 0x11/imm32/alloc-id:fake
36175 68/push 0/imm32/name
36176 68/push 0/imm32/name
36177 68/push 0x11/imm32/alloc-id:fake:payload
36178 89/<- %ecx 4/r32/esp
36179 $test-emit-subx-stmt-select-primitive:initialize-var-name:
36180
36181 8d/copy-address *(ecx+4) 0/r32/eax
36182 (copy-array Heap "foo" %eax)
36183 $test-emit-subx-stmt-select-primitive:initialize-var-register:
36184
36185 8d/copy-address *(ecx+0x1c) 0/r32/eax
36186 (copy-array Heap "eax" %eax)
36187 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
36188
36189 68/push 0/imm32/is-deref:false
36190 68/push 0/imm32/next
36191 68/push 0/imm32/next
36192 51/push-ecx/var-foo
36193 68/push 0x11/imm32/alloc-id:fake
36194 68/push 0x11/imm32/alloc-id:fake:payload
36195 89/<- %ebx 4/r32/esp
36196 $test-emit-subx-stmt-select-primitive:initialize-stmt:
36197
36198 53/push-ebx/outputs
36199 68/push 0x11/imm32/alloc-id:fake
36200 68/push 0/imm32/no-inouts
36201 68/push 0/imm32/no-inouts
36202 68/push 0/imm32/operation
36203 68/push 0/imm32/operation
36204 68/push 1/imm32
36205 89/<- %esi 4/r32/esp
36206 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
36207
36208 8d/copy-address *(esi+4) 0/r32/eax
36209 (copy-array Heap "increment" %eax)
36210 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
36211
36212 68/push 0/imm32/register
36213 68/push 0/imm32/register
36214 68/push 0/imm32/no-stack-offset
36215 68/push 1/imm32/block-depth
36216 ff 6/subop/push *(ecx+0x10)
36217 68/push 0x11/imm32/alloc-id:fake
36218 68/push 0/imm32/name
36219 68/push 0/imm32/name
36220 68/push 0x11/imm32/alloc-id:fake:payload
36221 89/<- %ebx 4/r32/esp
36222 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
36223
36224 8d/copy-address *(ebx+4) 0/r32/eax
36225 (copy-array Heap "dummy" %eax)
36226 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
36227
36228 8d/copy-address *(ebx+0x1c) 0/r32/eax
36229 (copy-array Heap "*" %eax)
36230 $test-emit-subx-stmt-select-primitive:initialize-var-list:
36231
36232 68/push 0/imm32/next
36233 68/push 0/imm32/next
36234 53/push-ebx/formal-var
36235 68/push 0x11/imm32/alloc-id:fake
36236 68/push 0x11/imm32/alloc-id:fake:payload
36237 89/<- %ebx 4/r32/esp
36238 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
36239
36240 68/push 0/imm32/next
36241 68/push 0/imm32/next
36242 68/push 0/imm32/no-x32
36243 68/push 0/imm32/no-xm32
36244 68/push 0/imm32/no-disp32
36245 68/push 0/imm32/no-imm8
36246 68/push 0/imm32/no-imm32
36247 68/push 0/imm32/no-r32
36248 68/push 3/imm32/rm32-is-first-output
36249 68/push 0/imm32/subx-name
36250 68/push 0/imm32/subx-name
36251 53/push-ebx/outputs
36252 68/push 0x11/imm32/alloc-id:fake
36253 68/push 0/imm32/no-inouts
36254 68/push 0/imm32/no-inouts
36255 68/push 0/imm32/name
36256 68/push 0/imm32/name
36257 68/push 0x11/imm32/alloc-id:fake:payload
36258 89/<- %edi 4/r32/esp
36259 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
36260
36261 8d/copy-address *(edi+4) 0/r32/eax
36262 (copy-array Heap "increment" %eax)
36263 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
36264
36265 8d/copy-address *(edi+0x1c) 0/r32/eax
36266 (copy-array Heap "ff 0/subop/increment" %eax)
36267 $test-emit-subx-stmt-select-primitive:initialize-primitive:
36268
36269 57/push-edi
36270 68/push 0x11/imm32/alloc-id:fake
36271 68/push 0/imm32/no-x32
36272 68/push 0/imm32/no-xm32
36273 68/push 0/imm32/no-disp32
36274 68/push 0/imm32/no-imm8
36275 68/push 0/imm32/no-imm32
36276 68/push 0/imm32/no-r32
36277 68/push 1/imm32/rm32-is-first-inout
36278 68/push 0/imm32/subx-name
36279 68/push 0/imm32/subx-name
36280 68/push 0/imm32/no-outputs
36281 68/push 0/imm32/no-outputs
36282 53/push-ebx/inouts
36283 68/push 0x11/imm32/alloc-id:fake
36284 68/push 0/imm32/name
36285 68/push 0/imm32/name
36286 89/<- %ebx 4/r32/esp
36287 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
36288
36289 (copy-array Heap "increment" %ebx)
36290 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
36291
36292 8d/copy-address *(ebx+0x18) 0/r32/eax
36293 (copy-array Heap "ff 0/subop/increment" %eax)
36294
36295 c7 0/subop/copy *Curr-block-depth 0/imm32
36296 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
36297 (flush _test-output-buffered-file)
36298 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36304
36305 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
36306
36307 89/<- %esp 5/r32/ebp
36308 5d/pop-to-ebp
36309 c3/return
36310
36311 test-emit-subx-stmt-select-primitive-2:
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331 55/push-ebp
36332 89/<- %ebp 4/r32/esp
36333
36334 (clear-stream _test-output-stream)
36335 (clear-stream $_test-output-buffered-file->buffer)
36336 $test-emit-subx-stmt-select-primitive-2:initialize-type:
36337
36338 68/push 0/imm32/right:null
36339 68/push 0/imm32/right:null
36340 68/push 0/imm32/left:unused
36341 68/push 1/imm32/value:int
36342 68/push 1/imm32/is-atom?:true
36343 68/push 0x11/imm32/alloc-id:fake:payload
36344 89/<- %ecx 4/r32/esp
36345 $test-emit-subx-stmt-select-primitive-2:initialize-var:
36346
36347 68/push 0/imm32/register
36348 68/push 0/imm32/register
36349 68/push 0/imm32/no-stack-offset
36350 68/push 1/imm32/block-depth
36351 51/push-ecx
36352 68/push 0x11/imm32/alloc-id:fake
36353 68/push 0/imm32/name
36354 68/push 0/imm32/name
36355 68/push 0x11/imm32/alloc-id:fake:payload
36356 89/<- %ecx 4/r32/esp
36357 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
36358
36359 8d/copy-address *(ecx+4) 0/r32/eax
36360 (copy-array Heap "foo" %eax)
36361 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
36362
36363 8d/copy-address *(ecx+0x1c) 0/r32/eax
36364 (copy-array Heap "eax" %eax)
36365 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
36366
36367 68/push 0/imm32/is-deref:false
36368 68/push 0/imm32/next
36369 68/push 0/imm32/next
36370 51/push-ecx/var-foo
36371 68/push 0x11/imm32/alloc-id:fake
36372 68/push 0x11/imm32/alloc-id:fake:payload
36373 89/<- %ebx 4/r32/esp
36374 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
36375
36376 68/push 0/imm32/no-outputs
36377 68/push 0/imm32/no-outputs
36378 53/push-ebx/inouts
36379 68/push 0x11/imm32/alloc-id:fake
36380 68/push 0/imm32/operation
36381 68/push 0/imm32/operation
36382 68/push 1/imm32
36383 89/<- %esi 4/r32/esp
36384 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
36385
36386 8d/copy-address *(esi+4) 0/r32/eax
36387 (copy-array Heap "increment" %eax)
36388 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
36389
36390 68/push 0/imm32/register
36391 68/push 0/imm32/register
36392 68/push 0/imm32/no-stack-offset
36393 68/push 1/imm32/block-depth
36394 ff 6/subop/push *(ecx+0x10)
36395 68/push 0x11/imm32/alloc-id:fake
36396 68/push 0/imm32/name
36397 68/push 0/imm32/name
36398 68/push 0x11/imm32/alloc-id:fake:payload
36399 89/<- %ebx 4/r32/esp
36400 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
36401
36402 8d/copy-address *(ebx+4) 0/r32/eax
36403 (copy-array Heap "dummy" %eax)
36404 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
36405
36406 8d/copy-address *(ebx+0x1c) 0/r32/eax
36407 (copy-array Heap "*" %eax)
36408 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
36409
36410 68/push 0/imm32/next
36411 68/push 0/imm32/next
36412 53/push-ebx/formal-var
36413 68/push 0x11/imm32/alloc-id:fake
36414 68/push 0x11/imm32/alloc-id:fake:payload
36415 89/<- %ebx 4/r32/esp
36416 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
36417
36418 68/push 0/imm32/next
36419 68/push 0/imm32/next
36420 68/push 0/imm32/no-x32
36421 68/push 0/imm32/no-xm32
36422 68/push 0/imm32/no-disp32
36423 68/push 0/imm32/no-imm8
36424 68/push 0/imm32/no-imm32
36425 68/push 0/imm32/no-r32
36426 68/push 3/imm32/rm32-is-first-output
36427 68/push 0/imm32/subx-name
36428 68/push 0/imm32/subx-name
36429 53/push-ebx/outputs
36430 68/push 0x11/imm32/alloc-id:fake
36431 68/push 0/imm32/no-inouts
36432 68/push 0/imm32/no-inouts
36433 68/push 0/imm32/name
36434 68/push 0/imm32/name
36435 68/push 0x11/imm32/alloc-id:fake:payload
36436 89/<- %edi 4/r32/esp
36437 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
36438
36439 8d/copy-address *(edi+4) 0/r32/eax
36440 (copy-array Heap "increment" %eax)
36441 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
36442
36443 8d/copy-address *(edi+0x1c) 0/r32/eax
36444 (copy-array Heap "ff 0/subop/increment" %eax)
36445 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
36446
36447 57/push-edi
36448 68/push 0x11/imm32/alloc-id:fake
36449 68/push 0/imm32/no-x32
36450 68/push 0/imm32/no-xm32
36451 68/push 0/imm32/no-disp32
36452 68/push 0/imm32/no-imm8
36453 68/push 0/imm32/no-imm32
36454 68/push 0/imm32/no-r32
36455 68/push 1/imm32/rm32-is-first-inout
36456 68/push 0/imm32/subx-name
36457 68/push 0/imm32/subx-name
36458 68/push 0/imm32/no-outputs
36459 68/push 0/imm32/no-outputs
36460 53/push-ebx/inouts
36461 68/push 0x11/imm32/alloc-id:fake
36462 68/push 0/imm32/name
36463 68/push 0/imm32/name
36464 89/<- %ebx 4/r32/esp
36465 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
36466
36467 (copy-array Heap "increment" %ebx)
36468 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
36469
36470 8d/copy-address *(ebx+0x18) 0/r32/eax
36471 (copy-array Heap "ff 0/subop/increment" %eax)
36472
36473 c7 0/subop/copy *Curr-block-depth 0/imm32
36474 (emit-subx-stmt _test-output-buffered-file %esi %ebx 0 Stderr 0)
36475 (flush _test-output-buffered-file)
36476 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36482
36483 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
36484
36485 89/<- %esp 5/r32/ebp
36486 5d/pop-to-ebp
36487 c3/return
36488
36489 test-increment-register:
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503 55/push-ebp
36504 89/<- %ebp 4/r32/esp
36505
36506 (clear-stream _test-output-stream)
36507 (clear-stream $_test-output-buffered-file->buffer)
36508 $test-increment-register:initialize-type:
36509
36510 68/push 0/imm32/right:null
36511 68/push 0/imm32/right:null
36512 68/push 0/imm32/left:unused
36513 68/push 1/imm32/value:int
36514 68/push 1/imm32/is-atom?:true
36515 68/push 0x11/imm32/alloc-id:fake:payload
36516 89/<- %ecx 4/r32/esp
36517 $test-increment-register:initialize-var:
36518
36519 68/push 0/imm32/register
36520 68/push 0/imm32/register
36521 68/push 0/imm32/no-stack-offset
36522 68/push 1/imm32/block-depth
36523 51/push-ecx
36524 68/push 0x11/imm32/alloc-id:fake
36525 68/push 0/imm32/name
36526 68/push 0/imm32/name
36527 68/push 0x11/imm32/alloc-id:fake:payload
36528 89/<- %ecx 4/r32/esp
36529 $test-increment-register:initialize-var-name:
36530
36531 8d/copy-address *(ecx+4) 0/r32/eax
36532 (copy-array Heap "foo" %eax)
36533 $test-increment-register:initialize-var-register:
36534
36535 8d/copy-address *(ecx+0x1c) 0/r32/eax
36536 (copy-array Heap "eax" %eax)
36537 $test-increment-register:initialize-stmt-var:
36538
36539 68/push 0/imm32/is-deref:false
36540 68/push 0/imm32/next
36541 68/push 0/imm32/next
36542 51/push-ecx/var-foo
36543 68/push 0x11/imm32/alloc-id:fake
36544 68/push 0x11/imm32/alloc-id:fake:payload
36545 89/<- %ebx 4/r32/esp
36546 $test-increment-register:initialize-stmt:
36547
36548 53/push-ebx/outputs
36549 68/push 0x11/imm32/alloc-id:fake
36550 68/push 0/imm32/no-inouts
36551 68/push 0/imm32/no-inouts
36552 68/push 0/imm32/operation
36553 68/push 0/imm32/operation
36554 68/push 1/imm32
36555 89/<- %esi 4/r32/esp
36556 $test-increment-register:initialize-stmt-operation:
36557
36558 8d/copy-address *(esi+4) 0/r32/eax
36559 (copy-array Heap "increment" %eax)
36560
36561 c7 0/subop/copy *Curr-block-depth 0/imm32
36562 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
36563 (flush _test-output-buffered-file)
36564 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36570
36571 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
36572
36573 89/<- %esp 5/r32/ebp
36574 5d/pop-to-ebp
36575 c3/return
36576
36577 test-add-reg-to-reg:
36578
36579
36580
36581
36582
36583 55/push-ebp
36584 89/<- %ebp 4/r32/esp
36585
36586 (clear-stream _test-output-stream)
36587 (clear-stream $_test-output-buffered-file->buffer)
36588 $test-add-reg-to-reg:initialize-type:
36589
36590 68/push 0/imm32/right:null
36591 68/push 0/imm32/right:null
36592 68/push 0/imm32/left:unused
36593 68/push 1/imm32/value:int
36594 68/push 1/imm32/is-atom?:true
36595 68/push 0x11/imm32/alloc-id:fake:payload
36596 89/<- %ecx 4/r32/esp
36597 $test-add-reg-to-reg:initialize-var1:
36598
36599 68/push 0/imm32/register
36600 68/push 0/imm32/register
36601 68/push 0/imm32/no-stack-offset
36602 68/push 1/imm32/block-depth
36603 51/push-ecx
36604 68/push 0x11/imm32/alloc-id:fake
36605 68/push 0/imm32/name
36606 68/push 0/imm32/name
36607 68/push 0x11/imm32/alloc-id:fake:payload
36608 89/<- %ecx 4/r32/esp
36609 $test-add-reg-to-reg:initialize-var1-name:
36610
36611 8d/copy-address *(ecx+4) 0/r32/eax
36612 (copy-array Heap "var1" %eax)
36613 $test-add-reg-to-reg:initialize-var1-register:
36614
36615 8d/copy-address *(ecx+0x1c) 0/r32/eax
36616 (copy-array Heap "eax" %eax)
36617 $test-add-reg-to-reg:initialize-var2:
36618
36619 68/push 0/imm32/register
36620 68/push 0/imm32/register
36621 68/push 0/imm32/no-stack-offset
36622 68/push 1/imm32/block-depth
36623 ff 6/subop/push *(ecx+0x10)
36624 68/push 0x11/imm32/alloc-id:fake
36625 68/push 0/imm32/name
36626 68/push 0/imm32/name
36627 68/push 0x11/imm32/alloc-id:fake:payload
36628 89/<- %edx 4/r32/esp
36629 $test-add-reg-to-reg:initialize-var2-name:
36630
36631 8d/copy-address *(edx+4) 0/r32/eax
36632 (copy-array Heap "var2" %eax)
36633 $test-add-reg-to-reg:initialize-var2-register:
36634
36635 8d/copy-address *(edx+0x1c) 0/r32/eax
36636 (copy-array Heap "ecx" %eax)
36637 $test-add-reg-to-reg:initialize-inouts:
36638
36639 68/push 0/imm32/is-deref:false
36640 68/push 0/imm32/next
36641 68/push 0/imm32/next
36642 52/push-edx/var2
36643 68/push 0x11/imm32/alloc-id:fake
36644 68/push 0x11/imm32/alloc-id:fake:payload
36645 89/<- %esi 4/r32/esp
36646 $test-add-reg-to-reg:initialize-outputs:
36647
36648 68/push 0/imm32/is-deref:false
36649 68/push 0/imm32/next
36650 68/push 0/imm32/next
36651 51/push-ecx/var1
36652 68/push 0x11/imm32/alloc-id:fake
36653 68/push 0x11/imm32/alloc-id:fake:payload
36654 89/<- %edi 4/r32/esp
36655 $test-add-reg-to-reg:initialize-stmt:
36656
36657 68/push 0/imm32/next
36658 68/push 0/imm32/next
36659 57/push-edi/outputs
36660 68/push 0x11/imm32/alloc-id:fake
36661 56/push-esi/inouts
36662 68/push 0x11/imm32/alloc-id:fake
36663 68/push 0/imm32/operation
36664 68/push 0/imm32/operation
36665 68/push 1/imm32/tag:stmt1
36666 89/<- %esi 4/r32/esp
36667 $test-add-reg-to-reg:initialize-stmt-operation:
36668
36669 8d/copy-address *(esi+4) 0/r32/eax
36670 (copy-array Heap "add" %eax)
36671
36672 c7 0/subop/copy *Curr-block-depth 0/imm32
36673 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
36674 (flush _test-output-buffered-file)
36675 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36681
36682 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
36683
36684 89/<- %esp 5/r32/ebp
36685 5d/pop-to-ebp
36686 c3/return
36687
36688 test-add-reg-to-mem:
36689
36690
36691
36692
36693
36694 55/push-ebp
36695 89/<- %ebp 4/r32/esp
36696
36697 (clear-stream _test-output-stream)
36698 (clear-stream $_test-output-buffered-file->buffer)
36699 $test-add-reg-to-mem:initialize-type:
36700
36701 68/push 0/imm32/right:null
36702 68/push 0/imm32/right:null
36703 68/push 0/imm32/left:unused
36704 68/push 1/imm32/value:int
36705 68/push 1/imm32/is-atom?:true
36706 68/push 0x11/imm32/alloc-id:fake:payload
36707 89/<- %ecx 4/r32/esp
36708 $test-add-reg-to-mem:initialize-var1:
36709
36710 68/push 0/imm32/register
36711 68/push 0/imm32/register
36712 68/push 8/imm32/stack-offset
36713 68/push 1/imm32/block-depth
36714 51/push-ecx
36715 68/push 0x11/imm32/alloc-id:fake
36716 68/push 0/imm32/name
36717 68/push 0/imm32/name
36718 68/push 0x11/imm32/alloc-id:fake:payload
36719 89/<- %ecx 4/r32/esp
36720 $test-add-reg-to-mem:initialize-var1-name:
36721
36722 8d/copy-address *(ecx+4) 0/r32/eax
36723 (copy-array Heap "var1" %eax)
36724 $test-add-reg-to-mem:initialize-var2:
36725
36726 68/push 0/imm32/register
36727 68/push 0/imm32/register
36728 68/push 0/imm32/no-stack-offset
36729 68/push 1/imm32/block-depth
36730 ff 6/subop/push *(ecx+0x10)
36731 68/push 0x11/imm32/alloc-id:fake
36732 68/push 0/imm32/name
36733 68/push 0/imm32/name
36734 68/push 0x11/imm32/alloc-id:fake:payload
36735 89/<- %edx 4/r32/esp
36736 $test-add-reg-to-mem:initialize-var2-name:
36737
36738 8d/copy-address *(edx+4) 0/r32/eax
36739 (copy-array Heap "var2" %eax)
36740 $test-add-reg-to-mem:initialize-var2-register:
36741
36742 8d/copy-address *(edx+0x1c) 0/r32/eax
36743 (copy-array Heap "ecx" %eax)
36744 $test-add-reg-to-mem:initialize-inouts:
36745
36746 68/push 0/imm32/is-deref:false
36747 68/push 0/imm32/next
36748 68/push 0/imm32/next
36749 52/push-edx/var2
36750 68/push 0x11/imm32/alloc-id:fake
36751 68/push 0x11/imm32/alloc-id:fake:payload
36752 89/<- %esi 4/r32/esp
36753
36754 68/push 0/imm32/is-deref:false
36755 56/push-esi/next
36756 68/push 0x11/imm32/alloc-id:fake
36757 51/push-ecx/var1
36758 68/push 0x11/imm32/alloc-id:fake
36759 68/push 0x11/imm32/alloc-id:fake:payload
36760 89/<- %esi 4/r32/esp
36761 $test-add-reg-to-mem:initialize-stmt:
36762
36763 68/push 0/imm32/next
36764 68/push 0/imm32/next
36765 68/push 0/imm32/outputs
36766 68/push 0/imm32/outputs
36767 56/push-esi/inouts
36768 68/push 0x11/imm32/alloc-id:fake
36769 68/push 0/imm32/operation
36770 68/push 0/imm32/operation
36771 68/push 1/imm32/tag:stmt1
36772 89/<- %esi 4/r32/esp
36773 $test-add-reg-to-mem:initialize-stmt-operation:
36774
36775 8d/copy-address *(esi+4) 0/r32/eax
36776 (copy-array Heap "add-to" %eax)
36777
36778 c7 0/subop/copy *Curr-block-depth 0/imm32
36779 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
36780 (flush _test-output-buffered-file)
36781 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36787
36788 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
36789
36790 89/<- %esp 5/r32/ebp
36791 5d/pop-to-ebp
36792 c3/return
36793
36794 test-add-mem-to-reg:
36795
36796
36797
36798
36799
36800 55/push-ebp
36801 89/<- %ebp 4/r32/esp
36802
36803 (clear-stream _test-output-stream)
36804 (clear-stream $_test-output-buffered-file->buffer)
36805 $test-add-mem-to-reg:initialize-type:
36806
36807 68/push 0/imm32/right:null
36808 68/push 0/imm32/right:null
36809 68/push 0/imm32/left:unused
36810 68/push 1/imm32/value:int
36811 68/push 1/imm32/is-atom?:true
36812 68/push 0x11/imm32/alloc-id:fake:payload
36813 89/<- %ecx 4/r32/esp
36814 $test-add-mem-to-reg:initialize-var:
36815
36816 68/push 0/imm32/register
36817 68/push 0/imm32/register
36818 68/push 0/imm32/no-stack-offset
36819 68/push 1/imm32/block-depth
36820 51/push-ecx
36821 68/push 0x11/imm32/alloc-id:fake
36822 68/push 0/imm32/name
36823 68/push 0/imm32/name
36824 68/push 0x11/imm32/alloc-id:fake:payload
36825 89/<- %ecx 4/r32/esp
36826 $test-add-mem-to-reg:initialize-var-name:
36827
36828 8d/copy-address *(ecx+4) 0/r32/eax
36829 (copy-array Heap "var1" %eax)
36830 $test-add-mem-to-reg:initialize-var-register:
36831
36832 8d/copy-address *(ecx+0x1c) 0/r32/eax
36833 (copy-array Heap "eax" %eax)
36834 $test-add-mem-to-reg:initialize-var2:
36835
36836 68/push 0/imm32/register
36837 68/push 0/imm32/register
36838 68/push 8/imm32/stack-offset
36839 68/push 1/imm32/block-depth
36840 ff 6/subop/push *(ecx+0x10)
36841 68/push 0x11/imm32/alloc-id:fake
36842 68/push 0/imm32/name
36843 68/push 0/imm32/name
36844 68/push 0x11/imm32/alloc-id:fake:payload
36845 89/<- %edx 4/r32/esp
36846 $test-add-mem-to-reg:initialize-var2-name:
36847
36848 8d/copy-address *(edx+4) 0/r32/eax
36849 (copy-array Heap "var2" %eax)
36850 $test-add-mem-to-reg:initialize-inouts:
36851
36852 68/push 0/imm32/is-deref:false
36853 68/push 0/imm32/next
36854 68/push 0/imm32/next
36855 52/push-edx/var2
36856 68/push 0x11/imm32/alloc-id:fake
36857 68/push 0x11/imm32/alloc-id:fake:payload
36858 89/<- %esi 4/r32/esp
36859 $test-add-mem-to-reg:initialize-outputs:
36860
36861 68/push 0/imm32/is-deref:false
36862 68/push 0/imm32/next
36863 68/push 0/imm32/next
36864 51/push-ecx/var1
36865 68/push 0x11/imm32/alloc-id:fake
36866 68/push 0x11/imm32/alloc-id:fake:payload
36867 89/<- %edi 4/r32/esp
36868 $test-add-mem-to-reg:initialize-stmt:
36869
36870 68/push 0/imm32/next
36871 68/push 0/imm32/next
36872 57/push-edi/outputs
36873 68/push 0x11/imm32/alloc-id:fake
36874 56/push-esi/inouts
36875 68/push 0x11/imm32/alloc-id:fake
36876 68/push 0/imm32/operation
36877 68/push 0/imm32/operation
36878 68/push 1/imm32/tag:stmt1
36879 89/<- %esi 4/r32/esp
36880 $test-add-mem-to-reg:initialize-stmt-operation:
36881
36882 8d/copy-address *(esi+4) 0/r32/eax
36883 (copy-array Heap "add" %eax)
36884
36885 c7 0/subop/copy *Curr-block-depth 0/imm32
36886 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
36887 (flush _test-output-buffered-file)
36888 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
36894
36895 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
36896
36897 89/<- %esp 5/r32/ebp
36898 5d/pop-to-ebp
36899 c3/return
36900
36901 test-add-literal-to-eax:
36902
36903
36904
36905
36906
36907 55/push-ebp
36908 89/<- %ebp 4/r32/esp
36909
36910 (clear-stream _test-output-stream)
36911 (clear-stream $_test-output-buffered-file->buffer)
36912 $test-add-literal-to-eax:initialize-var-type:
36913
36914 68/push 0/imm32/right:null
36915 68/push 0/imm32/right:null
36916 68/push 0/imm32/left:unused
36917 68/push 1/imm32/value:int
36918 68/push 1/imm32/is-atom?:true
36919 68/push 0x11/imm32/alloc-id:fake:payload
36920 89/<- %ecx 4/r32/esp
36921 $test-add-literal-to-eax:initialize-var:
36922
36923 68/push 0/imm32/register
36924 68/push 0/imm32/register
36925 68/push 0/imm32/no-stack-offset
36926 68/push 1/imm32/block-depth
36927 51/push-ecx
36928 68/push 0x11/imm32/alloc-id:fake
36929 68/push 0/imm32/name
36930 68/push 0/imm32/name
36931 68/push 0x11/imm32/alloc-id:fake:payload
36932 89/<- %ecx 4/r32/esp
36933 $test-add-literal-to-eax:initialize-var-name:
36934
36935 8d/copy-address *(ecx+4) 0/r32/eax
36936 (copy-array Heap "v" %eax)
36937 $test-add-literal-to-eax:initialize-var-register:
36938
36939 8d/copy-address *(ecx+0x1c) 0/r32/eax
36940 (copy-array Heap "eax" %eax)
36941 $test-add-literal-to-eax:initialize-literal-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 0/imm32/value:literal
36947 68/push 1/imm32/is-atom?:true
36948 68/push 0x11/imm32/alloc-id:fake:payload
36949 89/<- %edx 4/r32/esp
36950 $test-add-literal-to-eax:initialize-literal:
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 52/push-edx
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/<- %edx 4/r32/esp
36962 $test-add-literal-to-eax:initialize-literal-value:
36963
36964 8d/copy-address *(edx+4) 0/r32/eax
36965 (copy-array Heap "0x34" %eax)
36966 $test-add-literal-to-eax:initialize-inouts:
36967
36968 68/push 0/imm32/is-deref:false
36969 68/push 0/imm32/next
36970 68/push 0/imm32/next
36971 52/push-edx/l
36972 68/push 0x11/imm32/alloc-id:fake
36973 68/push 0x11/imm32/alloc-id:fake:payload
36974 89/<- %esi 4/r32/esp
36975 $test-add-literal-to-eax:initialize-outputs:
36976
36977 68/push 0/imm32/is-deref:false
36978 68/push 0/imm32/next
36979 68/push 0/imm32/next
36980 51/push-ecx/v
36981 68/push 0x11/imm32/alloc-id:fake
36982 68/push 0x11/imm32/alloc-id:fake:payload
36983 89/<- %edi 4/r32/esp
36984 $test-add-literal-to-eax:initialize-stmt:
36985
36986 68/push 0/imm32/next
36987 68/push 0/imm32/next
36988 57/push-edi/outputs
36989 68/push 0x11/imm32/alloc-id:fake
36990 56/push-esi/inouts
36991 68/push 0x11/imm32/alloc-id:fake
36992 68/push 0/imm32/operation
36993 68/push 0/imm32/operation
36994 68/push 1/imm32/tag:stmt1
36995 89/<- %esi 4/r32/esp
36996 $test-add-literal-to-eax:initialize-stmt-operation:
36997
36998 8d/copy-address *(esi+4) 0/r32/eax
36999 (copy-array Heap "add" %eax)
37000
37001 c7 0/subop/copy *Curr-block-depth 0/imm32
37002 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37003 (flush _test-output-buffered-file)
37004 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37010
37011 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
37012
37013 89/<- %esp 5/r32/ebp
37014 5d/pop-to-ebp
37015 c3/return
37016
37017 test-add-literal-to-reg:
37018
37019
37020
37021
37022
37023 55/push-ebp
37024 89/<- %ebp 4/r32/esp
37025
37026 (clear-stream _test-output-stream)
37027 (clear-stream $_test-output-buffered-file->buffer)
37028 $test-add-literal-to-reg:initialize-var-type:
37029
37030 68/push 0/imm32/right:null
37031 68/push 0/imm32/right:null
37032 68/push 0/imm32/left:unused
37033 68/push 1/imm32/value:int
37034 68/push 1/imm32/is-atom?:true
37035 68/push 0x11/imm32/alloc-id:fake:payload
37036 89/<- %ecx 4/r32/esp
37037 $test-add-literal-to-reg:initialize-var:
37038
37039 68/push 0/imm32/register
37040 68/push 0/imm32/register
37041 68/push 0/imm32/no-stack-offset
37042 68/push 1/imm32/block-depth
37043 51/push-ecx
37044 68/push 0x11/imm32/alloc-id:fake
37045 68/push 0/imm32/name
37046 68/push 0/imm32/name
37047 68/push 0x11/imm32/alloc-id:fake:payload
37048 89/<- %ecx 4/r32/esp
37049 $test-add-literal-to-reg:initialize-var-name:
37050
37051 8d/copy-address *(ecx+4) 0/r32/eax
37052 (copy-array Heap "v" %eax)
37053 $test-add-literal-to-reg:initialize-var-register:
37054
37055 8d/copy-address *(ecx+0x1c) 0/r32/eax
37056 (copy-array Heap "ecx" %eax)
37057 $test-add-literal-to-reg:initialize-literal-type:
37058
37059 68/push 0/imm32/right:null
37060 68/push 0/imm32/right:null
37061 68/push 0/imm32/left:unused
37062 68/push 0/imm32/value:literal
37063 68/push 1/imm32/is-atom?:true
37064 68/push 0x11/imm32/alloc-id:fake:payload
37065 89/<- %edx 4/r32/esp
37066 $test-add-literal-to-reg:initialize-literal:
37067
37068 68/push 0/imm32/register
37069 68/push 0/imm32/register
37070 68/push 0/imm32/no-stack-offset
37071 68/push 1/imm32/block-depth
37072 52/push-edx
37073 68/push 0x11/imm32/alloc-id:fake
37074 68/push 0/imm32/name
37075 68/push 0/imm32/name
37076 68/push 0x11/imm32/alloc-id:fake:payload
37077 89/<- %edx 4/r32/esp
37078 $test-add-literal-to-reg:initialize-literal-value:
37079
37080 8d/copy-address *(edx+4) 0/r32/eax
37081 (copy-array Heap "0x34" %eax)
37082 $test-add-literal-to-reg:initialize-inouts:
37083
37084 68/push 0/imm32/is-deref:false
37085 68/push 0/imm32/next
37086 68/push 0/imm32/next
37087 52/push-edx/l
37088 68/push 0x11/imm32/alloc-id:fake
37089 68/push 0x11/imm32/alloc-id:fake:payload
37090 89/<- %esi 4/r32/esp
37091 $test-add-literal-to-reg:initialize-outputs:
37092
37093 68/push 0/imm32/is-deref:false
37094 68/push 0/imm32/next
37095 68/push 0/imm32/next
37096 51/push-ecx/v
37097 68/push 0x11/imm32/alloc-id:fake
37098 68/push 0x11/imm32/alloc-id:fake:payload
37099 89/<- %edi 4/r32/esp
37100 $test-add-literal-to-reg:initialize-stmt:
37101
37102 68/push 0/imm32/next
37103 68/push 0/imm32/next
37104 57/push-edi/outputs
37105 68/push 0x11/imm32/alloc-id:fake
37106 56/push-esi/inouts
37107 68/push 0x11/imm32/alloc-id:fake
37108 68/push 0/imm32/operation
37109 68/push 0/imm32/operation
37110 68/push 1/imm32/tag:stmt1
37111 89/<- %esi 4/r32/esp
37112 $test-add-literal-to-reg:initialize-stmt-operation:
37113
37114 8d/copy-address *(esi+4) 0/r32/eax
37115 (copy-array Heap "add" %eax)
37116
37117 c7 0/subop/copy *Curr-block-depth 0/imm32
37118 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37119 (flush _test-output-buffered-file)
37120 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37126
37127 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
37128
37129 89/<- %esp 5/r32/ebp
37130 5d/pop-to-ebp
37131 c3/return
37132
37133 test-add-literal-to-mem:
37134
37135
37136
37137
37138
37139 55/push-ebp
37140 89/<- %ebp 4/r32/esp
37141
37142 (clear-stream _test-output-stream)
37143 (clear-stream $_test-output-buffered-file->buffer)
37144 $test-add-literal-to-mem:initialize-type:
37145
37146 68/push 0/imm32/right:null
37147 68/push 0/imm32/right:null
37148 68/push 0/imm32/left:unused
37149 68/push 1/imm32/value:int
37150 68/push 1/imm32/is-atom?:true
37151 68/push 0x11/imm32/alloc-id:fake:payload
37152 89/<- %ecx 4/r32/esp
37153 $test-add-literal-to-mem:initialize-var1:
37154
37155 68/push 0/imm32/register
37156 68/push 0/imm32/register
37157 68/push 8/imm32/stack-offset
37158 68/push 1/imm32/block-depth
37159 51/push-ecx
37160 68/push 0x11/imm32/alloc-id:fake
37161 68/push 0/imm32/name
37162 68/push 0/imm32/name
37163 68/push 0x11/imm32/alloc-id:fake:payload
37164 89/<- %ecx 4/r32/esp
37165 $test-add-literal-to-mem:initialize-var1-name:
37166
37167 8d/copy-address *(ecx+4) 0/r32/eax
37168 (copy-array Heap "var1" %eax)
37169 $test-add-literal-to-mem:initialize-literal-type:
37170
37171 68/push 0/imm32/right:null
37172 68/push 0/imm32/right:null
37173 68/push 0/imm32/left:unused
37174 68/push 0/imm32/value:literal
37175 68/push 1/imm32/is-atom?:true
37176 68/push 0x11/imm32/alloc-id:fake:payload
37177 89/<- %edx 4/r32/esp
37178 $test-add-literal-to-mem:initialize-literal:
37179
37180 68/push 0/imm32/register
37181 68/push 0/imm32/register
37182 68/push 0/imm32/no-stack-offset
37183 68/push 1/imm32/block-depth
37184 52/push-edx
37185 68/push 0x11/imm32/alloc-id:fake
37186 68/push 0/imm32/name
37187 68/push 0/imm32/name
37188 68/push 0x11/imm32/alloc-id:fake:payload
37189 89/<- %edx 4/r32/esp
37190 $test-add-literal-to-mem:initialize-literal-value:
37191
37192 8d/copy-address *(edx+4) 0/r32/eax
37193 (copy-array Heap "0x34" %eax)
37194 $test-add-literal-to-mem:initialize-inouts:
37195
37196 68/push 0/imm32/is-deref:false
37197 68/push 0/imm32/next
37198 68/push 0/imm32/next
37199 52/push-edx/l
37200 68/push 0x11/imm32/alloc-id:fake
37201 68/push 0x11/imm32/alloc-id:fake:payload
37202 89/<- %esi 4/r32/esp
37203
37204 68/push 0/imm32/is-deref:false
37205 56/push-esi/next
37206 68/push 0x11/imm32/alloc-id:fake
37207 51/push-ecx/var1
37208 68/push 0x11/imm32/alloc-id:fake
37209 68/push 0x11/imm32/alloc-id:fake:payload
37210 89/<- %esi 4/r32/esp
37211 $test-add-literal-to-mem:initialize-stmt:
37212
37213 68/push 0/imm32/next
37214 68/push 0/imm32/next
37215 68/push 0/imm32/outputs
37216 68/push 0/imm32/outputs
37217 56/push-esi/inouts
37218 68/push 0x11/imm32/alloc-id:fake
37219 68/push 0/imm32/operation
37220 68/push 0/imm32/operation
37221 68/push 1/imm32/tag:stmt1
37222 89/<- %esi 4/r32/esp
37223 $test-add-literal-to-mem:initialize-stmt-operation:
37224
37225 8d/copy-address *(esi+4) 0/r32/eax
37226 (copy-array Heap "add-to" %eax)
37227
37228 c7 0/subop/copy *Curr-block-depth 0/imm32
37229 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37230 (flush _test-output-buffered-file)
37231 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37237
37238 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
37239
37240 89/<- %esp 5/r32/ebp
37241 5d/pop-to-ebp
37242 c3/return
37243
37244 test-shift-reg-by-literal:
37245
37246
37247
37248
37249
37250 55/push-ebp
37251 89/<- %ebp 4/r32/esp
37252
37253 (clear-stream _test-output-stream)
37254 (clear-stream $_test-output-buffered-file->buffer)
37255 $test-shift-reg-by-literal:initialize-var-type:
37256
37257 68/push 0/imm32/right:null
37258 68/push 0/imm32/right:null
37259 68/push 0/imm32/left:unused
37260 68/push 1/imm32/value:int
37261 68/push 1/imm32/is-atom?:true
37262 68/push 0x11/imm32/alloc-id:fake:payload
37263 89/<- %ecx 4/r32/esp
37264 $test-shift-reg-by-literal:initialize-var:
37265
37266 68/push 0/imm32/register
37267 68/push 0/imm32/register
37268 68/push 0/imm32/no-stack-offset
37269 68/push 1/imm32/block-depth
37270 51/push-ecx
37271 68/push 0x11/imm32/alloc-id:fake
37272 68/push 0/imm32/name
37273 68/push 0/imm32/name
37274 68/push 0x11/imm32/alloc-id:fake:payload
37275 89/<- %ecx 4/r32/esp
37276 $test-shift-reg-by-literal:initialize-var-name:
37277
37278 8d/copy-address *(ecx+4) 0/r32/eax
37279 (copy-array Heap "v" %eax)
37280 $test-shift-reg-by-literal:initialize-var-register:
37281
37282 8d/copy-address *(ecx+0x1c) 0/r32/eax
37283 (copy-array Heap "ecx" %eax)
37284 $test-shift-reg-by-literal:initialize-literal-type:
37285
37286 68/push 0/imm32/right:null
37287 68/push 0/imm32/right:null
37288 68/push 0/imm32/left:unused
37289 68/push 0/imm32/value:literal
37290 68/push 1/imm32/is-atom?:true
37291 68/push 0x11/imm32/alloc-id:fake:payload
37292 89/<- %edx 4/r32/esp
37293 $test-shift-reg-by-literal:initialize-literal:
37294
37295 68/push 0/imm32/register
37296 68/push 0/imm32/register
37297 68/push 0/imm32/no-stack-offset
37298 68/push 1/imm32/block-depth
37299 52/push-edx
37300 68/push 0x11/imm32/alloc-id:fake
37301 68/push 0/imm32/name
37302 68/push 0/imm32/name
37303 68/push 0x11/imm32/alloc-id:fake:payload
37304 89/<- %edx 4/r32/esp
37305 $test-shift-reg-by-literal:initialize-literal-value:
37306
37307 8d/copy-address *(edx+4) 0/r32/eax
37308 (copy-array Heap "2" %eax)
37309 $test-shift-reg-by-literal:initialize-inouts:
37310
37311 68/push 0/imm32/is-deref:false
37312 68/push 0/imm32/next
37313 68/push 0/imm32/next
37314 52/push-edx/l
37315 68/push 0x11/imm32/alloc-id:fake
37316 68/push 0x11/imm32/alloc-id:fake:payload
37317 89/<- %esi 4/r32/esp
37318 $test-shift-reg-by-literal:initialize-outputs:
37319
37320 68/push 0/imm32/is-deref:false
37321 68/push 0/imm32/next
37322 68/push 0/imm32/next
37323 51/push-ecx/v
37324 68/push 0x11/imm32/alloc-id:fake
37325 68/push 0x11/imm32/alloc-id:fake:payload
37326 89/<- %edi 4/r32/esp
37327 $test-shift-reg-by-literal:initialize-stmt:
37328
37329 68/push 0/imm32/next
37330 68/push 0/imm32/next
37331 57/push-edi/outputs
37332 68/push 0x11/imm32/alloc-id:fake
37333 56/push-esi/inouts
37334 68/push 0x11/imm32/alloc-id:fake
37335 68/push 0/imm32/operation
37336 68/push 0/imm32/operation
37337 68/push 1/imm32/tag:stmt1
37338 89/<- %esi 4/r32/esp
37339 $test-shift-reg-by-literal:initialize-stmt-operation:
37340
37341 8d/copy-address *(esi+4) 0/r32/eax
37342 (copy-array Heap "shift-left" %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 "c1/shift 4/subop/left %ecx 2/imm8" "F - test-shift-reg-by-literal")
37355
37356 89/<- %esp 5/r32/ebp
37357 5d/pop-to-ebp
37358 c3/return
37359
37360 test-shift-mem-by-literal:
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-shift-mem-by-literal: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-shift-mem-by-literal:initialize-var1:
37381
37382 68/push 0/imm32/register
37383 68/push 0/imm32/register
37384 68/push 8/imm32/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-shift-mem-by-literal:initialize-var1-name:
37393
37394 8d/copy-address *(ecx+4) 0/r32/eax
37395 (copy-array Heap "var1" %eax)
37396 $test-shift-mem-by-literal:initialize-literal-type:
37397
37398 68/push 0/imm32/right:null
37399 68/push 0/imm32/right:null
37400 68/push 0/imm32/left:unused
37401 68/push 0/imm32/value:literal
37402 68/push 1/imm32/is-atom?:true
37403 68/push 0x11/imm32/alloc-id:fake:payload
37404 89/<- %edx 4/r32/esp
37405 $test-shift-mem-by-literal:initialize-literal:
37406
37407 68/push 0/imm32/register
37408 68/push 0/imm32/register
37409 68/push 0/imm32/no-stack-offset
37410 68/push 1/imm32/block-depth
37411 52/push-edx
37412 68/push 0x11/imm32/alloc-id:fake
37413 68/push 0/imm32/name
37414 68/push 0/imm32/name
37415 68/push 0x11/imm32/alloc-id:fake:payload
37416 89/<- %edx 4/r32/esp
37417 $test-shift-mem-by-literal:initialize-literal-value:
37418
37419 8d/copy-address *(edx+4) 0/r32/eax
37420 (copy-array Heap "3" %eax)
37421 $test-shift-mem-by-literal:initialize-inouts:
37422
37423 68/push 0/imm32/is-deref:false
37424 68/push 0/imm32/next
37425 68/push 0/imm32/next
37426 52/push-edx/l
37427 68/push 0x11/imm32/alloc-id:fake
37428 68/push 0x11/imm32/alloc-id:fake:payload
37429 89/<- %esi 4/r32/esp
37430
37431 68/push 0/imm32/is-deref:false
37432 56/push-esi/next
37433 68/push 0x11/imm32/alloc-id:fake
37434 51/push-ecx/var1
37435 68/push 0x11/imm32/alloc-id:fake
37436 68/push 0x11/imm32/alloc-id:fake:payload
37437 89/<- %esi 4/r32/esp
37438 $test-shift-mem-by-literal:initialize-stmt:
37439
37440 68/push 0/imm32/next
37441 68/push 0/imm32/next
37442 68/push 0/imm32/outputs
37443 68/push 0/imm32/outputs
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-shift-mem-by-literal:initialize-stmt-operation:
37451
37452 8d/copy-address *(esi+4) 0/r32/eax
37453 (copy-array Heap "shift-left" %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 "c1/shift 4/subop/left *(ebp+0x00000008) 3/imm8" "F - test-shift-mem-by-literal")
37466
37467 89/<- %esp 5/r32/ebp
37468 5d/pop-to-ebp
37469 c3/return
37470
37471 test-compare-reg-with-reg:
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-compare-reg-with-reg: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-compare-reg-with-reg:initialize-var1:
37492
37493 68/push 0/imm32/register
37494 68/push 0/imm32/register
37495 68/push 0/imm32/no-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-compare-reg-with-reg:initialize-var1-name:
37504
37505 8d/copy-address *(ecx+4) 0/r32/eax
37506 (copy-array Heap "var1" %eax)
37507 $test-compare-reg-with-reg:initialize-var1-register:
37508
37509 8d/copy-address *(ecx+0x1c) 0/r32/eax
37510 (copy-array Heap "ecx" %eax)
37511 $test-compare-reg-with-reg:initialize-var2:
37512
37513 68/push 0/imm32/register
37514 68/push 0/imm32/register
37515 68/push 0/imm32/no-stack-offset
37516 68/push 1/imm32/block-depth
37517 ff 6/subop/push *(ecx+0x10)
37518 68/push 0x11/imm32/alloc-id:fake
37519 68/push 0/imm32/name
37520 68/push 0/imm32/name
37521 68/push 0x11/imm32/alloc-id:fake:payload
37522 89/<- %edx 4/r32/esp
37523 $test-compare-reg-with-reg:initialize-var2-name:
37524
37525 8d/copy-address *(edx+4) 0/r32/eax
37526 (copy-array Heap "var2" %eax)
37527 $test-compare-reg-with-reg:initialize-var2-register:
37528
37529 8d/copy-address *(edx+0x1c) 0/r32/eax
37530 (copy-array Heap "eax" %eax)
37531 $test-compare-reg-with-reg:initialize-inouts:
37532
37533 68/push 0/imm32/is-deref:false
37534 68/push 0/imm32/next
37535 68/push 0/imm32/next
37536 52/push-edx/var2
37537 68/push 0x11/imm32/alloc-id:fake
37538 68/push 0x11/imm32/alloc-id:fake:payload
37539 89/<- %esi 4/r32/esp
37540
37541 68/push 0/imm32/is-deref:false
37542 56/push-esi/next
37543 68/push 0x11/imm32/alloc-id:fake
37544 51/push-ecx/var1
37545 68/push 0x11/imm32/alloc-id:fake
37546 68/push 0x11/imm32/alloc-id:fake:payload
37547 89/<- %esi 4/r32/esp
37548 $test-compare-reg-with-reg:initialize-stmt:
37549
37550 68/push 0/imm32/next
37551 68/push 0/imm32/next
37552 68/push 0/imm32/outputs
37553 68/push 0/imm32/outputs
37554 56/push-esi/inouts
37555 68/push 0x11/imm32/alloc-id:fake
37556 68/push 0/imm32/operation
37557 68/push 0/imm32/operation
37558 68/push 1/imm32/tag:stmt1
37559 89/<- %esi 4/r32/esp
37560 $test-compare-reg-with-reg:initialize-stmt-operation:
37561
37562 8d/copy-address *(esi+4) 0/r32/eax
37563 (copy-array Heap "compare" %eax)
37564
37565 c7 0/subop/copy *Curr-block-depth 0/imm32
37566 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37567 (flush _test-output-buffered-file)
37568 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37574
37575 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
37576
37577 89/<- %esp 5/r32/ebp
37578 5d/pop-to-ebp
37579 c3/return
37580
37581 test-compare-mem-with-reg:
37582
37583
37584
37585
37586
37587 55/push-ebp
37588 89/<- %ebp 4/r32/esp
37589
37590 (clear-stream _test-output-stream)
37591 (clear-stream $_test-output-buffered-file->buffer)
37592 $test-compare-mem-with-reg:initialize-type:
37593
37594 68/push 0/imm32/right:null
37595 68/push 0/imm32/right:null
37596 68/push 0/imm32/left:unused
37597 68/push 1/imm32/value:int
37598 68/push 1/imm32/is-atom?:true
37599 68/push 0x11/imm32/alloc-id:fake:payload
37600 89/<- %ecx 4/r32/esp
37601 $test-compare-mem-with-reg:initialize-var1:
37602
37603 68/push 0/imm32/register
37604 68/push 0/imm32/register
37605 68/push 8/imm32/stack-offset
37606 68/push 1/imm32/block-depth
37607 51/push-ecx
37608 68/push 0x11/imm32/alloc-id:fake
37609 68/push 0/imm32/name
37610 68/push 0/imm32/name
37611 68/push 0x11/imm32/alloc-id:fake:payload
37612 89/<- %ecx 4/r32/esp
37613 $test-compare-mem-with-reg:initialize-var1-name:
37614
37615 8d/copy-address *(ecx+4) 0/r32/eax
37616 (copy-array Heap "var1" %eax)
37617 $test-compare-mem-with-reg:initialize-var2:
37618
37619 68/push 0/imm32/register
37620 68/push 0/imm32/register
37621 68/push 0/imm32/no-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-compare-mem-with-reg:initialize-var2-name:
37630
37631 8d/copy-address *(edx+4) 0/r32/eax
37632 (copy-array Heap "var2" %eax)
37633 $test-compare-mem-with-reg:initialize-var2-register:
37634
37635 8d/copy-address *(edx+0x1c) 0/r32/eax
37636 (copy-array Heap "eax" %eax)
37637 $test-compare-mem-with-reg:initialize-inouts:
37638
37639 68/push 0/imm32/is-deref:false
37640 68/push 0/imm32/next
37641 68/push 0/imm32/next
37642 52/push-edx/var2
37643 68/push 0x11/imm32/alloc-id:fake
37644 68/push 0x11/imm32/alloc-id:fake:payload
37645 89/<- %esi 4/r32/esp
37646
37647 68/push 0/imm32/is-deref:false
37648 56/push-esi/next
37649 68/push 0x11/imm32/alloc-id:fake
37650 51/push-ecx/var1
37651 68/push 0x11/imm32/alloc-id:fake
37652 68/push 0x11/imm32/alloc-id:fake:payload
37653 89/<- %esi 4/r32/esp
37654 $test-compare-mem-with-reg:initialize-stmt:
37655
37656 68/push 0/imm32/next
37657 68/push 0/imm32/next
37658 68/push 0/imm32/outputs
37659 68/push 0/imm32/outputs
37660 56/push-esi/inouts
37661 68/push 0x11/imm32/alloc-id:fake
37662 68/push 0/imm32/operation
37663 68/push 0/imm32/operation
37664 68/push 1/imm32/tag:stmt1
37665 89/<- %esi 4/r32/esp
37666 $test-compare-mem-with-reg:initialize-stmt-operation:
37667
37668 8d/copy-address *(esi+4) 0/r32/eax
37669 (copy-array Heap "compare" %eax)
37670
37671 c7 0/subop/copy *Curr-block-depth 0/imm32
37672 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37673 (flush _test-output-buffered-file)
37674 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37680
37681 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
37682
37683 89/<- %esp 5/r32/ebp
37684 5d/pop-to-ebp
37685 c3/return
37686
37687 test-compare-reg-with-mem:
37688
37689
37690
37691
37692
37693 55/push-ebp
37694 89/<- %ebp 4/r32/esp
37695
37696 (clear-stream _test-output-stream)
37697 (clear-stream $_test-output-buffered-file->buffer)
37698 $test-compare-reg-with-mem:initialize-type:
37699
37700 68/push 0/imm32/right:null
37701 68/push 0/imm32/right:null
37702 68/push 0/imm32/left:unused
37703 68/push 1/imm32/value:int
37704 68/push 1/imm32/is-atom?:true
37705 68/push 0x11/imm32/alloc-id:fake:payload
37706 89/<- %ecx 4/r32/esp
37707 $test-compare-reg-with-mem:initialize-var1:
37708
37709 68/push 0/imm32/register
37710 68/push 0/imm32/register
37711 68/push 0/imm32/no-stack-offset
37712 68/push 1/imm32/block-depth
37713 51/push-ecx
37714 68/push 0x11/imm32/alloc-id:fake
37715 68/push 0/imm32/name
37716 68/push 0/imm32/name
37717 68/push 0x11/imm32/alloc-id:fake:payload
37718 89/<- %ecx 4/r32/esp
37719 $test-compare-reg-with-mem:initialize-var1-name:
37720
37721 8d/copy-address *(ecx+4) 0/r32/eax
37722 (copy-array Heap "var1" %eax)
37723 $test-compare-reg-with-mem:initialize-var1-register:
37724
37725 8d/copy-address *(ecx+0x1c) 0/r32/eax
37726 (copy-array Heap "eax" %eax)
37727 $test-compare-reg-with-mem:initialize-var2:
37728
37729 68/push 0/imm32/register
37730 68/push 0/imm32/register
37731 68/push 8/imm32/stack-offset
37732 68/push 1/imm32/block-depth
37733 ff 6/subop/push *(ecx+0x10)
37734 68/push 0x11/imm32/alloc-id:fake
37735 68/push 0/imm32/name
37736 68/push 0/imm32/name
37737 68/push 0x11/imm32/alloc-id:fake:payload
37738 89/<- %edx 4/r32/esp
37739 $test-compare-reg-with-mem:initialize-var2-name:
37740
37741 8d/copy-address *(edx+4) 0/r32/eax
37742 (copy-array Heap "var2" %eax)
37743 $test-compare-reg-with-mem:initialize-inouts:
37744
37745 68/push 0/imm32/is-deref:false
37746 68/push 0/imm32/next
37747 68/push 0/imm32/next
37748 52/push-edx/var2
37749 68/push 0x11/imm32/alloc-id:fake
37750 68/push 0x11/imm32/alloc-id:fake:payload
37751 89/<- %esi 4/r32/esp
37752
37753 68/push 0/imm32/is-deref:false
37754 56/push-esi/next
37755 68/push 0x11/imm32/alloc-id:fake
37756 51/push-ecx/var1
37757 68/push 0x11/imm32/alloc-id:fake
37758 68/push 0x11/imm32/alloc-id:fake:payload
37759 89/<- %esi 4/r32/esp
37760 $test-compare-reg-with-mem:initialize-stmt:
37761
37762 68/push 0/imm32/next
37763 68/push 0/imm32/next
37764 68/push 0/imm32/outputs
37765 68/push 0/imm32/outputs
37766 56/push-esi/inouts
37767 68/push 0x11/imm32/alloc-id:fake
37768 68/push 0/imm32/operation
37769 68/push 0/imm32/operation
37770 68/push 1/imm32/tag:stmt1
37771 89/<- %esi 4/r32/esp
37772 $test-compare-reg-with-mem:initialize-stmt-operation:
37773
37774 8d/copy-address *(esi+4) 0/r32/eax
37775 (copy-array Heap "compare" %eax)
37776
37777 c7 0/subop/copy *Curr-block-depth 0/imm32
37778 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37779 (flush _test-output-buffered-file)
37780 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37786
37787 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
37788
37789 89/<- %esp 5/r32/ebp
37790 5d/pop-to-ebp
37791 c3/return
37792
37793 test-compare-mem-with-literal:
37794
37795
37796
37797
37798
37799 55/push-ebp
37800 89/<- %ebp 4/r32/esp
37801
37802 (clear-stream _test-output-stream)
37803 (clear-stream $_test-output-buffered-file->buffer)
37804 $test-compare-mem-with-literal:initialize-type:
37805
37806 68/push 0/imm32/right:null
37807 68/push 0/imm32/right:null
37808 68/push 0/imm32/left:unused
37809 68/push 1/imm32/value:int
37810 68/push 1/imm32/is-atom?:true
37811 68/push 0x11/imm32/alloc-id:fake:payload
37812 89/<- %ecx 4/r32/esp
37813 $test-compare-mem-with-literal:initialize-var1:
37814
37815 68/push 0/imm32/register
37816 68/push 0/imm32/register
37817 68/push 8/imm32/stack-offset
37818 68/push 1/imm32/block-depth
37819 51/push-ecx
37820 68/push 0x11/imm32/alloc-id:fake
37821 68/push 0/imm32/name
37822 68/push 0/imm32/name
37823 68/push 0x11/imm32/alloc-id:fake:payload
37824 89/<- %ecx 4/r32/esp
37825 $test-compare-mem-with-literal:initialize-var1-name:
37826
37827 8d/copy-address *(ecx+4) 0/r32/eax
37828 (copy-array Heap "var1" %eax)
37829 $test-compare-mem-with-literal:initialize-literal-type:
37830
37831 68/push 0/imm32/right:null
37832 68/push 0/imm32/right:null
37833 68/push 0/imm32/left:unused
37834 68/push 0/imm32/value:literal
37835 68/push 1/imm32/is-atom?:true
37836 68/push 0x11/imm32/alloc-id:fake:payload
37837 89/<- %edx 4/r32/esp
37838 $test-compare-mem-with-literal:initialize-literal:
37839
37840 68/push 0/imm32/register
37841 68/push 0/imm32/register
37842 68/push 0/imm32/no-stack-offset
37843 68/push 1/imm32/block-depth
37844 52/push-edx
37845 68/push 0x11/imm32/alloc-id:fake
37846 68/push 0/imm32/name
37847 68/push 0/imm32/name
37848 68/push 0x11/imm32/alloc-id:fake:payload
37849 89/<- %edx 4/r32/esp
37850 $test-compare-mem-with-literal:initialize-literal-value:
37851
37852 8d/copy-address *(edx+4) 0/r32/eax
37853 (copy-array Heap "0x34" %eax)
37854 $test-compare-mem-with-literal:initialize-inouts:
37855
37856 68/push 0/imm32/is-deref:false
37857 68/push 0/imm32/next
37858 68/push 0/imm32/next
37859 52/push-edx/l
37860 68/push 0x11/imm32/alloc-id:fake
37861 68/push 0x11/imm32/alloc-id:fake:payload
37862 89/<- %esi 4/r32/esp
37863
37864 68/push 0/imm32/is-deref:false
37865 56/push-esi/next
37866 68/push 0x11/imm32/alloc-id:fake
37867 51/push-ecx/var1
37868 68/push 0x11/imm32/alloc-id:fake
37869 68/push 0x11/imm32/alloc-id:fake:payload
37870 89/<- %esi 4/r32/esp
37871 $test-compare-mem-with-literal:initialize-stmt:
37872
37873 68/push 0/imm32/next
37874 68/push 0/imm32/next
37875 68/push 0/imm32/outputs
37876 68/push 0/imm32/outputs
37877 56/push-esi/inouts
37878 68/push 0x11/imm32/alloc-id:fake
37879 68/push 0/imm32/operation
37880 68/push 0/imm32/operation
37881 68/push 1/imm32/tag:stmt1
37882 89/<- %esi 4/r32/esp
37883 $test-compare-mem-with-literal:initialize-stmt-operation:
37884
37885 8d/copy-address *(esi+4) 0/r32/eax
37886 (copy-array Heap "compare" %eax)
37887
37888 c7 0/subop/copy *Curr-block-depth 0/imm32
37889 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
37890 (flush _test-output-buffered-file)
37891 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
37897
37898 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
37899
37900 89/<- %esp 5/r32/ebp
37901 5d/pop-to-ebp
37902 c3/return
37903
37904 test-compare-eax-with-literal:
37905
37906
37907
37908
37909
37910 55/push-ebp
37911 89/<- %ebp 4/r32/esp
37912
37913 (clear-stream _test-output-stream)
37914 (clear-stream $_test-output-buffered-file->buffer)
37915 $test-compare-eax-with-literal:initialize-type:
37916
37917 68/push 0/imm32/right:null
37918 68/push 0/imm32/right:null
37919 68/push 0/imm32/left:unused
37920 68/push 1/imm32/value:int
37921 68/push 1/imm32/is-atom?:true
37922 68/push 0x11/imm32/alloc-id:fake:payload
37923 89/<- %ecx 4/r32/esp
37924 $test-compare-eax-with-literal:initialize-var1:
37925
37926 68/push 0/imm32/register
37927 68/push 0/imm32/register
37928 68/push 0/imm32/no-stack-offset
37929 68/push 1/imm32/block-depth
37930 51/push-ecx
37931 68/push 0x11/imm32/alloc-id:fake
37932 68/push 0/imm32/name
37933 68/push 0/imm32/name
37934 68/push 0x11/imm32/alloc-id:fake:payload
37935 89/<- %ecx 4/r32/esp
37936 $test-compare-eax-with-literal:initialize-var1-name:
37937
37938 8d/copy-address *(ecx+4) 0/r32/eax
37939 (copy-array Heap "var1" %eax)
37940 $test-compare-eax-with-literal:initialize-var1-register:
37941
37942 8d/copy-address *(ecx+0x1c) 0/r32/eax
37943 (copy-array Heap "eax" %eax)
37944 $test-compare-eax-with-literal:initialize-literal-type:
37945
37946 68/push 0/imm32/right:null
37947 68/push 0/imm32/right:null
37948 68/push 0/imm32/left:unused
37949 68/push 0/imm32/value:literal
37950 68/push 1/imm32/is-atom?:true
37951 68/push 0x11/imm32/alloc-id:fake:payload
37952 89/<- %edx 4/r32/esp
37953 $test-compare-eax-with-literal:initialize-literal:
37954
37955 68/push 0/imm32/register
37956 68/push 0/imm32/register
37957 68/push 0/imm32/no-stack-offset
37958 68/push 1/imm32/block-depth
37959 52/push-edx
37960 68/push 0x11/imm32/alloc-id:fake
37961 68/push 0/imm32/name
37962 68/push 0/imm32/name
37963 68/push 0x11/imm32/alloc-id:fake:payload
37964 89/<- %edx 4/r32/esp
37965 $test-compare-eax-with-literal:initialize-literal-value:
37966
37967 8d/copy-address *(edx+4) 0/r32/eax
37968 (copy-array Heap "0x34" %eax)
37969 $test-compare-eax-with-literal:initialize-inouts:
37970
37971 68/push 0/imm32/is-deref:false
37972 68/push 0/imm32/next
37973 68/push 0/imm32/next
37974 52/push-edx/l
37975 68/push 0x11/imm32/alloc-id:fake
37976 68/push 0x11/imm32/alloc-id:fake:payload
37977 89/<- %esi 4/r32/esp
37978
37979 68/push 0/imm32/is-deref:false
37980 56/push-esi/next
37981 68/push 0x11/imm32/alloc-id:fake
37982 51/push-ecx/var1
37983 68/push 0x11/imm32/alloc-id:fake
37984 68/push 0x11/imm32/alloc-id:fake:payload
37985 89/<- %esi 4/r32/esp
37986 $test-compare-eax-with-literal:initialize-stmt:
37987
37988 68/push 0/imm32/next
37989 68/push 0/imm32/next
37990 68/push 0/imm32/outputs
37991 68/push 0/imm32/outputs
37992 56/push-esi/inouts
37993 68/push 0x11/imm32/alloc-id:fake
37994 68/push 0/imm32/operation
37995 68/push 0/imm32/operation
37996 68/push 1/imm32/tag:stmt1
37997 89/<- %esi 4/r32/esp
37998 $test-compare-eax-with-literal:initialize-stmt-operation:
37999
38000 8d/copy-address *(esi+4) 0/r32/eax
38001 (copy-array Heap "compare" %eax)
38002
38003 c7 0/subop/copy *Curr-block-depth 0/imm32
38004 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38005 (flush _test-output-buffered-file)
38006 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38012
38013 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
38014
38015 89/<- %esp 5/r32/ebp
38016 5d/pop-to-ebp
38017 c3/return
38018
38019 test-compare-reg-with-literal:
38020
38021
38022
38023
38024
38025 55/push-ebp
38026 89/<- %ebp 4/r32/esp
38027
38028 (clear-stream _test-output-stream)
38029 (clear-stream $_test-output-buffered-file->buffer)
38030 $test-compare-reg-with-literal:initialize-type:
38031
38032 68/push 0/imm32/right:null
38033 68/push 0/imm32/right:null
38034 68/push 0/imm32/left:unused
38035 68/push 1/imm32/value:int
38036 68/push 1/imm32/is-atom?:true
38037 68/push 0x11/imm32/alloc-id:fake:payload
38038 89/<- %ecx 4/r32/esp
38039 $test-compare-reg-with-literal:initialize-var1:
38040
38041 68/push 0/imm32/register
38042 68/push 0/imm32/register
38043 68/push 0/imm32/no-stack-offset
38044 68/push 1/imm32/block-depth
38045 51/push-ecx
38046 68/push 0x11/imm32/alloc-id:fake
38047 68/push 0/imm32/name
38048 68/push 0/imm32/name
38049 68/push 0x11/imm32/alloc-id:fake:payload
38050 89/<- %ecx 4/r32/esp
38051 $test-compare-reg-with-literal:initialize-var1-name:
38052
38053 8d/copy-address *(ecx+4) 0/r32/eax
38054 (copy-array Heap "var1" %eax)
38055 $test-compare-reg-with-literal:initialize-var1-register:
38056
38057 8d/copy-address *(ecx+0x1c) 0/r32/eax
38058 (copy-array Heap "ecx" %eax)
38059 $test-compare-reg-with-literal:initialize-literal-type:
38060
38061 68/push 0/imm32/right:null
38062 68/push 0/imm32/right:null
38063 68/push 0/imm32/left:unused
38064 68/push 0/imm32/value:literal
38065 68/push 1/imm32/is-atom?:true
38066 68/push 0x11/imm32/alloc-id:fake:payload
38067 89/<- %edx 4/r32/esp
38068 $test-compare-reg-with-literal:initialize-literal:
38069
38070 68/push 0/imm32/register
38071 68/push 0/imm32/register
38072 68/push 0/imm32/no-stack-offset
38073 68/push 1/imm32/block-depth
38074 52/push-edx
38075 68/push 0x11/imm32/alloc-id:fake
38076 68/push 0/imm32/name
38077 68/push 0/imm32/name
38078 68/push 0x11/imm32/alloc-id:fake:payload
38079 89/<- %edx 4/r32/esp
38080 $test-compare-reg-with-literal:initialize-literal-value:
38081
38082 8d/copy-address *(edx+4) 0/r32/eax
38083 (copy-array Heap "0x34" %eax)
38084 $test-compare-reg-with-literal:initialize-inouts:
38085
38086 68/push 0/imm32/is-deref:false
38087 68/push 0/imm32/next
38088 68/push 0/imm32/next
38089 52/push-edx/l
38090 68/push 0x11/imm32/alloc-id:fake
38091 68/push 0x11/imm32/alloc-id:fake:payload
38092 89/<- %esi 4/r32/esp
38093
38094 68/push 0/imm32/is-deref:false
38095 56/push-esi/next
38096 68/push 0x11/imm32/alloc-id:fake
38097 51/push-ecx/var1
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-compare-reg-with-literal:initialize-stmt:
38102
38103 68/push 0/imm32/next
38104 68/push 0/imm32/next
38105 68/push 0/imm32/outputs
38106 68/push 0/imm32/outputs
38107 56/push-esi/inouts
38108 68/push 0x11/imm32/alloc-id:fake
38109 68/push 0/imm32/operation
38110 68/push 0/imm32/operation
38111 68/push 1/imm32/tag:stmt1
38112 89/<- %esi 4/r32/esp
38113 $test-compare-reg-with-literal:initialize-stmt-operation:
38114
38115 8d/copy-address *(esi+4) 0/r32/eax
38116 (copy-array Heap "compare" %eax)
38117
38118 c7 0/subop/copy *Curr-block-depth 0/imm32
38119 (emit-subx-stmt _test-output-buffered-file %esi Primitives 0 Stderr 0)
38120 (flush _test-output-buffered-file)
38121 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38127
38128 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
38129
38130 89/<- %esp 5/r32/ebp
38131 5d/pop-to-ebp
38132 c3/return
38133
38134 test-emit-subx-stmt-function-call:
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152 55/push-ebp
38153 89/<- %ebp 4/r32/esp
38154
38155 (clear-stream _test-output-stream)
38156 (clear-stream $_test-output-buffered-file->buffer)
38157 $test-emit-subx-function-call:initialize-type:
38158
38159 68/push 0/imm32/right:null
38160 68/push 0/imm32/right:null
38161 68/push 0/imm32/left:unused
38162 68/push 1/imm32/value:int
38163 68/push 1/imm32/is-atom?:true
38164 68/push 0x11/imm32/alloc-id:fake:payload
38165 89/<- %ecx 4/r32/esp
38166 $test-emit-subx-function-call:initialize-var:
38167
38168 68/push 0/imm32/no-register
38169 68/push 0/imm32/no-register
38170 68/push -8/imm32/stack-offset
38171 68/push 1/imm32/block-depth
38172 51/push-ecx/type
38173 68/push 0x11/imm32/alloc-id:fake
38174 68/push 0/imm32/name
38175 68/push 0/imm32/name
38176 68/push 0x11/imm32/alloc-id:fake:payload
38177 89/<- %ecx 4/r32/esp
38178 $test-emit-subx-function-call:initialize-var-name:
38179
38180 8d/copy-address *(ecx+4) 0/r32/eax
38181 (copy-array Heap "foo" %eax)
38182 $test-emit-subx-function-call:initialize-stmt-var:
38183
38184 68/push 0/imm32/is-deref:false
38185 68/push 0/imm32/next
38186 68/push 0/imm32/next
38187 51/push-ecx/var-foo
38188 68/push 0x11/imm32/alloc-id:fake
38189 68/push 0x11/imm32/alloc-id:fake:payload
38190 89/<- %ebx 4/r32/esp
38191 $test-emit-subx-function-call:initialize-stmt:
38192
38193 68/push 0/imm32/no-outputs
38194 68/push 0/imm32/no-outputs
38195 53/push-ebx/inouts
38196 68/push 0x11/imm32/alloc-id:fake
38197 68/push 0/imm32/operation
38198 68/push 0/imm32/operation
38199 68/push 1/imm32/tag
38200 89/<- %esi 4/r32/esp
38201 $test-emit-subx-function-call:initialize-stmt-operation:
38202
38203 8d/copy-address *(esi+4) 0/r32/eax
38204 (copy-array Heap "f" %eax)
38205
38206 c7 0/subop/copy *Curr-block-depth 0/imm32
38207 (emit-subx-stmt _test-output-buffered-file %esi 0 0 Stderr 0)
38208 (flush _test-output-buffered-file)
38209 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38215
38216 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
38217
38218 89/<- %esp 5/r32/ebp
38219 5d/pop-to-ebp
38220 c3/return
38221
38222 test-emit-subx-stmt-function-call-with-literal-arg:
38223
38224
38225
38226
38227
38228
38229 55/push-ebp
38230 89/<- %ebp 4/r32/esp
38231
38232 (clear-stream _test-output-stream)
38233 (clear-stream $_test-output-buffered-file->buffer)
38234 $test-emit-subx-function-call-with-literal-arg:initialize-type:
38235
38236 68/push 0/imm32/right:null
38237 68/push 0/imm32/right:null
38238 68/push 0/imm32/left:unused
38239 68/push 0/imm32/value:literal
38240 68/push 1/imm32/is-atom?:true
38241 68/push 0x11/imm32/alloc-id:fake:payload
38242 89/<- %ecx 4/r32/esp
38243 $test-emit-subx-function-call-with-literal-arg:initialize-var:
38244
38245 68/push 0/imm32/no-register
38246 68/push 0/imm32/no-register
38247 68/push 0/imm32/no-stack-offset
38248 68/push 1/imm32/block-depth
38249 51/push-ecx/type
38250 68/push 0x11/imm32/alloc-id:fake
38251 68/push 0/imm32/name
38252 68/push 0/imm32/name
38253 68/push 0x11/imm32/alloc-id:fake:payload
38254 89/<- %ecx 4/r32/esp
38255 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
38256
38257 8d/copy-address *(ecx+4) 0/r32/eax
38258 (copy-array Heap "0x34" %eax)
38259 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
38260
38261 68/push 0/imm32/is-deref:false
38262 68/push 0/imm32/next
38263 68/push 0/imm32/next
38264 51/push-ecx/var-foo
38265 68/push 0x11/imm32/alloc-id:fake
38266 68/push 0x11/imm32/alloc-id:fake:payload
38267 89/<- %ebx 4/r32/esp
38268 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
38269
38270 68/push 0/imm32/no-outputs
38271 68/push 0/imm32/no-outputs
38272 53/push-ebx/inouts
38273 68/push 0x11/imm32/alloc-id:fake
38274 68/push 0/imm32/operation
38275 68/push 0/imm32/operation
38276 68/push 1/imm32/tag
38277 89/<- %esi 4/r32/esp
38278 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
38279
38280 8d/copy-address *(esi+4) 0/r32/eax
38281 (copy-array Heap "f" %eax)
38282
38283 c7 0/subop/copy *Curr-block-depth 0/imm32
38284 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx 0 Stderr 0)
38285 (flush _test-output-buffered-file)
38286 +-- 6 lines: #? # dump _test-output-stream -----------------------------------------------------------------------------------------------------------------------------------------
38292
38293 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
38294
38295 89/<- %esp 5/r32/ebp
38296 5d/pop-to-ebp
38297 c3/return
38298
38299 emit-indent:
38300
38301 55/push-ebp
38302 89/<- %ebp 4/r32/esp
38303
38304 50/push-eax
38305
38306 8b/-> *(ebp+0xc) 0/r32/eax
38307 {
38308
38309 3d/compare-eax-with 0/imm32
38310 7e/jump-if-<= break/disp8
38311 (write-buffered *(ebp+8) " ")
38312 48/decrement-eax
38313 eb/jump loop/disp8
38314 }
38315 $emit-indent:end:
38316
38317 58/pop-to-eax
38318
38319 89/<- %esp 5/r32/ebp
38320 5d/pop-to-ebp
38321 c3/return
38322
38323 emit-subx-prologue:
38324
38325 55/push-ebp
38326 89/<- %ebp 4/r32/esp
38327
38328 (write-buffered *(ebp+8) " # . prologue\n")
38329 (write-buffered *(ebp+8) " 55/push-ebp\n")
38330 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
38331 $emit-subx-prologue:end:
38332
38333 89/<- %esp 5/r32/ebp
38334 5d/pop-to-ebp
38335 c3/return
38336
38337 emit-subx-epilogue:
38338
38339 55/push-ebp
38340 89/<- %ebp 4/r32/esp
38341
38342 (write-buffered *(ebp+8) " # . epilogue\n")
38343 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
38344 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
38345 (write-buffered *(ebp+8) " c3/return\n")
38346 $emit-subx-epilogue:end:
38347
38348 89/<- %esp 5/r32/ebp
38349 5d/pop-to-ebp
38350 c3/return