https://github.com/akkartik/mu/blob/master/apps/mu.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237 == data
238
239 Program:
240 _Program-functions:
241 0/imm32
242 _Program-functions->payload:
243 0/imm32
244 _Program-types:
245 0/imm32
246 _Program-types->payload:
247 0/imm32
248 _Program-signatures:
249 0/imm32
250 _Program-signatures->payload:
251 0/imm32
252
253
254
255
256
257
258
259
260
261
262
263
264 Function-name:
265 0/imm32
266 Function-inouts:
267 8/imm32
268 Function-outputs:
269 0x10/imm32
270 Function-body:
271 0x18/imm32
272 Function-next:
273 0x20/imm32
274 Function-size:
275 0x28/imm32/40
276
277 Primitive-name:
278 0/imm32
279 Primitive-inouts:
280 8/imm32
281 Primitive-outputs:
282 0x10/imm32
283 Primitive-subx-name:
284 0x18/imm32
285 Primitive-subx-rm32:
286 0x20/imm32
287 Primitive-subx-r32:
288 0x24/imm32
289 Primitive-subx-imm32:
290 0x28/imm32
291 Primitive-subx-imm8:
292 0x2c/imm32
293 Primitive-subx-disp32:
294 0x30/imm32
295 Primitive-subx-xm32:
296 0x34/imm32
297 Primitive-subx-x32:
298 0x38/imm32
299 Primitive-next:
300 0x3c/imm32
301 Primitive-size:
302 0x44/imm32/68
303
304 Stmt-tag:
305 0/imm32
306
307 Block-stmts:
308 4/imm32
309 Block-var:
310 0xc/imm32
311
312 Stmt1-operation:
313 4/imm32
314 Stmt1-inouts:
315 0xc/imm32
316 Stmt1-outputs:
317 0x14/imm32
318
319 Vardef-var:
320 4/imm32
321
322 Regvardef-operation:
323 4/imm32
324 Regvardef-inouts:
325 0xc/imm32
326 Regvardef-outputs:
327 0x14/imm32
328
329 Stmt-size:
330 0x1c/imm32
331
332 Var-name:
333 0/imm32
334 Var-type:
335 8/imm32
336 Var-block-depth:
337 0x10/imm32
338 Var-offset:
339 0x14/imm32
340 Var-register:
341 0x18/imm32
342 Var-size:
343 0x20/imm32
344
345 List-value:
346 0/imm32
347 List-next:
348 8/imm32
349 List-size:
350 0x10/imm32
351
352
353 Stmt-var-value:
354 0/imm32
355 Stmt-var-next:
356 8/imm32
357 Stmt-var-is-deref:
358 0x10/imm32
359 Stmt-var-size:
360 0x14/imm32
361
362
363
364 Live-var-value:
365 0/imm32
366 Live-var-register-spilled:
367 8/imm32
368 Live-var-size:
369 0xc/imm32
370
371
372
373 Type-tree-is-atom:
374 0/imm32
375
376 Type-tree-value:
377 4/imm32
378 Type-tree-value-size:
379 8/imm32
380 Type-tree-parameter-name:
381 8/imm32
382
383 Type-tree-left:
384 4/imm32
385 Type-tree-right:
386 0xc/imm32
387
388 Type-tree-size:
389 0x14/imm32
390
391
392
393
394 Type-id:
395 0/imm32/write
396 0/imm32/read
397 0x100/imm32/size
398
399 0/imm32
400
401 "int"/imm32
402 "addr"/imm32
403 "array"/imm32
404 "handle"/imm32
405 "boolean"/imm32
406 0/imm32
407
408 "offset"/imm32
409
410 "byte"/imm32
411 0/imm32
412
413 0/imm32
414
415 "stream"/imm32
416 "slice"/imm32
417 "code-point"/imm32
418 "grapheme"/imm32
419
420
421 "float"/imm32
422
423
424 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
425 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
426 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
427 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32 0/imm32
428 0/imm32 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
431 Primitive-type-ids:
432 0x40
433
434
435
436
437 Typeinfo-id:
438 0/imm32
439 Typeinfo-fields:
440 4/imm32
441
442
443
444
445
446 Typeinfo-total-size-in-bytes:
447 0xc/imm32
448 Typeinfo-next:
449 0x10/imm32
450 Typeinfo-size:
451 0x18/imm32
452
453
454
455 Typeinfo-fields-row-size:
456 0x10/imm32
457
458
459
460
461
462
463
464
465 Typeinfo-entry-input-var:
466 0/imm32
467 Typeinfo-entry-index:
468 8/imm32
469 Typeinfo-entry-output-var:
470 0xc/imm32
471 Typeinfo-entry-size:
472 0x14/imm32
473
474 == code
475
476 Entry:
477
478 89/<- %ebp 4/r32/esp
479 (new-segment *Heap-size Heap)
480
481 {
482
483 81 7/subop/compare *ebp 1/imm32
484 7e/jump-if-<= break/disp8
485
486 (kernel-string-equal? *(ebp+8) "test")
487 3d/compare-eax-and 0/imm32/false
488 74/jump-if-= break/disp8
489
490 (run-tests)
491
492 8b/-> *Num-test-failures 3/r32/ebx
493 eb/jump $mu-main:end/disp8
494 }
495
496 (convert-mu Stdin Stdout Stderr 0)
497 (flush Stdout)
498
499 bb/copy-to-ebx 0/imm32
500 $mu-main:end:
501 e8/call syscall_exit/disp32
502
503 convert-mu:
504
505 55/push-ebp
506 89/<- %ebp 4/r32/esp
507
508 50/push-eax
509
510 c7 0/subop/copy *Next-block-index 1/imm32
511 8b/-> *Primitive-type-ids 0/r32/eax
512 89/<- *Type-id 0/r32/eax
513 c7 0/subop/copy *_Program-functions 0/imm32
514 c7 0/subop/copy *_Program-functions->payload 0/imm32
515 c7 0/subop/copy *_Program-types 0/imm32
516 c7 0/subop/copy *_Program-types->payload 0/imm32
517 c7 0/subop/copy *_Program-signatures 0/imm32
518 c7 0/subop/copy *_Program-signatures->payload 0/imm32
519
520 (parse-mu *(ebp+8) *(ebp+0x10) *(ebp+0x14))
521 (populate-mu-type-sizes *(ebp+0x10) *(ebp+0x14))
522
523 (check-mu-types *(ebp+0x10) *(ebp+0x14))
524 (emit-subx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
525 $convert-mu:end:
526
527 58/pop-to-eax
528
529 89/<- %esp 5/r32/ebp
530 5d/pop-to-ebp
531 c3/return
532
533 test-convert-empty-input:
534
535
536 55/push-ebp
537 89/<- %ebp 4/r32/esp
538
539 (clear-stream _test-input-stream)
540 (clear-stream $_test-input-buffered-file->buffer)
541 (clear-stream _test-output-stream)
542 (clear-stream $_test-output-buffered-file->buffer)
543
544 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
545 (flush _test-output-buffered-file)
546 (check-stream-equal _test-output-stream "" "F - test-convert-empty-input")
547
548 89/<- %esp 5/r32/ebp
549 5d/pop-to-ebp
550 c3/return
551
552 test-convert-function-skeleton:
553
554 55/push-ebp
555 89/<- %ebp 4/r32/esp
556
557 (clear-stream _test-input-stream)
558 (clear-stream $_test-input-buffered-file->buffer)
559 (clear-stream _test-output-stream)
560 (clear-stream $_test-output-buffered-file->buffer)
561
562 (write _test-input-stream "fn foo {\n")
563 (write _test-input-stream "}\n")
564
565 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
566 (flush _test-output-buffered-file)
567 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
573
574 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-skeleton/0")
575 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-skeleton/1")
576 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-skeleton/2")
577 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-skeleton/3")
578 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-skeleton/4")
579 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-skeleton/5")
580 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-skeleton/6")
581 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-skeleton/7")
582
583 89/<- %esp 5/r32/ebp
584 5d/pop-to-ebp
585 c3/return
586
587 test-convert-multiple-function-skeletons:
588
589 55/push-ebp
590 89/<- %ebp 4/r32/esp
591
592 (clear-stream _test-input-stream)
593 (clear-stream $_test-input-buffered-file->buffer)
594 (clear-stream _test-output-stream)
595 (clear-stream $_test-output-buffered-file->buffer)
596
597 (write _test-input-stream "fn foo {\n")
598 (write _test-input-stream "}\n")
599 (write _test-input-stream "fn bar {\n")
600 (write _test-input-stream "}\n")
601
602 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
603 (flush _test-output-buffered-file)
604 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
610
611 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-multiple-function-skeletons/0")
612 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/1")
613 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/2")
614 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/3")
615 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/4")
616 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/5")
617 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/6")
618 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/7")
619
620 (check-next-stream-line-equal _test-output-stream "bar:" "F - test-convert-multiple-function-skeletons/10")
621 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-multiple-function-skeletons/11")
622 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-multiple-function-skeletons/12")
623 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-multiple-function-skeletons/13")
624 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-multiple-function-skeletons/14")
625 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-multiple-function-skeletons/15")
626 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-multiple-function-skeletons/16")
627 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-multiple-function-skeletons/17")
628
629 89/<- %esp 5/r32/ebp
630 5d/pop-to-ebp
631 c3/return
632
633 test-convert-function-with-arg:
634
635 55/push-ebp
636 89/<- %ebp 4/r32/esp
637
638 (clear-stream _test-input-stream)
639 (clear-stream $_test-input-buffered-file->buffer)
640 (clear-stream _test-output-stream)
641 (clear-stream $_test-output-buffered-file->buffer)
642
643 (write _test-input-stream "fn foo n: int {\n")
644 (write _test-input-stream "}\n")
645
646 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
647 (flush _test-output-buffered-file)
648 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
654
655 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg/0")
656 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg/1")
657 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg/2")
658 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg/3")
659 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg/4")
660 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg/5")
661 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg/6")
662 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg/7")
663
664 89/<- %esp 5/r32/ebp
665 5d/pop-to-ebp
666 c3/return
667
668 test-convert-function-with-arg-and-body:
669
670 55/push-ebp
671 89/<- %ebp 4/r32/esp
672
673 (clear-stream _test-input-stream)
674 (clear-stream $_test-input-buffered-file->buffer)
675 (clear-stream _test-output-stream)
676 (clear-stream $_test-output-buffered-file->buffer)
677
678 (write _test-input-stream "fn foo n: int {\n")
679 (write _test-input-stream " increment n\n")
680 (write _test-input-stream "}\n")
681
682 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
683 (flush _test-output-buffered-file)
684 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
690
691 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-arg-and-body/0")
692 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-arg-and-body/1")
693 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-arg-and-body/2")
694 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-arg-and-body/3")
695 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-arg-and-body/4")
696 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-arg-and-body/5")
697 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-arg-and-body/6")
698 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-arg-and-body/7")
699 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-arg-and-body/8")
700 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-arg-and-body/9")
701 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-arg-and-body/10")
702 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-arg-and-body/11")
703 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-arg-and-body/12")
704
705 89/<- %esp 5/r32/ebp
706 5d/pop-to-ebp
707 c3/return
708
709 test-convert-function-distinguishes-args:
710
711 55/push-ebp
712 89/<- %ebp 4/r32/esp
713
714 (clear-stream _test-input-stream)
715 (clear-stream $_test-input-buffered-file->buffer)
716 (clear-stream _test-output-stream)
717 (clear-stream $_test-output-buffered-file->buffer)
718
719 (write _test-input-stream "fn foo a: int, b: int {\n")
720 (write _test-input-stream " increment b\n")
721 (write _test-input-stream "}\n")
722
723 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
724 (flush _test-output-buffered-file)
725 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
731
732 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-distinguishes-args/0")
733 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-distinguishes-args/1")
734 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-distinguishes-args/2")
735 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-distinguishes-args/3")
736 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-distinguishes-args/4")
737 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-distinguishes-args/5")
738 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x0000000c)" "F - test-convert-function-distinguishes-args/6")
739 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-distinguishes-args/7")
740 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-distinguishes-args/8")
741 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-distinguishes-args/9")
742 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-distinguishes-args/10")
743 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-distinguishes-args/11")
744 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-distinguishes-args/12")
745
746 89/<- %esp 5/r32/ebp
747 5d/pop-to-ebp
748 c3/return
749
750 test-convert-function-with-return-literal:
751
752 55/push-ebp
753 89/<- %ebp 4/r32/esp
754
755 (clear-stream _test-input-stream)
756 (clear-stream $_test-input-buffered-file->buffer)
757 (clear-stream _test-output-stream)
758 (clear-stream $_test-output-buffered-file->buffer)
759
760 (write _test-input-stream "fn foo -> x/eax: int {\n")
761 (write _test-input-stream " return 0\n")
762 (write _test-input-stream "}\n")
763
764 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
765 (flush _test-output-buffered-file)
766 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
772
773 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-literal/0")
774 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-literal/1")
775 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-literal/2")
776 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-literal/3")
777 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-literal/4")
778 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-literal/5")
779 (check-next-stream-line-equal _test-output-stream " c7 0/subop/copy %eax 0/imm32" "F - test-convert-function-with-return-literal/6")
780 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-literal/7")
781 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-literal/8")
782 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-literal/9")
783 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-literal/10")
784 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-literal/11")
785 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-literal/12")
786 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-literal/13")
787
788 89/<- %esp 5/r32/ebp
789 5d/pop-to-ebp
790 c3/return
791
792 test-convert-function-with-return:
793
794 55/push-ebp
795 89/<- %ebp 4/r32/esp
796
797 (clear-stream _test-input-stream)
798 (clear-stream $_test-input-buffered-file->buffer)
799 (clear-stream _test-output-stream)
800 (clear-stream $_test-output-buffered-file->buffer)
801
802 (write _test-input-stream "fn foo -> x/eax: int {\n")
803 (write _test-input-stream " var y: int\n")
804 (write _test-input-stream " return y\n")
805 (write _test-input-stream "}\n")
806
807 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
808 (flush _test-output-buffered-file)
809 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
815
816 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return/0")
817 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return/1")
818 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return/2")
819 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return/3")
820 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return/4")
821 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return/5")
822 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return/6")
823 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-function-with-return/7")
824 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-function-with-return/8")
825 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return/9")
826 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return/10")
827 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return/11")
828 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return/12")
829 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return/13")
830 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return/14")
831 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return/15")
832
833 89/<- %esp 5/r32/ebp
834 5d/pop-to-ebp
835 c3/return
836
837 test-convert-function-with-return-register:
838
839 55/push-ebp
840 89/<- %ebp 4/r32/esp
841
842 (clear-stream _test-input-stream)
843 (clear-stream $_test-input-buffered-file->buffer)
844 (clear-stream _test-output-stream)
845 (clear-stream $_test-output-buffered-file->buffer)
846
847 (write _test-input-stream "fn foo -> x/eax: int {\n")
848 (write _test-input-stream " var y/eax: int <- copy 3\n")
849 (write _test-input-stream " return y\n")
850 (write _test-input-stream "}\n")
851
852 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
853 (flush _test-output-buffered-file)
854 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
860
861 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register/0")
862 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register/1")
863 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register/2")
864 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register/3")
865 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register/4")
866 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register/5")
867 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register/6")
868 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register/7")
869 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register/8")
870 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-return-register/9")
871 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register/10")
872 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register/11")
873 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register/12")
874 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register/13")
875 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register/14")
876 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register/15")
877 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register/16")
878
879 89/<- %esp 5/r32/ebp
880 5d/pop-to-ebp
881 c3/return
882
883 test-convert-function-with-literal-arg:
884
885 55/push-ebp
886 89/<- %ebp 4/r32/esp
887
888 (clear-stream _test-input-stream)
889 (clear-stream $_test-input-buffered-file->buffer)
890 (clear-stream _test-output-stream)
891 (clear-stream $_test-output-buffered-file->buffer)
892
893 (write _test-input-stream "fn foo a: int, b: int -> _/eax: int {\n")
894 (write _test-input-stream " var result/eax: int <- copy a\n")
895 (write _test-input-stream " result <- add 1\n")
896 (write _test-input-stream " return result\n")
897 (write _test-input-stream "}\n")
898
899 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
900 (flush _test-output-buffered-file)
901 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
907
908 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg/0")
909 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg/1")
910 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg/2")
911 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg/3")
912 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg/4")
913 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg/5")
914 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-literal-arg/6")
915 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-with-literal-arg/7")
916 (check-next-stream-line-equal _test-output-stream " 05/add-to-eax 1/imm32" "F - test-convert-function-with-literal-arg/8")
917 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-literal-arg/9")
918 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg/10")
919 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg/11")
920 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg/12")
921 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg/13")
922 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg/14")
923 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg/15")
924 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg/16")
925 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg/17")
926
927 89/<- %esp 5/r32/ebp
928 5d/pop-to-ebp
929 c3/return
930
931 test-convert-function-with-literal-arg-2:
932
933 55/push-ebp
934 89/<- %ebp 4/r32/esp
935
936 (clear-stream _test-input-stream)
937 (clear-stream $_test-input-buffered-file->buffer)
938 (clear-stream _test-output-stream)
939 (clear-stream $_test-output-buffered-file->buffer)
940
941 (write _test-input-stream "fn foo a: int, b: int -> _/ebx: int {\n")
942 (write _test-input-stream " var result/ebx: int <- copy a\n")
943 (write _test-input-stream " result <- add 1\n")
944 (write _test-input-stream " return result\n")
945 (write _test-input-stream "}\n")
946
947 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
948 (flush _test-output-buffered-file)
949 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
955
956 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-literal-arg-2/0")
957 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-literal-arg-2/1")
958 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-literal-arg-2/2")
959 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-literal-arg-2/3")
960 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-literal-arg-2/4")
961 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-literal-arg-2/5")
962 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-with-literal-arg-2/6")
963 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/7")
964 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %ebx 1/imm32" "F - test-convert-function-with-literal-arg-2/8")
965 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-with-literal-arg-2/9")
966 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-with-literal-arg-2/10")
967 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-literal-arg-2/11")
968 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-literal-arg-2/12")
969 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-literal-arg-2/13")
970 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-literal-arg-2/14")
971 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-literal-arg-2/15")
972 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-literal-arg-2/16")
973 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-literal-arg-2/17")
974
975 89/<- %esp 5/r32/ebp
976 5d/pop-to-ebp
977 c3/return
978
979 test-convert-function-call-with-literal-arg:
980
981 55/push-ebp
982 89/<- %ebp 4/r32/esp
983
984 (clear-stream _test-input-stream)
985 (clear-stream $_test-input-buffered-file->buffer)
986 (clear-stream _test-output-stream)
987 (clear-stream $_test-output-buffered-file->buffer)
988
989 (write _test-input-stream "fn main -> _/ebx: int {\n")
990 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
991 (write _test-input-stream " return result\n")
992 (write _test-input-stream "}\n")
993 (write _test-input-stream "fn do-add a: int, b: int -> _/eax: int {\n")
994 (write _test-input-stream " var result/eax: int <- copy a\n")
995 (write _test-input-stream " result <- add b\n")
996 (write _test-input-stream " return result\n")
997 (write _test-input-stream "}\n")
998
999 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1000 (flush _test-output-buffered-file)
1001 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1007
1008 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-literal-arg/0")
1009 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/1")
1010 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/2")
1011 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/3")
1012 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/4")
1013 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-literal-arg/5")
1014 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
1015 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-literal-arg/7")
1016 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1017 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
1018 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1019 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/11")
1020 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-literal-arg/12")
1021 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/13")
1022 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/14")
1023 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/15")
1024 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/16")
1025 (check-next-stream-line-equal _test-output-stream "do-add:" "F - test-convert-function-call-with-literal-arg/17")
1026 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-literal-arg/18")
1027 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-literal-arg/19")
1028 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-literal-arg/20")
1029 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-literal-arg/21")
1030 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:loop:" "F - test-convert-function-call-with-literal-arg/22")
1031 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/23")
1032 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/24")
1033 (check-next-stream-line-equal _test-output-stream " 03/add *(ebp+0x0000000c) 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/25")
1034 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-call-with-literal-arg/26")
1035 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
1036 (check-next-stream-line-equal _test-output-stream " e9/jump $do-add:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/28")
1037 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-literal-arg/29")
1038 (check-next-stream-line-equal _test-output-stream "$do-add:0x00000002:break:" "F - test-convert-function-call-with-literal-arg/30")
1039 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-literal-arg/31")
1040 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-literal-arg/32")
1041 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-literal-arg/33")
1042 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-literal-arg/34")
1043
1044 89/<- %esp 5/r32/ebp
1045 5d/pop-to-ebp
1046 c3/return
1047
1048 test-convert-function-call-with-signature:
1049
1050 55/push-ebp
1051 89/<- %ebp 4/r32/esp
1052
1053 (clear-stream _test-input-stream)
1054 (clear-stream $_test-input-buffered-file->buffer)
1055 (clear-stream _test-output-stream)
1056 (clear-stream $_test-output-buffered-file->buffer)
1057
1058 (write _test-input-stream "fn main -> _/ebx: int {\n")
1059 (write _test-input-stream " var result/eax: int <- do-add 3 4\n")
1060 (write _test-input-stream " return result\n")
1061 (write _test-input-stream "}\n")
1062 (write _test-input-stream "sig do-add a: int, b: int -> _/eax: int\n")
1063
1064 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1065 (flush _test-output-buffered-file)
1066 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1072
1073 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call-with-signature/0")
1074 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-signature/1")
1075 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-signature/2")
1076 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-signature/3")
1077 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-signature/4")
1078 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call-with-signature/5")
1079 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-call-with-literal-arg/6")
1080 (check-next-stream-line-equal _test-output-stream " (do-add 3 4)" "F - test-convert-function-call-with-signature/6")
1081 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1082 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-local-var-in-reg/9")
1083 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1084 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-signature/7")
1085 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call-with-signature/8")
1086 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-signature/9")
1087 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-signature/10")
1088 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-signature/11")
1089 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-signature/12")
1090
1091 89/<- %esp 5/r32/ebp
1092 5d/pop-to-ebp
1093 c3/return
1094
1095 test-convert-function-with-local-var-in-mem:
1096
1097 55/push-ebp
1098 89/<- %ebp 4/r32/esp
1099
1100 (clear-stream _test-input-stream)
1101 (clear-stream $_test-input-buffered-file->buffer)
1102 (clear-stream _test-output-stream)
1103 (clear-stream $_test-output-buffered-file->buffer)
1104
1105 (write _test-input-stream "fn foo {\n")
1106 (write _test-input-stream " var x: int\n")
1107 (write _test-input-stream " increment x\n")
1108 (write _test-input-stream "}\n")
1109
1110 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1111 (flush _test-output-buffered-file)
1112 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1118
1119 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem/0")
1120 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem/1")
1121 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem/2")
1122 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-mem/3")
1123 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem/4")
1124 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem/5")
1125 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem/6")
1126 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-mem/7")
1127 (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")
1128 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem/9")
1129 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem/10")
1130 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem/11")
1131 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-mem/12")
1132 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem/13")
1133 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem/14")
1134
1135 89/<- %esp 5/r32/ebp
1136 5d/pop-to-ebp
1137 c3/return
1138
1139 test-convert-invalid-literal:
1140
1141 55/push-ebp
1142 89/<- %ebp 4/r32/esp
1143
1144 (clear-stream _test-input-stream)
1145 (clear-stream $_test-input-buffered-file->buffer)
1146 (clear-stream _test-output-stream)
1147 (clear-stream $_test-output-buffered-file->buffer)
1148 (clear-stream _test-error-stream)
1149 (clear-stream $_test-error-buffered-file->buffer)
1150
1151 68/push 0/imm32
1152 68/push 0/imm32
1153 89/<- %edx 4/r32/esp
1154 (tailor-exit-descriptor %edx 0x10)
1155
1156 (write _test-input-stream "fn foo {\n")
1157 (write _test-input-stream " increment 1n\n")
1158 (write _test-input-stream "}\n")
1159
1160 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1161
1162
1163 89/<- %edx 4/r32/esp
1164 (flush _test-output-buffered-file)
1165 (flush _test-error-buffered-file)
1166 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1172
1173 (check-stream-equal _test-output-stream "" "F - test-convert-invalid-literal: output should be empty")
1174 (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")
1175
1176 (check-ints-equal *(edx+4) 2 "F - test-convert-invalid-literal: exit status")
1177
1178 81 0/subop/add %esp 8/imm32
1179
1180 5d/pop-to-ebp
1181 c3/return
1182
1183 test-local-var-in-mem-has-no-initializer:
1184
1185 55/push-ebp
1186 89/<- %ebp 4/r32/esp
1187
1188 (clear-stream _test-input-stream)
1189 (clear-stream $_test-input-buffered-file->buffer)
1190 (clear-stream _test-output-stream)
1191 (clear-stream $_test-output-buffered-file->buffer)
1192 (clear-stream _test-error-stream)
1193 (clear-stream $_test-error-buffered-file->buffer)
1194
1195 68/push 0/imm32
1196 68/push 0/imm32
1197 89/<- %edx 4/r32/esp
1198 (tailor-exit-descriptor %edx 0x10)
1199
1200 (write _test-input-stream "fn foo {\n")
1201 (write _test-input-stream " var x: int <- copy 0\n")
1202 (write _test-input-stream " increment x\n")
1203 (write _test-input-stream "}\n")
1204
1205 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1206
1207
1208 89/<- %edx 4/r32/esp
1209 (flush _test-output-buffered-file)
1210 (flush _test-error-buffered-file)
1211 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1217
1218 (check-stream-equal _test-output-stream "" "F - test-var-in-mem-has-no-initializer: output should be empty")
1219 (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")
1220
1221 (check-ints-equal *(edx+4) 2 "F - test-var-in-mem-has-no-initializer: exit status")
1222
1223 81 0/subop/add %esp 8/imm32
1224
1225 5d/pop-to-ebp
1226 c3/return
1227
1228 test-convert-function-with-local-var-with-compound-type-in-mem:
1229
1230 55/push-ebp
1231 89/<- %ebp 4/r32/esp
1232
1233 (clear-stream _test-input-stream)
1234 (clear-stream $_test-input-buffered-file->buffer)
1235 (clear-stream _test-output-stream)
1236 (clear-stream $_test-output-buffered-file->buffer)
1237
1238 (write _test-input-stream "fn foo {\n")
1239 (write _test-input-stream " var x: (addr int)\n")
1240 (write _test-input-stream " copy-to x, 0\n")
1241 (write _test-input-stream "}\n")
1242
1243 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1244 (flush _test-output-buffered-file)
1245 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1251
1252 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/0")
1253 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/1")
1254 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-compound-type-in-mem/2")
1255 (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")
1256 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-compound-type-in-mem/4")
1257 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/5")
1258 (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")
1259 (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")
1260 (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")
1261 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-compound-type-in-mem/9")
1262 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-compound-type-in-mem/10")
1263 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-compound-type-in-mem/11")
1264 (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")
1265 (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")
1266 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-compound-type-in-mem/14")
1267
1268 89/<- %esp 5/r32/ebp
1269 5d/pop-to-ebp
1270 c3/return
1271
1272 test-convert-function-with-local-var-in-reg:
1273
1274 55/push-ebp
1275 89/<- %ebp 4/r32/esp
1276
1277 (clear-stream _test-input-stream)
1278 (clear-stream $_test-input-buffered-file->buffer)
1279 (clear-stream _test-output-stream)
1280 (clear-stream $_test-output-buffered-file->buffer)
1281
1282 (write _test-input-stream "fn foo {\n")
1283 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1284 (write _test-input-stream " x <- increment\n")
1285 (write _test-input-stream "}\n")
1286
1287 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1288 (flush _test-output-buffered-file)
1289 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1295
1296 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-reg/0")
1297 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-reg/1")
1298 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-reg/2")
1299 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-reg/3")
1300 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-reg/4")
1301 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-reg/5")
1302 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-in-reg/6")
1303 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-function-with-local-var-in-reg/7")
1304 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-local-var-in-reg/8")
1305 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-in-reg/9")
1306 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-reg/10")
1307 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-reg/11")
1308 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-reg/12")
1309 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-reg/13")
1310 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-reg/14")
1311 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-reg/15")
1312
1313 89/<- %esp 5/r32/ebp
1314 5d/pop-to-ebp
1315 c3/return
1316
1317 test-convert-function-with-allocate:
1318
1319 55/push-ebp
1320 89/<- %ebp 4/r32/esp
1321
1322 (clear-stream _test-input-stream)
1323 (clear-stream $_test-input-buffered-file->buffer)
1324 (clear-stream _test-output-stream)
1325 (clear-stream $_test-output-buffered-file->buffer)
1326
1327 (write _test-input-stream "fn foo {\n")
1328 (write _test-input-stream " var x/ecx: (addr handle int) <- copy 0\n")
1329 (write _test-input-stream " allocate x\n")
1330 (write _test-input-stream "}\n")
1331
1332 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1333 (flush _test-output-buffered-file)
1334 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1340
1341 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-allocate/0")
1342 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-allocate/1")
1343 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-allocate/2")
1344 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-allocate/3")
1345 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-allocate/4")
1346 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-allocate/5")
1347 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-allocate/6")
1348 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-allocate/7")
1349 (check-next-stream-line-equal _test-output-stream " (allocate Heap 0x00000004 %ecx)" "F - test-convert-function-with-allocate/8")
1350 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-allocate/9")
1351 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-allocate/10")
1352 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-allocate/11")
1353 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-allocate/12")
1354 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-allocate/13")
1355 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-allocate/14")
1356 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-allocate/15")
1357
1358 89/<- %esp 5/r32/ebp
1359 5d/pop-to-ebp
1360 c3/return
1361
1362 test-initializer-in-hex:
1363
1364 55/push-ebp
1365 89/<- %ebp 4/r32/esp
1366
1367 (clear-stream _test-input-stream)
1368 (clear-stream $_test-input-buffered-file->buffer)
1369 (clear-stream _test-output-stream)
1370 (clear-stream $_test-output-buffered-file->buffer)
1371 (clear-stream _test-error-stream)
1372 (clear-stream $_test-error-buffered-file->buffer)
1373
1374 68/push 0/imm32
1375 68/push 0/imm32
1376 89/<- %edx 4/r32/esp
1377 (tailor-exit-descriptor %edx 0x10)
1378
1379 (write _test-input-stream "fn foo {\n")
1380 (write _test-input-stream " var x/ecx: int <- copy 10\n")
1381 (write _test-input-stream "}\n")
1382
1383 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1384
1385
1386 89/<- %edx 4/r32/esp
1387 (flush _test-output-buffered-file)
1388 (flush _test-error-buffered-file)
1389 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1395
1396 (check-stream-equal _test-output-stream "" "F - test-initializer-in-hex: output should be empty")
1397 (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")
1398
1399 (check-ints-equal *(edx+4) 2 "F - test-initializer-in-hex: exit status")
1400
1401 81 0/subop/add %esp 8/imm32
1402
1403 5d/pop-to-ebp
1404 c3/return
1405
1406 test-convert-function-with-second-local-var-in-same-reg:
1407
1408 55/push-ebp
1409 89/<- %ebp 4/r32/esp
1410
1411 (clear-stream _test-input-stream)
1412 (clear-stream $_test-input-buffered-file->buffer)
1413 (clear-stream _test-output-stream)
1414 (clear-stream $_test-output-buffered-file->buffer)
1415
1416 (write _test-input-stream "fn foo {\n")
1417 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1418 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1419 (write _test-input-stream " y <- increment\n")
1420 (write _test-input-stream "}\n")
1421
1422 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1423 (flush _test-output-buffered-file)
1424 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1430
1431 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-second-local-var-in-same-reg/0")
1432 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-second-local-var-in-same-reg/1")
1433 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/2")
1434 (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")
1435 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-second-local-var-in-same-reg/4")
1436 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-second-local-var-in-same-reg/5")
1437 (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")
1438 (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")
1439 (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")
1440 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-convert-function-with-second-local-var-in-same-reg/9")
1441 (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")
1442 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-second-local-var-in-same-reg/11")
1443 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-second-local-var-in-same-reg/12")
1444 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-second-local-var-in-same-reg/13")
1445 (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")
1446 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-second-local-var-in-same-reg/15")
1447 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-second-local-var-in-same-reg/16")
1448
1449 89/<- %esp 5/r32/ebp
1450 5d/pop-to-ebp
1451 c3/return
1452
1453 test-read-clobbered-reg-var:
1454
1455 55/push-ebp
1456 89/<- %ebp 4/r32/esp
1457
1458 (clear-stream _test-input-stream)
1459 (clear-stream $_test-input-buffered-file->buffer)
1460 (clear-stream _test-output-stream)
1461 (clear-stream $_test-output-buffered-file->buffer)
1462 (clear-stream _test-error-stream)
1463 (clear-stream $_test-error-buffered-file->buffer)
1464
1465 68/push 0/imm32
1466 68/push 0/imm32
1467 89/<- %edx 4/r32/esp
1468 (tailor-exit-descriptor %edx 0x10)
1469
1470 (write _test-input-stream "fn foo {\n")
1471 (write _test-input-stream " var x/ecx: int <- copy 3\n")
1472 (write _test-input-stream " var y/ecx: int <- copy 4\n")
1473 (write _test-input-stream " x <- increment\n")
1474 (write _test-input-stream "}\n")
1475
1476 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1477
1478
1479 89/<- %edx 4/r32/esp
1480 (flush _test-output-buffered-file)
1481 (flush _test-error-buffered-file)
1482 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1488
1489 (check-stream-equal _test-output-stream "" "F - test-read-clobbered-reg-var: output should be empty")
1490 (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")
1491
1492 (check-ints-equal *(edx+4) 2 "F - test-read-clobbered-reg-var: exit status")
1493
1494 81 0/subop/add %esp 8/imm32
1495
1496 5d/pop-to-ebp
1497 c3/return
1498
1499 test-overlapping-int-fp-registers:
1500
1501 55/push-ebp
1502 89/<- %ebp 4/r32/esp
1503
1504 (clear-stream _test-input-stream)
1505 (clear-stream $_test-input-buffered-file->buffer)
1506 (clear-stream _test-output-stream)
1507 (clear-stream $_test-output-buffered-file->buffer)
1508 (clear-stream _test-error-stream)
1509 (clear-stream $_test-error-buffered-file->buffer)
1510
1511 68/push 0/imm32
1512 68/push 0/imm32
1513 89/<- %edx 4/r32/esp
1514 (tailor-exit-descriptor %edx 0x10)
1515
1516 (write _test-input-stream "fn foo {\n")
1517 (write _test-input-stream " var x/eax: int <- copy 3\n")
1518 (write _test-input-stream " var y/xmm0: float <- convert x\n")
1519 (write _test-input-stream " x <- increment\n")
1520 (write _test-input-stream "}\n")
1521
1522 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1523
1524
1525 89/<- %edx 4/r32/esp
1526 (flush _test-output-buffered-file)
1527 (flush _test-error-buffered-file)
1528 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1534
1535 (check-next-stream-line-equal _test-error-stream "" "F - test-overlapping-int-fp-registers: error message")
1536
1537
1538 81 0/subop/add %esp 8/imm32
1539
1540 5d/pop-to-ebp
1541 c3/return
1542
1543 test-convert-function-call:
1544
1545 55/push-ebp
1546 89/<- %ebp 4/r32/esp
1547
1548 (clear-stream _test-input-stream)
1549 (clear-stream $_test-input-buffered-file->buffer)
1550 (clear-stream _test-output-stream)
1551 (clear-stream $_test-output-buffered-file->buffer)
1552
1553 (write _test-input-stream "fn main -> _/ebx: int {\n")
1554 (write _test-input-stream " var result/ebx: int <- foo\n")
1555 (write _test-input-stream " return result\n")
1556 (write _test-input-stream "}\n")
1557 (write _test-input-stream "fn foo -> result/ebx: int {\n")
1558 (write _test-input-stream " var result/ebx: int <- copy 3\n")
1559 (write _test-input-stream " return result\n")
1560 (write _test-input-stream "}\n")
1561
1562 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1563 (flush _test-output-buffered-file)
1564 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1570
1571 (check-next-stream-line-equal _test-output-stream "main:" "F - test-convert-function-call/0")
1572 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/1")
1573 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/2")
1574 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/3")
1575 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/4")
1576 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:loop:" "F - test-convert-function-call/5")
1577 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
1578 (check-next-stream-line-equal _test-output-stream " (foo)" "F - test-convert-function-call/6")
1579 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1580 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
1581 (check-next-stream-line-equal _test-output-stream " e9/jump $main:0x00000001:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1582 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/7")
1583 (check-next-stream-line-equal _test-output-stream "$main:0x00000001:break:" "F - test-convert-function-call/8")
1584 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/9")
1585 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/10")
1586 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/11")
1587 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/12")
1588 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call/13")
1589 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call/14")
1590 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call/15")
1591 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call/16")
1592 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call/17")
1593 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-call/18")
1594 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-function-call-with-literal-arg/6")
1595 (check-next-stream-line-equal _test-output-stream " bb/copy-to-ebx 3/imm32" "F - test-convert-function-call/19")
1596 (check-next-stream-line-equal _test-output-stream " 8b/-> %ebx 0x00000003/r32" "F - test-convert-function-call-with-literal-arg/8")
1597 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-function-call-with-literal-arg/27")
1598 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-call-with-literal-arg/10")
1599 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call/20")
1600 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call/21")
1601 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call/22")
1602 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call/23")
1603 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call/24")
1604 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call/25")
1605
1606 89/<- %esp 5/r32/ebp
1607 5d/pop-to-ebp
1608 c3/return
1609
1610 test-convert-function-call-with-inout-with-compound-type:
1611
1612 55/push-ebp
1613 89/<- %ebp 4/r32/esp
1614
1615 (clear-stream _test-input-stream)
1616 (clear-stream $_test-input-buffered-file->buffer)
1617 (clear-stream _test-output-stream)
1618 (clear-stream $_test-output-buffered-file->buffer)
1619
1620 (write _test-input-stream "fn f {\n")
1621 (write _test-input-stream " var x: (addr int)\n")
1622 (write _test-input-stream " g x\n")
1623 (write _test-input-stream "}\n")
1624 (write _test-input-stream "fn g a: (addr int) {\n")
1625 (write _test-input-stream "}\n")
1626
1627 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
1628 (flush _test-output-buffered-file)
1629 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
1635
1636 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-inout-with-compound-type/0")
1637 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/1")
1638 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/2")
1639 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/3")
1640 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-inout-with-compound-type/4")
1641 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-inout-with-compound-type/5")
1642 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-inout-with-compound-type/6")
1643 (check-next-stream-line-equal _test-output-stream " (g *(ebp+0xfffffffc))" "F - test-convert-function-call-with-inout-with-compound-type/7")
1644 (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")
1645 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-inout-with-compound-type/9")
1646 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-inout-with-compound-type/10")
1647 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/11")
1648 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/12")
1649 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/13")
1650 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/14")
1651 (check-next-stream-line-equal _test-output-stream "g:" "F - test-convert-function-call-with-inout-with-compound-type/15")
1652 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-inout-with-compound-type/16")
1653 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-inout-with-compound-type/17")
1654 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-call-with-inout-with-compound-type/18")
1655 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-inout-with-compound-type/19")
1656 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-inout-with-compound-type/20")
1657 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-inout-with-compound-type/21")
1658 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-inout-with-compound-type/22")
1659
1660 89/<- %esp 5/r32/ebp
1661 5d/pop-to-ebp
1662 c3/return
1663
1664 test-convert-function-call-with-inout-with-type-parameter:
1665
1666 55/push-ebp
1667 89/<- %ebp 4/r32/esp
1668
1669 (clear-stream _test-input-stream)
1670 (clear-stream $_test-input-buffered-file->buffer)
1671 (clear-stream _test-output-stream)
1672 (clear-stream $_test-output-buffered-file->buffer)
1673 (clear-stream _test-error-stream)
1674 (clear-stream $_test-error-buffered-file->buffer)
1675
1676 68/push 0/imm32
1677 68/push 0/imm32
1678 89/<- %edx 4/r32/esp
1679 (tailor-exit-descriptor %edx 0x10)
1680
1681 (write _test-input-stream "fn f {\n")
1682 (write _test-input-stream " var x: (addr int)\n")
1683 (write _test-input-stream " g x\n")
1684 (write _test-input-stream "}\n")
1685 (write _test-input-stream "fn g a: (addr _) {\n")
1686 (write _test-input-stream "}\n")
1687
1688 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1689
1690
1691 89/<- %edx 4/r32/esp
1692 (flush _test-output-buffered-file)
1693 (flush _test-error-buffered-file)
1694 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1700
1701 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-type-parameter: error stream should be empty")
1702
1703
1704 81 0/subop/add %esp 8/imm32
1705
1706 5d/pop-to-ebp
1707 c3/return
1708
1709 test-convert-function-call-with-incorrect-inout-type:
1710
1711 55/push-ebp
1712 89/<- %ebp 4/r32/esp
1713
1714 (clear-stream _test-input-stream)
1715 (clear-stream $_test-input-buffered-file->buffer)
1716 (clear-stream _test-output-stream)
1717 (clear-stream $_test-output-buffered-file->buffer)
1718 (clear-stream _test-error-stream)
1719 (clear-stream $_test-error-buffered-file->buffer)
1720
1721 68/push 0/imm32
1722 68/push 0/imm32
1723 89/<- %edx 4/r32/esp
1724 (tailor-exit-descriptor %edx 0x10)
1725
1726 (write _test-input-stream "fn f {\n")
1727 (write _test-input-stream " var x: int\n")
1728 (write _test-input-stream " g x\n")
1729 (write _test-input-stream "}\n")
1730 (write _test-input-stream "fn g a: foo {\n")
1731 (write _test-input-stream "}\n")
1732
1733 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1734
1735
1736 89/<- %edx 4/r32/esp
1737 (flush _test-output-buffered-file)
1738 (flush _test-error-buffered-file)
1739 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1745
1746 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-inout-type: output should be empty")
1747 (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")
1748
1749 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-inout-type: exit status")
1750
1751 81 0/subop/add %esp 8/imm32
1752 5d/pop-to-ebp
1753 c3/return
1754
1755 test-convert-function-call-with-inout-with-incorrect-compound-type:
1756
1757 55/push-ebp
1758 89/<- %ebp 4/r32/esp
1759
1760 (clear-stream _test-input-stream)
1761 (clear-stream $_test-input-buffered-file->buffer)
1762 (clear-stream _test-output-stream)
1763 (clear-stream $_test-output-buffered-file->buffer)
1764 (clear-stream _test-error-stream)
1765 (clear-stream $_test-error-buffered-file->buffer)
1766
1767 68/push 0/imm32
1768 68/push 0/imm32
1769 89/<- %edx 4/r32/esp
1770 (tailor-exit-descriptor %edx 0x10)
1771
1772 (write _test-input-stream "fn f {\n")
1773 (write _test-input-stream " var x: (addr int)\n")
1774 (write _test-input-stream " g x\n")
1775 (write _test-input-stream "}\n")
1776 (write _test-input-stream "fn g a: (addr bool) {\n")
1777 (write _test-input-stream "}\n")
1778
1779 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1780
1781
1782 89/<- %edx 4/r32/esp
1783 (flush _test-output-buffered-file)
1784 (flush _test-error-buffered-file)
1785 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1791
1792 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incorrect-compound-type: output should be empty")
1793 (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")
1794
1795 81 0/subop/add %esp 8/imm32
1796
1797 5d/pop-to-ebp
1798 c3/return
1799
1800 test-convert-function-call-with-inout-with-multiple-type-parameters:
1801
1802 55/push-ebp
1803 89/<- %ebp 4/r32/esp
1804
1805 (clear-stream _test-input-stream)
1806 (clear-stream $_test-input-buffered-file->buffer)
1807 (clear-stream _test-output-stream)
1808 (clear-stream $_test-output-buffered-file->buffer)
1809 (clear-stream _test-error-stream)
1810 (clear-stream $_test-error-buffered-file->buffer)
1811
1812 68/push 0/imm32
1813 68/push 0/imm32
1814 89/<- %edx 4/r32/esp
1815 (tailor-exit-descriptor %edx 0x10)
1816
1817 (write _test-input-stream "fn f {\n")
1818 (write _test-input-stream " var x: (addr int)\n")
1819 (write _test-input-stream " var y: (addr int)\n")
1820 (write _test-input-stream " g x, y\n")
1821 (write _test-input-stream "}\n")
1822 (write _test-input-stream "fn g a: (addr _), b: (addr _) {\n")
1823 (write _test-input-stream "}\n")
1824
1825 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1826
1827
1828 89/<- %edx 4/r32/esp
1829 (flush _test-output-buffered-file)
1830 (flush _test-error-buffered-file)
1831 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1837
1838 (check-stream-equal _test-error-stream "" "F - test-convert-function-call-with-inout-with-multiple-type-parameters: error stream should be empty")
1839
1840
1841 81 0/subop/add %esp 8/imm32
1842
1843 5d/pop-to-ebp
1844 c3/return
1845
1846 test-type-parameter-matches-rest-of-type:
1847
1848 55/push-ebp
1849 89/<- %ebp 4/r32/esp
1850
1851 (clear-stream _test-input-stream)
1852 (clear-stream $_test-input-buffered-file->buffer)
1853 (clear-stream _test-output-stream)
1854 (clear-stream $_test-output-buffered-file->buffer)
1855 (clear-stream _test-error-stream)
1856 (clear-stream $_test-error-buffered-file->buffer)
1857
1858 68/push 0/imm32
1859 68/push 0/imm32
1860 89/<- %edx 4/r32/esp
1861 (tailor-exit-descriptor %edx 0x10)
1862
1863 (write _test-input-stream "fn f {\n")
1864 (write _test-input-stream " var x: (addr array int)\n")
1865 (write _test-input-stream " g x\n")
1866 (write _test-input-stream "}\n")
1867 (write _test-input-stream "fn g a: (addr _) {\n")
1868 (write _test-input-stream "}\n")
1869
1870 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1871
1872
1873 89/<- %edx 4/r32/esp
1874 (flush _test-output-buffered-file)
1875 (flush _test-error-buffered-file)
1876 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1882
1883 (check-stream-equal _test-error-stream "" "F - test-type-parameter-matches-rest-of-type: error stream should be empty")
1884
1885
1886 81 0/subop/add %esp 8/imm32
1887
1888 5d/pop-to-ebp
1889 c3/return
1890
1891 test-convert-function-call-with-inout-with-incompatible-type-parameters:
1892
1893 55/push-ebp
1894 89/<- %ebp 4/r32/esp
1895
1896 (clear-stream _test-input-stream)
1897 (clear-stream $_test-input-buffered-file->buffer)
1898 (clear-stream _test-output-stream)
1899 (clear-stream $_test-output-buffered-file->buffer)
1900 (clear-stream _test-error-stream)
1901 (clear-stream $_test-error-buffered-file->buffer)
1902
1903 68/push 0/imm32
1904 68/push 0/imm32
1905 89/<- %edx 4/r32/esp
1906 (tailor-exit-descriptor %edx 0x10)
1907
1908 (write _test-input-stream "fn f {\n")
1909 (write _test-input-stream " var x: (addr int)\n")
1910 (write _test-input-stream " var y: (addr boolean)\n")
1911 (write _test-input-stream " g x, y\n")
1912 (write _test-input-stream "}\n")
1913 (write _test-input-stream "fn g a: (addr _T), b: (addr _T) {\n")
1914 (write _test-input-stream "}\n")
1915
1916 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1917
1918
1919 89/<- %edx 4/r32/esp
1920 (flush _test-output-buffered-file)
1921 (flush _test-error-buffered-file)
1922 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1928
1929 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-inout-with-incompatible-type-parameters: output should be empty")
1930 (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")
1931
1932 81 0/subop/add %esp 8/imm32
1933
1934 5d/pop-to-ebp
1935 c3/return
1936
1937 test-convert-function-call-with-too-few-inouts:
1938
1939 55/push-ebp
1940 89/<- %ebp 4/r32/esp
1941
1942 (clear-stream _test-input-stream)
1943 (clear-stream $_test-input-buffered-file->buffer)
1944 (clear-stream _test-output-stream)
1945 (clear-stream $_test-output-buffered-file->buffer)
1946 (clear-stream _test-error-stream)
1947 (clear-stream $_test-error-buffered-file->buffer)
1948
1949 68/push 0/imm32
1950 68/push 0/imm32
1951 89/<- %edx 4/r32/esp
1952 (tailor-exit-descriptor %edx 0x10)
1953
1954 (write _test-input-stream "fn f {\n")
1955 (write _test-input-stream " g\n")
1956 (write _test-input-stream "}\n")
1957 (write _test-input-stream "fn g a: int {\n")
1958 (write _test-input-stream "}\n")
1959
1960 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
1961
1962
1963 89/<- %edx 4/r32/esp
1964 (flush _test-output-buffered-file)
1965 (flush _test-error-buffered-file)
1966 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
1972
1973 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-inouts: output should be empty")
1974 (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")
1975
1976 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-inouts: exit status")
1977
1978 81 0/subop/add %esp 8/imm32
1979 5d/pop-to-ebp
1980 c3/return
1981
1982 test-convert-function-call-with-too-many-inouts:
1983
1984 55/push-ebp
1985 89/<- %ebp 4/r32/esp
1986
1987 (clear-stream _test-input-stream)
1988 (clear-stream $_test-input-buffered-file->buffer)
1989 (clear-stream _test-output-stream)
1990 (clear-stream $_test-output-buffered-file->buffer)
1991 (clear-stream _test-error-stream)
1992 (clear-stream $_test-error-buffered-file->buffer)
1993
1994 68/push 0/imm32
1995 68/push 0/imm32
1996 89/<- %edx 4/r32/esp
1997 (tailor-exit-descriptor %edx 0x10)
1998
1999 (write _test-input-stream "fn f {\n")
2000 (write _test-input-stream " var x: int\n")
2001 (write _test-input-stream " g x\n")
2002 (write _test-input-stream "}\n")
2003 (write _test-input-stream "fn g {\n")
2004 (write _test-input-stream "}\n")
2005
2006 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2007
2008
2009 89/<- %edx 4/r32/esp
2010 (flush _test-output-buffered-file)
2011 (flush _test-error-buffered-file)
2012 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2018
2019 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-inouts: output should be empty")
2020 (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")
2021
2022 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-inouts: exit status")
2023
2024 81 0/subop/add %esp 8/imm32
2025 5d/pop-to-ebp
2026 c3/return
2027
2028 test-convert-function-call-with-incorrect-output-type:
2029
2030 55/push-ebp
2031 89/<- %ebp 4/r32/esp
2032
2033 (clear-stream _test-input-stream)
2034 (clear-stream $_test-input-buffered-file->buffer)
2035 (clear-stream _test-output-stream)
2036 (clear-stream $_test-output-buffered-file->buffer)
2037 (clear-stream _test-error-stream)
2038 (clear-stream $_test-error-buffered-file->buffer)
2039
2040 68/push 0/imm32
2041 68/push 0/imm32
2042 89/<- %edx 4/r32/esp
2043 (tailor-exit-descriptor %edx 0x10)
2044
2045 (write _test-input-stream "fn f {\n")
2046 (write _test-input-stream " var x/eax: int <- g\n")
2047 (write _test-input-stream "}\n")
2048 (write _test-input-stream "fn g -> a/eax: foo {\n")
2049 (write _test-input-stream "}\n")
2050
2051 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2052
2053
2054 89/<- %edx 4/r32/esp
2055 (flush _test-output-buffered-file)
2056 (flush _test-error-buffered-file)
2057 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2063
2064 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-type: output should be empty")
2065 (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")
2066
2067 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-type: exit status")
2068
2069 81 0/subop/add %esp 8/imm32
2070 5d/pop-to-ebp
2071 c3/return
2072
2073 test-convert-function-call-with-too-few-outputs:
2074
2075 55/push-ebp
2076 89/<- %ebp 4/r32/esp
2077
2078 (clear-stream _test-input-stream)
2079 (clear-stream $_test-input-buffered-file->buffer)
2080 (clear-stream _test-output-stream)
2081 (clear-stream $_test-output-buffered-file->buffer)
2082 (clear-stream _test-error-stream)
2083 (clear-stream $_test-error-buffered-file->buffer)
2084
2085 68/push 0/imm32
2086 68/push 0/imm32
2087 89/<- %edx 4/r32/esp
2088 (tailor-exit-descriptor %edx 0x10)
2089
2090 (write _test-input-stream "fn f {\n")
2091 (write _test-input-stream " g\n")
2092 (write _test-input-stream "}\n")
2093 (write _test-input-stream "fn g -> a/eax: int {\n")
2094 (write _test-input-stream "}\n")
2095
2096 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2097
2098
2099 89/<- %edx 4/r32/esp
2100 (flush _test-output-buffered-file)
2101 (flush _test-error-buffered-file)
2102 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2108
2109 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-few-outputs: output should be empty")
2110 (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")
2111
2112 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-few-outputs: exit status")
2113
2114 81 0/subop/add %esp 8/imm32
2115 5d/pop-to-ebp
2116 c3/return
2117
2118 test-convert-function-call-with-too-many-outputs:
2119
2120 55/push-ebp
2121 89/<- %ebp 4/r32/esp
2122
2123 (clear-stream _test-input-stream)
2124 (clear-stream $_test-input-buffered-file->buffer)
2125 (clear-stream _test-output-stream)
2126 (clear-stream $_test-output-buffered-file->buffer)
2127 (clear-stream _test-error-stream)
2128 (clear-stream $_test-error-buffered-file->buffer)
2129
2130 68/push 0/imm32
2131 68/push 0/imm32
2132 89/<- %edx 4/r32/esp
2133 (tailor-exit-descriptor %edx 0x10)
2134
2135 (write _test-input-stream "fn f {\n")
2136 (write _test-input-stream " var x/eax: int <- g\n")
2137 (write _test-input-stream "}\n")
2138 (write _test-input-stream "fn g {\n")
2139 (write _test-input-stream "}\n")
2140
2141 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2142
2143
2144 89/<- %edx 4/r32/esp
2145 (flush _test-output-buffered-file)
2146 (flush _test-error-buffered-file)
2147 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2153
2154 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-too-many-outputs: output should be empty")
2155 (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")
2156
2157 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-too-many-outputs: exit status")
2158
2159 81 0/subop/add %esp 8/imm32
2160 5d/pop-to-ebp
2161 c3/return
2162
2163 test-convert-function-call-with-missing-output-register:
2164
2165 55/push-ebp
2166 89/<- %ebp 4/r32/esp
2167
2168 (clear-stream _test-input-stream)
2169 (clear-stream $_test-input-buffered-file->buffer)
2170 (clear-stream _test-output-stream)
2171 (clear-stream $_test-output-buffered-file->buffer)
2172 (clear-stream _test-error-stream)
2173 (clear-stream $_test-error-buffered-file->buffer)
2174
2175 68/push 0/imm32
2176 68/push 0/imm32
2177 89/<- %edx 4/r32/esp
2178 (tailor-exit-descriptor %edx 0x10)
2179
2180 (write _test-input-stream "fn f {\n")
2181 (write _test-input-stream " var x: int\n")
2182 (write _test-input-stream " x <- g\n")
2183 (write _test-input-stream "}\n")
2184 (write _test-input-stream "fn g -> a/eax: int {\n")
2185 (write _test-input-stream "}\n")
2186
2187 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2188
2189
2190 89/<- %edx 4/r32/esp
2191 (flush _test-output-buffered-file)
2192 (flush _test-error-buffered-file)
2193 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2199
2200 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-missing-output-register: output should be empty")
2201 (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")
2202
2203 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-missing-output-register: exit status")
2204
2205 81 0/subop/add %esp 8/imm32
2206 5d/pop-to-ebp
2207 c3/return
2208
2209 test-convert-function-call-with-incorrect-output-register:
2210
2211 55/push-ebp
2212 89/<- %ebp 4/r32/esp
2213
2214 (clear-stream _test-input-stream)
2215 (clear-stream $_test-input-buffered-file->buffer)
2216 (clear-stream _test-output-stream)
2217 (clear-stream $_test-output-buffered-file->buffer)
2218 (clear-stream _test-error-stream)
2219 (clear-stream $_test-error-buffered-file->buffer)
2220
2221 68/push 0/imm32
2222 68/push 0/imm32
2223 89/<- %edx 4/r32/esp
2224 (tailor-exit-descriptor %edx 0x10)
2225
2226 (write _test-input-stream "fn f {\n")
2227 (write _test-input-stream " var x/ecx: int <- g\n")
2228 (write _test-input-stream "}\n")
2229 (write _test-input-stream "fn g -> a/eax: int {\n")
2230 (write _test-input-stream "}\n")
2231
2232 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2233
2234
2235 89/<- %edx 4/r32/esp
2236 (flush _test-output-buffered-file)
2237 (flush _test-error-buffered-file)
2238 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2244
2245 (check-stream-equal _test-output-stream "" "F - test-convert-function-call-with-incorrect-output-register: output should be empty")
2246 (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")
2247
2248 (check-ints-equal *(edx+4) 2 "F - test-convert-function-call-with-incorrect-output-register: exit status")
2249
2250 81 0/subop/add %esp 8/imm32
2251 5d/pop-to-ebp
2252 c3/return
2253
2254 test-convert-function-with-local-var-dereferenced:
2255
2256 55/push-ebp
2257 89/<- %ebp 4/r32/esp
2258
2259 (clear-stream _test-input-stream)
2260 (clear-stream $_test-input-buffered-file->buffer)
2261 (clear-stream _test-output-stream)
2262 (clear-stream $_test-output-buffered-file->buffer)
2263
2264 (write _test-input-stream "fn foo {\n")
2265 (write _test-input-stream " var x/ecx: (addr int) <- copy 0\n")
2266 (write _test-input-stream " increment *x\n")
2267 (write _test-input-stream "}\n")
2268
2269 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2270 (flush _test-output-buffered-file)
2271 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2277
2278 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-dereferenced/0")
2279 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-dereferenced/1")
2280 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-dereferenced/2")
2281 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-dereferenced/3")
2282 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-dereferenced/4")
2283 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-dereferenced/5")
2284 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-local-var-dereferenced/6")
2285 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-local-var-dereferenced/7")
2286 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-with-local-var-dereferenced/8")
2287 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-local-var-dereferenced/9")
2288 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-dereferenced/10")
2289 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-dereferenced/11")
2290 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-dereferenced/12")
2291 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-dereferenced/13")
2292 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-dereferenced/14")
2293 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-dereferenced/15")
2294
2295 89/<- %esp 5/r32/ebp
2296 5d/pop-to-ebp
2297 c3/return
2298
2299
2300 test-convert-function-with-byte-operations:
2301
2302 55/push-ebp
2303 89/<- %ebp 4/r32/esp
2304
2305 (clear-stream _test-input-stream)
2306 (clear-stream $_test-input-buffered-file->buffer)
2307 (clear-stream _test-output-stream)
2308 (clear-stream $_test-output-buffered-file->buffer)
2309
2310 (write _test-input-stream "fn foo {\n")
2311 (write _test-input-stream " var x/eax: byte <- copy 0\n")
2312 (write _test-input-stream " var y/ecx: byte <- copy 0\n")
2313 (write _test-input-stream " y <- copy-byte x\n")
2314 (write _test-input-stream " var z/edx: (addr byte) <- copy 0\n")
2315 (write _test-input-stream " y <- copy-byte *z\n")
2316 (write _test-input-stream " copy-byte-to *z, x\n")
2317 (write _test-input-stream "}\n")
2318
2319 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2320 (flush _test-output-buffered-file)
2321 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2327
2328 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-byte-operations/0")
2329 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-byte-operations/1")
2330 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-byte-operations/2")
2331 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-byte-operations/3")
2332 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-byte-operations/4")
2333 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-byte-operations/5")
2334 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-byte-operations/6")
2335 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-function-with-byte-operations/7")
2336 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-byte-operations/8")
2337 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-byte-operations/9")
2338 (check-next-stream-line-equal _test-output-stream " 8a/byte-> %eax 0x00000001/r32" "F - test-convert-function-with-byte-operations/10")
2339 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-convert-function-with-byte-operations/11")
2340 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 0/imm32" "F - test-convert-function-with-byte-operations/12")
2341 (check-next-stream-line-equal _test-output-stream " 8a/byte-> *edx 0x00000001/r32" "F - test-convert-function-with-byte-operations/13")
2342 (check-next-stream-line-equal _test-output-stream " 88/byte<- *edx 0x00000000/r32" "F - test-convert-function-with-byte-operations/14")
2343 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-convert-function-with-byte-operations/15")
2344 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-byte-operations/16")
2345 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-byte-operations/17")
2346 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-byte-operations/18")
2347 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-byte-operations/19")
2348 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-byte-operations/20")
2349 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-byte-operations/21")
2350 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-byte-operations/22")
2351 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-byte-operations/23")
2352
2353 89/<- %esp 5/r32/ebp
2354 5d/pop-to-ebp
2355 c3/return
2356
2357
2358 test-copy-byte-var-from-fn-arg:
2359
2360 55/push-ebp
2361 89/<- %ebp 4/r32/esp
2362
2363 (clear-stream _test-input-stream)
2364 (clear-stream $_test-input-buffered-file->buffer)
2365 (clear-stream _test-output-stream)
2366 (clear-stream $_test-output-buffered-file->buffer)
2367
2368 (write _test-input-stream "fn foo x: byte, y: int {\n")
2369 (write _test-input-stream " var a/eax: byte <- copy x\n")
2370 (write _test-input-stream " var b/eax: int <- copy y\n")
2371 (write _test-input-stream "}\n")
2372
2373 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2374 (flush _test-output-buffered-file)
2375 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2381
2382 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-copy-byte-from-fn-arg/0")
2383 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-copy-byte-from-fn-arg/1")
2384 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-copy-byte-from-fn-arg/2")
2385 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-copy-byte-from-fn-arg/3")
2386 (check-next-stream-line-equal _test-output-stream " {" "F - test-copy-byte-from-fn-arg/4")
2387 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-copy-byte-from-fn-arg/5")
2388 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-copy-byte-from-fn-arg/6")
2389 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/7")
2390 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x0000000c) 0x00000000/r32" "F - test-copy-byte-from-fn-arg/8")
2391 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-copy-byte-from-fn-arg/9")
2392 (check-next-stream-line-equal _test-output-stream " }" "F - test-copy-byte-from-fn-arg/10")
2393 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-copy-byte-from-fn-arg/11")
2394 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-copy-byte-from-fn-arg/12")
2395 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-copy-byte-from-fn-arg/13")
2396 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-copy-byte-from-fn-arg/14")
2397 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-copy-byte-from-fn-arg/15")
2398
2399 89/<- %esp 5/r32/ebp
2400 5d/pop-to-ebp
2401 c3/return
2402
2403 test-convert-compare-register-with-literal:
2404
2405 55/push-ebp
2406 89/<- %ebp 4/r32/esp
2407
2408 (clear-stream _test-input-stream)
2409 (clear-stream $_test-input-buffered-file->buffer)
2410 (clear-stream _test-output-stream)
2411 (clear-stream $_test-output-buffered-file->buffer)
2412
2413 (write _test-input-stream "fn foo {\n")
2414 (write _test-input-stream " var x/ecx: int <- copy 0\n")
2415 (write _test-input-stream " compare x, 0\n")
2416 (write _test-input-stream "}\n")
2417
2418 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2419 (flush _test-output-buffered-file)
2420 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2426
2427 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-compare-register-with-literal/0")
2428 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-compare-register-with-literal/1")
2429 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-compare-register-with-literal/2")
2430 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-compare-register-with-literal/3")
2431 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-compare-register-with-literal/4")
2432 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-compare-register-with-literal/5")
2433 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
2434 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-compare-register-with-literal/7")
2435 (check-next-stream-line-equal _test-output-stream " 81 7/subop/compare %ecx 0/imm32" "F - test-convert-compare-register-with-literal/8")
2436 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
2437 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-compare-register-with-literal/10")
2438 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-compare-register-with-literal/11")
2439 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-compare-register-with-literal/12")
2440 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-compare-register-with-literal/13")
2441 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-compare-register-with-literal/14")
2442 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-compare-register-with-literal/15")
2443
2444 89/<- %esp 5/r32/ebp
2445 5d/pop-to-ebp
2446 c3/return
2447
2448 test-unknown-variable:
2449
2450 55/push-ebp
2451 89/<- %ebp 4/r32/esp
2452
2453 (clear-stream _test-input-stream)
2454 (clear-stream $_test-input-buffered-file->buffer)
2455 (clear-stream _test-output-stream)
2456 (clear-stream $_test-output-buffered-file->buffer)
2457 (clear-stream _test-error-stream)
2458 (clear-stream $_test-error-buffered-file->buffer)
2459
2460 68/push 0/imm32
2461 68/push 0/imm32
2462 89/<- %edx 4/r32/esp
2463 (tailor-exit-descriptor %edx 0x10)
2464
2465 (write _test-input-stream "fn foo {\n")
2466 (write _test-input-stream " compare x, 0\n")
2467 (write _test-input-stream "}\n")
2468
2469 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2470
2471
2472 89/<- %edx 4/r32/esp
2473 (flush _test-output-buffered-file)
2474 (flush _test-error-buffered-file)
2475 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2481
2482 (check-stream-equal _test-output-stream "" "F - test-unknown-variable: output should be empty")
2483 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable: error message")
2484
2485 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable: exit status")
2486
2487 81 0/subop/add %esp 8/imm32
2488
2489 5d/pop-to-ebp
2490 c3/return
2491
2492 test-convert-function-with-local-var-in-block:
2493
2494 55/push-ebp
2495 89/<- %ebp 4/r32/esp
2496
2497 (clear-stream _test-input-stream)
2498 (clear-stream $_test-input-buffered-file->buffer)
2499 (clear-stream _test-output-stream)
2500 (clear-stream $_test-output-buffered-file->buffer)
2501
2502 (write _test-input-stream "fn foo {\n")
2503 (write _test-input-stream " {\n")
2504 (write _test-input-stream " var x: int\n")
2505 (write _test-input-stream " increment x\n")
2506 (write _test-input-stream " }\n")
2507 (write _test-input-stream "}\n")
2508
2509 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2510 (flush _test-output-buffered-file)
2511 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2517
2518 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-block/0")
2519 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-block/1")
2520 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-block/2")
2521 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-block/3")
2522 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/4")
2523 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-block/5")
2524 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-block/6")
2525 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-block/7")
2526 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-block/8")
2527 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-local-var-in-block/9")
2528 (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")
2529 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/11")
2530 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-block/12")
2531 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-block/13")
2532 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-block/14")
2533 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-block/15")
2534 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-block/16")
2535 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-block/17")
2536 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-block/18")
2537
2538 89/<- %esp 5/r32/ebp
2539 5d/pop-to-ebp
2540 c3/return
2541
2542 test-convert-function-with-local-var-in-mem-after-block:
2543
2544 55/push-ebp
2545 89/<- %ebp 4/r32/esp
2546
2547 (clear-stream _test-input-stream)
2548 (clear-stream $_test-input-buffered-file->buffer)
2549 (clear-stream _test-output-stream)
2550 (clear-stream $_test-output-buffered-file->buffer)
2551
2552 (write _test-input-stream "fn foo {\n")
2553 (write _test-input-stream " {\n")
2554 (write _test-input-stream " var y: int\n")
2555 (write _test-input-stream " }\n")
2556 (write _test-input-stream " var x: int\n")
2557 (write _test-input-stream " increment x\n")
2558 (write _test-input-stream "}\n")
2559
2560 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2561 (flush _test-output-buffered-file)
2562 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2568
2569 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-mem-after-block/0")
2570 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-mem-after-block/1")
2571 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/2")
2572 (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")
2573 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/4")
2574 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/5")
2575 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-mem-after-block/6")
2576 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-local-var-in-mem-after-block/7")
2577 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/8")
2578 (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")
2579 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/10")
2580 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-local-var-in-mem-after-block/11")
2581 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-mem-after-block/12")
2582 (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")
2583 (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")
2584 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-mem-after-block/15")
2585 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-mem-after-block/16")
2586 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-mem-after-block/17")
2587 (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")
2588 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-mem-after-block/19")
2589 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-mem-after-block/20")
2590
2591 89/<- %esp 5/r32/ebp
2592 5d/pop-to-ebp
2593 c3/return
2594
2595 test-convert-function-with-local-var-in-named-block:
2596
2597 55/push-ebp
2598 89/<- %ebp 4/r32/esp
2599
2600 (clear-stream _test-input-stream)
2601 (clear-stream $_test-input-buffered-file->buffer)
2602 (clear-stream _test-output-stream)
2603 (clear-stream $_test-output-buffered-file->buffer)
2604
2605 (write _test-input-stream "fn foo {\n")
2606 (write _test-input-stream " $bar: {\n")
2607 (write _test-input-stream " var x: int\n")
2608 (write _test-input-stream " increment x\n")
2609 (write _test-input-stream " }\n")
2610 (write _test-input-stream "}\n")
2611
2612 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2613 (flush _test-output-buffered-file)
2614 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2620
2621 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-in-named-block/0")
2622 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-in-named-block/1")
2623 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-in-named-block/2")
2624 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-var-in-named-block/3")
2625 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/4")
2626 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-in-named-block/5")
2627 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-in-named-block/6")
2628 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-local-var-in-named-block/7")
2629 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-in-named-block/8")
2630 (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")
2631 (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")
2632 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/11")
2633 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-local-var-in-named-block/12")
2634 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-in-named-block/13")
2635 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-in-named-block/14")
2636 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-in-named-block/15")
2637 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-var-in-named-block/16")
2638 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-in-named-block/17")
2639 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-in-named-block/18")
2640
2641 89/<- %esp 5/r32/ebp
2642 5d/pop-to-ebp
2643 c3/return
2644
2645 test-unknown-variable-in-named-block:
2646
2647 55/push-ebp
2648 89/<- %ebp 4/r32/esp
2649
2650 (clear-stream _test-input-stream)
2651 (clear-stream $_test-input-buffered-file->buffer)
2652 (clear-stream _test-output-stream)
2653 (clear-stream $_test-output-buffered-file->buffer)
2654 (clear-stream _test-error-stream)
2655 (clear-stream $_test-error-buffered-file->buffer)
2656
2657 68/push 0/imm32
2658 68/push 0/imm32
2659 89/<- %edx 4/r32/esp
2660 (tailor-exit-descriptor %edx 0x10)
2661
2662 (write _test-input-stream "fn foo {\n")
2663 (write _test-input-stream " $a: {\n")
2664 (write _test-input-stream " compare x, 0\n")
2665 (write _test-input-stream " }\n")
2666 (write _test-input-stream "}\n")
2667
2668 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
2669
2670
2671 89/<- %edx 4/r32/esp
2672 (flush _test-output-buffered-file)
2673 (flush _test-error-buffered-file)
2674 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2680
2681 (check-stream-equal _test-output-stream "" "F - test-unknown-variable-in-named-block: output should be empty")
2682 (check-next-stream-line-equal _test-error-stream "fn foo: unknown variable 'x'" "F - test-unknown-variable-in-named-block: error message")
2683
2684 (check-ints-equal *(edx+4) 2 "F - test-unknown-variable-in-named-block: exit status")
2685
2686 81 0/subop/add %esp 8/imm32
2687
2688 5d/pop-to-ebp
2689 c3/return
2690
2691 test-always-shadow-outermost-reg-vars-in-function:
2692
2693 55/push-ebp
2694 89/<- %ebp 4/r32/esp
2695
2696 (clear-stream _test-input-stream)
2697 (clear-stream $_test-input-buffered-file->buffer)
2698 (clear-stream _test-output-stream)
2699 (clear-stream $_test-output-buffered-file->buffer)
2700
2701 (write _test-input-stream "fn foo {\n")
2702 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2703 (write _test-input-stream "}\n")
2704
2705 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2706 (flush _test-output-buffered-file)
2707 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2713
2714 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-always-shadow-outermost-reg-vars-in-function/0")
2715 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-always-shadow-outermost-reg-vars-in-function/1")
2716 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/2")
2717 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-always-shadow-outermost-reg-vars-in-function/3")
2718 (check-next-stream-line-equal _test-output-stream " {" "F - test-always-shadow-outermost-reg-vars-in-function/4")
2719 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-always-shadow-outermost-reg-vars-in-function/5")
2720 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-compare-register-with-literal/6")
2721 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-always-shadow-outermost-reg-vars-in-function/8")
2722 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-compare-register-with-literal/9")
2723 (check-next-stream-line-equal _test-output-stream " }" "F - test-always-shadow-outermost-reg-vars-in-function/12")
2724 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-always-shadow-outermost-reg-vars-in-function/13")
2725 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-always-shadow-outermost-reg-vars-in-function/14")
2726 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-always-shadow-outermost-reg-vars-in-function/15")
2727 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-always-shadow-outermost-reg-vars-in-function/16")
2728 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-always-shadow-outermost-reg-vars-in-function/17")
2729
2730 89/<- %esp 5/r32/ebp
2731 5d/pop-to-ebp
2732 c3/return
2733
2734 test-shadow-local:
2735
2736 55/push-ebp
2737 89/<- %ebp 4/r32/esp
2738
2739 (clear-stream _test-input-stream)
2740 (clear-stream $_test-input-buffered-file->buffer)
2741 (clear-stream _test-output-stream)
2742 (clear-stream $_test-output-buffered-file->buffer)
2743
2744 (write _test-input-stream "fn foo {\n")
2745 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2746 (write _test-input-stream " {\n")
2747 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2748 (write _test-input-stream " }\n")
2749 (write _test-input-stream " x <- increment\n")
2750 (write _test-input-stream "}\n")
2751
2752 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2753 (flush _test-output-buffered-file)
2754 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2760
2761 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-local/0")
2762 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-local/1")
2763 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-local/2")
2764 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-local/3")
2765 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/4")
2766 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-local/5")
2767 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/6")
2768 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-local/7")
2769 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-local/8")
2770 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-local/9")
2771 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-local/10")
2772 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-shadow-local/11")
2773 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/12")
2774 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/13")
2775 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-local/14")
2776 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-local/15")
2777 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-local/16")
2778 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-local/17")
2779 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-local/18")
2780 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-local/19")
2781 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-local/20")
2782 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-local/21")
2783 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-local/22")
2784
2785 89/<- %esp 5/r32/ebp
2786 5d/pop-to-ebp
2787 c3/return
2788
2789 test-shadow-name:
2790
2791 55/push-ebp
2792 89/<- %ebp 4/r32/esp
2793
2794 (clear-stream _test-input-stream)
2795 (clear-stream $_test-input-buffered-file->buffer)
2796 (clear-stream _test-output-stream)
2797 (clear-stream $_test-output-buffered-file->buffer)
2798
2799 (write _test-input-stream "fn foo {\n")
2800 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2801 (write _test-input-stream " {\n")
2802 (write _test-input-stream " var x/edx: int <- copy 4\n")
2803 (write _test-input-stream " }\n")
2804 (write _test-input-stream " x <- increment\n")
2805 (write _test-input-stream "}\n")
2806
2807 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2808 (flush _test-output-buffered-file)
2809 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2815
2816 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name/0")
2817 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name/1")
2818 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name/2")
2819 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name/3")
2820 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/4")
2821 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name/5")
2822 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name/6")
2823 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name/7")
2824 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name/8")
2825 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name/9")
2826 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name/10")
2827 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name/11")
2828 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name/12")
2829 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/13")
2830 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name/14")
2831 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name/15")
2832 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name/16")
2833 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name/17")
2834 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name/18")
2835 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name/19")
2836 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name/20")
2837 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name/21")
2838 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name/22")
2839
2840 89/<- %esp 5/r32/ebp
2841 5d/pop-to-ebp
2842 c3/return
2843
2844 test-shadow-name-2:
2845
2846 55/push-ebp
2847 89/<- %ebp 4/r32/esp
2848
2849 (clear-stream _test-input-stream)
2850 (clear-stream $_test-input-buffered-file->buffer)
2851 (clear-stream _test-output-stream)
2852 (clear-stream $_test-output-buffered-file->buffer)
2853
2854 (write _test-input-stream "fn foo {\n")
2855 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2856 (write _test-input-stream " {\n")
2857 (write _test-input-stream " var x/edx: int <- copy 4\n")
2858 (write _test-input-stream " var y/ecx: int <- copy 5\n")
2859 (write _test-input-stream " }\n")
2860 (write _test-input-stream " x <- increment\n")
2861 (write _test-input-stream "}\n")
2862
2863 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2864 (flush _test-output-buffered-file)
2865 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2871
2872 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-shadow-name-2/0")
2873 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-shadow-name-2/1")
2874 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-shadow-name-2/2")
2875 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-shadow-name-2/3")
2876 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/4")
2877 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-shadow-name-2/5")
2878 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/6")
2879 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-shadow-name-2/7")
2880 (check-next-stream-line-equal _test-output-stream " {" "F - test-shadow-name-2/8")
2881 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-shadow-name-2/9")
2882 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %edx" "F - test-shadow-name-2/10")
2883 (check-next-stream-line-equal _test-output-stream " ba/copy-to-edx 4/imm32" "F - test-shadow-name-2/11")
2884 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-shadow-name-2/12")
2885 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 5/imm32" "F - test-shadow-name-2/13")
2886 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/14")
2887 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %edx" "F - test-shadow-name-2/15")
2888 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/16")
2889 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-shadow-name-2/17")
2890 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-shadow-name-2/18")
2891 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-shadow-name-2/19")
2892 (check-next-stream-line-equal _test-output-stream " }" "F - test-shadow-name-2/20")
2893 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-shadow-name-2/21")
2894 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-shadow-name-2/22")
2895 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-shadow-name-2/23")
2896 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-shadow-name-2/24")
2897 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-shadow-name-2/25")
2898
2899 89/<- %esp 5/r32/ebp
2900 5d/pop-to-ebp
2901 c3/return
2902
2903 test-do-not-spill-same-register-in-block:
2904
2905 55/push-ebp
2906 89/<- %ebp 4/r32/esp
2907
2908 (clear-stream _test-input-stream)
2909 (clear-stream $_test-input-buffered-file->buffer)
2910 (clear-stream _test-output-stream)
2911 (clear-stream $_test-output-buffered-file->buffer)
2912
2913 (write _test-input-stream "fn foo {\n")
2914 (write _test-input-stream " var x/ecx: int <- copy 3\n")
2915 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2916 (write _test-input-stream " y <- increment\n")
2917 (write _test-input-stream "}\n")
2918
2919 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2920 (flush _test-output-buffered-file)
2921 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2927
2928 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-do-not-spill-same-register-in-block/0")
2929 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-do-not-spill-same-register-in-block/1")
2930 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-do-not-spill-same-register-in-block/2")
2931 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-do-not-spill-same-register-in-block/3")
2932 (check-next-stream-line-equal _test-output-stream " {" "F - test-do-not-spill-same-register-in-block/4")
2933 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-do-not-spill-same-register-in-block/5")
2934 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-do-not-spill-same-register-in-block/6")
2935 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-do-not-spill-same-register-in-block/7")
2936 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-do-not-spill-same-register-in-block/8")
2937 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-do-not-spill-same-register-in-block/9")
2938 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-do-not-spill-same-register-in-block/10")
2939 (check-next-stream-line-equal _test-output-stream " }" "F - test-do-not-spill-same-register-in-block/11")
2940 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-do-not-spill-same-register-in-block/12")
2941 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-do-not-spill-same-register-in-block/13")
2942 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-do-not-spill-same-register-in-block/14")
2943 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-do-not-spill-same-register-in-block/15")
2944 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-do-not-spill-same-register-in-block/16")
2945
2946 89/<- %esp 5/r32/ebp
2947 5d/pop-to-ebp
2948 c3/return
2949
2950 test-spill-different-register-in-block:
2951
2952 55/push-ebp
2953 89/<- %ebp 4/r32/esp
2954
2955 (clear-stream _test-input-stream)
2956 (clear-stream $_test-input-buffered-file->buffer)
2957 (clear-stream _test-output-stream)
2958 (clear-stream $_test-output-buffered-file->buffer)
2959
2960 (write _test-input-stream "fn foo {\n")
2961 (write _test-input-stream " var x/eax: int <- copy 3\n")
2962 (write _test-input-stream " var y/ecx: int <- copy 4\n")
2963 (write _test-input-stream " y <- increment\n")
2964 (write _test-input-stream "}\n")
2965
2966 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
2967 (flush _test-output-buffered-file)
2968 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
2974
2975 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-spill-different-register-in-block/0")
2976 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-spill-different-register-in-block/1")
2977 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-spill-different-register-in-block/2")
2978 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-spill-different-register-in-block/3")
2979 (check-next-stream-line-equal _test-output-stream " {" "F - test-spill-different-register-in-block/4")
2980 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-spill-different-register-in-block/5")
2981 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-spill-different-register-in-block/6")
2982 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-spill-different-register-in-block/7")
2983 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-spill-different-register-in-block/8")
2984 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-spill-different-register-in-block/9")
2985 (check-next-stream-line-equal _test-output-stream " 41/increment-ecx" "F - test-spill-different-register-in-block/10")
2986 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-spill-different-register-in-block/11")
2987 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-spill-different-register-in-block/12")
2988 (check-next-stream-line-equal _test-output-stream " }" "F - test-spill-different-register-in-block/13")
2989 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-spill-different-register-in-block/14")
2990 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-spill-different-register-in-block/15")
2991 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-spill-different-register-in-block/16")
2992 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-spill-different-register-in-block/17")
2993 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-spill-different-register-in-block/18")
2994
2995 89/<- %esp 5/r32/ebp
2996 5d/pop-to-ebp
2997 c3/return
2998
2999 test-convert-function-with-branches-in-block:
3000
3001 55/push-ebp
3002 89/<- %ebp 4/r32/esp
3003
3004 (clear-stream _test-input-stream)
3005 (clear-stream $_test-input-buffered-file->buffer)
3006 (clear-stream _test-output-stream)
3007 (clear-stream $_test-output-buffered-file->buffer)
3008
3009 (write _test-input-stream "fn foo x: int {\n")
3010 (write _test-input-stream " {\n")
3011 (write _test-input-stream " break-if->=\n")
3012 (write _test-input-stream " loop-if-addr<\n")
3013 (write _test-input-stream " increment x\n")
3014 (write _test-input-stream " loop\n")
3015 (write _test-input-stream " }\n")
3016 (write _test-input-stream "}\n")
3017
3018 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3019 (flush _test-output-buffered-file)
3020 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3026
3027 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
3028 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
3029 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
3030 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
3031 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
3032 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
3033 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
3034 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
3035 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
3036 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
3037 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
3038 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
3039 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
3040 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
3041 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
3042 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
3043 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
3044 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
3045 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
3046 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
3047 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
3048 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
3049 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
3050 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
3051 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
3052 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
3053
3054 89/<- %esp 5/r32/ebp
3055 5d/pop-to-ebp
3056 c3/return
3057
3058 test-convert-function-with-branches-in-block-2:
3059
3060 55/push-ebp
3061 89/<- %ebp 4/r32/esp
3062
3063 (clear-stream _test-input-stream)
3064 (clear-stream $_test-input-buffered-file->buffer)
3065 (clear-stream _test-output-stream)
3066 (clear-stream $_test-output-buffered-file->buffer)
3067
3068 (write _test-input-stream "fn foo x: int {\n")
3069 (write _test-input-stream " {\n")
3070 (write _test-input-stream " break-if->=\n")
3071 (write _test-input-stream " loop-if-float<\n")
3072 (write _test-input-stream " increment x\n")
3073 (write _test-input-stream " loop\n")
3074 (write _test-input-stream " }\n")
3075 (write _test-input-stream "}\n")
3076
3077 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3078 (flush _test-output-buffered-file)
3079 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3085
3086 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-block/0")
3087 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-block/1")
3088 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-block/2")
3089 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-block/3")
3090 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/4")
3091 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-block/5")
3092 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/6")
3093 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-in-block/7")
3094 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/8")
3095 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-block/9")
3096 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-in-block/10")
3097 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/11")
3098 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-block/12")
3099 (check-next-stream-line-equal _test-output-stream " 0f 83/jump-if-addr>= break/disp32" "F - test-convert-function-with-branches-in-block/13")
3100 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:loop/disp32" "F - test-convert-function-with-branches-in-block/14")
3101 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/15")
3102 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-block/16")
3103 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-block/17")
3104 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/18")
3105 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-in-block/19")
3106 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-block/20")
3107 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-block/21")
3108 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-block/22")
3109 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-block/23")
3110 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-block/24")
3111 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-block/25")
3112
3113 89/<- %esp 5/r32/ebp
3114 5d/pop-to-ebp
3115 c3/return
3116
3117 test-convert-function-with-branches-in-named-block:
3118
3119 55/push-ebp
3120 89/<- %ebp 4/r32/esp
3121
3122 (clear-stream _test-input-stream)
3123 (clear-stream $_test-input-buffered-file->buffer)
3124 (clear-stream _test-output-stream)
3125 (clear-stream $_test-output-buffered-file->buffer)
3126
3127 (write _test-input-stream "fn foo x: int {\n")
3128 (write _test-input-stream " $bar: {\n")
3129 (write _test-input-stream " break-if->= $bar\n")
3130 (write _test-input-stream " loop-if-addr< $bar\n")
3131 (write _test-input-stream " increment x\n")
3132 (write _test-input-stream " loop\n")
3133 (write _test-input-stream " }\n")
3134 (write _test-input-stream "}\n")
3135
3136 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3137 (flush _test-output-buffered-file)
3138 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3144
3145 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-in-named-block/0")
3146 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-in-named-block/1")
3147 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-in-named-block/2")
3148 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-in-named-block/3")
3149 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/4")
3150 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-in-named-block/5")
3151 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/6")
3152 (check-next-stream-line-equal _test-output-stream "$bar:loop:" "F - test-convert-function-with-branches-in-named-block/7")
3153 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/8")
3154 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-in-named-block/9")
3155 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:break/disp32" "F - test-convert-function-with-branches-in-named-block/10")
3156 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/11")
3157 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-in-named-block/12")
3158 (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")
3159 (check-next-stream-line-equal _test-output-stream " e9/jump $bar:loop/disp32" "F - test-convert-function-with-branches-in-named-block/14")
3160 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/15")
3161 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0x00000008)" "F - test-convert-function-with-branches-in-named-block/16")
3162 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-in-named-block/17")
3163 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/18")
3164 (check-next-stream-line-equal _test-output-stream "$bar:break:" "F - test-convert-function-with-branches-in-named-block/19")
3165 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-in-named-block/20")
3166 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-in-named-block/21")
3167 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-in-named-block/22")
3168 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-in-named-block/23")
3169 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-in-named-block/24")
3170 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-in-named-block/25")
3171
3172 89/<- %esp 5/r32/ebp
3173 5d/pop-to-ebp
3174 c3/return
3175
3176 test-convert-function-with-var-in-nested-block:
3177
3178 55/push-ebp
3179 89/<- %ebp 4/r32/esp
3180
3181 (clear-stream _test-input-stream)
3182 (clear-stream $_test-input-buffered-file->buffer)
3183 (clear-stream _test-output-stream)
3184 (clear-stream $_test-output-buffered-file->buffer)
3185
3186 (write _test-input-stream "fn foo x: int {\n")
3187 (write _test-input-stream " {\n")
3188 (write _test-input-stream " {\n")
3189 (write _test-input-stream " var x: int\n")
3190 (write _test-input-stream " increment x\n")
3191 (write _test-input-stream " }\n")
3192 (write _test-input-stream " }\n")
3193 (write _test-input-stream "}\n")
3194
3195 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3196 (flush _test-output-buffered-file)
3197 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3203
3204 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-var-in-nested-block/0")
3205 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-var-in-nested-block/1")
3206 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-var-in-nested-block/2")
3207 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-var-in-nested-block/3")
3208 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/4")
3209 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-var-in-nested-block/5")
3210 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/6")
3211 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-var-in-nested-block/7")
3212 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-var-in-nested-block/8")
3213 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-var-in-nested-block/9")
3214 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-var-in-nested-block/10")
3215 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-var-in-nested-block/11")
3216 (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")
3217 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/13")
3218 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-var-in-nested-block/14")
3219 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/15")
3220 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-var-in-nested-block/16")
3221 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-var-in-nested-block/17")
3222 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-var-in-nested-block/18")
3223 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-var-in-nested-block/19")
3224 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-var-in-nested-block/20")
3225 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-var-in-nested-block/21")
3226 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-var-in-nested-block/22")
3227
3228 89/<- %esp 5/r32/ebp
3229 5d/pop-to-ebp
3230 c3/return
3231
3232 test-convert-function-with-multiple-vars-in-nested-blocks:
3233
3234 55/push-ebp
3235 89/<- %ebp 4/r32/esp
3236
3237 (clear-stream _test-input-stream)
3238 (clear-stream $_test-input-buffered-file->buffer)
3239 (clear-stream _test-output-stream)
3240 (clear-stream $_test-output-buffered-file->buffer)
3241
3242 (write _test-input-stream "fn foo x: int {\n")
3243 (write _test-input-stream " {\n")
3244 (write _test-input-stream " var x/eax: int <- copy 0\n")
3245 (write _test-input-stream " {\n")
3246 (write _test-input-stream " var y: int\n")
3247 (write _test-input-stream " x <- add y\n")
3248 (write _test-input-stream " }\n")
3249 (write _test-input-stream " }\n")
3250 (write _test-input-stream "}\n")
3251
3252 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3253 (flush _test-output-buffered-file)
3254 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3260
3261 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/0")
3262 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/1")
3263 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/2")
3264 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/3")
3265 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/4")
3266 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/5")
3267 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/6")
3268 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/7")
3269 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/8")
3270 (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")
3271 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-multiple-vars-in-nested-blocks/10")
3272 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/11")
3273 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-multiple-vars-in-nested-blocks/12")
3274 (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")
3275 (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")
3276 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/15")
3277 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/16")
3278 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-multiple-vars-in-nested-blocks/17")
3279 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/18")
3280 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/19")
3281 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-multiple-vars-in-nested-blocks/20")
3282 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-multiple-vars-in-nested-blocks/21")
3283 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-multiple-vars-in-nested-blocks/22")
3284 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/23")
3285 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-multiple-vars-in-nested-blocks/24")
3286 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-multiple-vars-in-nested-blocks/25")
3287
3288 89/<- %esp 5/r32/ebp
3289 5d/pop-to-ebp
3290 c3/return
3291
3292 test-convert-function-with-branches-and-local-vars:
3293
3294
3295
3296
3297 55/push-ebp
3298 89/<- %ebp 4/r32/esp
3299
3300 (clear-stream _test-input-stream)
3301 (clear-stream $_test-input-buffered-file->buffer)
3302 (clear-stream _test-output-stream)
3303 (clear-stream $_test-output-buffered-file->buffer)
3304
3305 (write _test-input-stream "fn foo {\n")
3306 (write _test-input-stream " {\n")
3307 (write _test-input-stream " var x: int\n")
3308 (write _test-input-stream " break-if->=\n")
3309 (write _test-input-stream " increment x\n")
3310 (write _test-input-stream " }\n")
3311 (write _test-input-stream "}\n")
3312
3313 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3314 (flush _test-output-buffered-file)
3315 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3321
3322 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-local-vars/0")
3323 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-local-vars/1")
3324 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-local-vars/2")
3325 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-branches-and-local-vars/3")
3326 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/4")
3327 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-local-vars/5")
3328 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/6")
3329 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-local-vars/7")
3330 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-local-vars/8")
3331 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-local-vars/9")
3332 (check-next-stream-line-equal _test-output-stream " 0f 8c/jump-if-< break/disp32" "F - test-convert-function-with-branches-and-local-vars/10")
3333 (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")
3334 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000002:break/disp32" "F - test-convert-function-with-branches-and-local-vars/12")
3335 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/13")
3336 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *(ebp+0xfffffffc)" "F - test-convert-function-with-branches-and-local-vars/14")
3337 (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")
3338 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/16")
3339 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-local-vars/17")
3340 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-local-vars/18")
3341 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-local-vars/19")
3342 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-local-vars/20")
3343 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-branches-and-local-vars/21")
3344 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-local-vars/22")
3345 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-local-vars/23")
3346
3347 89/<- %esp 5/r32/ebp
3348 5d/pop-to-ebp
3349 c3/return
3350
3351 test-convert-function-with-conditional-loops-and-local-vars:
3352
3353
3354
3355
3356 55/push-ebp
3357 89/<- %ebp 4/r32/esp
3358
3359 (clear-stream _test-input-stream)
3360 (clear-stream $_test-input-buffered-file->buffer)
3361 (clear-stream _test-output-stream)
3362 (clear-stream $_test-output-buffered-file->buffer)
3363
3364 (write _test-input-stream "fn foo {\n")
3365 (write _test-input-stream " {\n")
3366 (write _test-input-stream " var x: int\n")
3367 (write _test-input-stream " loop-if->=\n")
3368 (write _test-input-stream " increment x\n")
3369 (write _test-input-stream " }\n")
3370 (write _test-input-stream "}\n")
3371
3372 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3373 (flush _test-output-buffered-file)
3374 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3380
3381 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-conditional-loops-and-local-vars/0")
3382 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-conditional-loops-and-local-vars/1")
3383 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/2")
3384 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-conditional-loops-and-local-vars/3")
3385 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/4")
3386 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/5")
3387 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/6")
3388 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-conditional-loops-and-local-vars/7")
3389 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-conditional-loops-and-local-vars/8")
3390 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-conditional-loops-and-local-vars/9")
3391 (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")
3392 (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")
3393 (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")
3394 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/13")
3395 (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")
3396 (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")
3397 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/16")
3398 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/17")
3399 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-conditional-loops-and-local-vars/18")
3400 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-conditional-loops-and-local-vars/19")
3401 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-conditional-loops-and-local-vars/20")
3402 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/21")
3403 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-conditional-loops-and-local-vars/22")
3404 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-conditional-loops-and-local-vars/23")
3405
3406 89/<- %esp 5/r32/ebp
3407 5d/pop-to-ebp
3408 c3/return
3409
3410 test-convert-function-with-unconditional-loops-and-local-vars:
3411
3412
3413
3414
3415 55/push-ebp
3416 89/<- %ebp 4/r32/esp
3417
3418 (clear-stream _test-input-stream)
3419 (clear-stream $_test-input-buffered-file->buffer)
3420 (clear-stream _test-output-stream)
3421 (clear-stream $_test-output-buffered-file->buffer)
3422
3423 (write _test-input-stream "fn foo {\n")
3424 (write _test-input-stream " {\n")
3425 (write _test-input-stream " var x: int\n")
3426 (write _test-input-stream " loop\n")
3427 (write _test-input-stream " increment x\n")
3428 (write _test-input-stream " }\n")
3429 (write _test-input-stream "}\n")
3430
3431 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3432 (flush _test-output-buffered-file)
3433 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3439
3440 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-loops-and-local-vars/0")
3441 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-loops-and-local-vars/1")
3442 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/2")
3443 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-loops-and-local-vars/3")
3444 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/4")
3445 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/5")
3446 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-loops-and-local-vars/6")
3447 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-loops-and-local-vars/7")
3448 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-loops-and-local-vars/8")
3449 (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")
3450 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-unconditional-loops-and-local-vars/10")
3451
3452 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/11")
3453 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/12")
3454 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-loops-and-local-vars/13")
3455 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-loops-and-local-vars/14")
3456 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-loops-and-local-vars/15")
3457 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/16")
3458 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-loops-and-local-vars/17")
3459 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-loops-and-local-vars/18")
3460
3461 89/<- %esp 5/r32/ebp
3462 5d/pop-to-ebp
3463 c3/return
3464
3465 test-convert-function-with-branches-and-loops-and-local-vars:
3466
3467 55/push-ebp
3468 89/<- %ebp 4/r32/esp
3469
3470 (clear-stream _test-input-stream)
3471 (clear-stream $_test-input-buffered-file->buffer)
3472 (clear-stream _test-output-stream)
3473 (clear-stream $_test-output-buffered-file->buffer)
3474
3475 (write _test-input-stream "fn foo {\n")
3476 (write _test-input-stream " {\n")
3477 (write _test-input-stream " var x: int\n")
3478 (write _test-input-stream " break-if->=\n")
3479 (write _test-input-stream " increment x\n")
3480 (write _test-input-stream " loop\n")
3481 (write _test-input-stream " }\n")
3482 (write _test-input-stream "}\n")
3483
3484 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3485 (flush _test-output-buffered-file)
3486 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3492
3493 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-branches-and-loops-and-local-vars/0")
3494 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-branches-and-loops-and-local-vars/1")
3495 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/2")
3496 (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")
3497 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/4")
3498 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/5")
3499 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/6")
3500 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-branches-and-loops-and-local-vars/7")
3501 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-branches-and-loops-and-local-vars/8")
3502 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-branches-and-loops-and-local-vars/9")
3503 (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")
3504 (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")
3505 (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")
3506 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/13")
3507 (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")
3508 (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")
3509 (check-next-stream-line-equal _test-output-stream " e9/jump loop/disp32" "F - test-convert-function-with-branches-and-loops-and-local-vars/16")
3510 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/17")
3511 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/18")
3512 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-branches-and-loops-and-local-vars/19")
3513 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-branches-and-loops-and-local-vars/20")
3514 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-branches-and-loops-and-local-vars/21")
3515 (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")
3516 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-branches-and-loops-and-local-vars/23")
3517 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-branches-and-loops-and-local-vars/24")
3518
3519 89/<- %esp 5/r32/ebp
3520 5d/pop-to-ebp
3521 c3/return
3522
3523 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars:
3524
3525 55/push-ebp
3526 89/<- %ebp 4/r32/esp
3527
3528 (clear-stream _test-input-stream)
3529 (clear-stream $_test-input-buffered-file->buffer)
3530 (clear-stream _test-output-stream)
3531 (clear-stream $_test-output-buffered-file->buffer)
3532
3533 (write _test-input-stream "fn foo {\n")
3534 (write _test-input-stream " a: {\n")
3535 (write _test-input-stream " var x: int\n")
3536 (write _test-input-stream " {\n")
3537 (write _test-input-stream " var y: int\n")
3538 (write _test-input-stream " break-if->= a\n")
3539 (write _test-input-stream " increment x\n")
3540 (write _test-input-stream " loop\n")
3541 (write _test-input-stream " }\n")
3542 (write _test-input-stream " }\n")
3543 (write _test-input-stream "}\n")
3544
3545 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3546 (flush _test-output-buffered-file)
3547 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3553
3554 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/0")
3555 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/1")
3556 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/2")
3557 (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")
3558 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/4")
3559 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/5")
3560 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/6")
3561 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/7")
3562 (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")
3563 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/9")
3564 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/10")
3565 (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")
3566 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/12")
3567 (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")
3568 (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")
3569 (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")
3570 (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")
3571 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/17")
3572 (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")
3573 (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")
3574 (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")
3575 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/21")
3576 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/22")
3577 (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")
3578 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/24")
3579 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/25")
3580 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/26")
3581 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/27")
3582 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/28")
3583 (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")
3584 (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")
3585 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars/31")
3586
3587 89/<- %esp 5/r32/ebp
3588 5d/pop-to-ebp
3589 c3/return
3590
3591 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2:
3592
3593 55/push-ebp
3594 89/<- %ebp 4/r32/esp
3595
3596 (clear-stream _test-input-stream)
3597 (clear-stream $_test-input-buffered-file->buffer)
3598 (clear-stream _test-output-stream)
3599 (clear-stream $_test-output-buffered-file->buffer)
3600
3601
3602 (write _test-input-stream "fn foo {\n")
3603 (write _test-input-stream " a: {\n")
3604 (write _test-input-stream " var x: int\n")
3605 (write _test-input-stream " {\n")
3606 (write _test-input-stream " break-if->= a\n")
3607 (write _test-input-stream " }\n")
3608 (write _test-input-stream " }\n")
3609 (write _test-input-stream "}\n")
3610
3611 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3612 (flush _test-output-buffered-file)
3613 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3619
3620 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/0")
3621 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/1")
3622 (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")
3623 (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")
3624 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/4")
3625 (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")
3626 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/6")
3627 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/7")
3628 (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")
3629 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/9")
3630 (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")
3631 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/11")
3632 (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")
3633 (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")
3634 (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")
3635 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/15")
3636 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/16")
3637 (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")
3638 (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")
3639 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/19")
3640 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/20")
3641 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/21")
3642 (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")
3643 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/23")
3644 (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")
3645 (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")
3646 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-2/26")
3647
3648 89/<- %esp 5/r32/ebp
3649 5d/pop-to-ebp
3650 c3/return
3651
3652 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3:
3653
3654 55/push-ebp
3655 89/<- %ebp 4/r32/esp
3656
3657 (clear-stream _test-input-stream)
3658 (clear-stream $_test-input-buffered-file->buffer)
3659 (clear-stream _test-output-stream)
3660 (clear-stream $_test-output-buffered-file->buffer)
3661
3662
3663 (write _test-input-stream "fn foo {\n")
3664 (write _test-input-stream " a: {\n")
3665 (write _test-input-stream " var x: int\n")
3666 (write _test-input-stream " {\n")
3667 (write _test-input-stream " break a\n")
3668 (write _test-input-stream " }\n")
3669 (write _test-input-stream " }\n")
3670 (write _test-input-stream "}\n")
3671
3672 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3673 (flush _test-output-buffered-file)
3674 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3680
3681 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/0")
3682 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/1")
3683 (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")
3684 (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")
3685 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/4")
3686 (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")
3687 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/6")
3688 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/7")
3689 (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")
3690 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/9")
3691 (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")
3692 (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")
3693 (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")
3694 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/14")
3695 (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")
3696 (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")
3697 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/17")
3698 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/18")
3699 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/19")
3700 (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")
3701 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/21")
3702 (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")
3703 (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")
3704 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-3/24")
3705
3706 89/<- %esp 5/r32/ebp
3707 5d/pop-to-ebp
3708 c3/return
3709
3710 test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4:
3711
3712 55/push-ebp
3713 89/<- %ebp 4/r32/esp
3714
3715 (clear-stream _test-input-stream)
3716 (clear-stream $_test-input-buffered-file->buffer)
3717 (clear-stream _test-output-stream)
3718 (clear-stream $_test-output-buffered-file->buffer)
3719
3720 (write _test-input-stream "fn foo {\n")
3721 (write _test-input-stream " a: {\n")
3722 (write _test-input-stream " var x/esi: int <- copy 0\n")
3723 (write _test-input-stream " {\n")
3724 (write _test-input-stream " break a\n")
3725 (write _test-input-stream " }\n")
3726 (write _test-input-stream " }\n")
3727 (write _test-input-stream "}\n")
3728
3729 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3730 (flush _test-output-buffered-file)
3731 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3737
3738 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/0")
3739 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/1")
3740 (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")
3741 (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")
3742 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/4")
3743 (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")
3744 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/6")
3745 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/7")
3746 (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")
3747 (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")
3748 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/10")
3749 (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")
3750 (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")
3751 (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")
3752 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/14")
3753 (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")
3754 (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")
3755 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/17")
3756 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/18")
3757 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/19")
3758 (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")
3759 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/21")
3760 (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")
3761 (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")
3762 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-branches-and-loops-and-local-vars-4/24")
3763
3764 89/<- %esp 5/r32/ebp
3765 5d/pop-to-ebp
3766 c3/return
3767
3768 test-convert-function-with-nonlocal-unconditional-break-and-local-vars:
3769
3770 55/push-ebp
3771 89/<- %ebp 4/r32/esp
3772
3773 (clear-stream _test-input-stream)
3774 (clear-stream $_test-input-buffered-file->buffer)
3775 (clear-stream _test-output-stream)
3776 (clear-stream $_test-output-buffered-file->buffer)
3777
3778 (write _test-input-stream "fn foo {\n")
3779 (write _test-input-stream " a: {\n")
3780 (write _test-input-stream " var x: int\n")
3781 (write _test-input-stream " {\n")
3782 (write _test-input-stream " var y: int\n")
3783 (write _test-input-stream " break a\n")
3784 (write _test-input-stream " increment x\n")
3785 (write _test-input-stream " }\n")
3786 (write _test-input-stream " }\n")
3787 (write _test-input-stream "}\n")
3788
3789 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3790 (flush _test-output-buffered-file)
3791 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3797
3798 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/0")
3799 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/1")
3800 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/2")
3801 (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")
3802 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/4")
3803 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/5")
3804 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/6")
3805 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/7")
3806 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/8")
3807 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/9")
3808 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/10")
3809 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/11")
3810 (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")
3811 (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")
3812 (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")
3813 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/15")
3814 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/16")
3815 (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")
3816 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/18")
3817 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/19")
3818 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/20")
3819 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/21")
3820 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/22")
3821 (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")
3822 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/24")
3823 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-break-and-local-vars/25")
3824
3825 89/<- %esp 5/r32/ebp
3826 5d/pop-to-ebp
3827 c3/return
3828
3829 test-convert-function-with-unconditional-break-and-local-vars:
3830
3831 55/push-ebp
3832 89/<- %ebp 4/r32/esp
3833
3834 (clear-stream _test-input-stream)
3835 (clear-stream $_test-input-buffered-file->buffer)
3836 (clear-stream _test-output-stream)
3837 (clear-stream $_test-output-buffered-file->buffer)
3838
3839 (write _test-input-stream "fn foo {\n")
3840 (write _test-input-stream " {\n")
3841 (write _test-input-stream " var x: int\n")
3842 (write _test-input-stream " {\n")
3843 (write _test-input-stream " var y: int\n")
3844 (write _test-input-stream " break\n")
3845 (write _test-input-stream " increment x\n")
3846 (write _test-input-stream " }\n")
3847 (write _test-input-stream " }\n")
3848 (write _test-input-stream "}\n")
3849
3850 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3851 (flush _test-output-buffered-file)
3852 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3858
3859 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-unconditional-break-and-local-vars/0")
3860 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-unconditional-break-and-local-vars/1")
3861 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/2")
3862 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-unconditional-break-and-local-vars/3")
3863 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/4")
3864 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/5")
3865 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/6")
3866 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/7")
3867 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/8")
3868 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-unconditional-break-and-local-vars/9")
3869 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-unconditional-break-and-local-vars/10")
3870 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-unconditional-break-and-local-vars/11")
3871 (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")
3872 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/13")
3873 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/14")
3874 (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")
3875 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/16")
3876 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/17")
3877 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-unconditional-break-and-local-vars/18")
3878 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-unconditional-break-and-local-vars/19")
3879 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-unconditional-break-and-local-vars/20")
3880 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/21")
3881 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-unconditional-break-and-local-vars/22")
3882 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-unconditional-break-and-local-vars/23")
3883
3884 89/<- %esp 5/r32/ebp
3885 5d/pop-to-ebp
3886 c3/return
3887
3888 test-convert-function-with-nonlocal-unconditional-loop-and-local-vars:
3889
3890 55/push-ebp
3891 89/<- %ebp 4/r32/esp
3892
3893 (clear-stream _test-input-stream)
3894 (clear-stream $_test-input-buffered-file->buffer)
3895 (clear-stream _test-output-stream)
3896 (clear-stream $_test-output-buffered-file->buffer)
3897
3898 (write _test-input-stream "fn foo {\n")
3899 (write _test-input-stream " a: {\n")
3900 (write _test-input-stream " var x: int\n")
3901 (write _test-input-stream " {\n")
3902 (write _test-input-stream " var y: int\n")
3903 (write _test-input-stream " loop a\n")
3904 (write _test-input-stream " increment x\n")
3905 (write _test-input-stream " }\n")
3906 (write _test-input-stream " }\n")
3907 (write _test-input-stream "}\n")
3908
3909 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3910 (flush _test-output-buffered-file)
3911 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3917
3918 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/0")
3919 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/1")
3920 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/2")
3921 (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")
3922 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/4")
3923 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/5")
3924 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/6")
3925 (check-next-stream-line-equal _test-output-stream "a:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/7")
3926 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/8")
3927 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/9")
3928 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/10")
3929 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/11")
3930 (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")
3931 (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")
3932 (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")
3933 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/15")
3934 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/16")
3935 (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")
3936 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/18")
3937 (check-next-stream-line-equal _test-output-stream "a:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/19")
3938 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/20")
3939 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/21")
3940 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/22")
3941 (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")
3942 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/24")
3943 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-nonlocal-unconditional-loop-and-local-vars/25")
3944
3945 89/<- %esp 5/r32/ebp
3946 5d/pop-to-ebp
3947 c3/return
3948
3949 test-convert-function-with-local-array-var-in-mem:
3950
3951 55/push-ebp
3952 89/<- %ebp 4/r32/esp
3953
3954 (clear-stream _test-input-stream)
3955 (clear-stream $_test-input-buffered-file->buffer)
3956 (clear-stream _test-output-stream)
3957 (clear-stream $_test-output-buffered-file->buffer)
3958
3959 (write _test-input-stream "fn foo {\n")
3960 (write _test-input-stream " var x: (array int 3)\n")
3961 (write _test-input-stream "}\n")
3962
3963 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
3964 (flush _test-output-buffered-file)
3965 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
3971
3972 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-var-in-mem/0")
3973 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-var-in-mem/1")
3974 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-var-in-mem/2")
3975 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-local-array-var-in-mem/3")
3976 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-var-in-mem/4")
3977 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-var-in-mem/5")
3978
3979 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-function-with-local-array-var-in-mem/7")
3980 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-function-with-local-array-var-in-mem/8")
3981
3982 (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")
3983
3984 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-var-in-mem/10")
3985 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-var-in-mem/11")
3986 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-var-in-mem/12")
3987 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-local-array-var-in-mem/13")
3988 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-var-in-mem/14")
3989 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-var-in-mem/15")
3990
3991 89/<- %esp 5/r32/ebp
3992 5d/pop-to-ebp
3993 c3/return
3994
3995 test-array-size-in-hex:
3996
3997 55/push-ebp
3998 89/<- %ebp 4/r32/esp
3999
4000 (clear-stream _test-input-stream)
4001 (clear-stream $_test-input-buffered-file->buffer)
4002 (clear-stream _test-output-stream)
4003 (clear-stream $_test-output-buffered-file->buffer)
4004 (clear-stream _test-error-stream)
4005 (clear-stream $_test-error-buffered-file->buffer)
4006
4007 68/push 0/imm32
4008 68/push 0/imm32
4009 89/<- %edx 4/r32/esp
4010 (tailor-exit-descriptor %edx 0x10)
4011
4012 (write _test-input-stream "fn foo {\n")
4013 (write _test-input-stream " var x: (array int 10)\n")
4014 (write _test-input-stream "}\n")
4015
4016 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4017
4018
4019 89/<- %edx 4/r32/esp
4020 (flush _test-output-buffered-file)
4021 (flush _test-error-buffered-file)
4022 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
4028
4029 (check-stream-equal _test-output-stream "" "F - test-array-size-in-hex: output should be empty")
4030 (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")
4031
4032 (check-ints-equal *(edx+4) 2 "F - test-array-size-in-hex: exit status")
4033
4034 81 0/subop/add %esp 8/imm32
4035
4036 5d/pop-to-ebp
4037 c3/return
4038
4039 test-convert-function-with-populate:
4040
4041 55/push-ebp
4042 89/<- %ebp 4/r32/esp
4043
4044 (clear-stream _test-input-stream)
4045 (clear-stream $_test-input-buffered-file->buffer)
4046 (clear-stream _test-output-stream)
4047 (clear-stream $_test-output-buffered-file->buffer)
4048
4049 (write _test-input-stream "fn foo {\n")
4050 (write _test-input-stream " var x/ecx: (addr handle array int) <- copy 0\n")
4051 (write _test-input-stream " populate x, 7\n")
4052 (write _test-input-stream "}\n")
4053
4054 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4055 (flush _test-output-buffered-file)
4056 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4062
4063 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-populate/0")
4064 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-populate/1")
4065 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-populate/2")
4066 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-populate/3")
4067 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-populate/4")
4068 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-populate/5")
4069 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-populate/6")
4070 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-function-with-populate/7")
4071 (check-next-stream-line-equal _test-output-stream " (allocate-array2 Heap 0x00000004 7 %ecx)" "F - test-convert-function-with-populate/8")
4072 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-populate/9")
4073 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-populate/10")
4074 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-populate/11")
4075 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-populate/12")
4076 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-populate/13")
4077 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-populate/14")
4078 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-populate/15")
4079
4080 89/<- %esp 5/r32/ebp
4081 5d/pop-to-ebp
4082 c3/return
4083
4084
4085 test-convert-function-with-local-array-of-bytes-in-mem:
4086
4087 55/push-ebp
4088 89/<- %ebp 4/r32/esp
4089
4090 (clear-stream _test-input-stream)
4091 (clear-stream $_test-input-buffered-file->buffer)
4092 (clear-stream _test-output-stream)
4093 (clear-stream $_test-output-buffered-file->buffer)
4094
4095 (write _test-input-stream "fn foo {\n")
4096 (write _test-input-stream " var x: (array byte 3)\n")
4097 (write _test-input-stream "}\n")
4098
4099 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4100 (flush _test-output-buffered-file)
4101 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4107
4108 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-array-of-bytes-in-mem/0")
4109 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-array-of-bytes-in-mem/1")
4110 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/2")
4111 (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")
4112 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-array-of-bytes-in-mem/4")
4113 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-array-of-bytes-in-mem/5")
4114
4115 (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")
4116 (check-next-stream-line-equal _test-output-stream " 68/push 0x00000003/imm32" "F - test-convert-function-with-local-array-of-bytes-in-mem/8")
4117
4118 (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")
4119
4120 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-array-of-bytes-in-mem/10")
4121 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-array-of-bytes-in-mem/11")
4122 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-array-of-bytes-in-mem/12")
4123 (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")
4124 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-array-of-bytes-in-mem/14")
4125 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-array-of-bytes-in-mem/15")
4126
4127 89/<- %esp 5/r32/ebp
4128 5d/pop-to-ebp
4129 c3/return
4130
4131 test-convert-address:
4132
4133 55/push-ebp
4134 89/<- %ebp 4/r32/esp
4135
4136 (clear-stream _test-input-stream)
4137 (clear-stream $_test-input-buffered-file->buffer)
4138 (clear-stream _test-output-stream)
4139 (clear-stream $_test-output-buffered-file->buffer)
4140
4141 (write _test-input-stream "fn foo {\n")
4142 (write _test-input-stream " var a: int\n")
4143 (write _test-input-stream " var b/eax: (addr int) <- address a\n")
4144 (write _test-input-stream "}\n")
4145
4146 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4147 (flush _test-output-buffered-file)
4148 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4154
4155 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-address/0")
4156 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-address/1")
4157 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-address/2")
4158 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-address/3")
4159 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-address/4")
4160 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-address/5")
4161 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-address/6")
4162 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-address/7")
4163 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000000/r32" "F - test-convert-address/8")
4164 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-address/9")
4165 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-address/10")
4166 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-address/11")
4167 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-address/12")
4168 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-address/13")
4169 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-address/14")
4170 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-address/15")
4171 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-address/16")
4172
4173 89/<- %esp 5/r32/ebp
4174 5d/pop-to-ebp
4175 c3/return
4176
4177 test-convert-floating-point-convert:
4178
4179 55/push-ebp
4180 89/<- %ebp 4/r32/esp
4181
4182 (clear-stream _test-input-stream)
4183 (clear-stream $_test-input-buffered-file->buffer)
4184 (clear-stream _test-output-stream)
4185 (clear-stream $_test-output-buffered-file->buffer)
4186
4187 (write _test-input-stream "fn foo {\n")
4188 (write _test-input-stream " var a/eax: int <- copy 0\n")
4189 (write _test-input-stream " var b/xmm1: float <- convert a\n")
4190 (write _test-input-stream "}\n")
4191
4192 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4193 (flush _test-output-buffered-file)
4194 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4200
4201 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert/0")
4202 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert/1")
4203 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert/2")
4204 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert/3")
4205 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert/4")
4206 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert/5")
4207 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert/6")
4208 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert/7")
4209 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert/8")
4210 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert/9")
4211 (check-next-stream-line-equal _test-output-stream " f3 0f 2a/convert-to-float %eax 0x00000001/x32" "F - test-convert-floating-point-convert/10")
4212 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert/11")
4213 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert/12")
4214 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert/13")
4215 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert/14")
4216 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert/15")
4217 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert/16")
4218 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert/17")
4219 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert/18")
4220 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert/19")
4221
4222 89/<- %esp 5/r32/ebp
4223 5d/pop-to-ebp
4224 c3/return
4225
4226 test-convert-floating-point-convert-2:
4227
4228 55/push-ebp
4229 89/<- %ebp 4/r32/esp
4230
4231 (clear-stream _test-input-stream)
4232 (clear-stream $_test-input-buffered-file->buffer)
4233 (clear-stream _test-output-stream)
4234 (clear-stream $_test-output-buffered-file->buffer)
4235
4236 (write _test-input-stream "fn foo {\n")
4237 (write _test-input-stream " var a/eax: int <- copy 0\n")
4238 (write _test-input-stream " var b/xmm1: float <- convert a\n")
4239 (write _test-input-stream " a <- convert b\n")
4240 (write _test-input-stream "}\n")
4241
4242 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4243 (flush _test-output-buffered-file)
4244 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4250
4251 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-floating-point-convert-2/0")
4252 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-convert-2/1")
4253 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-convert-2/2")
4254 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-convert-2/3")
4255 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-convert-2/4")
4256 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-floating-point-convert-2/5")
4257 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-convert-2/6")
4258 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-convert-2/7")
4259 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-convert-2/8")
4260 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-convert-2/9")
4261 (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")
4262 (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")
4263 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-convert-2/12")
4264 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-floating-point-convert-2/13")
4265 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-convert-2/14")
4266 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-convert-2/15")
4267 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-floating-point-convert-2/16")
4268 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-convert-2/17")
4269 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-convert-2/18")
4270 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-convert-2/19")
4271 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-convert-2/20")
4272
4273 89/<- %esp 5/r32/ebp
4274 5d/pop-to-ebp
4275 c3/return
4276
4277 test-convert-floating-point-operation:
4278
4279 55/push-ebp
4280 89/<- %ebp 4/r32/esp
4281
4282 (clear-stream _test-input-stream)
4283 (clear-stream $_test-input-buffered-file->buffer)
4284 (clear-stream _test-output-stream)
4285 (clear-stream $_test-output-buffered-file->buffer)
4286
4287 (write _test-input-stream "fn f {\n")
4288 (write _test-input-stream " var m: float\n")
4289 (write _test-input-stream " var x/xmm1: float <- copy m\n")
4290 (write _test-input-stream " var y/xmm5: float <- copy m\n")
4291 (write _test-input-stream " x <- copy y\n")
4292 (write _test-input-stream " copy-to m, y\n")
4293 (write _test-input-stream " x <- add y\n")
4294 (write _test-input-stream " x <- add m\n")
4295 (write _test-input-stream " x <- subtract y\n")
4296 (write _test-input-stream " x <- subtract m\n")
4297 (write _test-input-stream " x <- multiply y\n")
4298 (write _test-input-stream " x <- multiply m\n")
4299 (write _test-input-stream " x <- divide y\n")
4300 (write _test-input-stream " x <- divide m\n")
4301 (write _test-input-stream " x <- reciprocal y\n")
4302 (write _test-input-stream " x <- reciprocal m\n")
4303 (write _test-input-stream " x <- square-root y\n")
4304 (write _test-input-stream " x <- square-root m\n")
4305 (write _test-input-stream " x <- inverse-square-root y\n")
4306 (write _test-input-stream " x <- inverse-square-root m\n")
4307 (write _test-input-stream " x <- max y\n")
4308 (write _test-input-stream " x <- max m\n")
4309 (write _test-input-stream " x <- min y\n")
4310 (write _test-input-stream " x <- min m\n")
4311 (write _test-input-stream " compare x, y\n")
4312 (write _test-input-stream " compare x, m\n")
4313 (write _test-input-stream "}\n")
4314
4315 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4316 (flush _test-output-buffered-file)
4317 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4323
4324 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-operation/0")
4325 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-operation/1")
4326 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-operation/2")
4327 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-operation/3")
4328 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-operation/4")
4329 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-operation/5")
4330 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-operation/6")
4331 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/7")
4332 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-operation/8")
4333 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/9")
4334 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-operation/10")
4335 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 5/x32" "F - test-convert-floating-point-operation/11")
4336 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/12")
4337 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/13")
4338 (check-next-stream-line-equal _test-output-stream " f3 0f 11/copy *(ebp+0xfffffffc) 0x00000005/x32" "F - test-convert-floating-point-operation/14")
4339 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/15")
4340 (check-next-stream-line-equal _test-output-stream " f3 0f 58/add *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/16")
4341 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/17")
4342 (check-next-stream-line-equal _test-output-stream " f3 0f 5c/subtract *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/18")
4343 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/19")
4344 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/20")
4345 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/21")
4346 (check-next-stream-line-equal _test-output-stream " f3 0f 5e/divide *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/22")
4347 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/23")
4348 (check-next-stream-line-equal _test-output-stream " f3 0f 53/reciprocal *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/24")
4349 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/25")
4350 (check-next-stream-line-equal _test-output-stream " f3 0f 51/square-root *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/26")
4351 (check-next-stream-line-equal _test-output-stream " f3 0f 52/inverse-square-root %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/27")
4352 (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")
4353 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/29")
4354 (check-next-stream-line-equal _test-output-stream " f3 0f 5f/max *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/30")
4355 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min %xmm5 0x00000001/x32" "F - test-convert-floating-point-operation/31")
4356 (check-next-stream-line-equal _test-output-stream " f3 0f 5d/min *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/32")
4357 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare %xmm1 0x00000005/x32" "F - test-convert-floating-point-operation/33")
4358 (check-next-stream-line-equal _test-output-stream " 0f 2f/compare *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-operation/34")
4359 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 5/x32" "F - test-convert-floating-point-operation/35")
4360 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/36")
4361 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-operation/37")
4362 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-operation/38")
4363 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-operation/39")
4364 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-operation/40")
4365 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-operation/41")
4366 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-operation/42")
4367 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-operation/43")
4368 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-operation/44")
4369 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-operation/45")
4370
4371 89/<- %esp 5/r32/ebp
4372 5d/pop-to-ebp
4373 c3/return
4374
4375 test-convert-floating-point-dereferenced:
4376
4377 55/push-ebp
4378 89/<- %ebp 4/r32/esp
4379
4380 (clear-stream _test-input-stream)
4381 (clear-stream $_test-input-buffered-file->buffer)
4382 (clear-stream _test-output-stream)
4383 (clear-stream $_test-output-buffered-file->buffer)
4384
4385 (write _test-input-stream "fn f {\n")
4386 (write _test-input-stream " var m: float\n")
4387 (write _test-input-stream " var x/xmm1: float <- copy m\n")
4388 (write _test-input-stream " var y/eax: (addr float) <- copy 0\n")
4389 (write _test-input-stream " x <- multiply *y\n")
4390 (write _test-input-stream "}\n")
4391
4392 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4393 (flush _test-output-buffered-file)
4394 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4400
4401 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-floating-point-dereferenced/0")
4402 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-floating-point-dereferenced/1")
4403 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-floating-point-dereferenced/2")
4404 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-floating-point-dereferenced/3")
4405 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-floating-point-dereferenced/4")
4406 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-floating-point-dereferenced/5")
4407 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-floating-point-dereferenced/6")
4408 (check-next-stream-line-equal _test-output-stream " 81 5/subop/subtract %esp 4/imm32" "F - test-convert-floating-point-dereferenced/7")
4409 (check-next-stream-line-equal _test-output-stream " f3 0f 11/<- *esp 1/x32" "F - test-convert-floating-point-dereferenced/8")
4410 (check-next-stream-line-equal _test-output-stream " f3 0f 10/copy *(ebp+0xfffffffc) 0x00000001/x32" "F - test-convert-floating-point-dereferenced/9")
4411 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-floating-point-dereferenced/10")
4412 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-floating-point-dereferenced/11")
4413 (check-next-stream-line-equal _test-output-stream " f3 0f 59/multiply *eax 0x00000001/x32" "F - test-convert-floating-point-dereferenced/12")
4414 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-floating-point-dereferenced/13")
4415 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 1/x32" "F - test-convert-floating-point-dereferenced/14")
4416 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
4417 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-floating-point-dereferenced/16")
4418 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-floating-point-dereferenced/17")
4419 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-floating-point-dereferenced/18")
4420 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-floating-point-dereferenced/19")
4421 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-floating-point-dereferenced/20")
4422 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-floating-point-dereferenced/21")
4423 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-floating-point-dereferenced/22")
4424
4425 89/<- %esp 5/r32/ebp
4426 5d/pop-to-ebp
4427 c3/return
4428
4429 test-convert-length-of-array:
4430
4431 55/push-ebp
4432 89/<- %ebp 4/r32/esp
4433
4434 (clear-stream _test-input-stream)
4435 (clear-stream $_test-input-buffered-file->buffer)
4436 (clear-stream _test-output-stream)
4437 (clear-stream $_test-output-buffered-file->buffer)
4438
4439 (write _test-input-stream "fn foo a: (addr array int) {\n")
4440 (write _test-input-stream " var b/eax: (addr array int) <- copy a\n")
4441 (write _test-input-stream " var c/eax: int <- length b\n")
4442 (write _test-input-stream "}\n")
4443
4444 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4445 (flush _test-output-buffered-file)
4446 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4452
4453 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array/0")
4454 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array/1")
4455 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array/2")
4456 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array/3")
4457 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array/4")
4458 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array/5")
4459 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array/6")
4460 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array/7")
4461 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array/8")
4462 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array/9")
4463 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array/10")
4464 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array/11")
4465 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array/12")
4466 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array/13")
4467 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array/14")
4468 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array/15")
4469 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array/16")
4470
4471 89/<- %esp 5/r32/ebp
4472 5d/pop-to-ebp
4473 c3/return
4474
4475
4476 test-convert-length-of-array-of-bytes:
4477
4478 55/push-ebp
4479 89/<- %ebp 4/r32/esp
4480
4481 (clear-stream _test-input-stream)
4482 (clear-stream $_test-input-buffered-file->buffer)
4483 (clear-stream _test-output-stream)
4484 (clear-stream $_test-output-buffered-file->buffer)
4485
4486 (write _test-input-stream "fn foo a: (addr array byte) {\n")
4487 (write _test-input-stream " var b/eax: (addr array byte) <- copy a\n")
4488 (write _test-input-stream " var c/eax: int <- length b\n")
4489 (write _test-input-stream "}\n")
4490
4491 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4492 (flush _test-output-buffered-file)
4493 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4499
4500 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-bytes/0")
4501 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-bytes/1")
4502 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-bytes/2")
4503 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-bytes/3")
4504 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-bytes/4")
4505 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-bytes/5")
4506 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-bytes/6")
4507 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/7")
4508 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-bytes/8")
4509 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-bytes/9")
4510 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-bytes/10")
4511 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-bytes/11")
4512 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-bytes/12")
4513 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-bytes/13")
4514 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-bytes/14")
4515 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-bytes/15")
4516
4517 89/<- %esp 5/r32/ebp
4518 5d/pop-to-ebp
4519 c3/return
4520
4521 test-convert-length-of-array-on-stack:
4522
4523 55/push-ebp
4524 89/<- %ebp 4/r32/esp
4525
4526 (clear-stream _test-input-stream)
4527 (clear-stream $_test-input-buffered-file->buffer)
4528 (clear-stream _test-output-stream)
4529 (clear-stream $_test-output-buffered-file->buffer)
4530
4531 (write _test-input-stream "fn foo {\n")
4532 (write _test-input-stream " var a: (array int 3)\n")
4533 (write _test-input-stream " var b/eax: int <- length a\n")
4534 (write _test-input-stream "}\n")
4535
4536 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4537 (flush _test-output-buffered-file)
4538 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4544
4545 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-on-stack/0")
4546 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-on-stack/1")
4547 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-on-stack/2")
4548 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-on-stack/3")
4549 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-on-stack/4")
4550 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-on-stack/5")
4551
4552 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-length-of-array-on-stack/6")
4553 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-length-of-array-on-stack/7")
4554 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-on-stack/8")
4555 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff0) 0x00000000/r32" "F - test-convert-length-of-array-on-stack/9")
4556 (check-next-stream-line-equal _test-output-stream " c1/shift 5/subop/>> %eax 0x00000002/imm8" "F - test-convert-length-of-array-on-stack/10")
4557 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-on-stack/11")
4558 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-length-of-array-on-stack/12")
4559 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-on-stack/13")
4560 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-on-stack/14")
4561 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-on-stack/15")
4562 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-on-stack/16")
4563 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-on-stack/17")
4564 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-on-stack/18")
4565
4566 89/<- %esp 5/r32/ebp
4567 5d/pop-to-ebp
4568 c3/return
4569
4570 test-reg-var-def-with-read-of-same-register:
4571
4572 55/push-ebp
4573 89/<- %ebp 4/r32/esp
4574
4575 (clear-stream _test-input-stream)
4576 (clear-stream $_test-input-buffered-file->buffer)
4577 (clear-stream _test-output-stream)
4578 (clear-stream $_test-output-buffered-file->buffer)
4579 (clear-stream _test-error-stream)
4580 (clear-stream $_test-error-buffered-file->buffer)
4581
4582 68/push 0/imm32
4583 68/push 0/imm32
4584 89/<- %edx 4/r32/esp
4585 (tailor-exit-descriptor %edx 0x10)
4586
4587 (write _test-input-stream "fn foo {\n")
4588 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
4589 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4590 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
4591 (write _test-input-stream "}\n")
4592
4593 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
4594
4595
4596 89/<- %edx 4/r32/esp
4597 (flush _test-output-buffered-file)
4598 (flush _test-error-buffered-file)
4599 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4605 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
4611 (check-stream-equal _test-error-stream "" "F - test-reg-var-def-with-read-of-same-register: error stream should be empty")
4612
4613 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-reg-var-def-with-read-of-same-register/0")
4614 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-reg-var-def-with-read-of-same-register/1")
4615 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-reg-var-def-with-read-of-same-register/2")
4616 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-reg-var-def-with-read-of-same-register/3")
4617 (check-next-stream-line-equal _test-output-stream " {" "F - test-reg-var-def-with-read-of-same-register/4")
4618 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-reg-var-def-with-read-of-same-register/5")
4619 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-reg-var-def-with-read-of-same-register/6")
4620 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-reg-var-def-with-read-of-same-register/7")
4621 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-reg-var-def-with-read-of-same-register/8")
4622 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-reg-var-def-with-read-of-same-register/9")
4623 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-reg-var-def-with-read-of-same-register/11")
4624 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-reg-var-def-with-read-of-same-register/13")
4625 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-reg-var-def-with-read-of-same-register/14")
4626 (check-next-stream-line-equal _test-output-stream " }" "F - test-reg-var-def-with-read-of-same-register/15")
4627 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-reg-var-def-with-read-of-same-register/16")
4628 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-reg-var-def-with-read-of-same-register/17")
4629 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-reg-var-def-with-read-of-same-register/18")
4630 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-reg-var-def-with-read-of-same-register/19")
4631 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-reg-var-def-with-read-of-same-register/20")
4632
4633 81 0/subop/add %esp 8/imm32
4634
4635 5d/pop-to-ebp
4636 c3/return
4637
4638 test-convert-index-into-array:
4639
4640 55/push-ebp
4641 89/<- %ebp 4/r32/esp
4642
4643 (clear-stream _test-input-stream)
4644 (clear-stream $_test-input-buffered-file->buffer)
4645 (clear-stream _test-output-stream)
4646 (clear-stream $_test-output-buffered-file->buffer)
4647
4648 (write _test-input-stream "fn foo {\n")
4649 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
4650 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4651 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
4652 (write _test-input-stream "}\n")
4653
4654 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4655 (flush _test-output-buffered-file)
4656 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4662
4663 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array/0")
4664 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array/1")
4665 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array/2")
4666 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array/3")
4667 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array/4")
4668 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array/5")
4669 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array/6")
4670 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array/7")
4671 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array/8")
4672 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array/9")
4673 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx<<0x00000002 + 4) 0x00000000/r32" "F - test-convert-index-into-array/10")
4674 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array/11")
4675 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array/12")
4676 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array/13")
4677 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array/14")
4678 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array/15")
4679 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array/16")
4680 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array/17")
4681 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array/18")
4682
4683 89/<- %esp 5/r32/ebp
4684 5d/pop-to-ebp
4685 c3/return
4686
4687 test-convert-index-into-array-of-bytes:
4688
4689 55/push-ebp
4690 89/<- %ebp 4/r32/esp
4691
4692 (clear-stream _test-input-stream)
4693 (clear-stream $_test-input-buffered-file->buffer)
4694 (clear-stream _test-output-stream)
4695 (clear-stream $_test-output-buffered-file->buffer)
4696
4697 (write _test-input-stream "fn foo {\n")
4698 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
4699 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
4700 (write _test-input-stream " var x/eax: (addr byte) <- index arr, idx\n")
4701 (write _test-input-stream "}\n")
4702
4703 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4704 (flush _test-output-buffered-file)
4705 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4711
4712 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes/0")
4713 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes/1")
4714 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes/2")
4715 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes/3")
4716 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes/4")
4717 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes/5")
4718 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes/6")
4719 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-of-bytes/7")
4720 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes/8")
4721 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-of-bytes/9")
4722 (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")
4723 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes/13")
4724 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes/14")
4725 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes/15")
4726 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes/16")
4727 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes/17")
4728 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes/18")
4729 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes/19")
4730 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes/20")
4731
4732 89/<- %esp 5/r32/ebp
4733 5d/pop-to-ebp
4734 c3/return
4735
4736 test-convert-index-into-array-with-literal:
4737
4738 55/push-ebp
4739 89/<- %ebp 4/r32/esp
4740
4741 (clear-stream _test-input-stream)
4742 (clear-stream $_test-input-buffered-file->buffer)
4743 (clear-stream _test-output-stream)
4744 (clear-stream $_test-output-buffered-file->buffer)
4745
4746 (write _test-input-stream "fn foo {\n")
4747 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
4748 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
4749 (write _test-input-stream "}\n")
4750
4751 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4752 (flush _test-output-buffered-file)
4753 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4759
4760 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-with-literal/0")
4761 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-with-literal/1")
4762 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-with-literal/2")
4763 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-with-literal/3")
4764 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-with-literal/4")
4765 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-with-literal/5")
4766 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-with-literal/6")
4767 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-with-literal/7")
4768
4769 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x0000000c) 0x00000000/r32" "F - test-convert-index-into-array-with-literal/8")
4770 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-with-literal/9")
4771 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-with-literal/10")
4772 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-with-literal/11")
4773 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-with-literal/12")
4774 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-with-literal/13")
4775 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-with-literal/14")
4776 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-with-literal/15")
4777
4778 89/<- %esp 5/r32/ebp
4779 5d/pop-to-ebp
4780 c3/return
4781
4782 test-convert-index-into-array-of-bytes-with-literal:
4783
4784 55/push-ebp
4785 89/<- %ebp 4/r32/esp
4786
4787 (clear-stream _test-input-stream)
4788 (clear-stream $_test-input-buffered-file->buffer)
4789 (clear-stream _test-output-stream)
4790 (clear-stream $_test-output-buffered-file->buffer)
4791
4792 (write _test-input-stream "fn foo {\n")
4793 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
4794 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
4795 (write _test-input-stream "}\n")
4796
4797 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4798 (flush _test-output-buffered-file)
4799 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4805
4806 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-with-literal/0")
4807 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-with-literal/1")
4808 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/2")
4809 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-with-literal/3")
4810 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-with-literal/4")
4811 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-with-literal/5")
4812 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-with-literal/6")
4813 (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")
4814
4815 (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")
4816 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-with-literal/9")
4817 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-with-literal/10")
4818 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-with-literal/11")
4819 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-with-literal/12")
4820 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-with-literal/13")
4821 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-with-literal/14")
4822 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-with-literal/15")
4823
4824 89/<- %esp 5/r32/ebp
4825 5d/pop-to-ebp
4826 c3/return
4827
4828 test-convert-index-into-array-on-stack:
4829
4830 55/push-ebp
4831 89/<- %ebp 4/r32/esp
4832
4833 (clear-stream _test-input-stream)
4834 (clear-stream $_test-input-buffered-file->buffer)
4835 (clear-stream _test-output-stream)
4836 (clear-stream $_test-output-buffered-file->buffer)
4837
4838 (write _test-input-stream "fn foo {\n")
4839 (write _test-input-stream " var arr: (array int 3)\n")
4840 (write _test-input-stream " var idx/eax: int <- copy 2\n")
4841 (write _test-input-stream " var x/eax: (addr int) <- index arr, idx\n")
4842 (write _test-input-stream "}\n")
4843
4844 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4845 (flush _test-output-buffered-file)
4846 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4852
4853 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack/0")
4854 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack/1")
4855 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack/2")
4856 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack/3")
4857 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack/4")
4858 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack/5")
4859
4860 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack/6")
4861 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack/7")
4862
4863 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack/8")
4864 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 2/imm32" "F - test-convert-index-into-array-on-stack/9")
4865
4866 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + eax<<0x00000002 + 0xfffffff4) 0x00000000/r32" "F - test-convert-index-into-array-on-stack/10")
4867
4868 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack/11")
4869
4870 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack/12")
4871
4872 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack/13")
4873 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack/14")
4874 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack/15")
4875 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack/16")
4876 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack/17")
4877 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack/18")
4878
4879 89/<- %esp 5/r32/ebp
4880 5d/pop-to-ebp
4881 c3/return
4882
4883 test-convert-index-into-array-on-stack-with-literal:
4884
4885 55/push-ebp
4886 89/<- %ebp 4/r32/esp
4887
4888 (clear-stream _test-input-stream)
4889 (clear-stream $_test-input-buffered-file->buffer)
4890 (clear-stream _test-output-stream)
4891 (clear-stream $_test-output-buffered-file->buffer)
4892
4893 (write _test-input-stream "fn foo {\n")
4894 (write _test-input-stream " var arr: (array int 3)\n")
4895 (write _test-input-stream " var x/eax: (addr int) <- index arr, 2\n")
4896 (write _test-input-stream "}\n")
4897
4898 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4899 (flush _test-output-buffered-file)
4900 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4906
4907 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-on-stack-with-literal/0")
4908 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-on-stack-with-literal/1")
4909 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-on-stack-with-literal/2")
4910 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-on-stack-with-literal/3")
4911 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-on-stack-with-literal/4")
4912 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-on-stack-with-literal/5")
4913
4914 (check-next-stream-line-equal _test-output-stream " (push-n-zero-bytes 0x0000000c)" "F - test-convert-index-into-array-on-stack-with-literal/6")
4915 (check-next-stream-line-equal _test-output-stream " 68/push 0x0000000c/imm32" "F - test-convert-index-into-array-on-stack-with-literal/7")
4916
4917 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-on-stack-with-literal/8")
4918
4919 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xfffffffc) 0x00000000/r32" "F - test-convert-index-into-array-on-stack-with-literal/9")
4920
4921 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-on-stack-with-literal/10")
4922
4923 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000010/imm32" "F - test-convert-index-into-array-on-stack-with-literal/11")
4924
4925 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-on-stack-with-literal/12")
4926 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-on-stack-with-literal/13")
4927 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-on-stack-with-literal/14")
4928 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-on-stack-with-literal/15")
4929 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-on-stack-with-literal/16")
4930 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-on-stack-with-literal/17")
4931
4932 89/<- %esp 5/r32/ebp
4933 5d/pop-to-ebp
4934 c3/return
4935
4936 test-convert-index-into-array-of-bytes-on-stack-with-literal:
4937
4938 55/push-ebp
4939 89/<- %ebp 4/r32/esp
4940
4941 (clear-stream _test-input-stream)
4942 (clear-stream $_test-input-buffered-file->buffer)
4943 (clear-stream _test-output-stream)
4944 (clear-stream $_test-output-buffered-file->buffer)
4945
4946 (write _test-input-stream "fn foo {\n")
4947 (write _test-input-stream " var arr: (array byte 3)\n")
4948 (write _test-input-stream " var x/eax: (addr byte) <- index arr, 2\n")
4949 (write _test-input-stream "}\n")
4950
4951 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
4952 (flush _test-output-buffered-file)
4953 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
4959
4960 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/0")
4961 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/1")
4962 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/2")
4963 (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")
4964 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/4")
4965 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/5")
4966
4967 (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")
4968 (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")
4969
4970 (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")
4971
4972 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp + 0xffffffff) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/9")
4973
4974 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/10")
4975
4976 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000007/imm32" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/11")
4977
4978 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/12")
4979 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/13")
4980 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/14")
4981 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/15")
4982 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/16")
4983 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-on-stack-with-literal/17")
4984
4985 89/<- %esp 5/r32/ebp
4986 5d/pop-to-ebp
4987 c3/return
4988
4989 test-convert-index-into-array-using-offset:
4990
4991 55/push-ebp
4992 89/<- %ebp 4/r32/esp
4993
4994 (clear-stream _test-input-stream)
4995 (clear-stream $_test-input-buffered-file->buffer)
4996 (clear-stream _test-output-stream)
4997 (clear-stream $_test-output-buffered-file->buffer)
4998
4999 (write _test-input-stream "fn foo {\n")
5000 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5001 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5002 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
5003 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
5004 (write _test-input-stream "}\n")
5005
5006 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5007 (flush _test-output-buffered-file)
5008 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5014
5015 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset/0")
5016 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset/1")
5017 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset/2")
5018 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset/3")
5019 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset/4")
5020 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset/5")
5021 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset/6")
5022 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-index-into-array-using-offset/7")
5023 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset/8")
5024 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-index-into-array-using-offset/9")
5025 (check-next-stream-line-equal _test-output-stream " 69/multiply %ecx 0x00000004/imm32 0x00000001/r32" "F - test-convert-index-into-array-using-offset/10")
5026 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset/11")
5027 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset/12")
5028 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset/13")
5029 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset/14")
5030 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset/15")
5031 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset/16")
5032 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset/17")
5033 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset/18")
5034 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset/19")
5035
5036 89/<- %esp 5/r32/ebp
5037 5d/pop-to-ebp
5038 c3/return
5039
5040 test-convert-index-into-array-of-bytes-using-offset:
5041
5042 55/push-ebp
5043 89/<- %ebp 4/r32/esp
5044
5045 (clear-stream _test-input-stream)
5046 (clear-stream $_test-input-buffered-file->buffer)
5047 (clear-stream _test-output-stream)
5048 (clear-stream $_test-output-buffered-file->buffer)
5049
5050 (write _test-input-stream "fn foo {\n")
5051 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5052 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
5053 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
5054 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
5055 (write _test-input-stream "}\n")
5056
5057 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5058 (flush _test-output-buffered-file)
5059 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5065
5066 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset/0")
5067 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset/1")
5068 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/2")
5069 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-of-bytes-using-offset/3")
5070 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset/4")
5071 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset/5")
5072 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-of-bytes-using-offset/6")
5073 (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")
5074 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/8")
5075 (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")
5076 (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")
5077 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset/11")
5078 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset/12")
5079 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset/13")
5080 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset/14")
5081 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset/15")
5082 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset/16")
5083 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset/17")
5084 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset/18")
5085 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset/19")
5086
5087 89/<- %esp 5/r32/ebp
5088 5d/pop-to-ebp
5089 c3/return
5090
5091 test-convert-index-into-array-using-offset-on-stack:
5092
5093 55/push-ebp
5094 89/<- %ebp 4/r32/esp
5095
5096 (clear-stream _test-input-stream)
5097 (clear-stream $_test-input-buffered-file->buffer)
5098 (clear-stream _test-output-stream)
5099 (clear-stream $_test-output-buffered-file->buffer)
5100
5101 (write _test-input-stream "fn foo {\n")
5102 (write _test-input-stream " var arr/eax: (addr array int) <- copy 0\n")
5103 (write _test-input-stream " var idx: int\n")
5104 (write _test-input-stream " var off/ecx: (offset int) <- compute-offset arr, idx\n")
5105 (write _test-input-stream " var x/eax: (addr int) <- index arr, off\n")
5106 (write _test-input-stream "}\n")
5107
5108 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5109 (flush _test-output-buffered-file)
5110 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5116
5117 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-using-offset-on-stack/0")
5118 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-using-offset-on-stack/1")
5119 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-using-offset-on-stack/2")
5120 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-index-into-array-using-offset-on-stack/3")
5121 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-using-offset-on-stack/4")
5122 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-using-offset-on-stack/5")
5123 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-index-into-array-using-offset-on-stack/6")
5124 (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")
5125 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-index-into-array-using-offset-on-stack/8")
5126 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-index-into-array-using-offset-on-stack/9")
5127 (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")
5128 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-using-offset-on-stack/11")
5129 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-using-offset-on-stack/12")
5130 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-using-offset-on-stack/13")
5131 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-using-offset-on-stack/14")
5132 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-using-offset-on-stack/15")
5133 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-using-offset-on-stack/16")
5134 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-using-offset-on-stack/17")
5135 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-using-offset-on-stack/18")
5136 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-using-offset-on-stack/19")
5137 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-using-offset-on-stack/20")
5138
5139 89/<- %esp 5/r32/ebp
5140 5d/pop-to-ebp
5141 c3/return
5142
5143 test-convert-index-into-array-of-bytes-using-offset-on-stack:
5144
5145 55/push-ebp
5146 89/<- %ebp 4/r32/esp
5147
5148 (clear-stream _test-input-stream)
5149 (clear-stream $_test-input-buffered-file->buffer)
5150 (clear-stream _test-output-stream)
5151 (clear-stream $_test-output-buffered-file->buffer)
5152
5153 (write _test-input-stream "fn foo {\n")
5154 (write _test-input-stream " var arr/eax: (addr array byte) <- copy 0\n")
5155 (write _test-input-stream " var idx: int\n")
5156 (write _test-input-stream " var off/ecx: (offset byte) <- compute-offset arr, idx\n")
5157 (write _test-input-stream " var x/eax: (addr byte) <- index arr, off\n")
5158 (write _test-input-stream "}\n")
5159
5160 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5161 (flush _test-output-buffered-file)
5162 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5168
5169 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/0")
5170 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/1")
5171 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/2")
5172 (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")
5173 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/4")
5174 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/5")
5175 (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")
5176 (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")
5177 (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")
5178 (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")
5179 (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")
5180 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + ecx + 4) 0x00000000/r32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/11")
5181 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/12")
5182 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000004/imm32" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/13")
5183 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/14")
5184 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/15")
5185 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/16")
5186 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/17")
5187 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/18")
5188 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/19")
5189 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-index-into-array-of-bytes-using-offset-on-stack/20")
5190
5191 89/<- %esp 5/r32/ebp
5192 5d/pop-to-ebp
5193 c3/return
5194
5195 test-convert-function-and-type-definition:
5196
5197 55/push-ebp
5198 89/<- %ebp 4/r32/esp
5199
5200 (clear-stream _test-input-stream)
5201 (clear-stream $_test-input-buffered-file->buffer)
5202 (clear-stream _test-output-stream)
5203 (clear-stream $_test-output-buffered-file->buffer)
5204
5205 (write _test-input-stream "fn foo a: (addr t) {\n")
5206 (write _test-input-stream " var _a/eax: (addr t) <- copy a\n")
5207 (write _test-input-stream " var b/ecx: (addr int) <- get _a, x\n")
5208 (write _test-input-stream " var c/ecx: (addr int) <- get _a, y\n")
5209 (write _test-input-stream "}\n")
5210 (write _test-input-stream "type t {\n")
5211 (write _test-input-stream " x: int\n")
5212 (write _test-input-stream " y: int\n")
5213 (write _test-input-stream "}\n")
5214
5215 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5216 (flush _test-output-buffered-file)
5217 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5223
5224 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-and-type-definition/0")
5225 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-and-type-definition/1")
5226 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-and-type-definition/2")
5227 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-and-type-definition/3")
5228 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-and-type-definition/4")
5229 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-and-type-definition/5")
5230 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-and-type-definition/6")
5231 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0x00000008) 0x00000000/r32" "F - test-convert-function-and-type-definition/7")
5232 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-and-type-definition/8")
5233 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000000) 0x00000001/r32" "F - test-convert-function-and-type-definition/9")
5234 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(eax + 0x00000004) 0x00000001/r32" "F - test-convert-function-and-type-definition/11")
5235 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-and-type-definition/13")
5236 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-and-type-definition/14")
5237 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-and-type-definition/15")
5238 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-and-type-definition/16")
5239 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-and-type-definition/17")
5240 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-and-type-definition/18")
5241 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-and-type-definition/19")
5242 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-and-type-definition/20")
5243
5244 89/<- %esp 5/r32/ebp
5245 5d/pop-to-ebp
5246 c3/return
5247
5248 test-type-definition-with-array:
5249
5250 55/push-ebp
5251 89/<- %ebp 4/r32/esp
5252
5253 (clear-stream _test-input-stream)
5254 (clear-stream $_test-input-buffered-file->buffer)
5255 (clear-stream _test-output-stream)
5256 (clear-stream $_test-output-buffered-file->buffer)
5257 (clear-stream _test-error-stream)
5258 (clear-stream $_test-error-buffered-file->buffer)
5259
5260 68/push 0/imm32
5261 68/push 0/imm32
5262 89/<- %edx 4/r32/esp
5263 (tailor-exit-descriptor %edx 0x10)
5264
5265 (write _test-input-stream "type t {\n")
5266 (write _test-input-stream " a: (array int 3)\n")
5267 (write _test-input-stream "}\n")
5268
5269 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5270
5271
5272 89/<- %edx 4/r32/esp
5273 (flush _test-output-buffered-file)
5274 (flush _test-error-buffered-file)
5275 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5281
5282 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-array: output should be empty")
5283 (check-next-stream-line-equal _test-error-stream "type t: 'array' elements not allowed for now" "F - test-type-definition-with-array: error message")
5284
5285 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-array: exit status")
5286
5287 81 0/subop/add %esp 8/imm32
5288
5289 5d/pop-to-ebp
5290 c3/return
5291
5292 test-type-definition-with-addr:
5293
5294 55/push-ebp
5295 89/<- %ebp 4/r32/esp
5296
5297 (clear-stream _test-input-stream)
5298 (clear-stream $_test-input-buffered-file->buffer)
5299 (clear-stream _test-output-stream)
5300 (clear-stream $_test-output-buffered-file->buffer)
5301 (clear-stream _test-error-stream)
5302 (clear-stream $_test-error-buffered-file->buffer)
5303
5304 68/push 0/imm32
5305 68/push 0/imm32
5306 89/<- %edx 4/r32/esp
5307 (tailor-exit-descriptor %edx 0x10)
5308
5309 (write _test-input-stream "type t {\n")
5310 (write _test-input-stream " a: (addr int)\n")
5311 (write _test-input-stream "}\n")
5312
5313 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5314
5315
5316 89/<- %edx 4/r32/esp
5317 (flush _test-output-buffered-file)
5318 (flush _test-error-buffered-file)
5319 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5325
5326 (check-stream-equal _test-output-stream "" "F - test-type-definition-with-addr: output should be empty")
5327 (check-next-stream-line-equal _test-error-stream "type t: 'addr' elements not allowed" "F - test-type-definition-with-addr: error message")
5328
5329 (check-ints-equal *(edx+4) 2 "F - test-type-definition-with-addr: exit status")
5330
5331 81 0/subop/add %esp 8/imm32
5332
5333 5d/pop-to-ebp
5334 c3/return
5335
5336 test-convert-function-with-local-var-with-user-defined-type:
5337
5338 55/push-ebp
5339 89/<- %ebp 4/r32/esp
5340
5341 (clear-stream _test-input-stream)
5342 (clear-stream $_test-input-buffered-file->buffer)
5343 (clear-stream _test-output-stream)
5344 (clear-stream $_test-output-buffered-file->buffer)
5345
5346 (write _test-input-stream "fn foo {\n")
5347 (write _test-input-stream " var a: t\n")
5348 (write _test-input-stream "}\n")
5349 (write _test-input-stream "type t {\n")
5350 (write _test-input-stream " x: int\n")
5351 (write _test-input-stream " y: int\n")
5352 (write _test-input-stream "}\n")
5353
5354 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5355 (flush _test-output-buffered-file)
5356 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5362
5363 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-local-var-with-user-defined-type/0")
5364 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-local-var-with-user-defined-type/1")
5365 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/2")
5366 (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")
5367 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type/4")
5368 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-local-var-with-user-defined-type/5")
5369 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/6")
5370 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-local-var-with-user-defined-type/7")
5371 (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")
5372 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type/9")
5373 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-local-var-with-user-defined-type/10")
5374 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-local-var-with-user-defined-type/11")
5375 (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")
5376 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-local-var-with-user-defined-type/13")
5377 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-local-var-with-user-defined-type/14")
5378
5379 89/<- %esp 5/r32/ebp
5380 5d/pop-to-ebp
5381 c3/return
5382
5383 test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type:
5384
5385 55/push-ebp
5386 89/<- %ebp 4/r32/esp
5387
5388 (clear-stream _test-input-stream)
5389 (clear-stream $_test-input-buffered-file->buffer)
5390 (clear-stream _test-output-stream)
5391 (clear-stream $_test-output-buffered-file->buffer)
5392
5393 (write _test-input-stream "fn foo {\n")
5394 (write _test-input-stream " var a: t\n")
5395 (write _test-input-stream "}\n")
5396 (write _test-input-stream "type t {\n")
5397 (write _test-input-stream " x: s\n")
5398 (write _test-input-stream "}\n")
5399 (write _test-input-stream "type s {\n")
5400 (write _test-input-stream " z: int\n")
5401 (write _test-input-stream "}\n")
5402
5403 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5404 (flush _test-output-buffered-file)
5405 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5411
5412 (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")
5413 (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")
5414 (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")
5415 (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")
5416 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/4")
5417 (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")
5418 (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")
5419 (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")
5420 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-local-var-with-user-defined-type-containing-user-defined-type/9")
5421 (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")
5422 (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")
5423 (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")
5424 (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")
5425 (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")
5426
5427 89/<- %esp 5/r32/ebp
5428 5d/pop-to-ebp
5429 c3/return
5430
5431 test-convert-function-call-with-arg-of-user-defined-type:
5432
5433 55/push-ebp
5434 89/<- %ebp 4/r32/esp
5435
5436 (clear-stream _test-input-stream)
5437 (clear-stream $_test-input-buffered-file->buffer)
5438 (clear-stream _test-output-stream)
5439 (clear-stream $_test-output-buffered-file->buffer)
5440
5441 (write _test-input-stream "fn f {\n")
5442 (write _test-input-stream " var a: t\n")
5443 (write _test-input-stream " foo a\n")
5444 (write _test-input-stream "}\n")
5445 (write _test-input-stream "fn foo x: t {\n")
5446 (write _test-input-stream "}\n")
5447 (write _test-input-stream "type t {\n")
5448 (write _test-input-stream " x: int\n")
5449 (write _test-input-stream " y: int\n")
5450 (write _test-input-stream "}\n")
5451
5452 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5453 (flush _test-output-buffered-file)
5454 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5460
5461 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
5462 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
5463 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
5464 (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")
5465 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
5466 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
5467
5468 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/6")
5469 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-call-with-arg-of-user-defined-type/7")
5470
5471 (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")
5472
5473 (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")
5474 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
5475 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
5476 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
5477 (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")
5478 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
5479 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
5480 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
5481 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
5482 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
5483 (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")
5484 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
5485 (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")
5486 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
5487 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
5488
5489 89/<- %esp 5/r32/ebp
5490 5d/pop-to-ebp
5491 c3/return
5492
5493 test-convert-function-call-with-arg-of-user-defined-type-register-indirect:
5494
5495 55/push-ebp
5496 89/<- %ebp 4/r32/esp
5497
5498 (clear-stream _test-input-stream)
5499 (clear-stream $_test-input-buffered-file->buffer)
5500 (clear-stream _test-output-stream)
5501 (clear-stream $_test-output-buffered-file->buffer)
5502
5503 (write _test-input-stream "fn f {\n")
5504 (write _test-input-stream " var a/eax: (addr t) <- copy 0\n")
5505 (write _test-input-stream " foo *a\n")
5506 (write _test-input-stream "}\n")
5507 (write _test-input-stream "fn foo x: t {\n")
5508 (write _test-input-stream "}\n")
5509 (write _test-input-stream "type t {\n")
5510 (write _test-input-stream " x: int\n")
5511 (write _test-input-stream " y: int\n")
5512 (write _test-input-stream "}\n")
5513
5514 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5515 (flush _test-output-buffered-file)
5516 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5522
5523 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type/0")
5524 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/1")
5525 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/2")
5526 (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")
5527 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type/4")
5528 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:loop:" "F - test-convert-function-call-with-arg-of-user-defined-type/5")
5529
5530 (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")
5531 (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")
5532
5533 (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")
5534
5535 (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")
5536 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type/10")
5537 (check-next-stream-line-equal _test-output-stream "$f:0x00000001:break:" "F - test-convert-function-call-with-arg-of-user-defined-type/11")
5538 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/12")
5539 (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")
5540 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/14")
5541 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/15")
5542 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type/16")
5543 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type/17")
5544 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/18")
5545 (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")
5546 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type/20")
5547 (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")
5548 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type/22")
5549 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type/23")
5550
5551 89/<- %esp 5/r32/ebp
5552 5d/pop-to-ebp
5553 c3/return
5554
5555
5556
5557 test-convert-function-call-with-arg-of-user-defined-type-by-reference:
5558
5559 55/push-ebp
5560 89/<- %ebp 4/r32/esp
5561
5562 (clear-stream _test-input-stream)
5563 (clear-stream $_test-input-buffered-file->buffer)
5564 (clear-stream _test-output-stream)
5565 (clear-stream $_test-output-buffered-file->buffer)
5566
5567 (write _test-input-stream "fn f {\n")
5568 (write _test-input-stream " var a: t\n")
5569 (write _test-input-stream " var b/eax: (addr t) <- address a\n")
5570 (write _test-input-stream " foo b\n")
5571 (write _test-input-stream "}\n")
5572 (write _test-input-stream "fn foo x: (addr t) {\n")
5573 (write _test-input-stream " var x/ecx: (addr int) <- copy x\n")
5574 (write _test-input-stream " increment *x\n")
5575 (write _test-input-stream "}\n")
5576 (write _test-input-stream "type t {\n")
5577 (write _test-input-stream " x: int\n")
5578 (write _test-input-stream " y: int\n")
5579 (write _test-input-stream "}\n")
5580
5581 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5582 (flush _test-output-buffered-file)
5583 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5589
5590 (check-next-stream-line-equal _test-output-stream "f:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/0")
5591 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/1")
5592 (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")
5593 (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")
5594 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/4")
5595 (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")
5596
5597 (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")
5598 (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")
5599
5600 (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")
5601 (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")
5602
5603 (check-next-stream-line-equal _test-output-stream " (foo %eax)" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/10")
5604
5605 (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")
5606 (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")
5607 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/13")
5608 (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")
5609 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/15")
5610 (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")
5611 (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")
5612 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/18")
5613 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/19")
5614 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/20")
5615 (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")
5616 (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")
5617 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/23")
5618 (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")
5619 (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")
5620 (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")
5621 (check-next-stream-line-equal _test-output-stream " ff 0/subop/increment *ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/27")
5622 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/28")
5623 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/29")
5624 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/30")
5625 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/31")
5626 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/32")
5627 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/33")
5628 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-call-with-arg-of-user-defined-type-by-reference/34")
5629
5630 89/<- %esp 5/r32/ebp
5631 5d/pop-to-ebp
5632 c3/return
5633
5634 test-convert-get-on-local-variable:
5635
5636 55/push-ebp
5637 89/<- %ebp 4/r32/esp
5638
5639 (clear-stream _test-input-stream)
5640 (clear-stream $_test-input-buffered-file->buffer)
5641 (clear-stream _test-output-stream)
5642 (clear-stream $_test-output-buffered-file->buffer)
5643
5644 (write _test-input-stream "fn foo {\n")
5645 (write _test-input-stream " var a: t\n")
5646 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5647 (write _test-input-stream "}\n")
5648 (write _test-input-stream "type t {\n")
5649 (write _test-input-stream " x: int\n")
5650 (write _test-input-stream " y: int\n")
5651 (write _test-input-stream "}\n")
5652
5653 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5654 (flush _test-output-buffered-file)
5655 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5661
5662 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-local-variable/0")
5663 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-local-variable/1")
5664 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-local-variable/2")
5665 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-local-variable/3")
5666 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-local-variable/4")
5667 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-local-variable/5")
5668
5669 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/6")
5670 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-get-on-local-variable/7")
5671
5672 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-local-variable/8")
5673
5674 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0xfffffffc) 0x00000001/r32" "F - test-convert-get-on-local-variable/9")
5675
5676 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-local-variable/10")
5677
5678 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 0x00000008/imm32" "F - test-convert-get-on-local-variable/11")
5679 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-local-variable/12")
5680 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-local-variable/13")
5681 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-local-variable/14")
5682 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-local-variable/15")
5683 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-local-variable/16")
5684 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-local-variable/17")
5685
5686 89/<- %esp 5/r32/ebp
5687 5d/pop-to-ebp
5688 c3/return
5689
5690 test-convert-get-on-function-argument:
5691
5692 55/push-ebp
5693 89/<- %ebp 4/r32/esp
5694
5695 (clear-stream _test-input-stream)
5696 (clear-stream $_test-input-buffered-file->buffer)
5697 (clear-stream _test-output-stream)
5698 (clear-stream $_test-output-buffered-file->buffer)
5699
5700 (write _test-input-stream "fn foo a: t {\n")
5701 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5702 (write _test-input-stream "}\n")
5703 (write _test-input-stream "type t {\n")
5704 (write _test-input-stream " x: int\n")
5705 (write _test-input-stream " y: int\n")
5706 (write _test-input-stream "}\n")
5707
5708 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5709 (flush _test-output-buffered-file)
5710 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5716
5717 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument/0")
5718 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument/1")
5719 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument/2")
5720 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument/3")
5721 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument/4")
5722 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument/5")
5723
5724 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument/6")
5725
5726 (check-next-stream-line-equal _test-output-stream " 8d/copy-address *(ebp+0x0000000c) 0x00000001/r32" "F - test-convert-get-on-function-argument/7")
5727
5728 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument/8")
5729 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument/9")
5730 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument/10")
5731 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument/11")
5732 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument/12")
5733 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument/13")
5734 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument/14")
5735
5736 89/<- %esp 5/r32/ebp
5737 5d/pop-to-ebp
5738 c3/return
5739
5740 test-convert-get-on-function-argument-with-known-type:
5741
5742 55/push-ebp
5743 89/<- %ebp 4/r32/esp
5744
5745 (clear-stream _test-input-stream)
5746 (clear-stream $_test-input-buffered-file->buffer)
5747 (clear-stream _test-output-stream)
5748 (clear-stream $_test-output-buffered-file->buffer)
5749
5750 (write _test-input-stream "type t {\n")
5751 (write _test-input-stream " x: int\n")
5752 (write _test-input-stream " y: int\n")
5753 (write _test-input-stream "}\n")
5754 (write _test-input-stream "fn foo a: t {\n")
5755 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
5756 (write _test-input-stream "}\n")
5757
5758 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5759 (flush _test-output-buffered-file)
5760 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
5766
5767 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-get-on-function-argument-with-known-type/0")
5768 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-get-on-function-argument-with-known-type/1")
5769 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-get-on-function-argument-with-known-type/2")
5770 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-get-on-function-argument-with-known-type/3")
5771 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-get-on-function-argument-with-known-type/4")
5772 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-get-on-function-argument-with-known-type/5")
5773
5774 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-get-on-function-argument-with-known-type/6")
5775
5776 (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")
5777
5778 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-get-on-function-argument-with-known-type/8")
5779 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-get-on-function-argument-with-known-type/9")
5780 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-get-on-function-argument-with-known-type/10")
5781 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-get-on-function-argument-with-known-type/11")
5782 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-get-on-function-argument-with-known-type/12")
5783 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-get-on-function-argument-with-known-type/13")
5784 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-get-on-function-argument-with-known-type/14")
5785
5786 89/<- %esp 5/r32/ebp
5787 5d/pop-to-ebp
5788 c3/return
5789
5790 test-add-with-too-many-inouts:
5791
5792 55/push-ebp
5793 89/<- %ebp 4/r32/esp
5794
5795 (clear-stream _test-input-stream)
5796 (clear-stream $_test-input-buffered-file->buffer)
5797 (clear-stream _test-output-stream)
5798 (clear-stream $_test-output-buffered-file->buffer)
5799 (clear-stream _test-error-stream)
5800 (clear-stream $_test-error-buffered-file->buffer)
5801
5802 68/push 0/imm32
5803 68/push 0/imm32
5804 89/<- %edx 4/r32/esp
5805 (tailor-exit-descriptor %edx 0x10)
5806
5807 (write _test-input-stream "fn foo {\n")
5808 (write _test-input-stream " var a: int\n")
5809 (write _test-input-stream " var b/ecx: int <- add a, 0\n")
5810 (write _test-input-stream "}\n")
5811
5812 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5813
5814
5815 89/<- %edx 4/r32/esp
5816 (flush _test-output-buffered-file)
5817 (flush _test-error-buffered-file)
5818 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5824
5825 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts: output should be empty")
5826 (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")
5827
5828 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts: exit status")
5829
5830 81 0/subop/add %esp 8/imm32
5831
5832 5d/pop-to-ebp
5833 c3/return
5834
5835 test-add-with-too-many-inouts-2:
5836
5837 55/push-ebp
5838 89/<- %ebp 4/r32/esp
5839
5840 (clear-stream _test-input-stream)
5841 (clear-stream $_test-input-buffered-file->buffer)
5842 (clear-stream _test-output-stream)
5843 (clear-stream $_test-output-buffered-file->buffer)
5844 (clear-stream _test-error-stream)
5845 (clear-stream $_test-error-buffered-file->buffer)
5846
5847 68/push 0/imm32
5848 68/push 0/imm32
5849 89/<- %edx 4/r32/esp
5850 (tailor-exit-descriptor %edx 0x10)
5851
5852 (write _test-input-stream "fn foo {\n")
5853 (write _test-input-stream " var a: int\n")
5854 (write _test-input-stream " add-to a, 0, 1\n")
5855 (write _test-input-stream "}\n")
5856
5857 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5858
5859
5860 89/<- %edx 4/r32/esp
5861 (flush _test-output-buffered-file)
5862 (flush _test-error-buffered-file)
5863 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5869
5870 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-inouts-2: output should be empty")
5871 (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")
5872
5873 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-inouts-2: exit status")
5874
5875 81 0/subop/add %esp 8/imm32
5876
5877 5d/pop-to-ebp
5878 c3/return
5879
5880 test-add-with-too-many-outputs:
5881
5882 55/push-ebp
5883 89/<- %ebp 4/r32/esp
5884
5885 (clear-stream _test-input-stream)
5886 (clear-stream $_test-input-buffered-file->buffer)
5887 (clear-stream _test-output-stream)
5888 (clear-stream $_test-output-buffered-file->buffer)
5889 (clear-stream _test-error-stream)
5890 (clear-stream $_test-error-buffered-file->buffer)
5891
5892 68/push 0/imm32
5893 68/push 0/imm32
5894 89/<- %edx 4/r32/esp
5895 (tailor-exit-descriptor %edx 0x10)
5896
5897 (write _test-input-stream "fn foo {\n")
5898 (write _test-input-stream " var a/eax: int <- copy 0\n")
5899 (write _test-input-stream " var b/ebx: int <- copy 0\n")
5900 (write _test-input-stream " var c/ecx: int <- copy 0\n")
5901 (write _test-input-stream " c, b <- add a\n")
5902 (write _test-input-stream "}\n")
5903
5904 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5905
5906
5907 89/<- %edx 4/r32/esp
5908 (flush _test-output-buffered-file)
5909 (flush _test-error-buffered-file)
5910 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5916
5917 (check-stream-equal _test-output-stream "" "F - test-add-with-too-many-outputs: output should be empty")
5918 (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")
5919
5920 (check-ints-equal *(edx+4) 2 "F - test-add-with-too-many-outputs: exit status")
5921
5922 81 0/subop/add %esp 8/imm32
5923
5924 5d/pop-to-ebp
5925 c3/return
5926
5927 test-add-with-non-number:
5928
5929 55/push-ebp
5930 89/<- %ebp 4/r32/esp
5931
5932 (clear-stream _test-input-stream)
5933 (clear-stream $_test-input-buffered-file->buffer)
5934 (clear-stream _test-output-stream)
5935 (clear-stream $_test-output-buffered-file->buffer)
5936 (clear-stream _test-error-stream)
5937 (clear-stream $_test-error-buffered-file->buffer)
5938
5939 68/push 0/imm32
5940 68/push 0/imm32
5941 89/<- %edx 4/r32/esp
5942 (tailor-exit-descriptor %edx 0x10)
5943
5944 (write _test-input-stream "fn foo {\n")
5945 (write _test-input-stream " var a: int\n")
5946 (write _test-input-stream " var b/ecx: (addr int) <- add a\n")
5947 (write _test-input-stream "}\n")
5948
5949 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
5950
5951
5952 89/<- %edx 4/r32/esp
5953 (flush _test-output-buffered-file)
5954 (flush _test-error-buffered-file)
5955 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
5961
5962 (check-stream-equal _test-output-stream "" "F - test-add-with-non-number: output should be empty")
5963 (check-next-stream-line-equal _test-error-stream "fn foo: stmt add: only non-addr scalar args permitted" "F - test-add-with-non-number: error message")
5964
5965 (check-ints-equal *(edx+4) 2 "F - test-add-with-non-number: exit status")
5966
5967 81 0/subop/add %esp 8/imm32
5968
5969 5d/pop-to-ebp
5970 c3/return
5971
5972 test-add-with-addr-dereferenced:
5973
5974 55/push-ebp
5975 89/<- %ebp 4/r32/esp
5976
5977 (clear-stream _test-input-stream)
5978 (clear-stream $_test-input-buffered-file->buffer)
5979 (clear-stream _test-output-stream)
5980 (clear-stream $_test-output-buffered-file->buffer)
5981
5982 (write _test-input-stream "fn foo {\n")
5983 (write _test-input-stream " var a/eax: (addr int) <- copy 0\n")
5984 (write _test-input-stream " add-to *a, 1\n")
5985 (write _test-input-stream "}\n")
5986
5987 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
5988 (flush _test-output-buffered-file)
5989
5990
5991 89/<- %esp 5/r32/ebp
5992 5d/pop-to-ebp
5993 c3/return
5994
5995 test-get-with-wrong-field:
5996
5997 55/push-ebp
5998 89/<- %ebp 4/r32/esp
5999
6000 (clear-stream _test-input-stream)
6001 (clear-stream $_test-input-buffered-file->buffer)
6002 (clear-stream _test-output-stream)
6003 (clear-stream $_test-output-buffered-file->buffer)
6004 (clear-stream _test-error-stream)
6005 (clear-stream $_test-error-buffered-file->buffer)
6006
6007 68/push 0/imm32
6008 68/push 0/imm32
6009 89/<- %edx 4/r32/esp
6010 (tailor-exit-descriptor %edx 0x10)
6011
6012 (write _test-input-stream "fn foo {\n")
6013 (write _test-input-stream " var a: t\n")
6014 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6015 (write _test-input-stream "}\n")
6016 (write _test-input-stream "type t {\n")
6017 (write _test-input-stream " x: int\n")
6018 (write _test-input-stream "}\n")
6019
6020 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6021
6022
6023 89/<- %edx 4/r32/esp
6024 (flush _test-output-buffered-file)
6025 (flush _test-error-buffered-file)
6026 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6032
6033 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-field: output should be empty")
6034 (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")
6035
6036 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-field: exit status")
6037
6038 81 0/subop/add %esp 8/imm32
6039
6040 5d/pop-to-ebp
6041 c3/return
6042
6043 test-get-with-wrong-base-type:
6044
6045 55/push-ebp
6046 89/<- %ebp 4/r32/esp
6047
6048 (clear-stream _test-input-stream)
6049 (clear-stream $_test-input-buffered-file->buffer)
6050 (clear-stream _test-output-stream)
6051 (clear-stream $_test-output-buffered-file->buffer)
6052 (clear-stream _test-error-stream)
6053 (clear-stream $_test-error-buffered-file->buffer)
6054
6055 68/push 0/imm32
6056 68/push 0/imm32
6057 89/<- %edx 4/r32/esp
6058 (tailor-exit-descriptor %edx 0x10)
6059
6060 (write _test-input-stream "fn foo {\n")
6061 (write _test-input-stream " var a: int\n")
6062 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6063 (write _test-input-stream "}\n")
6064
6065 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6066
6067
6068 89/<- %edx 4/r32/esp
6069 (flush _test-output-buffered-file)
6070 (flush _test-error-buffered-file)
6071 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6077
6078 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type: output should be empty")
6079 (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")
6080
6081 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type: exit status")
6082
6083 81 0/subop/add %esp 8/imm32
6084
6085 5d/pop-to-ebp
6086 c3/return
6087
6088 test-get-with-wrong-base-type-2:
6089
6090 55/push-ebp
6091 89/<- %ebp 4/r32/esp
6092
6093 (clear-stream _test-input-stream)
6094 (clear-stream $_test-input-buffered-file->buffer)
6095 (clear-stream _test-output-stream)
6096 (clear-stream $_test-output-buffered-file->buffer)
6097 (clear-stream _test-error-stream)
6098 (clear-stream $_test-error-buffered-file->buffer)
6099
6100 68/push 0/imm32
6101 68/push 0/imm32
6102 89/<- %edx 4/r32/esp
6103 (tailor-exit-descriptor %edx 0x10)
6104
6105 (write _test-input-stream "fn foo {\n")
6106 (write _test-input-stream " var a: (addr t)\n")
6107 (write _test-input-stream " var c/ecx: (addr int) <- get a, y\n")
6108 (write _test-input-stream "}\n")
6109 (write _test-input-stream "type t {\n")
6110 (write _test-input-stream " x: int\n")
6111 (write _test-input-stream "}\n")
6112
6113 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6114
6115
6116 89/<- %edx 4/r32/esp
6117 (flush _test-output-buffered-file)
6118 (flush _test-error-buffered-file)
6119 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6125
6126 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-base-type-2: output should be empty")
6127 (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")
6128
6129 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-base-type-2: exit status")
6130
6131 81 0/subop/add %esp 8/imm32
6132
6133 5d/pop-to-ebp
6134 c3/return
6135
6136 test-get-with-wrong-offset-type:
6137
6138 55/push-ebp
6139 89/<- %ebp 4/r32/esp
6140
6141 (clear-stream _test-input-stream)
6142 (clear-stream $_test-input-buffered-file->buffer)
6143 (clear-stream _test-output-stream)
6144 (clear-stream $_test-output-buffered-file->buffer)
6145 (clear-stream _test-error-stream)
6146 (clear-stream $_test-error-buffered-file->buffer)
6147
6148 68/push 0/imm32
6149 68/push 0/imm32
6150 89/<- %edx 4/r32/esp
6151 (tailor-exit-descriptor %edx 0x10)
6152
6153 (write _test-input-stream "fn foo {\n")
6154 (write _test-input-stream " var a: t\n")
6155 (write _test-input-stream " var b: int\n")
6156 (write _test-input-stream " var c/ecx: (addr int) <- get a, b\n")
6157 (write _test-input-stream "}\n")
6158 (write _test-input-stream "type t {\n")
6159 (write _test-input-stream " x: int\n")
6160 (write _test-input-stream "}\n")
6161
6162 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6163
6164
6165 89/<- %edx 4/r32/esp
6166 (flush _test-output-buffered-file)
6167 (flush _test-error-buffered-file)
6168 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6174
6175 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-offset-type: output should be empty")
6176 (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")
6177
6178 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-offset-type: exit status")
6179
6180 81 0/subop/add %esp 8/imm32
6181
6182 5d/pop-to-ebp
6183 c3/return
6184
6185 test-get-with-wrong-output-type:
6186
6187 55/push-ebp
6188 89/<- %ebp 4/r32/esp
6189
6190 (clear-stream _test-input-stream)
6191 (clear-stream $_test-input-buffered-file->buffer)
6192 (clear-stream _test-output-stream)
6193 (clear-stream $_test-output-buffered-file->buffer)
6194 (clear-stream _test-error-stream)
6195 (clear-stream $_test-error-buffered-file->buffer)
6196
6197 68/push 0/imm32
6198 68/push 0/imm32
6199 89/<- %edx 4/r32/esp
6200 (tailor-exit-descriptor %edx 0x10)
6201
6202 (write _test-input-stream "fn foo {\n")
6203 (write _test-input-stream " var a: t\n")
6204 (write _test-input-stream " var c: (addr int)\n")
6205 (write _test-input-stream " c <- get a, x\n")
6206 (write _test-input-stream "}\n")
6207 (write _test-input-stream "type t {\n")
6208 (write _test-input-stream " x: int\n")
6209 (write _test-input-stream "}\n")
6210
6211 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6212
6213
6214 89/<- %edx 4/r32/esp
6215 (flush _test-output-buffered-file)
6216 (flush _test-error-buffered-file)
6217 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6223
6224 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type: output should be empty")
6225 (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")
6226
6227 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type: exit status")
6228
6229 81 0/subop/add %esp 8/imm32
6230
6231 5d/pop-to-ebp
6232 c3/return
6233
6234 test-get-with-wrong-output-type-2:
6235
6236 55/push-ebp
6237 89/<- %ebp 4/r32/esp
6238
6239 (clear-stream _test-input-stream)
6240 (clear-stream $_test-input-buffered-file->buffer)
6241 (clear-stream _test-output-stream)
6242 (clear-stream $_test-output-buffered-file->buffer)
6243 (clear-stream _test-error-stream)
6244 (clear-stream $_test-error-buffered-file->buffer)
6245
6246 68/push 0/imm32
6247 68/push 0/imm32
6248 89/<- %edx 4/r32/esp
6249 (tailor-exit-descriptor %edx 0x10)
6250
6251 (write _test-input-stream "fn foo {\n")
6252 (write _test-input-stream " var a: t\n")
6253 (write _test-input-stream " var c/ecx: int <- get a, x\n")
6254 (write _test-input-stream "}\n")
6255 (write _test-input-stream "type t {\n")
6256 (write _test-input-stream " x: int\n")
6257 (write _test-input-stream "}\n")
6258
6259 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6260
6261
6262 89/<- %edx 4/r32/esp
6263 (flush _test-output-buffered-file)
6264 (flush _test-error-buffered-file)
6265 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6271
6272 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-2: output should be empty")
6273 (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")
6274
6275 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-2: exit status")
6276
6277 81 0/subop/add %esp 8/imm32
6278
6279 5d/pop-to-ebp
6280 c3/return
6281
6282 test-get-with-wrong-output-type-3:
6283
6284 55/push-ebp
6285 89/<- %ebp 4/r32/esp
6286
6287 (clear-stream _test-input-stream)
6288 (clear-stream $_test-input-buffered-file->buffer)
6289 (clear-stream _test-output-stream)
6290 (clear-stream $_test-output-buffered-file->buffer)
6291 (clear-stream _test-error-stream)
6292 (clear-stream $_test-error-buffered-file->buffer)
6293
6294 68/push 0/imm32
6295 68/push 0/imm32
6296 89/<- %edx 4/r32/esp
6297 (tailor-exit-descriptor %edx 0x10)
6298
6299 (write _test-input-stream "fn foo {\n")
6300 (write _test-input-stream " var a: t\n")
6301 (write _test-input-stream " var c/ecx: (array int) <- get a, x\n")
6302 (write _test-input-stream "}\n")
6303 (write _test-input-stream "type t {\n")
6304 (write _test-input-stream " x: int\n")
6305 (write _test-input-stream "}\n")
6306
6307 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6308
6309
6310 89/<- %edx 4/r32/esp
6311 (flush _test-output-buffered-file)
6312 (flush _test-error-buffered-file)
6313 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6319
6320 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-3: output should be empty")
6321 (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")
6322
6323 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-3: exit status")
6324
6325 81 0/subop/add %esp 8/imm32
6326
6327 5d/pop-to-ebp
6328 c3/return
6329
6330 test-get-with-wrong-output-type-4:
6331
6332 55/push-ebp
6333 89/<- %ebp 4/r32/esp
6334
6335 (clear-stream _test-input-stream)
6336 (clear-stream $_test-input-buffered-file->buffer)
6337 (clear-stream _test-output-stream)
6338 (clear-stream $_test-output-buffered-file->buffer)
6339 (clear-stream _test-error-stream)
6340 (clear-stream $_test-error-buffered-file->buffer)
6341
6342 68/push 0/imm32
6343 68/push 0/imm32
6344 89/<- %edx 4/r32/esp
6345 (tailor-exit-descriptor %edx 0x10)
6346
6347 (write _test-input-stream "fn foo {\n")
6348 (write _test-input-stream " var a: t\n")
6349 (write _test-input-stream " var c/ecx: (addr boolean) <- get a, x\n")
6350 (write _test-input-stream "}\n")
6351 (write _test-input-stream "type t {\n")
6352 (write _test-input-stream " x: int\n")
6353 (write _test-input-stream "}\n")
6354
6355 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6356
6357
6358 89/<- %edx 4/r32/esp
6359 (flush _test-output-buffered-file)
6360 (flush _test-error-buffered-file)
6361 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6367
6368 (check-stream-equal _test-output-stream "" "F - test-get-with-wrong-output-type-4: output should be empty")
6369 (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")
6370
6371 (check-ints-equal *(edx+4) 2 "F - test-get-with-wrong-output-type-4: exit status")
6372
6373 81 0/subop/add %esp 8/imm32
6374
6375 5d/pop-to-ebp
6376 c3/return
6377
6378 test-get-with-wrong-output-type-5:
6379
6380 55/push-ebp
6381 89/<- %ebp 4/r32/esp
6382
6383 (clear-stream _test-input-stream)
6384 (clear-stream $_test-input-buffered-file->buffer)
6385 (clear-stream _test-output-stream)
6386 (clear-stream $_test-output-buffered-file->buffer)
6387
6388 (write _test-input-stream "fn foo {\n")
6389 (write _test-input-stream " var a: t\n")
6390 (write _test-input-stream " var c/ecx: (addr handle int) <- get a, x\n")
6391 (write _test-input-stream "}\n")
6392 (write _test-input-stream "type t {\n")
6393 (write _test-input-stream " x: (handle int)\n")
6394 (write _test-input-stream "}\n")
6395
6396 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6397 (flush _test-output-buffered-file)
6398
6399
6400 89/<- %esp 5/r32/ebp
6401 5d/pop-to-ebp
6402 c3/return
6403
6404 test-get-with-too-few-inouts:
6405
6406 55/push-ebp
6407 89/<- %ebp 4/r32/esp
6408
6409 (clear-stream _test-input-stream)
6410 (clear-stream $_test-input-buffered-file->buffer)
6411 (clear-stream _test-output-stream)
6412 (clear-stream $_test-output-buffered-file->buffer)
6413 (clear-stream _test-error-stream)
6414 (clear-stream $_test-error-buffered-file->buffer)
6415
6416 68/push 0/imm32
6417 68/push 0/imm32
6418 89/<- %edx 4/r32/esp
6419 (tailor-exit-descriptor %edx 0x10)
6420
6421 (write _test-input-stream "fn foo {\n")
6422 (write _test-input-stream " var a: t\n")
6423 (write _test-input-stream " var c/ecx: (addr int) <- get a\n")
6424 (write _test-input-stream "}\n")
6425 (write _test-input-stream "type t {\n")
6426 (write _test-input-stream " x: int\n")
6427 (write _test-input-stream "}\n")
6428
6429 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6430
6431
6432 89/<- %edx 4/r32/esp
6433 (flush _test-output-buffered-file)
6434 (flush _test-error-buffered-file)
6435 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6441
6442 (check-stream-equal _test-output-stream "" "F - test-get-with-too-few-inouts: output should be empty")
6443 (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")
6444
6445 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-few-inouts: exit status")
6446
6447 81 0/subop/add %esp 8/imm32
6448
6449 5d/pop-to-ebp
6450 c3/return
6451
6452 test-get-with-too-many-inouts:
6453
6454 55/push-ebp
6455 89/<- %ebp 4/r32/esp
6456
6457 (clear-stream _test-input-stream)
6458 (clear-stream $_test-input-buffered-file->buffer)
6459 (clear-stream _test-output-stream)
6460 (clear-stream $_test-output-buffered-file->buffer)
6461 (clear-stream _test-error-stream)
6462 (clear-stream $_test-error-buffered-file->buffer)
6463
6464 68/push 0/imm32
6465 68/push 0/imm32
6466 89/<- %edx 4/r32/esp
6467 (tailor-exit-descriptor %edx 0x10)
6468
6469 (write _test-input-stream "fn foo {\n")
6470 (write _test-input-stream " var a: t\n")
6471 (write _test-input-stream " var c/ecx: (addr int) <- get a, x, 0\n")
6472 (write _test-input-stream "}\n")
6473 (write _test-input-stream "type t {\n")
6474 (write _test-input-stream " x: int\n")
6475 (write _test-input-stream "}\n")
6476
6477 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6478
6479
6480 89/<- %edx 4/r32/esp
6481 (flush _test-output-buffered-file)
6482 (flush _test-error-buffered-file)
6483 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6489
6490 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-inouts: output should be empty")
6491 (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")
6492
6493 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-inouts: exit status")
6494
6495 81 0/subop/add %esp 8/imm32
6496
6497 5d/pop-to-ebp
6498 c3/return
6499
6500 test-get-with-no-output:
6501
6502 55/push-ebp
6503 89/<- %ebp 4/r32/esp
6504
6505 (clear-stream _test-input-stream)
6506 (clear-stream $_test-input-buffered-file->buffer)
6507 (clear-stream _test-output-stream)
6508 (clear-stream $_test-output-buffered-file->buffer)
6509 (clear-stream _test-error-stream)
6510 (clear-stream $_test-error-buffered-file->buffer)
6511
6512 68/push 0/imm32
6513 68/push 0/imm32
6514 89/<- %edx 4/r32/esp
6515 (tailor-exit-descriptor %edx 0x10)
6516
6517 (write _test-input-stream "fn foo {\n")
6518 (write _test-input-stream " var a: t\n")
6519 (write _test-input-stream " get a, x\n")
6520 (write _test-input-stream "}\n")
6521 (write _test-input-stream "type t {\n")
6522 (write _test-input-stream " x: int\n")
6523 (write _test-input-stream "}\n")
6524
6525 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6526
6527
6528 89/<- %edx 4/r32/esp
6529 (flush _test-output-buffered-file)
6530 (flush _test-error-buffered-file)
6531 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6537
6538 (check-stream-equal _test-output-stream "" "F - test-get-with-no-output: output should be empty")
6539 (check-next-stream-line-equal _test-error-stream "fn foo: stmt get: must have an output" "F - test-get-with-no-output: error message")
6540
6541 (check-ints-equal *(edx+4) 2 "F - test-get-with-no-output: exit status")
6542
6543 81 0/subop/add %esp 8/imm32
6544
6545 5d/pop-to-ebp
6546 c3/return
6547
6548 test-get-with-too-many-outputs:
6549
6550 55/push-ebp
6551 89/<- %ebp 4/r32/esp
6552
6553 (clear-stream _test-input-stream)
6554 (clear-stream $_test-input-buffered-file->buffer)
6555 (clear-stream _test-output-stream)
6556 (clear-stream $_test-output-buffered-file->buffer)
6557 (clear-stream _test-error-stream)
6558 (clear-stream $_test-error-buffered-file->buffer)
6559
6560 68/push 0/imm32
6561 68/push 0/imm32
6562 89/<- %edx 4/r32/esp
6563 (tailor-exit-descriptor %edx 0x10)
6564
6565 (write _test-input-stream "fn foo {\n")
6566 (write _test-input-stream " var a: t\n")
6567 (write _test-input-stream " var b: int\n")
6568 (write _test-input-stream " var c/eax: (addr int) <- copy 0\n")
6569 (write _test-input-stream " c, b <- get a, x\n")
6570 (write _test-input-stream "}\n")
6571 (write _test-input-stream "type t {\n")
6572 (write _test-input-stream " x: int\n")
6573 (write _test-input-stream "}\n")
6574
6575 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6576
6577
6578 89/<- %edx 4/r32/esp
6579 (flush _test-output-buffered-file)
6580 (flush _test-error-buffered-file)
6581 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6587
6588 (check-stream-equal _test-output-stream "" "F - test-get-with-too-many-outputs: output should be empty")
6589 (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")
6590
6591 (check-ints-equal *(edx+4) 2 "F - test-get-with-too-many-outputs: exit status")
6592
6593 81 0/subop/add %esp 8/imm32
6594
6595 5d/pop-to-ebp
6596 c3/return
6597
6598 test-convert-array-of-user-defined-types:
6599
6600 55/push-ebp
6601 89/<- %ebp 4/r32/esp
6602
6603 (clear-stream _test-input-stream)
6604 (clear-stream $_test-input-buffered-file->buffer)
6605 (clear-stream _test-output-stream)
6606 (clear-stream $_test-output-buffered-file->buffer)
6607
6608 (write _test-input-stream "type t {\n")
6609 (write _test-input-stream " x: int\n")
6610 (write _test-input-stream " y: int\n")
6611 (write _test-input-stream "}\n")
6612 (write _test-input-stream "fn foo {\n")
6613 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
6614 (write _test-input-stream " var idx/ecx: int <- copy 3\n")
6615 (write _test-input-stream " var x/eax: (addr t) <- index arr, idx\n")
6616 (write _test-input-stream "}\n")
6617
6618 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6619 (flush _test-output-buffered-file)
6620 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6626
6627 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-array-of-user-defined-types/0")
6628 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-array-of-user-defined-types/1")
6629 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-array-of-user-defined-types/2")
6630 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-array-of-user-defined-types/3")
6631 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-array-of-user-defined-types/4")
6632 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-array-of-user-defined-types/5")
6633 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-array-of-user-defined-types/6")
6634 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 0/imm32" "F - test-convert-array-of-user-defined-types/7")
6635 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-array-of-user-defined-types/8")
6636 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 3/imm32" "F - test-convert-array-of-user-defined-types/9")
6637 (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")
6638 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-array-of-user-defined-types/13")
6639 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-array-of-user-defined-types/14")
6640 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-array-of-user-defined-types/15")
6641 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-array-of-user-defined-types/16")
6642 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-array-of-user-defined-types/17")
6643 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-array-of-user-defined-types/18")
6644 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-array-of-user-defined-types/19")
6645 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-array-of-user-defined-types/20")
6646
6647 89/<- %esp 5/r32/ebp
6648 5d/pop-to-ebp
6649 c3/return
6650
6651 test-convert-length-of-array-of-user-defined-types-to-eax:
6652
6653 55/push-ebp
6654 89/<- %ebp 4/r32/esp
6655
6656 (clear-stream _test-input-stream)
6657 (clear-stream $_test-input-buffered-file->buffer)
6658 (clear-stream _test-output-stream)
6659 (clear-stream $_test-output-buffered-file->buffer)
6660
6661 (write _test-input-stream "type t {\n")
6662 (write _test-input-stream " x: int\n")
6663 (write _test-input-stream " y: int\n")
6664 (write _test-input-stream " z: int\n")
6665 (write _test-input-stream "}\n")
6666 (write _test-input-stream "fn foo {\n")
6667 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
6668 (write _test-input-stream " var x/eax: int <- length arr\n")
6669 (write _test-input-stream "}\n")
6670
6671 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6672 (flush _test-output-buffered-file)
6673 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6679
6680 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/0")
6681 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/1")
6682 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-eax/2")
6683 (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")
6684 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-eax/4")
6685 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/5")
6686
6687 (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")
6688 (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")
6689
6690 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/8")
6691 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-eax/9")
6692 (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")
6693 (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")
6694 (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")
6695 (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")
6696 (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")
6697 (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")
6698
6699 (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")
6700
6701 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-eax/17")
6702 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-eax/18")
6703 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-eax/19")
6704 (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")
6705 (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")
6706 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-eax/22")
6707
6708 89/<- %esp 5/r32/ebp
6709 5d/pop-to-ebp
6710 c3/return
6711
6712 test-convert-length-of-array-of-user-defined-types-to-ecx:
6713
6714 55/push-ebp
6715 89/<- %ebp 4/r32/esp
6716
6717 (clear-stream _test-input-stream)
6718 (clear-stream $_test-input-buffered-file->buffer)
6719 (clear-stream _test-output-stream)
6720 (clear-stream $_test-output-buffered-file->buffer)
6721
6722 (write _test-input-stream "type t {\n")
6723 (write _test-input-stream " x: int\n")
6724 (write _test-input-stream " y: int\n")
6725 (write _test-input-stream " z: int\n")
6726 (write _test-input-stream "}\n")
6727 (write _test-input-stream "fn foo {\n")
6728 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
6729 (write _test-input-stream " var x/ecx: int <- length arr\n")
6730 (write _test-input-stream "}\n")
6731
6732 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6733 (flush _test-output-buffered-file)
6734 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6740
6741 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/0")
6742 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/1")
6743 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/2")
6744 (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")
6745 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/4")
6746 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/5")
6747
6748 (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")
6749 (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")
6750
6751 (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")
6752
6753 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/9")
6754 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/10")
6755 (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")
6756 (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")
6757 (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")
6758 (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")
6759 (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")
6760 (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")
6761 (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")
6762
6763 (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")
6764
6765 (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")
6766
6767 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/20")
6768 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/21")
6769 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/22")
6770 (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")
6771 (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")
6772 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-ecx/25")
6773
6774 89/<- %esp 5/r32/ebp
6775 5d/pop-to-ebp
6776 c3/return
6777
6778 test-convert-length-of-array-of-user-defined-types-to-edx:
6779
6780 55/push-ebp
6781 89/<- %ebp 4/r32/esp
6782
6783 (clear-stream _test-input-stream)
6784 (clear-stream $_test-input-buffered-file->buffer)
6785 (clear-stream _test-output-stream)
6786 (clear-stream $_test-output-buffered-file->buffer)
6787
6788 (write _test-input-stream "type t {\n")
6789 (write _test-input-stream " x: int\n")
6790 (write _test-input-stream " y: int\n")
6791 (write _test-input-stream " z: int\n")
6792 (write _test-input-stream "}\n")
6793 (write _test-input-stream "fn foo {\n")
6794 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
6795 (write _test-input-stream " var x/edx: int <- length arr\n")
6796 (write _test-input-stream "}\n")
6797
6798 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6799 (flush _test-output-buffered-file)
6800 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6806
6807 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/0")
6808 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/1")
6809 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types-to-edx/2")
6810 (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")
6811 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types-to-edx/4")
6812 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/5")
6813
6814 (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")
6815 (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")
6816
6817 (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")
6818
6819 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types-to-edx/9")
6820 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types-to-edx/10")
6821 (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")
6822 (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")
6823 (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")
6824 (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")
6825 (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")
6826 (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")
6827 (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")
6828
6829 (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")
6830
6831 (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")
6832
6833 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types-to-edx/20")
6834 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types-to-edx/21")
6835 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types-to-edx/22")
6836 (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")
6837 (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")
6838 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types-to-edx/25")
6839
6840 89/<- %esp 5/r32/ebp
6841 5d/pop-to-ebp
6842 c3/return
6843
6844 test-convert-length-of-array-of-user-defined-types:
6845
6846 55/push-ebp
6847 89/<- %ebp 4/r32/esp
6848
6849 (clear-stream _test-input-stream)
6850 (clear-stream $_test-input-buffered-file->buffer)
6851 (clear-stream _test-output-stream)
6852 (clear-stream $_test-output-buffered-file->buffer)
6853
6854 (write _test-input-stream "type t {\n")
6855 (write _test-input-stream " x: int\n")
6856 (write _test-input-stream " y: int\n")
6857 (write _test-input-stream " z: int\n")
6858 (write _test-input-stream "}\n")
6859 (write _test-input-stream "fn foo {\n")
6860 (write _test-input-stream " var arr/eax: (addr array t) <- copy 0\n")
6861 (write _test-input-stream " var x/ebx: int <- length arr\n")
6862 (write _test-input-stream "}\n")
6863
6864 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
6865 (flush _test-output-buffered-file)
6866 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
6872
6873 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-length-of-array-of-user-defined-types/0")
6874 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-length-of-array-of-user-defined-types/1")
6875 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-length-of-array-of-user-defined-types/2")
6876 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-length-of-array-of-user-defined-types/3")
6877 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-length-of-array-of-user-defined-types/4")
6878 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-length-of-array-of-user-defined-types/5")
6879 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-length-of-array-of-user-defined-types/6")
6880 (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")
6881 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ebx" "F - test-convert-length-of-array-of-user-defined-types/8")
6882 (check-next-stream-line-equal _test-output-stream " 50/push-eax" "F - test-convert-length-of-array-of-user-defined-types/9")
6883 (check-next-stream-line-equal _test-output-stream " 51/push-ecx" "F - test-convert-length-of-array-of-user-defined-types/10")
6884 (check-next-stream-line-equal _test-output-stream " 52/push-edx" "F - test-convert-length-of-array-of-user-defined-types/11")
6885 (check-next-stream-line-equal _test-output-stream " 8b/-> *eax 0x00000000/r32" "F - test-convert-length-of-array-of-user-defined-types/12")
6886 (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")
6887 (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")
6888 (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")
6889 (check-next-stream-line-equal _test-output-stream " 89/<- %ebx 0/r32/eax" "F - test-convert-length-of-array-of-user-defined-types/16")
6890 (check-next-stream-line-equal _test-output-stream " 5a/pop-to-edx" "F - test-convert-length-of-array-of-user-defined-types/17")
6891 (check-next-stream-line-equal _test-output-stream " 59/pop-to-ecx" "F - test-convert-length-of-array-of-user-defined-types/18")
6892 (check-next-stream-line-equal _test-output-stream " 58/pop-to-eax" "F - test-convert-length-of-array-of-user-defined-types/19")
6893 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ebx" "F - test-convert-length-of-array-of-user-defined-types/20")
6894 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-length-of-array-of-user-defined-types/21")
6895 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-length-of-array-of-user-defined-types/22")
6896 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-length-of-array-of-user-defined-types/23")
6897 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-length-of-array-of-user-defined-types/24")
6898 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-length-of-array-of-user-defined-types/25")
6899 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-length-of-array-of-user-defined-types/26")
6900 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-length-of-array-of-user-defined-types/27")
6901
6902 89/<- %esp 5/r32/ebp
6903 5d/pop-to-ebp
6904 c3/return
6905
6906 test-index-with-non-array-atom-base-type:
6907
6908 55/push-ebp
6909 89/<- %ebp 4/r32/esp
6910
6911 (clear-stream _test-input-stream)
6912 (clear-stream $_test-input-buffered-file->buffer)
6913 (clear-stream _test-output-stream)
6914 (clear-stream $_test-output-buffered-file->buffer)
6915 (clear-stream _test-error-stream)
6916 (clear-stream $_test-error-buffered-file->buffer)
6917
6918 68/push 0/imm32
6919 68/push 0/imm32
6920 89/<- %edx 4/r32/esp
6921 (tailor-exit-descriptor %edx 0x10)
6922
6923 (write _test-input-stream "fn foo {\n")
6924 (write _test-input-stream " var a: int\n")
6925 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
6926 (write _test-input-stream "}\n")
6927
6928 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6929
6930
6931 89/<- %edx 4/r32/esp
6932 (flush _test-output-buffered-file)
6933 (flush _test-error-buffered-file)
6934 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6940
6941 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-atom-base-type: output should be empty")
6942 (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")
6943
6944 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-atom-base-type: exit status")
6945
6946 81 0/subop/add %esp 8/imm32
6947
6948 5d/pop-to-ebp
6949 c3/return
6950
6951 test-index-with-non-array-compound-base-type:
6952
6953 55/push-ebp
6954 89/<- %ebp 4/r32/esp
6955
6956 (clear-stream _test-input-stream)
6957 (clear-stream $_test-input-buffered-file->buffer)
6958 (clear-stream _test-output-stream)
6959 (clear-stream $_test-output-buffered-file->buffer)
6960 (clear-stream _test-error-stream)
6961 (clear-stream $_test-error-buffered-file->buffer)
6962
6963 68/push 0/imm32
6964 68/push 0/imm32
6965 89/<- %edx 4/r32/esp
6966 (tailor-exit-descriptor %edx 0x10)
6967
6968 (write _test-input-stream "fn foo {\n")
6969 (write _test-input-stream " var a: (handle int)\n")
6970 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
6971 (write _test-input-stream "}\n")
6972
6973 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
6974
6975
6976 89/<- %edx 4/r32/esp
6977 (flush _test-output-buffered-file)
6978 (flush _test-error-buffered-file)
6979 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
6985
6986 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type: output should be empty")
6987 (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")
6988
6989 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type: exit status")
6990
6991 81 0/subop/add %esp 8/imm32
6992
6993 5d/pop-to-ebp
6994 c3/return
6995
6996 test-index-with-non-array-compound-base-type-2:
6997
6998 55/push-ebp
6999 89/<- %ebp 4/r32/esp
7000
7001 (clear-stream _test-input-stream)
7002 (clear-stream $_test-input-buffered-file->buffer)
7003 (clear-stream _test-output-stream)
7004 (clear-stream $_test-output-buffered-file->buffer)
7005 (clear-stream _test-error-stream)
7006 (clear-stream $_test-error-buffered-file->buffer)
7007
7008 68/push 0/imm32
7009 68/push 0/imm32
7010 89/<- %edx 4/r32/esp
7011 (tailor-exit-descriptor %edx 0x10)
7012
7013 (write _test-input-stream "fn foo {\n")
7014 (write _test-input-stream " var a: (addr int)\n")
7015 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
7016 (write _test-input-stream "}\n")
7017
7018 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7019
7020
7021 89/<- %edx 4/r32/esp
7022 (flush _test-output-buffered-file)
7023 (flush _test-error-buffered-file)
7024 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7030
7031 (check-stream-equal _test-output-stream "" "F - test-index-with-non-array-compound-base-type-2: output should be empty")
7032 (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")
7033
7034 (check-ints-equal *(edx+4) 2 "F - test-index-with-non-array-compound-base-type-2: exit status")
7035
7036 81 0/subop/add %esp 8/imm32
7037
7038 5d/pop-to-ebp
7039 c3/return
7040
7041 test-index-with-array-atom-base-type:
7042
7043 55/push-ebp
7044 89/<- %ebp 4/r32/esp
7045
7046 (clear-stream _test-input-stream)
7047 (clear-stream $_test-input-buffered-file->buffer)
7048 (clear-stream _test-output-stream)
7049 (clear-stream $_test-output-buffered-file->buffer)
7050 (clear-stream _test-error-stream)
7051 (clear-stream $_test-error-buffered-file->buffer)
7052
7053 68/push 0/imm32
7054 68/push 0/imm32
7055 89/<- %edx 4/r32/esp
7056 (tailor-exit-descriptor %edx 0x10)
7057
7058 (write _test-input-stream "fn foo {\n")
7059 (write _test-input-stream " var a: array\n")
7060 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
7061 (write _test-input-stream "}\n")
7062
7063 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7064
7065
7066 89/<- %edx 4/r32/esp
7067 (flush _test-output-buffered-file)
7068 (flush _test-error-buffered-file)
7069 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7075
7076 (check-stream-equal _test-output-stream "" "F - test-index-with-array-atom-base-type: output should be empty")
7077 (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")
7078
7079 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-atom-base-type: exit status")
7080
7081 81 0/subop/add %esp 8/imm32
7082
7083 5d/pop-to-ebp
7084 c3/return
7085
7086 test-index-with-addr-base-on-stack:
7087
7088 55/push-ebp
7089 89/<- %ebp 4/r32/esp
7090
7091 (clear-stream _test-input-stream)
7092 (clear-stream $_test-input-buffered-file->buffer)
7093 (clear-stream _test-output-stream)
7094 (clear-stream $_test-output-buffered-file->buffer)
7095 (clear-stream _test-error-stream)
7096 (clear-stream $_test-error-buffered-file->buffer)
7097
7098 68/push 0/imm32
7099 68/push 0/imm32
7100 89/<- %edx 4/r32/esp
7101 (tailor-exit-descriptor %edx 0x10)
7102
7103 (write _test-input-stream "fn foo {\n")
7104 (write _test-input-stream " var a: (addr array int)\n")
7105 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
7106 (write _test-input-stream "}\n")
7107
7108 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7109
7110
7111 89/<- %edx 4/r32/esp
7112 (flush _test-output-buffered-file)
7113 (flush _test-error-buffered-file)
7114 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7120
7121 (check-stream-equal _test-output-stream "" "F - test-index-with-addr-base-on-stack: output should be empty")
7122 (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")
7123
7124 (check-ints-equal *(edx+4) 2 "F - test-index-with-addr-base-on-stack: exit status")
7125
7126 81 0/subop/add %esp 8/imm32
7127
7128 5d/pop-to-ebp
7129 c3/return
7130
7131 test-index-with-array-base-in-register:
7132
7133 55/push-ebp
7134 89/<- %ebp 4/r32/esp
7135
7136 (clear-stream _test-input-stream)
7137 (clear-stream $_test-input-buffered-file->buffer)
7138 (clear-stream _test-output-stream)
7139 (clear-stream $_test-output-buffered-file->buffer)
7140 (clear-stream _test-error-stream)
7141 (clear-stream $_test-error-buffered-file->buffer)
7142
7143 68/push 0/imm32
7144 68/push 0/imm32
7145 89/<- %edx 4/r32/esp
7146 (tailor-exit-descriptor %edx 0x10)
7147
7148 (write _test-input-stream "fn foo {\n")
7149 (write _test-input-stream " var a/eax: (array int 3) <- copy 0\n")
7150 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0\n")
7151 (write _test-input-stream "}\n")
7152
7153 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7154
7155
7156 89/<- %edx 4/r32/esp
7157 (flush _test-output-buffered-file)
7158 (flush _test-error-buffered-file)
7159 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7165
7166 (check-stream-equal _test-output-stream "" "F - test-index-with-array-base-in-register: output should be empty")
7167 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: var 'a' is an array, and so must live on the stack" "F - test-index-with-array-base-in-register: error message")
7168
7169 (check-ints-equal *(edx+4) 2 "F - test-index-with-array-base-in-register: exit status")
7170
7171 81 0/subop/add %esp 8/imm32
7172
7173 5d/pop-to-ebp
7174 c3/return
7175
7176 test-index-with-wrong-index-type:
7177
7178 55/push-ebp
7179 89/<- %ebp 4/r32/esp
7180
7181 (clear-stream _test-input-stream)
7182 (clear-stream $_test-input-buffered-file->buffer)
7183 (clear-stream _test-output-stream)
7184 (clear-stream $_test-output-buffered-file->buffer)
7185 (clear-stream _test-error-stream)
7186 (clear-stream $_test-error-buffered-file->buffer)
7187
7188 68/push 0/imm32
7189 68/push 0/imm32
7190 89/<- %edx 4/r32/esp
7191 (tailor-exit-descriptor %edx 0x10)
7192
7193 (write _test-input-stream "fn foo {\n")
7194 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
7195 (write _test-input-stream " var b: boolean\n")
7196 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
7197 (write _test-input-stream "}\n")
7198
7199 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7200
7201
7202 89/<- %edx 4/r32/esp
7203 (flush _test-output-buffered-file)
7204 (flush _test-error-buffered-file)
7205 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7211
7212 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-index-type: output should be empty")
7213 (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")
7214
7215 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-index-type: exit status")
7216
7217 81 0/subop/add %esp 8/imm32
7218
7219 5d/pop-to-ebp
7220 c3/return
7221
7222 test-index-with-offset-atom-index-type:
7223
7224 55/push-ebp
7225 89/<- %ebp 4/r32/esp
7226
7227 (clear-stream _test-input-stream)
7228 (clear-stream $_test-input-buffered-file->buffer)
7229 (clear-stream _test-output-stream)
7230 (clear-stream $_test-output-buffered-file->buffer)
7231 (clear-stream _test-error-stream)
7232 (clear-stream $_test-error-buffered-file->buffer)
7233
7234 68/push 0/imm32
7235 68/push 0/imm32
7236 89/<- %edx 4/r32/esp
7237 (tailor-exit-descriptor %edx 0x10)
7238
7239 (write _test-input-stream "fn foo {\n")
7240 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
7241 (write _test-input-stream " var b: offset\n")
7242 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
7243 (write _test-input-stream "}\n")
7244
7245 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7246
7247
7248 89/<- %edx 4/r32/esp
7249 (flush _test-output-buffered-file)
7250 (flush _test-error-buffered-file)
7251 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7257
7258 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-atom-index-type: output should be empty")
7259 (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")
7260
7261 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-atom-index-type: exit status")
7262
7263 81 0/subop/add %esp 8/imm32
7264
7265 5d/pop-to-ebp
7266 c3/return
7267
7268 test-index-with-offset-on-stack:
7269
7270 55/push-ebp
7271 89/<- %ebp 4/r32/esp
7272
7273 (clear-stream _test-input-stream)
7274 (clear-stream $_test-input-buffered-file->buffer)
7275 (clear-stream _test-output-stream)
7276 (clear-stream $_test-output-buffered-file->buffer)
7277 (clear-stream _test-error-stream)
7278 (clear-stream $_test-error-buffered-file->buffer)
7279
7280 68/push 0/imm32
7281 68/push 0/imm32
7282 89/<- %edx 4/r32/esp
7283 (tailor-exit-descriptor %edx 0x10)
7284
7285 (write _test-input-stream "fn foo {\n")
7286 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
7287 (write _test-input-stream " var b: int\n")
7288 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
7289 (write _test-input-stream "}\n")
7290
7291 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7292
7293
7294 89/<- %edx 4/r32/esp
7295 (flush _test-output-buffered-file)
7296 (flush _test-error-buffered-file)
7297 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7303
7304 (check-stream-equal _test-output-stream "" "F - test-index-with-offset-on-stack: output should be empty")
7305 (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")
7306
7307 (check-ints-equal *(edx+4) 2 "F - test-index-with-offset-on-stack: exit status")
7308
7309 81 0/subop/add %esp 8/imm32
7310
7311 5d/pop-to-ebp
7312 c3/return
7313
7314 test-index-needs-offset-type:
7315
7316 55/push-ebp
7317 89/<- %ebp 4/r32/esp
7318
7319 (clear-stream _test-input-stream)
7320 (clear-stream $_test-input-buffered-file->buffer)
7321 (clear-stream _test-output-stream)
7322 (clear-stream $_test-output-buffered-file->buffer)
7323 (clear-stream _test-error-stream)
7324 (clear-stream $_test-error-buffered-file->buffer)
7325
7326 68/push 0/imm32
7327 68/push 0/imm32
7328 89/<- %edx 4/r32/esp
7329 (tailor-exit-descriptor %edx 0x10)
7330
7331 (write _test-input-stream "fn foo {\n")
7332 (write _test-input-stream " var a/eax: (addr array t) <- copy 0\n")
7333 (write _test-input-stream " var b/ebx: int <- copy 0\n")
7334 (write _test-input-stream " var c/ecx: (addr int) <- index a, b\n")
7335 (write _test-input-stream "}\n")
7336 (write _test-input-stream "type t {\n")
7337 (write _test-input-stream " x: int\n")
7338 (write _test-input-stream " y: int\n")
7339 (write _test-input-stream " z: int\n")
7340 (write _test-input-stream "}\n")
7341
7342 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7343
7344
7345 89/<- %edx 4/r32/esp
7346 (flush _test-output-buffered-file)
7347 (flush _test-error-buffered-file)
7348 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7354
7355 (check-stream-equal _test-output-stream "" "F - test-index-needs-offset-type: output should be empty")
7356 (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")
7357
7358 (check-ints-equal *(edx+4) 2 "F - test-index-needs-offset-type: exit status")
7359
7360 81 0/subop/add %esp 8/imm32
7361
7362 5d/pop-to-ebp
7363 c3/return
7364
7365 test-index-with-output-not-address:
7366
7367 55/push-ebp
7368 89/<- %ebp 4/r32/esp
7369
7370 (clear-stream _test-input-stream)
7371 (clear-stream $_test-input-buffered-file->buffer)
7372 (clear-stream _test-output-stream)
7373 (clear-stream $_test-output-buffered-file->buffer)
7374 (clear-stream _test-error-stream)
7375 (clear-stream $_test-error-buffered-file->buffer)
7376
7377 68/push 0/imm32
7378 68/push 0/imm32
7379 89/<- %edx 4/r32/esp
7380 (tailor-exit-descriptor %edx 0x10)
7381
7382 (write _test-input-stream "fn foo {\n")
7383 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
7384 (write _test-input-stream " var o/edi: int <- index a, 0\n")
7385 (write _test-input-stream "}\n")
7386
7387 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7388
7389
7390 89/<- %edx 4/r32/esp
7391 (flush _test-output-buffered-file)
7392 (flush _test-error-buffered-file)
7393 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7399
7400 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address: output should be empty")
7401 (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")
7402
7403 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address: exit status")
7404
7405 81 0/subop/add %esp 8/imm32
7406
7407 5d/pop-to-ebp
7408 c3/return
7409
7410 test-index-with-output-not-address-2:
7411
7412 55/push-ebp
7413 89/<- %ebp 4/r32/esp
7414
7415 (clear-stream _test-input-stream)
7416 (clear-stream $_test-input-buffered-file->buffer)
7417 (clear-stream _test-output-stream)
7418 (clear-stream $_test-output-buffered-file->buffer)
7419 (clear-stream _test-error-stream)
7420 (clear-stream $_test-error-buffered-file->buffer)
7421
7422 68/push 0/imm32
7423 68/push 0/imm32
7424 89/<- %edx 4/r32/esp
7425 (tailor-exit-descriptor %edx 0x10)
7426
7427 (write _test-input-stream "fn foo {\n")
7428 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
7429 (write _test-input-stream " var o/edi: (int) <- index a, 0\n")
7430 (write _test-input-stream "}\n")
7431
7432 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7433
7434
7435 89/<- %edx 4/r32/esp
7436 (flush _test-output-buffered-file)
7437 (flush _test-error-buffered-file)
7438 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7444
7445 (check-stream-equal _test-output-stream "" "F - test-index-with-output-not-address-2: output should be empty")
7446 (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")
7447
7448 (check-ints-equal *(edx+4) 2 "F - test-index-with-output-not-address-2: exit status")
7449
7450 81 0/subop/add %esp 8/imm32
7451
7452 5d/pop-to-ebp
7453 c3/return
7454
7455 test-index-with-wrong-output-type:
7456
7457 55/push-ebp
7458 89/<- %ebp 4/r32/esp
7459
7460 (clear-stream _test-input-stream)
7461 (clear-stream $_test-input-buffered-file->buffer)
7462 (clear-stream _test-output-stream)
7463 (clear-stream $_test-output-buffered-file->buffer)
7464 (clear-stream _test-error-stream)
7465 (clear-stream $_test-error-buffered-file->buffer)
7466
7467 68/push 0/imm32
7468 68/push 0/imm32
7469 89/<- %edx 4/r32/esp
7470 (tailor-exit-descriptor %edx 0x10)
7471
7472 (write _test-input-stream "fn foo {\n")
7473 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
7474 (write _test-input-stream " var o/edi: (addr int) <- index a, 0\n")
7475 (write _test-input-stream "}\n")
7476
7477 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7478
7479
7480 89/<- %edx 4/r32/esp
7481 (flush _test-output-buffered-file)
7482 (flush _test-error-buffered-file)
7483 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7489
7490 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-type: output should be empty")
7491 (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")
7492
7493 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-type: exit status")
7494
7495 81 0/subop/add %esp 8/imm32
7496
7497 5d/pop-to-ebp
7498 c3/return
7499
7500 test-index-with-wrong-output-compound-type:
7501
7502 55/push-ebp
7503 89/<- %ebp 4/r32/esp
7504
7505 (clear-stream _test-input-stream)
7506 (clear-stream $_test-input-buffered-file->buffer)
7507 (clear-stream _test-output-stream)
7508 (clear-stream $_test-output-buffered-file->buffer)
7509 (clear-stream _test-error-stream)
7510 (clear-stream $_test-error-buffered-file->buffer)
7511
7512 68/push 0/imm32
7513 68/push 0/imm32
7514 89/<- %edx 4/r32/esp
7515 (tailor-exit-descriptor %edx 0x10)
7516
7517 (write _test-input-stream "fn foo {\n")
7518 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
7519 (write _test-input-stream " var o/edi: (addr handle int) <- index a, 0\n")
7520 (write _test-input-stream "}\n")
7521
7522 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7523
7524
7525 89/<- %edx 4/r32/esp
7526 (flush _test-output-buffered-file)
7527 (flush _test-error-buffered-file)
7528 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7534
7535 (check-stream-equal _test-output-stream "" "F - test-index-with-wrong-output-compound-type: output should be empty")
7536 (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")
7537
7538 (check-ints-equal *(edx+4) 2 "F - test-index-with-wrong-output-compound-type: exit status")
7539
7540 81 0/subop/add %esp 8/imm32
7541
7542 5d/pop-to-ebp
7543 c3/return
7544
7545 test-index-with-no-inouts:
7546
7547 55/push-ebp
7548 89/<- %ebp 4/r32/esp
7549
7550 (clear-stream _test-input-stream)
7551 (clear-stream $_test-input-buffered-file->buffer)
7552 (clear-stream _test-output-stream)
7553 (clear-stream $_test-output-buffered-file->buffer)
7554 (clear-stream _test-error-stream)
7555 (clear-stream $_test-error-buffered-file->buffer)
7556
7557 68/push 0/imm32
7558 68/push 0/imm32
7559 89/<- %edx 4/r32/esp
7560 (tailor-exit-descriptor %edx 0x10)
7561
7562 (write _test-input-stream "fn foo {\n")
7563 (write _test-input-stream " var c/ecx: (addr int) <- index\n")
7564 (write _test-input-stream "}\n")
7565
7566 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7567
7568
7569 89/<- %edx 4/r32/esp
7570 (flush _test-output-buffered-file)
7571 (flush _test-error-buffered-file)
7572 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7578
7579 (check-stream-equal _test-output-stream "" "F - test-index-with-no-inouts: output should be empty")
7580 (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")
7581
7582 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-inouts: exit status")
7583
7584 81 0/subop/add %esp 8/imm32
7585
7586 5d/pop-to-ebp
7587 c3/return
7588
7589 test-index-with-too-few-inouts:
7590
7591 55/push-ebp
7592 89/<- %ebp 4/r32/esp
7593
7594 (clear-stream _test-input-stream)
7595 (clear-stream $_test-input-buffered-file->buffer)
7596 (clear-stream _test-output-stream)
7597 (clear-stream $_test-output-buffered-file->buffer)
7598 (clear-stream _test-error-stream)
7599 (clear-stream $_test-error-buffered-file->buffer)
7600
7601 68/push 0/imm32
7602 68/push 0/imm32
7603 89/<- %edx 4/r32/esp
7604 (tailor-exit-descriptor %edx 0x10)
7605
7606 (write _test-input-stream "fn foo {\n")
7607 (write _test-input-stream " var a: (array int 3)\n")
7608 (write _test-input-stream " var c/ecx: (addr int) <- index a\n")
7609 (write _test-input-stream "}\n")
7610
7611 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7612
7613
7614 89/<- %edx 4/r32/esp
7615 (flush _test-output-buffered-file)
7616 (flush _test-error-buffered-file)
7617 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7623
7624 (check-stream-equal _test-output-stream "" "F - test-index-with-too-few-inouts: output should be empty")
7625 (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")
7626
7627 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-few-inouts: exit status")
7628
7629 81 0/subop/add %esp 8/imm32
7630
7631 5d/pop-to-ebp
7632 c3/return
7633
7634 test-index-with-too-many-inouts:
7635
7636 55/push-ebp
7637 89/<- %ebp 4/r32/esp
7638
7639 (clear-stream _test-input-stream)
7640 (clear-stream $_test-input-buffered-file->buffer)
7641 (clear-stream _test-output-stream)
7642 (clear-stream $_test-output-buffered-file->buffer)
7643 (clear-stream _test-error-stream)
7644 (clear-stream $_test-error-buffered-file->buffer)
7645
7646 68/push 0/imm32
7647 68/push 0/imm32
7648 89/<- %edx 4/r32/esp
7649 (tailor-exit-descriptor %edx 0x10)
7650
7651 (write _test-input-stream "fn foo {\n")
7652 (write _test-input-stream " var a: (array int 3)\n")
7653 (write _test-input-stream " var c/ecx: (addr int) <- index a, 0, 0\n")
7654 (write _test-input-stream "}\n")
7655
7656 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7657
7658
7659 89/<- %edx 4/r32/esp
7660 (flush _test-output-buffered-file)
7661 (flush _test-error-buffered-file)
7662 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7668
7669 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-inouts: output should be empty")
7670 (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")
7671
7672 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-inouts: exit status")
7673
7674 81 0/subop/add %esp 8/imm32
7675
7676 5d/pop-to-ebp
7677 c3/return
7678
7679 test-index-with-no-output:
7680
7681 55/push-ebp
7682 89/<- %ebp 4/r32/esp
7683
7684 (clear-stream _test-input-stream)
7685 (clear-stream $_test-input-buffered-file->buffer)
7686 (clear-stream _test-output-stream)
7687 (clear-stream $_test-output-buffered-file->buffer)
7688 (clear-stream _test-error-stream)
7689 (clear-stream $_test-error-buffered-file->buffer)
7690
7691 68/push 0/imm32
7692 68/push 0/imm32
7693 89/<- %edx 4/r32/esp
7694 (tailor-exit-descriptor %edx 0x10)
7695
7696 (write _test-input-stream "fn foo {\n")
7697 (write _test-input-stream " var a: (array int 3)\n")
7698 (write _test-input-stream " index a, 0\n")
7699 (write _test-input-stream "}\n")
7700
7701 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7702
7703
7704 89/<- %edx 4/r32/esp
7705 (flush _test-output-buffered-file)
7706 (flush _test-error-buffered-file)
7707 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7713
7714 (check-stream-equal _test-output-stream "" "F - test-index-with-no-output: output should be empty")
7715 (check-next-stream-line-equal _test-error-stream "fn foo: stmt index: must have an output" "F - test-index-with-no-output: error message")
7716
7717 (check-ints-equal *(edx+4) 2 "F - test-index-with-no-output: exit status")
7718
7719 81 0/subop/add %esp 8/imm32
7720
7721 5d/pop-to-ebp
7722 c3/return
7723
7724 test-index-with-too-many-outputs:
7725
7726 55/push-ebp
7727 89/<- %ebp 4/r32/esp
7728
7729 (clear-stream _test-input-stream)
7730 (clear-stream $_test-input-buffered-file->buffer)
7731 (clear-stream _test-output-stream)
7732 (clear-stream $_test-output-buffered-file->buffer)
7733 (clear-stream _test-error-stream)
7734 (clear-stream $_test-error-buffered-file->buffer)
7735
7736 68/push 0/imm32
7737 68/push 0/imm32
7738 89/<- %edx 4/r32/esp
7739 (tailor-exit-descriptor %edx 0x10)
7740
7741 (write _test-input-stream "fn foo {\n")
7742 (write _test-input-stream " var a: (array int 3)\n")
7743 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
7744 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
7745 (write _test-input-stream " b, c <- index a, 0\n")
7746 (write _test-input-stream "}\n")
7747
7748 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7749
7750
7751 89/<- %edx 4/r32/esp
7752 (flush _test-output-buffered-file)
7753 (flush _test-error-buffered-file)
7754 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7760
7761 (check-stream-equal _test-output-stream "" "F - test-index-with-too-many-outputs: output should be empty")
7762 (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")
7763
7764 (check-ints-equal *(edx+4) 2 "F - test-index-with-too-many-outputs: exit status")
7765
7766 81 0/subop/add %esp 8/imm32
7767
7768 5d/pop-to-ebp
7769 c3/return
7770
7771 test-compute-offset-with-non-array-atom-base-type:
7772
7773 55/push-ebp
7774 89/<- %ebp 4/r32/esp
7775
7776 (clear-stream _test-input-stream)
7777 (clear-stream $_test-input-buffered-file->buffer)
7778 (clear-stream _test-output-stream)
7779 (clear-stream $_test-output-buffered-file->buffer)
7780 (clear-stream _test-error-stream)
7781 (clear-stream $_test-error-buffered-file->buffer)
7782
7783 68/push 0/imm32
7784 68/push 0/imm32
7785 89/<- %edx 4/r32/esp
7786 (tailor-exit-descriptor %edx 0x10)
7787
7788 (write _test-input-stream "fn foo {\n")
7789 (write _test-input-stream " var a: int\n")
7790 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
7791 (write _test-input-stream "}\n")
7792
7793 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7794
7795
7796 89/<- %edx 4/r32/esp
7797 (flush _test-output-buffered-file)
7798 (flush _test-error-buffered-file)
7799 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7805
7806 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-atom-base-type: output should be empty")
7807 (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")
7808
7809 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-atom-base-type: exit status")
7810
7811 81 0/subop/add %esp 8/imm32
7812
7813 5d/pop-to-ebp
7814 c3/return
7815
7816 test-compute-offset-with-non-array-compound-base-type:
7817
7818 55/push-ebp
7819 89/<- %ebp 4/r32/esp
7820
7821 (clear-stream _test-input-stream)
7822 (clear-stream $_test-input-buffered-file->buffer)
7823 (clear-stream _test-output-stream)
7824 (clear-stream $_test-output-buffered-file->buffer)
7825 (clear-stream _test-error-stream)
7826 (clear-stream $_test-error-buffered-file->buffer)
7827
7828 68/push 0/imm32
7829 68/push 0/imm32
7830 89/<- %edx 4/r32/esp
7831 (tailor-exit-descriptor %edx 0x10)
7832
7833 (write _test-input-stream "fn foo {\n")
7834 (write _test-input-stream " var a: (handle int)\n")
7835 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
7836 (write _test-input-stream "}\n")
7837
7838 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7839
7840
7841 89/<- %edx 4/r32/esp
7842 (flush _test-output-buffered-file)
7843 (flush _test-error-buffered-file)
7844 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7850
7851 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type: output should be empty")
7852 (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")
7853
7854 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type: exit status")
7855
7856 81 0/subop/add %esp 8/imm32
7857
7858 5d/pop-to-ebp
7859 c3/return
7860
7861 test-compute-offset-with-non-array-compound-base-type-2:
7862
7863 55/push-ebp
7864 89/<- %ebp 4/r32/esp
7865
7866 (clear-stream _test-input-stream)
7867 (clear-stream $_test-input-buffered-file->buffer)
7868 (clear-stream _test-output-stream)
7869 (clear-stream $_test-output-buffered-file->buffer)
7870 (clear-stream _test-error-stream)
7871 (clear-stream $_test-error-buffered-file->buffer)
7872
7873 68/push 0/imm32
7874 68/push 0/imm32
7875 89/<- %edx 4/r32/esp
7876 (tailor-exit-descriptor %edx 0x10)
7877
7878 (write _test-input-stream "fn foo {\n")
7879 (write _test-input-stream " var a: (addr int)\n")
7880 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
7881 (write _test-input-stream "}\n")
7882
7883 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7884
7885
7886 89/<- %edx 4/r32/esp
7887 (flush _test-output-buffered-file)
7888 (flush _test-error-buffered-file)
7889 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7895
7896 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-non-array-compound-base-type-2: output should be empty")
7897 (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")
7898
7899 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-non-array-compound-base-type-2: exit status")
7900
7901 81 0/subop/add %esp 8/imm32
7902
7903 5d/pop-to-ebp
7904 c3/return
7905
7906 test-compute-offset-with-array-atom-base-type:
7907
7908 55/push-ebp
7909 89/<- %ebp 4/r32/esp
7910
7911 (clear-stream _test-input-stream)
7912 (clear-stream $_test-input-buffered-file->buffer)
7913 (clear-stream _test-output-stream)
7914 (clear-stream $_test-output-buffered-file->buffer)
7915 (clear-stream _test-error-stream)
7916 (clear-stream $_test-error-buffered-file->buffer)
7917
7918 68/push 0/imm32
7919 68/push 0/imm32
7920 89/<- %edx 4/r32/esp
7921 (tailor-exit-descriptor %edx 0x10)
7922
7923 (write _test-input-stream "fn foo {\n")
7924 (write _test-input-stream " var a: array\n")
7925 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0\n")
7926 (write _test-input-stream "}\n")
7927
7928 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7929
7930
7931 89/<- %edx 4/r32/esp
7932 (flush _test-output-buffered-file)
7933 (flush _test-error-buffered-file)
7934 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7940
7941 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-array-atom-base-type: output should be empty")
7942 (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")
7943
7944 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-array-atom-base-type: exit status")
7945
7946 81 0/subop/add %esp 8/imm32
7947
7948 5d/pop-to-ebp
7949 c3/return
7950
7951 test-compute-offset-with-wrong-index-type:
7952
7953 55/push-ebp
7954 89/<- %ebp 4/r32/esp
7955
7956 (clear-stream _test-input-stream)
7957 (clear-stream $_test-input-buffered-file->buffer)
7958 (clear-stream _test-output-stream)
7959 (clear-stream $_test-output-buffered-file->buffer)
7960 (clear-stream _test-error-stream)
7961 (clear-stream $_test-error-buffered-file->buffer)
7962
7963 68/push 0/imm32
7964 68/push 0/imm32
7965 89/<- %edx 4/r32/esp
7966 (tailor-exit-descriptor %edx 0x10)
7967
7968 (write _test-input-stream "fn foo {\n")
7969 (write _test-input-stream " var a/eax: (addr array int) <- copy 0\n")
7970 (write _test-input-stream " var b: boolean\n")
7971 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, b\n")
7972 (write _test-input-stream "}\n")
7973
7974 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
7975
7976
7977 89/<- %edx 4/r32/esp
7978 (flush _test-output-buffered-file)
7979 (flush _test-error-buffered-file)
7980 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
7986
7987 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-index-type: output should be empty")
7988 (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")
7989
7990 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-index-type: exit status")
7991
7992 81 0/subop/add %esp 8/imm32
7993
7994 5d/pop-to-ebp
7995 c3/return
7996
7997 test-compute-offset-with-output-not-offset:
7998
7999 55/push-ebp
8000 89/<- %ebp 4/r32/esp
8001
8002 (clear-stream _test-input-stream)
8003 (clear-stream $_test-input-buffered-file->buffer)
8004 (clear-stream _test-output-stream)
8005 (clear-stream $_test-output-buffered-file->buffer)
8006 (clear-stream _test-error-stream)
8007 (clear-stream $_test-error-buffered-file->buffer)
8008
8009 68/push 0/imm32
8010 68/push 0/imm32
8011 89/<- %edx 4/r32/esp
8012 (tailor-exit-descriptor %edx 0x10)
8013
8014 (write _test-input-stream "fn foo {\n")
8015 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
8016 (write _test-input-stream " var o/edi: int <- compute-offset a, 0\n")
8017 (write _test-input-stream "}\n")
8018
8019 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8020
8021
8022 89/<- %edx 4/r32/esp
8023 (flush _test-output-buffered-file)
8024 (flush _test-error-buffered-file)
8025 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8031
8032 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-offset: output should be empty")
8033 (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")
8034
8035 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-offset: exit status")
8036
8037 81 0/subop/add %esp 8/imm32
8038
8039 5d/pop-to-ebp
8040 c3/return
8041
8042 test-compute-offset-with-output-not-address-2:
8043
8044 55/push-ebp
8045 89/<- %ebp 4/r32/esp
8046
8047 (clear-stream _test-input-stream)
8048 (clear-stream $_test-input-buffered-file->buffer)
8049 (clear-stream _test-output-stream)
8050 (clear-stream $_test-output-buffered-file->buffer)
8051 (clear-stream _test-error-stream)
8052 (clear-stream $_test-error-buffered-file->buffer)
8053
8054 68/push 0/imm32
8055 68/push 0/imm32
8056 89/<- %edx 4/r32/esp
8057 (tailor-exit-descriptor %edx 0x10)
8058
8059 (write _test-input-stream "fn foo {\n")
8060 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
8061 (write _test-input-stream " var o/edi: (int) <- compute-offset a, 0\n")
8062 (write _test-input-stream "}\n")
8063
8064 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8065
8066
8067 89/<- %edx 4/r32/esp
8068 (flush _test-output-buffered-file)
8069 (flush _test-error-buffered-file)
8070 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8076
8077 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-output-not-address-2: output should be empty")
8078 (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")
8079
8080 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-output-not-address-2: exit status")
8081
8082 81 0/subop/add %esp 8/imm32
8083
8084 5d/pop-to-ebp
8085 c3/return
8086
8087 test-compute-offset-with-wrong-output-type:
8088
8089 55/push-ebp
8090 89/<- %ebp 4/r32/esp
8091
8092 (clear-stream _test-input-stream)
8093 (clear-stream $_test-input-buffered-file->buffer)
8094 (clear-stream _test-output-stream)
8095 (clear-stream $_test-output-buffered-file->buffer)
8096 (clear-stream _test-error-stream)
8097 (clear-stream $_test-error-buffered-file->buffer)
8098
8099 68/push 0/imm32
8100 68/push 0/imm32
8101 89/<- %edx 4/r32/esp
8102 (tailor-exit-descriptor %edx 0x10)
8103
8104 (write _test-input-stream "fn foo {\n")
8105 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
8106 (write _test-input-stream " var o/edi: (offset int) <- compute-offset a, 0\n")
8107 (write _test-input-stream "}\n")
8108
8109 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8110
8111
8112 89/<- %edx 4/r32/esp
8113 (flush _test-output-buffered-file)
8114 (flush _test-error-buffered-file)
8115 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8121
8122 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-type: output should be empty")
8123 (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")
8124
8125 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-type: exit status")
8126
8127 81 0/subop/add %esp 8/imm32
8128
8129 5d/pop-to-ebp
8130 c3/return
8131
8132 test-compute-offset-with-wrong-output-compound-type:
8133
8134 55/push-ebp
8135 89/<- %ebp 4/r32/esp
8136
8137 (clear-stream _test-input-stream)
8138 (clear-stream $_test-input-buffered-file->buffer)
8139 (clear-stream _test-output-stream)
8140 (clear-stream $_test-output-buffered-file->buffer)
8141 (clear-stream _test-error-stream)
8142 (clear-stream $_test-error-buffered-file->buffer)
8143
8144 68/push 0/imm32
8145 68/push 0/imm32
8146 89/<- %edx 4/r32/esp
8147 (tailor-exit-descriptor %edx 0x10)
8148
8149 (write _test-input-stream "fn foo {\n")
8150 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
8151 (write _test-input-stream " var o/edi: (offset handle int) <- compute-offset a, 0\n")
8152 (write _test-input-stream "}\n")
8153
8154 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8155
8156
8157 89/<- %edx 4/r32/esp
8158 (flush _test-output-buffered-file)
8159 (flush _test-error-buffered-file)
8160 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8166
8167 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-wrong-output-compound-type: output should be empty")
8168 (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")
8169
8170 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-wrong-output-compound-type: exit status")
8171
8172 81 0/subop/add %esp 8/imm32
8173
8174 5d/pop-to-ebp
8175 c3/return
8176
8177 test-compute-offset-with-no-inouts:
8178
8179 55/push-ebp
8180 89/<- %ebp 4/r32/esp
8181
8182 (clear-stream _test-input-stream)
8183 (clear-stream $_test-input-buffered-file->buffer)
8184 (clear-stream _test-output-stream)
8185 (clear-stream $_test-output-buffered-file->buffer)
8186 (clear-stream _test-error-stream)
8187 (clear-stream $_test-error-buffered-file->buffer)
8188
8189 68/push 0/imm32
8190 68/push 0/imm32
8191 89/<- %edx 4/r32/esp
8192 (tailor-exit-descriptor %edx 0x10)
8193
8194 (write _test-input-stream "fn foo {\n")
8195 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset\n")
8196 (write _test-input-stream "}\n")
8197
8198 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8199
8200
8201 89/<- %edx 4/r32/esp
8202 (flush _test-output-buffered-file)
8203 (flush _test-error-buffered-file)
8204 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8210
8211 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-inouts: output should be empty")
8212 (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")
8213
8214 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-inouts: exit status")
8215
8216 81 0/subop/add %esp 8/imm32
8217
8218 5d/pop-to-ebp
8219 c3/return
8220
8221 test-compute-offset-with-too-few-inouts:
8222
8223 55/push-ebp
8224 89/<- %ebp 4/r32/esp
8225
8226 (clear-stream _test-input-stream)
8227 (clear-stream $_test-input-buffered-file->buffer)
8228 (clear-stream _test-output-stream)
8229 (clear-stream $_test-output-buffered-file->buffer)
8230 (clear-stream _test-error-stream)
8231 (clear-stream $_test-error-buffered-file->buffer)
8232
8233 68/push 0/imm32
8234 68/push 0/imm32
8235 89/<- %edx 4/r32/esp
8236 (tailor-exit-descriptor %edx 0x10)
8237
8238 (write _test-input-stream "fn foo {\n")
8239 (write _test-input-stream " var a: (array int 3)\n")
8240 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a\n")
8241 (write _test-input-stream "}\n")
8242
8243 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8244
8245
8246 89/<- %edx 4/r32/esp
8247 (flush _test-output-buffered-file)
8248 (flush _test-error-buffered-file)
8249 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8255
8256 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-few-inouts: output should be empty")
8257 (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")
8258
8259 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-few-inouts: exit status")
8260
8261 81 0/subop/add %esp 8/imm32
8262
8263 5d/pop-to-ebp
8264 c3/return
8265
8266 test-compute-offset-with-too-many-inouts:
8267
8268 55/push-ebp
8269 89/<- %ebp 4/r32/esp
8270
8271 (clear-stream _test-input-stream)
8272 (clear-stream $_test-input-buffered-file->buffer)
8273 (clear-stream _test-output-stream)
8274 (clear-stream $_test-output-buffered-file->buffer)
8275 (clear-stream _test-error-stream)
8276 (clear-stream $_test-error-buffered-file->buffer)
8277
8278 68/push 0/imm32
8279 68/push 0/imm32
8280 89/<- %edx 4/r32/esp
8281 (tailor-exit-descriptor %edx 0x10)
8282
8283 (write _test-input-stream "fn foo {\n")
8284 (write _test-input-stream " var a: (array int 3)\n")
8285 (write _test-input-stream " var c/ecx: (offset int) <- compute-offset a, 0, 0\n")
8286 (write _test-input-stream "}\n")
8287
8288 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8289
8290
8291 89/<- %edx 4/r32/esp
8292 (flush _test-output-buffered-file)
8293 (flush _test-error-buffered-file)
8294 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8300
8301 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-inouts: output should be empty")
8302 (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")
8303
8304 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-inouts: exit status")
8305
8306 81 0/subop/add %esp 8/imm32
8307
8308 5d/pop-to-ebp
8309 c3/return
8310
8311 test-compute-offset-with-no-output:
8312
8313 55/push-ebp
8314 89/<- %ebp 4/r32/esp
8315
8316 (clear-stream _test-input-stream)
8317 (clear-stream $_test-input-buffered-file->buffer)
8318 (clear-stream _test-output-stream)
8319 (clear-stream $_test-output-buffered-file->buffer)
8320 (clear-stream _test-error-stream)
8321 (clear-stream $_test-error-buffered-file->buffer)
8322
8323 68/push 0/imm32
8324 68/push 0/imm32
8325 89/<- %edx 4/r32/esp
8326 (tailor-exit-descriptor %edx 0x10)
8327
8328 (write _test-input-stream "fn foo {\n")
8329 (write _test-input-stream " var a: (array int 3)\n")
8330 (write _test-input-stream " compute-offset a, 0\n")
8331 (write _test-input-stream "}\n")
8332
8333 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8334
8335
8336 89/<- %edx 4/r32/esp
8337 (flush _test-output-buffered-file)
8338 (flush _test-error-buffered-file)
8339 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8345
8346 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-no-output: output should be empty")
8347 (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")
8348
8349 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-no-output: exit status")
8350
8351 81 0/subop/add %esp 8/imm32
8352
8353 5d/pop-to-ebp
8354 c3/return
8355
8356 test-compute-offset-with-too-many-outputs:
8357
8358 55/push-ebp
8359 89/<- %ebp 4/r32/esp
8360
8361 (clear-stream _test-input-stream)
8362 (clear-stream $_test-input-buffered-file->buffer)
8363 (clear-stream _test-output-stream)
8364 (clear-stream $_test-output-buffered-file->buffer)
8365 (clear-stream _test-error-stream)
8366 (clear-stream $_test-error-buffered-file->buffer)
8367
8368 68/push 0/imm32
8369 68/push 0/imm32
8370 89/<- %edx 4/r32/esp
8371 (tailor-exit-descriptor %edx 0x10)
8372
8373 (write _test-input-stream "fn foo {\n")
8374 (write _test-input-stream " var a: (array int 3)\n")
8375 (write _test-input-stream " var b/eax: (offset int) <- copy 0\n")
8376 (write _test-input-stream " var c/ecx: (addr int) <- copy 0\n")
8377 (write _test-input-stream " b, c <- compute-offset a, 0\n")
8378 (write _test-input-stream "}\n")
8379
8380 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8381
8382
8383 89/<- %edx 4/r32/esp
8384 (flush _test-output-buffered-file)
8385 (flush _test-error-buffered-file)
8386 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8392
8393 (check-stream-equal _test-output-stream "" "F - test-compute-offset-with-too-many-outputs: output should be empty")
8394 (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")
8395
8396 (check-ints-equal *(edx+4) 2 "F - test-compute-offset-with-too-many-outputs: exit status")
8397
8398 81 0/subop/add %esp 8/imm32
8399
8400 5d/pop-to-ebp
8401 c3/return
8402
8403 test-convert-read-from-stream:
8404
8405 55/push-ebp
8406 89/<- %ebp 4/r32/esp
8407
8408 (clear-stream _test-input-stream)
8409 (clear-stream $_test-input-buffered-file->buffer)
8410 (clear-stream _test-output-stream)
8411 (clear-stream $_test-output-buffered-file->buffer)
8412
8413 (write _test-input-stream "fn foo {\n")
8414 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
8415 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
8416 (write _test-input-stream " read-from-stream s, o\n")
8417 (write _test-input-stream "}\n")
8418
8419 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8420
8421
8422 89/<- %edx 4/r32/esp
8423 (flush _test-output-buffered-file)
8424 (flush _test-error-buffered-file)
8425 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
8431
8432 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream/0")
8433 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream/1")
8434 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream/2")
8435 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream/3")
8436 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream/4")
8437 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream/5")
8438 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream/6")
8439 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-read-from-stream/7")
8440 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream/8")
8441 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-read-from-stream/9")
8442 (check-next-stream-line-equal _test-output-stream " (read-from-stream %esi %ecx 0x00000004)" "F - test-convert-read-from-stream/10")
8443 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream/11")
8444 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream/12")
8445 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream/13")
8446 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream/14")
8447 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream/15")
8448 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream/16")
8449 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream/17")
8450 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream/18")
8451
8452 89/<- %esp 5/r32/ebp
8453 5d/pop-to-ebp
8454 c3/return
8455
8456 test-convert-read-from-stream-with-correct-payload-size:
8457
8458 55/push-ebp
8459 89/<- %ebp 4/r32/esp
8460
8461 (clear-stream _test-input-stream)
8462 (clear-stream $_test-input-buffered-file->buffer)
8463 (clear-stream _test-output-stream)
8464 (clear-stream $_test-output-buffered-file->buffer)
8465
8466 (write _test-input-stream "fn foo {\n")
8467 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
8468 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
8469 (write _test-input-stream " read-from-stream s, o\n")
8470 (write _test-input-stream "}\n")
8471
8472 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8473
8474
8475 89/<- %edx 4/r32/esp
8476 (flush _test-output-buffered-file)
8477 (flush _test-error-buffered-file)
8478 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
8484
8485 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-read-from-stream-with-correct-payload-size/0")
8486 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-read-from-stream-with-correct-payload-size/1")
8487 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/2")
8488 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-read-from-stream-with-correct-payload-size/3")
8489 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-read-from-stream-with-correct-payload-size/4")
8490 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-read-from-stream-with-correct-payload-size/5")
8491 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-read-from-stream-with-correct-payload-size/6")
8492 (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")
8493 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/8")
8494 (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")
8495 (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")
8496 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-read-from-stream-with-correct-payload-size/11")
8497 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-read-from-stream-with-correct-payload-size/12")
8498 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-read-from-stream-with-correct-payload-size/13")
8499 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-read-from-stream-with-correct-payload-size/14")
8500 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-read-from-stream-with-correct-payload-size/15")
8501 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-read-from-stream-with-correct-payload-size/16")
8502 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-read-from-stream-with-correct-payload-size/17")
8503 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-read-from-stream-with-correct-payload-size/18")
8504
8505 89/<- %esp 5/r32/ebp
8506 5d/pop-to-ebp
8507 c3/return
8508
8509 test-read-from-stream-with-non-stream-atom-base-type:
8510
8511 55/push-ebp
8512 89/<- %ebp 4/r32/esp
8513
8514 (clear-stream _test-input-stream)
8515 (clear-stream $_test-input-buffered-file->buffer)
8516 (clear-stream _test-output-stream)
8517 (clear-stream $_test-output-buffered-file->buffer)
8518 (clear-stream _test-error-stream)
8519 (clear-stream $_test-error-buffered-file->buffer)
8520
8521 68/push 0/imm32
8522 68/push 0/imm32
8523 89/<- %edx 4/r32/esp
8524 (tailor-exit-descriptor %edx 0x10)
8525
8526 (write _test-input-stream "fn foo {\n")
8527 (write _test-input-stream " var a: int\n")
8528 (write _test-input-stream " read-from-stream a, 0\n")
8529 (write _test-input-stream "}\n")
8530
8531 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8532
8533
8534 89/<- %edx 4/r32/esp
8535 (flush _test-output-buffered-file)
8536 (flush _test-error-buffered-file)
8537 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8543
8544 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-atom-base-type: output should be empty")
8545 (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")
8546
8547 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-atom-base-type: exit status")
8548
8549 81 0/subop/add %esp 8/imm32
8550
8551 5d/pop-to-ebp
8552 c3/return
8553
8554 test-read-from-stream-with-non-stream-compound-base-type:
8555
8556 55/push-ebp
8557 89/<- %ebp 4/r32/esp
8558
8559 (clear-stream _test-input-stream)
8560 (clear-stream $_test-input-buffered-file->buffer)
8561 (clear-stream _test-output-stream)
8562 (clear-stream $_test-output-buffered-file->buffer)
8563 (clear-stream _test-error-stream)
8564 (clear-stream $_test-error-buffered-file->buffer)
8565
8566 68/push 0/imm32
8567 68/push 0/imm32
8568 89/<- %edx 4/r32/esp
8569 (tailor-exit-descriptor %edx 0x10)
8570
8571 (write _test-input-stream "fn foo {\n")
8572 (write _test-input-stream " var a: (handle int)\n")
8573 (write _test-input-stream " read-from-stream a, 0\n")
8574 (write _test-input-stream "}\n")
8575
8576 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8577
8578
8579 89/<- %edx 4/r32/esp
8580 (flush _test-output-buffered-file)
8581 (flush _test-error-buffered-file)
8582 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8588
8589 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type: output should be empty")
8590 (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")
8591
8592 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type: exit status")
8593
8594 81 0/subop/add %esp 8/imm32
8595
8596 5d/pop-to-ebp
8597 c3/return
8598
8599 test-read-from-stream-with-non-stream-compound-base-type-2:
8600
8601 55/push-ebp
8602 89/<- %ebp 4/r32/esp
8603
8604 (clear-stream _test-input-stream)
8605 (clear-stream $_test-input-buffered-file->buffer)
8606 (clear-stream _test-output-stream)
8607 (clear-stream $_test-output-buffered-file->buffer)
8608 (clear-stream _test-error-stream)
8609 (clear-stream $_test-error-buffered-file->buffer)
8610
8611 68/push 0/imm32
8612 68/push 0/imm32
8613 89/<- %edx 4/r32/esp
8614 (tailor-exit-descriptor %edx 0x10)
8615
8616 (write _test-input-stream "fn foo {\n")
8617 (write _test-input-stream " var a: (addr int)\n")
8618 (write _test-input-stream " read-from-stream a, 0\n")
8619 (write _test-input-stream "}\n")
8620
8621 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8622
8623
8624 89/<- %edx 4/r32/esp
8625 (flush _test-output-buffered-file)
8626 (flush _test-error-buffered-file)
8627 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8633
8634 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-non-stream-compound-base-type-2: output should be empty")
8635 (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")
8636
8637 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-non-stream-compound-base-type-2: exit status")
8638
8639 81 0/subop/add %esp 8/imm32
8640
8641 5d/pop-to-ebp
8642 c3/return
8643
8644 test-read-from-stream-with-stream-atom-base-type:
8645
8646 55/push-ebp
8647 89/<- %ebp 4/r32/esp
8648
8649 (clear-stream _test-input-stream)
8650 (clear-stream $_test-input-buffered-file->buffer)
8651 (clear-stream _test-output-stream)
8652 (clear-stream $_test-output-buffered-file->buffer)
8653 (clear-stream _test-error-stream)
8654 (clear-stream $_test-error-buffered-file->buffer)
8655
8656 68/push 0/imm32
8657 68/push 0/imm32
8658 89/<- %edx 4/r32/esp
8659 (tailor-exit-descriptor %edx 0x10)
8660
8661 (write _test-input-stream "fn foo {\n")
8662 (write _test-input-stream " var a: stream\n")
8663 (write _test-input-stream " read-from-stream a, 0\n")
8664 (write _test-input-stream "}\n")
8665
8666 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8667
8668
8669 89/<- %edx 4/r32/esp
8670 (flush _test-output-buffered-file)
8671 (flush _test-error-buffered-file)
8672 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8678
8679 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-stream-atom-base-type: output should be empty")
8680 (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")
8681
8682 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-stream-atom-base-type: exit status")
8683
8684 81 0/subop/add %esp 8/imm32
8685
8686 5d/pop-to-ebp
8687 c3/return
8688
8689 test-read-from-stream-with-wrong-index-type:
8690
8691 55/push-ebp
8692 89/<- %ebp 4/r32/esp
8693
8694 (clear-stream _test-input-stream)
8695 (clear-stream $_test-input-buffered-file->buffer)
8696 (clear-stream _test-output-stream)
8697 (clear-stream $_test-output-buffered-file->buffer)
8698 (clear-stream _test-error-stream)
8699 (clear-stream $_test-error-buffered-file->buffer)
8700
8701 68/push 0/imm32
8702 68/push 0/imm32
8703 89/<- %edx 4/r32/esp
8704 (tailor-exit-descriptor %edx 0x10)
8705
8706 (write _test-input-stream "fn foo {\n")
8707 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
8708 (write _test-input-stream " var b: boolean\n")
8709 (write _test-input-stream " read-from-stream a, b\n")
8710 (write _test-input-stream "}\n")
8711
8712 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8713
8714
8715 89/<- %edx 4/r32/esp
8716 (flush _test-output-buffered-file)
8717 (flush _test-error-buffered-file)
8718 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8724
8725 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-wrong-index-type: output should be empty")
8726 (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")
8727
8728 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-wrong-index-type: exit status")
8729
8730 81 0/subop/add %esp 8/imm32
8731
8732 5d/pop-to-ebp
8733 c3/return
8734
8735 test-read-from-stream-with-no-inouts:
8736
8737 55/push-ebp
8738 89/<- %ebp 4/r32/esp
8739
8740 (clear-stream _test-input-stream)
8741 (clear-stream $_test-input-buffered-file->buffer)
8742 (clear-stream _test-output-stream)
8743 (clear-stream $_test-output-buffered-file->buffer)
8744 (clear-stream _test-error-stream)
8745 (clear-stream $_test-error-buffered-file->buffer)
8746
8747 68/push 0/imm32
8748 68/push 0/imm32
8749 89/<- %edx 4/r32/esp
8750 (tailor-exit-descriptor %edx 0x10)
8751
8752 (write _test-input-stream "fn foo {\n")
8753 (write _test-input-stream " read-from-stream\n")
8754 (write _test-input-stream "}\n")
8755
8756 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8757
8758
8759 89/<- %edx 4/r32/esp
8760 (flush _test-output-buffered-file)
8761 (flush _test-error-buffered-file)
8762 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8768
8769 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-no-inouts: output should be empty")
8770 (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")
8771
8772 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-no-inouts: exit status")
8773
8774 81 0/subop/add %esp 8/imm32
8775
8776 5d/pop-to-ebp
8777 c3/return
8778
8779 test-read-from-stream-with-too-few-inouts:
8780
8781 55/push-ebp
8782 89/<- %ebp 4/r32/esp
8783
8784 (clear-stream _test-input-stream)
8785 (clear-stream $_test-input-buffered-file->buffer)
8786 (clear-stream _test-output-stream)
8787 (clear-stream $_test-output-buffered-file->buffer)
8788 (clear-stream _test-error-stream)
8789 (clear-stream $_test-error-buffered-file->buffer)
8790
8791 68/push 0/imm32
8792 68/push 0/imm32
8793 89/<- %edx 4/r32/esp
8794 (tailor-exit-descriptor %edx 0x10)
8795
8796 (write _test-input-stream "fn foo {\n")
8797 (write _test-input-stream " var a: (addr stream int)\n")
8798 (write _test-input-stream " read-from-stream a\n")
8799 (write _test-input-stream "}\n")
8800
8801 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8802
8803
8804 89/<- %edx 4/r32/esp
8805 (flush _test-output-buffered-file)
8806 (flush _test-error-buffered-file)
8807 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8813
8814 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-few-inouts: output should be empty")
8815 (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")
8816
8817 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-few-inouts: exit status")
8818
8819 81 0/subop/add %esp 8/imm32
8820
8821 5d/pop-to-ebp
8822 c3/return
8823
8824 test-read-from-stream-with-too-many-inouts:
8825
8826 55/push-ebp
8827 89/<- %ebp 4/r32/esp
8828
8829 (clear-stream _test-input-stream)
8830 (clear-stream $_test-input-buffered-file->buffer)
8831 (clear-stream _test-output-stream)
8832 (clear-stream $_test-output-buffered-file->buffer)
8833 (clear-stream _test-error-stream)
8834 (clear-stream $_test-error-buffered-file->buffer)
8835
8836 68/push 0/imm32
8837 68/push 0/imm32
8838 89/<- %edx 4/r32/esp
8839 (tailor-exit-descriptor %edx 0x10)
8840
8841 (write _test-input-stream "fn foo {\n")
8842 (write _test-input-stream " var a: (addr stream int)\n")
8843 (write _test-input-stream " var b: (addr int)\n")
8844 (write _test-input-stream " read-from-stream a, b, 0\n")
8845 (write _test-input-stream "}\n")
8846
8847 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8848
8849
8850 89/<- %edx 4/r32/esp
8851 (flush _test-output-buffered-file)
8852 (flush _test-error-buffered-file)
8853 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8859
8860 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-too-many-inouts: output should be empty")
8861 (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")
8862
8863 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-too-many-inouts: exit status")
8864
8865 81 0/subop/add %esp 8/imm32
8866
8867 5d/pop-to-ebp
8868 c3/return
8869
8870 test-read-from-stream-with-output:
8871
8872 55/push-ebp
8873 89/<- %ebp 4/r32/esp
8874
8875 (clear-stream _test-input-stream)
8876 (clear-stream $_test-input-buffered-file->buffer)
8877 (clear-stream _test-output-stream)
8878 (clear-stream $_test-output-buffered-file->buffer)
8879 (clear-stream _test-error-stream)
8880 (clear-stream $_test-error-buffered-file->buffer)
8881
8882 68/push 0/imm32
8883 68/push 0/imm32
8884 89/<- %edx 4/r32/esp
8885 (tailor-exit-descriptor %edx 0x10)
8886
8887 (write _test-input-stream "fn foo {\n")
8888 (write _test-input-stream " var a: (addr stream int)\n")
8889 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
8890 (write _test-input-stream " b <- read-from-stream a, b\n")
8891 (write _test-input-stream "}\n")
8892
8893 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
8894
8895
8896 89/<- %edx 4/r32/esp
8897 (flush _test-output-buffered-file)
8898 (flush _test-error-buffered-file)
8899 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
8905
8906 (check-stream-equal _test-output-stream "" "F - test-read-from-stream-with-output: output should be empty")
8907 (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")
8908
8909 (check-ints-equal *(edx+4) 2 "F - test-read-from-stream-with-output: exit status")
8910
8911 81 0/subop/add %esp 8/imm32
8912
8913 5d/pop-to-ebp
8914 c3/return
8915
8916 test-convert-write-to-stream:
8917
8918 55/push-ebp
8919 89/<- %ebp 4/r32/esp
8920
8921 (clear-stream _test-input-stream)
8922 (clear-stream $_test-input-buffered-file->buffer)
8923 (clear-stream _test-output-stream)
8924 (clear-stream $_test-output-buffered-file->buffer)
8925
8926 (write _test-input-stream "fn foo {\n")
8927 (write _test-input-stream " var s/esi: (addr stream int) <- copy 0\n")
8928 (write _test-input-stream " var o/ecx: (addr int) <- copy 0\n")
8929 (write _test-input-stream " write-to-stream s, o\n")
8930 (write _test-input-stream "}\n")
8931
8932 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8933
8934
8935 89/<- %edx 4/r32/esp
8936 (flush _test-output-buffered-file)
8937 (flush _test-error-buffered-file)
8938 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
8944
8945 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream/0")
8946 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream/1")
8947 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream/2")
8948 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream/3")
8949 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream/4")
8950 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream/5")
8951 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream/6")
8952 (check-next-stream-line-equal _test-output-stream " be/copy-to-esi 0/imm32" "F - test-convert-write-to-stream/7")
8953 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream/8")
8954 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 0/imm32" "F - test-convert-write-to-stream/9")
8955 (check-next-stream-line-equal _test-output-stream " (write-to-stream %esi %ecx 0x00000004)" "F - test-convert-write-to-stream/10")
8956 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream/11")
8957 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream/12")
8958 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream/13")
8959 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream/14")
8960 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream/15")
8961 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream/16")
8962 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream/17")
8963 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream/18")
8964
8965 89/<- %esp 5/r32/ebp
8966 5d/pop-to-ebp
8967 c3/return
8968
8969 test-convert-write-to-stream-with-correct-payload-size:
8970
8971 55/push-ebp
8972 89/<- %ebp 4/r32/esp
8973
8974 (clear-stream _test-input-stream)
8975 (clear-stream $_test-input-buffered-file->buffer)
8976 (clear-stream _test-output-stream)
8977 (clear-stream $_test-output-buffered-file->buffer)
8978
8979 (write _test-input-stream "fn foo {\n")
8980 (write _test-input-stream " var s/esi: (addr stream handle int) <- copy 0\n")
8981 (write _test-input-stream " var o/ecx: (addr handle int) <- copy 0\n")
8982 (write _test-input-stream " write-to-stream s, o\n")
8983 (write _test-input-stream "}\n")
8984
8985 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
8986
8987
8988 89/<- %edx 4/r32/esp
8989 (flush _test-output-buffered-file)
8990 (flush _test-error-buffered-file)
8991 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
8997
8998 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-write-to-stream-with-correct-payload-size/0")
8999 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-write-to-stream-with-correct-payload-size/1")
9000 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/2")
9001 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-write-to-stream-with-correct-payload-size/3")
9002 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-write-to-stream-with-correct-payload-size/4")
9003 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-write-to-stream-with-correct-payload-size/5")
9004 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %esi" "F - test-convert-write-to-stream-with-correct-payload-size/6")
9005 (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")
9006 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/8")
9007 (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")
9008 (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")
9009 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-write-to-stream-with-correct-payload-size/11")
9010 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %esi" "F - test-convert-write-to-stream-with-correct-payload-size/12")
9011 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-write-to-stream-with-correct-payload-size/13")
9012 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-write-to-stream-with-correct-payload-size/14")
9013 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-write-to-stream-with-correct-payload-size/15")
9014 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-write-to-stream-with-correct-payload-size/16")
9015 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-write-to-stream-with-correct-payload-size/17")
9016 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-write-to-stream-with-correct-payload-size/18")
9017
9018 89/<- %esp 5/r32/ebp
9019 5d/pop-to-ebp
9020 c3/return
9021
9022 test-write-to-stream-with-non-stream-atom-base-type:
9023
9024 55/push-ebp
9025 89/<- %ebp 4/r32/esp
9026
9027 (clear-stream _test-input-stream)
9028 (clear-stream $_test-input-buffered-file->buffer)
9029 (clear-stream _test-output-stream)
9030 (clear-stream $_test-output-buffered-file->buffer)
9031 (clear-stream _test-error-stream)
9032 (clear-stream $_test-error-buffered-file->buffer)
9033
9034 68/push 0/imm32
9035 68/push 0/imm32
9036 89/<- %edx 4/r32/esp
9037 (tailor-exit-descriptor %edx 0x10)
9038
9039 (write _test-input-stream "fn foo {\n")
9040 (write _test-input-stream " var a: int\n")
9041 (write _test-input-stream " write-to-stream a, 0\n")
9042 (write _test-input-stream "}\n")
9043
9044 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9045
9046
9047 89/<- %edx 4/r32/esp
9048 (flush _test-output-buffered-file)
9049 (flush _test-error-buffered-file)
9050 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9056
9057 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-atom-base-type: output should be empty")
9058 (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")
9059
9060 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-atom-base-type: exit status")
9061
9062 81 0/subop/add %esp 8/imm32
9063
9064 5d/pop-to-ebp
9065 c3/return
9066
9067 test-write-to-stream-with-non-stream-compound-base-type:
9068
9069 55/push-ebp
9070 89/<- %ebp 4/r32/esp
9071
9072 (clear-stream _test-input-stream)
9073 (clear-stream $_test-input-buffered-file->buffer)
9074 (clear-stream _test-output-stream)
9075 (clear-stream $_test-output-buffered-file->buffer)
9076 (clear-stream _test-error-stream)
9077 (clear-stream $_test-error-buffered-file->buffer)
9078
9079 68/push 0/imm32
9080 68/push 0/imm32
9081 89/<- %edx 4/r32/esp
9082 (tailor-exit-descriptor %edx 0x10)
9083
9084 (write _test-input-stream "fn foo {\n")
9085 (write _test-input-stream " var a: (handle int)\n")
9086 (write _test-input-stream " write-to-stream a, 0\n")
9087 (write _test-input-stream "}\n")
9088
9089 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9090
9091
9092 89/<- %edx 4/r32/esp
9093 (flush _test-output-buffered-file)
9094 (flush _test-error-buffered-file)
9095 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9101
9102 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type: output should be empty")
9103 (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")
9104
9105 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type: exit status")
9106
9107 81 0/subop/add %esp 8/imm32
9108
9109 5d/pop-to-ebp
9110 c3/return
9111
9112 test-write-to-stream-with-non-stream-compound-base-type-2:
9113
9114 55/push-ebp
9115 89/<- %ebp 4/r32/esp
9116
9117 (clear-stream _test-input-stream)
9118 (clear-stream $_test-input-buffered-file->buffer)
9119 (clear-stream _test-output-stream)
9120 (clear-stream $_test-output-buffered-file->buffer)
9121 (clear-stream _test-error-stream)
9122 (clear-stream $_test-error-buffered-file->buffer)
9123
9124 68/push 0/imm32
9125 68/push 0/imm32
9126 89/<- %edx 4/r32/esp
9127 (tailor-exit-descriptor %edx 0x10)
9128
9129 (write _test-input-stream "fn foo {\n")
9130 (write _test-input-stream " var a: (addr int)\n")
9131 (write _test-input-stream " write-to-stream a, 0\n")
9132 (write _test-input-stream "}\n")
9133
9134 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9135
9136
9137 89/<- %edx 4/r32/esp
9138 (flush _test-output-buffered-file)
9139 (flush _test-error-buffered-file)
9140 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9146
9147 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-non-stream-compound-base-type-2: output should be empty")
9148 (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")
9149
9150 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-non-stream-compound-base-type-2: exit status")
9151
9152 81 0/subop/add %esp 8/imm32
9153
9154 5d/pop-to-ebp
9155 c3/return
9156
9157 test-write-to-stream-with-stream-atom-base-type:
9158
9159 55/push-ebp
9160 89/<- %ebp 4/r32/esp
9161
9162 (clear-stream _test-input-stream)
9163 (clear-stream $_test-input-buffered-file->buffer)
9164 (clear-stream _test-output-stream)
9165 (clear-stream $_test-output-buffered-file->buffer)
9166 (clear-stream _test-error-stream)
9167 (clear-stream $_test-error-buffered-file->buffer)
9168
9169 68/push 0/imm32
9170 68/push 0/imm32
9171 89/<- %edx 4/r32/esp
9172 (tailor-exit-descriptor %edx 0x10)
9173
9174 (write _test-input-stream "fn foo {\n")
9175 (write _test-input-stream " var a: stream\n")
9176 (write _test-input-stream " write-to-stream a, 0\n")
9177 (write _test-input-stream "}\n")
9178
9179 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9180
9181
9182 89/<- %edx 4/r32/esp
9183 (flush _test-output-buffered-file)
9184 (flush _test-error-buffered-file)
9185 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9191
9192 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-stream-atom-base-type: output should be empty")
9193 (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")
9194
9195 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-stream-atom-base-type: exit status")
9196
9197 81 0/subop/add %esp 8/imm32
9198
9199 5d/pop-to-ebp
9200 c3/return
9201
9202 test-write-to-stream-with-wrong-index-type:
9203
9204 55/push-ebp
9205 89/<- %ebp 4/r32/esp
9206
9207 (clear-stream _test-input-stream)
9208 (clear-stream $_test-input-buffered-file->buffer)
9209 (clear-stream _test-output-stream)
9210 (clear-stream $_test-output-buffered-file->buffer)
9211 (clear-stream _test-error-stream)
9212 (clear-stream $_test-error-buffered-file->buffer)
9213
9214 68/push 0/imm32
9215 68/push 0/imm32
9216 89/<- %edx 4/r32/esp
9217 (tailor-exit-descriptor %edx 0x10)
9218
9219 (write _test-input-stream "fn foo {\n")
9220 (write _test-input-stream " var a/eax: (addr stream int) <- copy 0\n")
9221 (write _test-input-stream " var b: boolean\n")
9222 (write _test-input-stream " write-to-stream a, b\n")
9223 (write _test-input-stream "}\n")
9224
9225 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9226
9227
9228 89/<- %edx 4/r32/esp
9229 (flush _test-output-buffered-file)
9230 (flush _test-error-buffered-file)
9231 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9237
9238 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-wrong-index-type: output should be empty")
9239 (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")
9240
9241 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-wrong-index-type: exit status")
9242
9243 81 0/subop/add %esp 8/imm32
9244
9245 5d/pop-to-ebp
9246 c3/return
9247
9248 test-write-to-stream-with-no-inouts:
9249
9250 55/push-ebp
9251 89/<- %ebp 4/r32/esp
9252
9253 (clear-stream _test-input-stream)
9254 (clear-stream $_test-input-buffered-file->buffer)
9255 (clear-stream _test-output-stream)
9256 (clear-stream $_test-output-buffered-file->buffer)
9257 (clear-stream _test-error-stream)
9258 (clear-stream $_test-error-buffered-file->buffer)
9259
9260 68/push 0/imm32
9261 68/push 0/imm32
9262 89/<- %edx 4/r32/esp
9263 (tailor-exit-descriptor %edx 0x10)
9264
9265 (write _test-input-stream "fn foo {\n")
9266 (write _test-input-stream " write-to-stream\n")
9267 (write _test-input-stream "}\n")
9268
9269 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9270
9271
9272 89/<- %edx 4/r32/esp
9273 (flush _test-output-buffered-file)
9274 (flush _test-error-buffered-file)
9275 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9281
9282 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-no-inouts: output should be empty")
9283 (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")
9284
9285 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-no-inouts: exit status")
9286
9287 81 0/subop/add %esp 8/imm32
9288
9289 5d/pop-to-ebp
9290 c3/return
9291
9292 test-write-to-stream-with-too-few-inouts:
9293
9294 55/push-ebp
9295 89/<- %ebp 4/r32/esp
9296
9297 (clear-stream _test-input-stream)
9298 (clear-stream $_test-input-buffered-file->buffer)
9299 (clear-stream _test-output-stream)
9300 (clear-stream $_test-output-buffered-file->buffer)
9301 (clear-stream _test-error-stream)
9302 (clear-stream $_test-error-buffered-file->buffer)
9303
9304 68/push 0/imm32
9305 68/push 0/imm32
9306 89/<- %edx 4/r32/esp
9307 (tailor-exit-descriptor %edx 0x10)
9308
9309 (write _test-input-stream "fn foo {\n")
9310 (write _test-input-stream " var a: (addr stream int)\n")
9311 (write _test-input-stream " write-to-stream a\n")
9312 (write _test-input-stream "}\n")
9313
9314 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9315
9316
9317 89/<- %edx 4/r32/esp
9318 (flush _test-output-buffered-file)
9319 (flush _test-error-buffered-file)
9320 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9326
9327 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-few-inouts: output should be empty")
9328 (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")
9329
9330 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-few-inouts: exit status")
9331
9332 81 0/subop/add %esp 8/imm32
9333
9334 5d/pop-to-ebp
9335 c3/return
9336
9337 test-write-to-stream-with-too-many-inouts:
9338
9339 55/push-ebp
9340 89/<- %ebp 4/r32/esp
9341
9342 (clear-stream _test-input-stream)
9343 (clear-stream $_test-input-buffered-file->buffer)
9344 (clear-stream _test-output-stream)
9345 (clear-stream $_test-output-buffered-file->buffer)
9346 (clear-stream _test-error-stream)
9347 (clear-stream $_test-error-buffered-file->buffer)
9348
9349 68/push 0/imm32
9350 68/push 0/imm32
9351 89/<- %edx 4/r32/esp
9352 (tailor-exit-descriptor %edx 0x10)
9353
9354 (write _test-input-stream "fn foo {\n")
9355 (write _test-input-stream " var a: (addr stream int)\n")
9356 (write _test-input-stream " var b: (addr int)\n")
9357 (write _test-input-stream " write-to-stream a, b, 0\n")
9358 (write _test-input-stream "}\n")
9359
9360 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9361
9362
9363 89/<- %edx 4/r32/esp
9364 (flush _test-output-buffered-file)
9365 (flush _test-error-buffered-file)
9366 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9372
9373 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-too-many-inouts: output should be empty")
9374 (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")
9375
9376 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-too-many-inouts: exit status")
9377
9378 81 0/subop/add %esp 8/imm32
9379
9380 5d/pop-to-ebp
9381 c3/return
9382
9383 test-write-to-stream-with-output:
9384
9385 55/push-ebp
9386 89/<- %ebp 4/r32/esp
9387
9388 (clear-stream _test-input-stream)
9389 (clear-stream $_test-input-buffered-file->buffer)
9390 (clear-stream _test-output-stream)
9391 (clear-stream $_test-output-buffered-file->buffer)
9392 (clear-stream _test-error-stream)
9393 (clear-stream $_test-error-buffered-file->buffer)
9394
9395 68/push 0/imm32
9396 68/push 0/imm32
9397 89/<- %edx 4/r32/esp
9398 (tailor-exit-descriptor %edx 0x10)
9399
9400 (write _test-input-stream "fn foo {\n")
9401 (write _test-input-stream " var a: (addr stream int)\n")
9402 (write _test-input-stream " var b/eax: (addr int) <- copy 0\n")
9403 (write _test-input-stream " b <- write-to-stream a, b\n")
9404 (write _test-input-stream "}\n")
9405
9406 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9407
9408
9409 89/<- %edx 4/r32/esp
9410 (flush _test-output-buffered-file)
9411 (flush _test-error-buffered-file)
9412 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9418
9419 (check-stream-equal _test-output-stream "" "F - test-write-to-stream-with-output: output should be empty")
9420 (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")
9421
9422 (check-ints-equal *(edx+4) 2 "F - test-write-to-stream-with-output: exit status")
9423
9424 81 0/subop/add %esp 8/imm32
9425
9426 5d/pop-to-ebp
9427 c3/return
9428
9429 test-length-with-non-array-atom-base-type:
9430
9431 55/push-ebp
9432 89/<- %ebp 4/r32/esp
9433
9434 (clear-stream _test-input-stream)
9435 (clear-stream $_test-input-buffered-file->buffer)
9436 (clear-stream _test-output-stream)
9437 (clear-stream $_test-output-buffered-file->buffer)
9438 (clear-stream _test-error-stream)
9439 (clear-stream $_test-error-buffered-file->buffer)
9440
9441 68/push 0/imm32
9442 68/push 0/imm32
9443 89/<- %edx 4/r32/esp
9444 (tailor-exit-descriptor %edx 0x10)
9445
9446 (write _test-input-stream "fn foo {\n")
9447 (write _test-input-stream " var a: int\n")
9448 (write _test-input-stream " var c/ecx: int <- length a\n")
9449 (write _test-input-stream "}\n")
9450
9451 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9452
9453
9454 89/<- %edx 4/r32/esp
9455 (flush _test-output-buffered-file)
9456 (flush _test-error-buffered-file)
9457 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9463
9464 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-atom-base-type: output should be empty")
9465 (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")
9466
9467 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-atom-base-type: exit status")
9468
9469 81 0/subop/add %esp 8/imm32
9470
9471 5d/pop-to-ebp
9472 c3/return
9473
9474 test-length-with-non-array-compound-base-type:
9475
9476 55/push-ebp
9477 89/<- %ebp 4/r32/esp
9478
9479 (clear-stream _test-input-stream)
9480 (clear-stream $_test-input-buffered-file->buffer)
9481 (clear-stream _test-output-stream)
9482 (clear-stream $_test-output-buffered-file->buffer)
9483 (clear-stream _test-error-stream)
9484 (clear-stream $_test-error-buffered-file->buffer)
9485
9486 68/push 0/imm32
9487 68/push 0/imm32
9488 89/<- %edx 4/r32/esp
9489 (tailor-exit-descriptor %edx 0x10)
9490
9491 (write _test-input-stream "fn foo {\n")
9492 (write _test-input-stream " var a: (handle int)\n")
9493 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
9494 (write _test-input-stream "}\n")
9495
9496 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9497
9498
9499 89/<- %edx 4/r32/esp
9500 (flush _test-output-buffered-file)
9501 (flush _test-error-buffered-file)
9502 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9508
9509 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type: output should be empty")
9510 (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")
9511
9512 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type: exit status")
9513
9514 81 0/subop/add %esp 8/imm32
9515
9516 5d/pop-to-ebp
9517 c3/return
9518
9519 test-length-with-non-array-compound-base-type-2:
9520
9521 55/push-ebp
9522 89/<- %ebp 4/r32/esp
9523
9524 (clear-stream _test-input-stream)
9525 (clear-stream $_test-input-buffered-file->buffer)
9526 (clear-stream _test-output-stream)
9527 (clear-stream $_test-output-buffered-file->buffer)
9528 (clear-stream _test-error-stream)
9529 (clear-stream $_test-error-buffered-file->buffer)
9530
9531 68/push 0/imm32
9532 68/push 0/imm32
9533 89/<- %edx 4/r32/esp
9534 (tailor-exit-descriptor %edx 0x10)
9535
9536 (write _test-input-stream "fn foo {\n")
9537 (write _test-input-stream " var a: (addr int)\n")
9538 (write _test-input-stream " var c/ecx: (addr int) <- length a, 0\n")
9539 (write _test-input-stream "}\n")
9540
9541 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9542
9543
9544 89/<- %edx 4/r32/esp
9545 (flush _test-output-buffered-file)
9546 (flush _test-error-buffered-file)
9547 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9553
9554 (check-stream-equal _test-output-stream "" "F - test-length-with-non-array-compound-base-type-2: output should be empty")
9555 (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")
9556
9557 (check-ints-equal *(edx+4) 2 "F - test-length-with-non-array-compound-base-type-2: exit status")
9558
9559 81 0/subop/add %esp 8/imm32
9560
9561 5d/pop-to-ebp
9562 c3/return
9563
9564 test-length-with-array-atom-base-type:
9565
9566 55/push-ebp
9567 89/<- %ebp 4/r32/esp
9568
9569 (clear-stream _test-input-stream)
9570 (clear-stream $_test-input-buffered-file->buffer)
9571 (clear-stream _test-output-stream)
9572 (clear-stream $_test-output-buffered-file->buffer)
9573 (clear-stream _test-error-stream)
9574 (clear-stream $_test-error-buffered-file->buffer)
9575
9576 68/push 0/imm32
9577 68/push 0/imm32
9578 89/<- %edx 4/r32/esp
9579 (tailor-exit-descriptor %edx 0x10)
9580
9581 (write _test-input-stream "fn foo {\n")
9582 (write _test-input-stream " var a: array\n")
9583 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
9584 (write _test-input-stream "}\n")
9585
9586 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9587
9588
9589 89/<- %edx 4/r32/esp
9590 (flush _test-output-buffered-file)
9591 (flush _test-error-buffered-file)
9592 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9598
9599 (check-stream-equal _test-output-stream "" "F - test-length-with-array-atom-base-type: output should be empty")
9600 (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")
9601
9602 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-atom-base-type: exit status")
9603
9604 81 0/subop/add %esp 8/imm32
9605
9606 5d/pop-to-ebp
9607 c3/return
9608
9609 test-length-with-addr-base-on-stack:
9610
9611 55/push-ebp
9612 89/<- %ebp 4/r32/esp
9613
9614 (clear-stream _test-input-stream)
9615 (clear-stream $_test-input-buffered-file->buffer)
9616 (clear-stream _test-output-stream)
9617 (clear-stream $_test-output-buffered-file->buffer)
9618 (clear-stream _test-error-stream)
9619 (clear-stream $_test-error-buffered-file->buffer)
9620
9621 68/push 0/imm32
9622 68/push 0/imm32
9623 89/<- %edx 4/r32/esp
9624 (tailor-exit-descriptor %edx 0x10)
9625
9626 (write _test-input-stream "fn foo {\n")
9627 (write _test-input-stream " var a: (addr array int)\n")
9628 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
9629 (write _test-input-stream "}\n")
9630
9631 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9632
9633
9634 89/<- %edx 4/r32/esp
9635 (flush _test-output-buffered-file)
9636 (flush _test-error-buffered-file)
9637 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9643
9644 (check-stream-equal _test-output-stream "" "F - test-length-with-addr-base-on-stack: output should be empty")
9645 (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")
9646
9647 (check-ints-equal *(edx+4) 2 "F - test-length-with-addr-base-on-stack: exit status")
9648
9649 81 0/subop/add %esp 8/imm32
9650
9651 5d/pop-to-ebp
9652 c3/return
9653
9654 test-length-with-array-base-in-register:
9655
9656 55/push-ebp
9657 89/<- %ebp 4/r32/esp
9658
9659 (clear-stream _test-input-stream)
9660 (clear-stream $_test-input-buffered-file->buffer)
9661 (clear-stream _test-output-stream)
9662 (clear-stream $_test-output-buffered-file->buffer)
9663 (clear-stream _test-error-stream)
9664 (clear-stream $_test-error-buffered-file->buffer)
9665
9666 68/push 0/imm32
9667 68/push 0/imm32
9668 89/<- %edx 4/r32/esp
9669 (tailor-exit-descriptor %edx 0x10)
9670
9671 (write _test-input-stream "fn foo {\n")
9672 (write _test-input-stream " var a/eax: (array int 3) <- copy 0\n")
9673 (write _test-input-stream " var c/ecx: (addr int) <- length a\n")
9674 (write _test-input-stream "}\n")
9675
9676 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9677
9678
9679 89/<- %edx 4/r32/esp
9680 (flush _test-output-buffered-file)
9681 (flush _test-error-buffered-file)
9682 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9688
9689 (check-stream-equal _test-output-stream "" "F - test-length-with-array-base-in-register: output should be empty")
9690 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: var 'a' is an array, and so must live on the stack" "F - test-length-with-array-base-in-register: error message")
9691
9692 (check-ints-equal *(edx+4) 2 "F - test-length-with-array-base-in-register: exit status")
9693
9694 81 0/subop/add %esp 8/imm32
9695
9696 5d/pop-to-ebp
9697 c3/return
9698
9699 test-length-with-wrong-output-type:
9700
9701 55/push-ebp
9702 89/<- %ebp 4/r32/esp
9703
9704 (clear-stream _test-input-stream)
9705 (clear-stream $_test-input-buffered-file->buffer)
9706 (clear-stream _test-output-stream)
9707 (clear-stream $_test-output-buffered-file->buffer)
9708 (clear-stream _test-error-stream)
9709 (clear-stream $_test-error-buffered-file->buffer)
9710
9711 68/push 0/imm32
9712 68/push 0/imm32
9713 89/<- %edx 4/r32/esp
9714 (tailor-exit-descriptor %edx 0x10)
9715
9716 (write _test-input-stream "fn foo {\n")
9717 (write _test-input-stream " var a/ebx: (addr array boolean) <- copy 0\n")
9718 (write _test-input-stream " var o/edi: (addr int) <- length a\n")
9719 (write _test-input-stream "}\n")
9720
9721 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9722
9723
9724 89/<- %edx 4/r32/esp
9725 (flush _test-output-buffered-file)
9726 (flush _test-error-buffered-file)
9727 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9733
9734 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-type: output should be empty")
9735 (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")
9736
9737 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-type: exit status")
9738
9739 81 0/subop/add %esp 8/imm32
9740
9741 5d/pop-to-ebp
9742 c3/return
9743
9744 test-length-with-wrong-output-compound-type:
9745
9746 55/push-ebp
9747 89/<- %ebp 4/r32/esp
9748
9749 (clear-stream _test-input-stream)
9750 (clear-stream $_test-input-buffered-file->buffer)
9751 (clear-stream _test-output-stream)
9752 (clear-stream $_test-output-buffered-file->buffer)
9753 (clear-stream _test-error-stream)
9754 (clear-stream $_test-error-buffered-file->buffer)
9755
9756 68/push 0/imm32
9757 68/push 0/imm32
9758 89/<- %edx 4/r32/esp
9759 (tailor-exit-descriptor %edx 0x10)
9760
9761 (write _test-input-stream "fn foo {\n")
9762 (write _test-input-stream " var a/ebx: (addr array handle boolean) <- copy 0\n")
9763 (write _test-input-stream " var o/edi: (addr handle int) <- length a\n")
9764 (write _test-input-stream "}\n")
9765
9766 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9767
9768
9769 89/<- %edx 4/r32/esp
9770 (flush _test-output-buffered-file)
9771 (flush _test-error-buffered-file)
9772 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9778
9779 (check-stream-equal _test-output-stream "" "F - test-length-with-wrong-output-compound-type: output should be empty")
9780 (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")
9781
9782 (check-ints-equal *(edx+4) 2 "F - test-length-with-wrong-output-compound-type: exit status")
9783
9784 81 0/subop/add %esp 8/imm32
9785
9786 5d/pop-to-ebp
9787 c3/return
9788
9789 test-length-with-no-inouts:
9790
9791 55/push-ebp
9792 89/<- %ebp 4/r32/esp
9793
9794 (clear-stream _test-input-stream)
9795 (clear-stream $_test-input-buffered-file->buffer)
9796 (clear-stream _test-output-stream)
9797 (clear-stream $_test-output-buffered-file->buffer)
9798 (clear-stream _test-error-stream)
9799 (clear-stream $_test-error-buffered-file->buffer)
9800
9801 68/push 0/imm32
9802 68/push 0/imm32
9803 89/<- %edx 4/r32/esp
9804 (tailor-exit-descriptor %edx 0x10)
9805
9806 (write _test-input-stream "fn foo {\n")
9807 (write _test-input-stream " var c/ecx: int <- length\n")
9808 (write _test-input-stream "}\n")
9809
9810 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9811
9812
9813 89/<- %edx 4/r32/esp
9814 (flush _test-output-buffered-file)
9815 (flush _test-error-buffered-file)
9816 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9822
9823 (check-stream-equal _test-output-stream "" "F - test-length-with-no-inouts: output should be empty")
9824 (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")
9825
9826 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-inouts: exit status")
9827
9828 81 0/subop/add %esp 8/imm32
9829
9830 5d/pop-to-ebp
9831 c3/return
9832
9833 test-length-with-too-many-inouts:
9834
9835 55/push-ebp
9836 89/<- %ebp 4/r32/esp
9837
9838 (clear-stream _test-input-stream)
9839 (clear-stream $_test-input-buffered-file->buffer)
9840 (clear-stream _test-output-stream)
9841 (clear-stream $_test-output-buffered-file->buffer)
9842 (clear-stream _test-error-stream)
9843 (clear-stream $_test-error-buffered-file->buffer)
9844
9845 68/push 0/imm32
9846 68/push 0/imm32
9847 89/<- %edx 4/r32/esp
9848 (tailor-exit-descriptor %edx 0x10)
9849
9850 (write _test-input-stream "fn foo {\n")
9851 (write _test-input-stream " var a: (array int 3)\n")
9852 (write _test-input-stream " var c/ecx: int <- length a, 0, 0\n")
9853 (write _test-input-stream "}\n")
9854
9855 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9856
9857
9858 89/<- %edx 4/r32/esp
9859 (flush _test-output-buffered-file)
9860 (flush _test-error-buffered-file)
9861 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9867
9868 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-inouts: output should be empty")
9869 (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")
9870
9871 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-inouts: exit status")
9872
9873 81 0/subop/add %esp 8/imm32
9874
9875 5d/pop-to-ebp
9876 c3/return
9877
9878 test-length-with-no-output:
9879
9880 55/push-ebp
9881 89/<- %ebp 4/r32/esp
9882
9883 (clear-stream _test-input-stream)
9884 (clear-stream $_test-input-buffered-file->buffer)
9885 (clear-stream _test-output-stream)
9886 (clear-stream $_test-output-buffered-file->buffer)
9887 (clear-stream _test-error-stream)
9888 (clear-stream $_test-error-buffered-file->buffer)
9889
9890 68/push 0/imm32
9891 68/push 0/imm32
9892 89/<- %edx 4/r32/esp
9893 (tailor-exit-descriptor %edx 0x10)
9894
9895 (write _test-input-stream "fn foo {\n")
9896 (write _test-input-stream " var a: (array int 3)\n")
9897 (write _test-input-stream " length a\n")
9898 (write _test-input-stream "}\n")
9899
9900 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9901
9902
9903 89/<- %edx 4/r32/esp
9904 (flush _test-output-buffered-file)
9905 (flush _test-error-buffered-file)
9906 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9912
9913 (check-stream-equal _test-output-stream "" "F - test-length-with-no-output: output should be empty")
9914 (check-next-stream-line-equal _test-error-stream "fn foo: stmt length: must have an output" "F - test-length-with-no-output: error message")
9915
9916 (check-ints-equal *(edx+4) 2 "F - test-length-with-no-output: exit status")
9917
9918 81 0/subop/add %esp 8/imm32
9919
9920 5d/pop-to-ebp
9921 c3/return
9922
9923 test-length-with-too-many-outputs:
9924
9925 55/push-ebp
9926 89/<- %ebp 4/r32/esp
9927
9928 (clear-stream _test-input-stream)
9929 (clear-stream $_test-input-buffered-file->buffer)
9930 (clear-stream _test-output-stream)
9931 (clear-stream $_test-output-buffered-file->buffer)
9932 (clear-stream _test-error-stream)
9933 (clear-stream $_test-error-buffered-file->buffer)
9934
9935 68/push 0/imm32
9936 68/push 0/imm32
9937 89/<- %edx 4/r32/esp
9938 (tailor-exit-descriptor %edx 0x10)
9939
9940 (write _test-input-stream "fn foo {\n")
9941 (write _test-input-stream " var a: (array int 3)\n")
9942 (write _test-input-stream " var b/eax: int <- copy 0\n")
9943 (write _test-input-stream " var c/ecx: int <- copy 0\n")
9944 (write _test-input-stream " b, c <- length a\n")
9945 (write _test-input-stream "}\n")
9946
9947 (convert-mu _test-input-buffered-file _test-output-buffered-file _test-error-buffered-file %edx)
9948
9949
9950 89/<- %edx 4/r32/esp
9951 (flush _test-output-buffered-file)
9952 (flush _test-error-buffered-file)
9953 +-- 6 lines: #? # dump _test-error-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
9959
9960 (check-stream-equal _test-output-stream "" "F - test-length-with-too-many-outputs: output should be empty")
9961 (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")
9962
9963 (check-ints-equal *(edx+4) 2 "F - test-length-with-too-many-outputs: exit status")
9964
9965 81 0/subop/add %esp 8/imm32
9966
9967 5d/pop-to-ebp
9968 c3/return
9969
9970 test-convert-function-with-return-register-and-local:
9971
9972 55/push-ebp
9973 89/<- %ebp 4/r32/esp
9974
9975 (clear-stream _test-input-stream)
9976 (clear-stream $_test-input-buffered-file->buffer)
9977 (clear-stream _test-output-stream)
9978 (clear-stream $_test-output-buffered-file->buffer)
9979
9980 (write _test-input-stream "fn foo -> x/eax: int {\n")
9981 (write _test-input-stream " var y/eax: int <- copy 3\n")
9982 (write _test-input-stream " var z/ecx: int <- copy 4\n")
9983 (write _test-input-stream " return y\n")
9984 (write _test-input-stream "}\n")
9985
9986 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
9987 (flush _test-output-buffered-file)
9988 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
9994
9995 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local/0")
9996 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local/1")
9997 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local/2")
9998 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local/3")
9999 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local/4")
10000 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local/5")
10001 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local/6")
10002 (check-next-stream-line-equal _test-output-stream " b8/copy-to-eax 3/imm32" "F - test-convert-function-with-return-register-and-local/7")
10003 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local/8")
10004 (check-next-stream-line-equal _test-output-stream " b9/copy-to-ecx 4/imm32" "F - test-convert-function-with-return-register-and-local/9")
10005 (check-next-stream-line-equal _test-output-stream " 8b/-> %eax 0x00000000/r32" "F - test-convert-function-with-return-register-and-local/10")
10006 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local/11")
10007 (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")
10008 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-register-and-local/13")
10009 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local/14")
10010 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local/15")
10011 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local/16")
10012 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local/17")
10013 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local/18")
10014 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local/19")
10015
10016 89/<- %esp 5/r32/ebp
10017 5d/pop-to-ebp
10018 c3/return
10019
10020 test-convert-function-with-return-register-and-local-2:
10021
10022 55/push-ebp
10023 89/<- %ebp 4/r32/esp
10024
10025 (clear-stream _test-input-stream)
10026 (clear-stream $_test-input-buffered-file->buffer)
10027 (clear-stream _test-output-stream)
10028 (clear-stream $_test-output-buffered-file->buffer)
10029
10030 (write _test-input-stream "fn foo -> x/eax: int {\n")
10031 (write _test-input-stream " var y/eax: int <- copy 3\n")
10032 (write _test-input-stream " var z/ecx: int <- copy 4\n")
10033 (write _test-input-stream " return z\n")
10034 (write _test-input-stream "}\n")
10035
10036 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10037 (flush _test-output-buffered-file)
10038 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
10044
10045 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-register-and-local-2/0")
10046 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-register-and-local-2/1")
10047 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-register-and-local-2/2")
10048 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-register-and-local-2/3")
10049 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-register-and-local-2/4")
10050 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-register-and-local-2/5")
10051 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-register-and-local-2/6")
10052 (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")
10053 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %ecx" "F - test-convert-function-with-return-register-and-local-2/8")
10054 (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")
10055 (check-next-stream-line-equal _test-output-stream " 8b/-> %ecx 0x00000000/r32" "F - test-convert-function-with-return-register-and-local-2/10")
10056 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %ecx" "F - test-convert-function-with-return-register-and-local-2/11")
10057 (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")
10058 (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")
10059 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-register-and-local-2/14")
10060 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-register-and-local-2/15")
10061 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-register-and-local-2/16")
10062 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-register-and-local-2/17")
10063 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-register-and-local-2/18")
10064 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-register-and-local-2/19")
10065
10066 89/<- %esp 5/r32/ebp
10067 5d/pop-to-ebp
10068 c3/return
10069
10070 test-convert-function-with-return-float-register-and-local:
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
10080 (write _test-input-stream "fn foo -> f/xmm1: float {\n")
10081 (write _test-input-stream " var y/eax: int <- copy 3\n")
10082 (write _test-input-stream " var g/xmm0: float <- convert y\n")
10083 (write _test-input-stream " var h/xmm1: float <- convert y\n")
10084 (write _test-input-stream " return g\n")
10085 (write _test-input-stream "}\n")
10086
10087 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10088 (flush _test-output-buffered-file)
10089 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
10095
10096 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-float-register-and-local/0")
10097 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-float-register-and-local/1")
10098 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-float-register-and-local/2")
10099 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-float-register-and-local/3")
10100 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-float-register-and-local/4")
10101 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-float-register-and-local/5")
10102 (check-next-stream-line-equal _test-output-stream " ff 6/subop/push %eax" "F - test-convert-function-with-return-float-register-and-local/6")
10103 (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")
10104 (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")
10105 (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")
10106 (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")
10107 (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")
10108 (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")
10109 (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")
10110 (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")
10111 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/15")
10112 (check-next-stream-line-equal _test-output-stream " f3 0f 10/-> *esp 0/x32" "F - test-convert-floating-point-dereferenced/16")
10113 (check-next-stream-line-equal _test-output-stream " 81 0/subop/add %esp 4/imm32" "F - test-convert-floating-point-dereferenced/17")
10114 (check-next-stream-line-equal _test-output-stream " 8f 0/subop/pop %eax" "F - test-convert-function-with-return-float-register-and-local/18")
10115 (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")
10116 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-float-register-and-local/20")
10117 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-float-register-and-local/21")
10118 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-float-register-and-local/22")
10119 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-float-register-and-local/23")
10120 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-float-register-and-local/24")
10121 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-float-register-and-local/25")
10122
10123 89/<- %esp 5/r32/ebp
10124 5d/pop-to-ebp
10125 c3/return
10126
10127 test-convert-function-with-return-and-local-vars:
10128
10129 55/push-ebp
10130 89/<- %ebp 4/r32/esp
10131
10132 (clear-stream _test-input-stream)
10133 (clear-stream $_test-input-buffered-file->buffer)
10134 (clear-stream _test-output-stream)
10135 (clear-stream $_test-output-buffered-file->buffer)
10136
10137 (write _test-input-stream "fn foo -> a/eax: int {\n")
10138 (write _test-input-stream " {\n")
10139 (write _test-input-stream " var x: int\n")
10140 (write _test-input-stream " {\n")
10141 (write _test-input-stream " var y: int\n")
10142 (write _test-input-stream " return y\n")
10143 (write _test-input-stream " increment x\n")
10144 (write _test-input-stream " }\n")
10145 (write _test-input-stream " }\n")
10146 (write _test-input-stream "}\n")
10147
10148 (convert-mu _test-input-buffered-file _test-output-buffered-file Stderr 0)
10149 (flush _test-output-buffered-file)
10150 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
10156
10157 (check-next-stream-line-equal _test-output-stream "foo:" "F - test-convert-function-with-return-and-local-vars/0")
10158 (check-next-stream-line-equal _test-output-stream " # . prologue" "F - test-convert-function-with-return-and-local-vars/1")
10159 (check-next-stream-line-equal _test-output-stream " 55/push-ebp" "F - test-convert-function-with-return-and-local-vars/2")
10160 (check-next-stream-line-equal _test-output-stream " 89/<- %ebp 4/r32/esp" "F - test-convert-function-with-return-and-local-vars/3")
10161 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/4")
10162 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:loop:" "F - test-convert-function-with-return-and-local-vars/5")
10163 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/6")
10164 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:loop:" "F - test-convert-function-with-return-and-local-vars/7")
10165 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/8")
10166 (check-next-stream-line-equal _test-output-stream " {" "F - test-convert-function-with-return-and-local-vars/9")
10167 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:loop:" "F - test-convert-function-with-return-and-local-vars/10")
10168 (check-next-stream-line-equal _test-output-stream " 68/push 0/imm32" "F - test-convert-function-with-return-and-local-vars/11")
10169 (check-next-stream-line-equal _test-output-stream " 8b/-> *(ebp+0xfffffff8) 0x00000000/r32" "F - test-convert-function-with-return-and-local-vars/12")
10170 (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")
10171 (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")
10172 (check-next-stream-line-equal _test-output-stream " e9/jump $foo:0x00000001:break/disp32" "F - test-convert-function-with-return-and-local-vars/15")
10173 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/16")
10174 (check-next-stream-line-equal _test-output-stream "$foo:0x00000003:break:" "F - test-convert-function-with-return-and-local-vars/17")
10175 (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")
10176 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/19")
10177 (check-next-stream-line-equal _test-output-stream "$foo:0x00000002:break:" "F - test-convert-function-with-return-and-local-vars/20")
10178 (check-next-stream-line-equal _test-output-stream " }" "F - test-convert-function-with-return-and-local-vars/21")
10179 (check-next-stream-line-equal _test-output-stream "$foo:0x00000001:break:" "F - test-convert-function-with-return-and-local-vars/22")
10180 (check-next-stream-line-equal _test-output-stream " # . epilogue" "F - test-convert-function-with-return-and-local-vars/23")
10181 (check-next-stream-line-equal _test-output-stream " 89/<- %esp 5/r32/ebp" "F - test-convert-function-with-return-and-local-vars/24")
10182 (check-next-stream-line-equal _test-output-stream " 5d/pop-to-ebp" "F - test-convert-function-with-return-and-local-vars/25")
10183 (check-next-stream-line-equal _test-output-stream " c3/return" "F - test-convert-function-with-return-and-local-vars/26")
10184
10185 89/<- %esp 5/r32/ebp
10186 5d/pop-to-ebp
10187 c3/return
10188
10189
10190
10191
10192
10193 == data
10194
10195
10196 Next-block-index:
10197 1/imm32
10198
10199 Curr-block-depth:
10200 1/imm32
10201
10202 == code
10203
10204 parse-mu:
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243 55/push-ebp
10244 89/<- %ebp 4/r32/esp
10245
10246 68/push _Program-signatures/imm32
10247
10248 50/push-eax
10249 51/push-ecx
10250 52/push-edx
10251 53/push-ebx
10252 56/push-esi
10253 57/push-edi
10254
10255 81 5/subop/subtract %esp 0x200/imm32
10256 68/push 0x200/imm32/size
10257 68/push 0/imm32/read
10258 68/push 0/imm32/write
10259 89/<- %ecx 4/r32/esp
10260
10261 68/push 0/imm32/end
10262 68/push 0/imm32/start
10263 89/<- %edx 4/r32/esp
10264
10265 bf/copy-to-edi _Program-functions/imm32
10266
10267 81 5/subop/subtract %esp 0xc00/imm32
10268 68/push 0xc00/imm32/size
10269 68/push 0/imm32/top
10270 89/<- %ebx 4/r32/esp
10271 {
10272 $parse-mu:line-loop:
10273 (clear-stream %ecx)
10274 (read-line-buffered *(ebp+8) %ecx)
10275
10276 81 7/subop/compare *ecx 0/imm32
10277 0f 84/jump-if-= break/disp32
10278 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
10284 (next-mu-token %ecx %edx)
10285
10286 (slice-empty? %edx)
10287 3d/compare-eax-and 0/imm32/false
10288 0f 85/jump-if-!= loop/disp32
10289
10290
10291 8b/-> *edx 0/r32/eax
10292 8a/copy-byte *eax 0/r32/AL
10293 81 4/subop/and %eax 0xff/imm32
10294
10295 3d/compare-eax-and 0x23/imm32/hash
10296 0f 84/jump-if-= loop/disp32
10297
10298 {
10299 $parse-mu:fn:
10300 (slice-equal? %edx "fn")
10301 3d/compare-eax-and 0/imm32/false
10302 0f 84/jump-if-= break/disp32
10303
10304 68/push 0/imm32
10305 68/push 0/imm32
10306 89/<- %esi 4/r32/esp
10307
10308 (allocate Heap *Function-size %esi)
10309
10310 (lookup *esi *(esi+4))
10311
10312 (clear-stack %ebx)
10313
10314 (populate-mu-function-header %ecx %eax %ebx *(ebp+0xc) *(ebp+0x10))
10315 (populate-mu-function-body *(ebp+8) %eax %ebx *(ebp+0xc) *(ebp+0x10))
10316
10317 8b/-> *esi 0/r32/eax
10318 89/<- *edi 0/r32/eax
10319 8b/-> *(esi+4) 0/r32/eax
10320 89/<- *(edi+4) 0/r32/eax
10321
10322
10323 (lookup *esi *(esi+4))
10324
10325 8d/copy-address *(eax+0x20) 7/r32/edi
10326
10327 81 0/subop/add %esp 8/imm32
10328
10329 e9/jump $parse-mu:line-loop/disp32
10330 }
10331
10332
10333 {
10334 $parse-mu:sig:
10335 (slice-equal? %edx "sig")
10336 3d/compare-eax-and 0/imm32/false
10337 0f 84/jump-if-= break/disp32
10338
10339 57/push-edi
10340 8b/-> *(ebp-4) 7/r32/edi
10341
10342 68/push 0/imm32
10343 68/push 0/imm32
10344 89/<- %esi 4/r32/esp
10345
10346 (allocate Heap *Function-size %esi)
10347
10348 (lookup *esi *(esi+4))
10349
10350 (populate-mu-function-signature %ecx %eax *(ebp+0xc) *(ebp+0x10))
10351
10352 8b/-> *esi 0/r32/eax
10353 89/<- *edi 0/r32/eax
10354 8b/-> *(esi+4) 0/r32/eax
10355 89/<- *(edi+4) 0/r32/eax
10356
10357
10358 (lookup *esi *(esi+4))
10359
10360 8d/copy-address *(eax+0x20) 7/r32/edi
10361
10362 81 0/subop/add %esp 8/imm32
10363
10364 89/<- *(ebp-4) 7/r32/edi
10365
10366 5f/pop-to-edi
10367
10368 e9/jump $parse-mu:line-loop/disp32
10369 }
10370
10371 {
10372 $parse-mu:type:
10373 (slice-equal? %edx "type")
10374 3d/compare-eax-and 0/imm32
10375 0f 84/jump-if-= break/disp32
10376 (next-mu-token %ecx %edx)
10377
10378 (pos-or-insert-slice Type-id %edx)
10379
10380 51/push-ecx
10381
10382 68/push 0/imm32
10383 68/push 0/imm32
10384 89/<- %ecx 4/r32/esp
10385 (find-or-create-typeinfo %eax %ecx)
10386
10387 (lookup *ecx *(ecx+4))
10388
10389
10390 (populate-mu-type *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
10391
10392
10393 81 0/subop/add %esp 8/imm32
10394
10395 59/pop-to-ecx
10396 e9/jump $parse-mu:line-loop/disp32
10397 }
10398
10399 e9/jump $parse-mu:error1/disp32
10400 }
10401 $parse-mu:end:
10402
10403 81 0/subop/add %esp 0x20c/imm32
10404 81 0/subop/add %esp 0xc08/imm32
10405 81 0/subop/add %esp 8/imm32
10406
10407 5f/pop-to-edi
10408 5e/pop-to-esi
10409 5b/pop-to-ebx
10410 5a/pop-to-edx
10411 59/pop-to-ecx
10412 58/pop-to-eax
10413
10414 81 0/subop/add %esp 4/imm32
10415
10416 89/<- %esp 5/r32/ebp
10417 5d/pop-to-ebp
10418 c3/return
10419
10420 $parse-mu:error1:
10421
10422 (write-buffered *(ebp+0xc) "unexpected top-level command: ")
10423 (write-slice-buffered *(ebp+0xc) %edx)
10424 (write-buffered *(ebp+0xc) "\n")
10425 (flush *(ebp+0xc))
10426 (stop *(ebp+0x10) 1)
10427
10428
10429 $parse-mu:error2:
10430
10431 (write-int32-hex-buffered *(ebp+0xc) *ebx)
10432 (write-buffered *(ebp+0xc) " vars not reclaimed after fn '")
10433 (write-slice-buffered *(ebp+0xc) *eax)
10434 (write-buffered *(ebp+0xc) "'\n")
10435 (flush *(ebp+0xc))
10436 (stop *(ebp+0x10) 1)
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453 populate-mu-function-header:
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484 55/push-ebp
10485 89/<- %ebp 4/r32/esp
10486
10487 50/push-eax
10488 51/push-ecx
10489 52/push-edx
10490 53/push-ebx
10491 57/push-edi
10492
10493 8b/-> *(ebp+0xc) 7/r32/edi
10494
10495 68/push 0/imm32/end
10496 68/push 0/imm32/start
10497 89/<- %ecx 4/r32/esp
10498
10499 68/push 0/imm32
10500 68/push 0/imm32
10501 89/<- %ebx 4/r32/esp
10502
10503 (next-mu-token *(ebp+8) %ecx)
10504
10505
10506 (slice-empty? %ecx)
10507 3d/compare-eax-and 0/imm32/false
10508 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10509
10510 (slice-equal? %ecx "{")
10511 3d/compare-eax-and 0/imm32/false
10512 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10513
10514 (slice-equal? %ecx "->")
10515 3d/compare-eax-and 0/imm32/false
10516 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10517
10518 (slice-equal? %ecx "}")
10519 3d/compare-eax-and 0/imm32/false
10520 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10521
10522 (slice-to-string Heap %ecx %edi)
10523
10524 {
10525 $populate-mu-function-header:check-for-inout:
10526 (next-mu-token *(ebp+8) %ecx)
10527
10528 (slice-empty? %ecx)
10529 3d/compare-eax-and 0/imm32/false
10530 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10531
10532 (slice-equal? %ecx "{")
10533 3d/compare-eax-and 0/imm32/false
10534 0f 85/jump-if-!= $populate-mu-function-header:done/disp32
10535
10536 (slice-equal? %ecx "->")
10537 3d/compare-eax-and 0/imm32/false
10538 0f 85/jump-if-!= break/disp32
10539
10540 (slice-equal? %ecx "}")
10541 3d/compare-eax-and 0/imm32/false
10542 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10543
10544 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
10545
10546
10547 (lookup *ebx *(ebx+4))
10548 81 7/subop/compare *(eax+0x18) 0/imm32
10549 0f 85/jump-if-!= $populate-mu-function-header:error2/disp32
10550
10551
10552
10553 8d/copy-address *(edi+8) 0/r32/eax
10554 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
10555
10556 (push *(ebp+0x10) *ebx)
10557 (push *(ebp+0x10) *(ebx+4))
10558 (push *(ebp+0x10) 0)
10559
10560 e9/jump loop/disp32
10561 }
10562
10563 {
10564 $populate-mu-function-header:check-for-out:
10565 (next-mu-token *(ebp+8) %ecx)
10566
10567 (slice-empty? %ecx)
10568 3d/compare-eax-and 0/imm32/false
10569 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10570
10571 (slice-equal? %ecx "{")
10572 3d/compare-eax-and 0/imm32/false
10573 0f 85/jump-if-!= break/disp32
10574
10575 (slice-equal? %ecx "->")
10576 3d/compare-eax-and 0/imm32/false
10577 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10578
10579 (slice-equal? %ecx "}")
10580 3d/compare-eax-and 0/imm32/false
10581 0f 85/jump-if-!= $populate-mu-function-header:error1/disp32
10582
10583 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x14) *(ebp+0x18))
10584
10585
10586 (lookup *ebx *(ebx+4))
10587 81 7/subop/compare *(eax+0x18) 0/imm32
10588 0f 84/jump-if-= $populate-mu-function-header:error3/disp32
10589
10590 8d/copy-address *(edi+0x10) 0/r32/eax
10591 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
10592
10593 e9/jump loop/disp32
10594 }
10595 $populate-mu-function-header:done:
10596 (check-no-tokens-left *(ebp+8))
10597 $populate-mu-function-header:end:
10598
10599 81 0/subop/add %esp 0x10/imm32
10600
10601 5f/pop-to-edi
10602 5b/pop-to-ebx
10603 5a/pop-to-edx
10604 59/pop-to-ecx
10605 58/pop-to-eax
10606
10607 89/<- %esp 5/r32/ebp
10608 5d/pop-to-ebp
10609 c3/return
10610
10611 $populate-mu-function-header:error1:
10612
10613 (write-buffered *(ebp+0x14) "function header not in form 'fn <name> [inouts] [-> outputs] {' -- '")
10614 (flush *(ebp+0x14))
10615 (rewind-stream *(ebp+8))
10616 (write-stream-data *(ebp+0x14) *(ebp+8))
10617 (write-buffered *(ebp+0x14) "'\n")
10618 (flush *(ebp+0x14))
10619 (stop *(ebp+0x18) 1)
10620
10621
10622 $populate-mu-function-header:error2:
10623
10624 (write-buffered *(ebp+0x14) "fn ")
10625 50/push-eax
10626 (lookup *edi *(edi+4))
10627 (write-buffered *(ebp+0x14) %eax)
10628 58/pop-to-eax
10629 (write-buffered *(ebp+0x14) ": function inout '")
10630 (lookup *eax *(eax+4))
10631 (write-buffered *(ebp+0x10) %eax)
10632 (write-buffered *(ebp+0x14) "' cannot be in a register")
10633 (flush *(ebp+0x14))
10634 (stop *(ebp+0x18) 1)
10635
10636
10637 $populate-mu-function-header:error3:
10638
10639 (write-buffered *(ebp+0x14) "fn ")
10640 50/push-eax
10641 (lookup *edi *(edi+4))
10642 (write-buffered *(ebp+0x14) %eax)
10643 58/pop-to-eax
10644 (write-buffered *(ebp+0x14) ": function output '")
10645 (lookup *ebx *(ebx+4))
10646 (lookup *eax *(eax+4))
10647 (write-buffered *(ebp+0x14) %eax)
10648 (write-buffered *(ebp+0x14) "' must be in a register, in instruction '")
10649 (rewind-stream *(ebp+8))
10650 (write-stream-data *(ebp+0x14) *(ebp+8))
10651 (write-buffered *(ebp+0x14) "'\n")
10652 (flush *(ebp+0x14))
10653 (stop *(ebp+0x18) 1)
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665 populate-mu-function-signature:
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691 55/push-ebp
10692 89/<- %ebp 4/r32/esp
10693
10694 50/push-eax
10695 51/push-ecx
10696 52/push-edx
10697 53/push-ebx
10698 57/push-edi
10699
10700 8b/-> *(ebp+0xc) 7/r32/edi
10701
10702 68/push 0/imm32/end
10703 68/push 0/imm32/start
10704 89/<- %ecx 4/r32/esp
10705
10706 68/push 0/imm32
10707 68/push 0/imm32
10708 89/<- %ebx 4/r32/esp
10709
10710 (next-mu-token *(ebp+8) %ecx)
10711
10712
10713 (slice-equal? %ecx "{")
10714 3d/compare-eax-and 0/imm32/false
10715 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10716
10717 (slice-equal? %ecx "->")
10718 3d/compare-eax-and 0/imm32/false
10719 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10720
10721 (slice-equal? %ecx "}")
10722 3d/compare-eax-and 0/imm32/false
10723 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10724
10725 (slice-to-string Heap %ecx %edi)
10726
10727 {
10728 $populate-mu-function-signature:check-for-inout:
10729 (next-mu-token *(ebp+8) %ecx)
10730 (slice-empty? %ecx)
10731 3d/compare-eax-and 0/imm32/false
10732 0f 85/jump-if-!= break/disp32
10733
10734 (slice-equal? %ecx "->")
10735 3d/compare-eax-and 0/imm32/false
10736 0f 85/jump-if-!= break/disp32
10737
10738 (slice-equal? %ecx "{")
10739 3d/compare-eax-and 0/imm32/false
10740 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10741
10742 (slice-equal? %ecx "}")
10743 3d/compare-eax-and 0/imm32/false
10744 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10745
10746 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
10747
10748
10749 (lookup *ebx *(ebx+4))
10750 81 7/subop/compare *(eax+0x18) 0/imm32
10751 0f 85/jump-if-!= $populate-mu-function-signature:error2/disp32
10752
10753
10754
10755 8d/copy-address *(edi+8) 0/r32/eax
10756 (append-list Heap *ebx *(ebx+4) *(edi+8) *(edi+0xc) %eax)
10757
10758 e9/jump loop/disp32
10759 }
10760
10761 {
10762 $populate-mu-function-signature:check-for-out:
10763 (next-mu-token *(ebp+8) %ecx)
10764 (slice-empty? %ecx)
10765 3d/compare-eax-and 0/imm32/false
10766 0f 85/jump-if-!= break/disp32
10767
10768 (slice-equal? %ecx "{")
10769 3d/compare-eax-and 0/imm32/false
10770 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10771
10772 (slice-equal? %ecx "->")
10773 3d/compare-eax-and 0/imm32/false
10774 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10775
10776 (slice-equal? %ecx "}")
10777 3d/compare-eax-and 0/imm32/false
10778 0f 85/jump-if-!= $populate-mu-function-signature:error1/disp32
10779
10780 (parse-var-with-type %ecx *(ebp+8) %ebx *(ebp+0x10) *(ebp+0x14))
10781
10782
10783 (lookup *ebx *(ebx+4))
10784 81 7/subop/compare *(eax+0x18) 0/imm32
10785 0f 84/jump-if-= $populate-mu-function-signature:error3/disp32
10786
10787 8d/copy-address *(edi+0x10) 0/r32/eax
10788 (append-list Heap *ebx *(ebx+4) *(edi+0x10) *(edi+0x14) %eax)
10789
10790 e9/jump loop/disp32
10791 }
10792 $populate-mu-function-signature:done:
10793 (check-no-tokens-left *(ebp+8))
10794 $populate-mu-function-signature:end:
10795
10796 81 0/subop/add %esp 0x10/imm32
10797
10798 5f/pop-to-edi
10799 5b/pop-to-ebx
10800 5a/pop-to-edx
10801 59/pop-to-ecx
10802 58/pop-to-eax
10803
10804 89/<- %esp 5/r32/ebp
10805 5d/pop-to-ebp
10806 c3/return
10807
10808 $populate-mu-function-signature:error1:
10809
10810 (write-buffered *(ebp+0x10) "function signature not in form 'fn <name> [inouts] [-> outputs] {' -- '")
10811 (flush *(ebp+0x10))
10812 (rewind-stream *(ebp+8))
10813 (write-stream-data *(ebp+0x10) *(ebp+8))
10814 (write-buffered *(ebp+0x10) "'\n")
10815 (flush *(ebp+0x10))
10816 (stop *(ebp+0x14) 1)
10817
10818
10819 $populate-mu-function-signature:error2:
10820
10821 (write-buffered *(ebp+0x10) "fn ")
10822 50/push-eax
10823 (lookup *edi *(edi+4))
10824 (write-buffered *(ebp+0x10) %eax)
10825 58/pop-to-eax
10826 (write-buffered *(ebp+0x10) ": function inout '")
10827 (lookup *eax *(eax+4))
10828 (write-buffered *(ebp+0x10) %eax)
10829 (write-buffered *(ebp+0x10) "' cannot be in a register")
10830 (flush *(ebp+0x10))
10831 (stop *(ebp+0x14) 1)
10832
10833
10834 $populate-mu-function-signature:error3:
10835
10836 (write-buffered *(ebp+0x10) "fn ")
10837 50/push-eax
10838 (lookup *edi *(edi+4))
10839 (write-buffered *(ebp+0x10) %eax)
10840 58/pop-to-eax
10841 (write-buffered *(ebp+0x10) ": function output '")
10842 (lookup *ebx *(ebx+4))
10843 (lookup *eax *(eax+4))
10844 (write-buffered *(ebp+0x10) %eax)
10845 (write-buffered *(ebp+0x10) "' must be in a register, in instruction '")
10846 (rewind-stream *(ebp+8))
10847 (write-stream-data *(ebp+0x10) *(ebp+8))
10848 (write-buffered *(ebp+0x10) "'\n")
10849 (flush *(ebp+0x10))
10850 (stop *(ebp+0x14) 1)
10851
10852
10853 test-function-header-with-arg:
10854
10855 55/push-ebp
10856 89/<- %ebp 4/r32/esp
10857
10858 8b/-> *Primitive-type-ids 0/r32/eax
10859 89/<- *Type-id 0/r32/eax
10860 (clear-stream _test-input-stream)
10861 (write _test-input-stream "foo n: int {\n")
10862
10863 2b/subtract *Function-size 4/r32/esp
10864 89/<- %ecx 4/r32/esp
10865 (zero-out %ecx *Function-size)
10866
10867 81 5/subop/subtract %esp 0xc0/imm32
10868 68/push 0xc0/imm32/size
10869 68/push 0/imm32/top
10870 89/<- %ebx 4/r32/esp
10871
10872 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
10873
10874 (lookup *ecx *(ecx+4))
10875 (check-strings-equal %eax "foo" "F - test-function-header-with-arg/name")
10876
10877 (lookup *(ecx+8) *(ecx+0xc))
10878 (lookup *eax *(eax+4))
10879 89/<- %edx 0/r32/eax
10880
10881 (lookup *edx *(edx+4))
10882 (check-strings-equal %eax "n" "F - test-function-header-with-arg/inout:0")
10883
10884 (lookup *(edx+8) *(edx+0xc))
10885 (check-ints-equal *eax 1 "F - test-function-header-with-arg/inout:0/type:0")
10886 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-arg/inout:0/type:1")
10887 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-arg/inout:0/type:2")
10888
10889 89/<- %esp 5/r32/ebp
10890 5d/pop-to-ebp
10891 c3/return
10892
10893 test-function-header-with-multiple-args:
10894
10895 55/push-ebp
10896 89/<- %ebp 4/r32/esp
10897
10898 8b/-> *Primitive-type-ids 0/r32/eax
10899 89/<- *Type-id 0/r32/eax
10900 (clear-stream _test-input-stream)
10901 (write _test-input-stream "foo a: int, b: int c: int {\n")
10902
10903 2b/subtract *Function-size 4/r32/esp
10904 89/<- %ecx 4/r32/esp
10905 (zero-out %ecx *Function-size)
10906
10907 81 5/subop/subtract %esp 0xc0/imm32
10908 68/push 0xc0/imm32/size
10909 68/push 0/imm32/top
10910 89/<- %ebx 4/r32/esp
10911
10912 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
10913
10914 (lookup *ecx *(ecx+4))
10915 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args/name")
10916
10917 (lookup *(ecx+8) *(ecx+0xc))
10918 89/<- %edx 0/r32/eax
10919 $test-function-header-with-multiple-args:inout0:
10920
10921 (lookup *edx *(edx+4))
10922 89/<- %ebx 0/r32/eax
10923
10924 (lookup *ebx *(ebx+4))
10925 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args/inout:0")
10926
10927 (lookup *(ebx+8) *(ebx+0xc))
10928 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:0/type:0")
10929 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:0/type:1")
10930 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:0/type:2")
10931 $test-function-header-with-multiple-args:inout1:
10932
10933 (lookup *(edx+8) *(edx+0xc))
10934 89/<- %edx 0/r32/eax
10935
10936 (lookup *edx *(edx+4))
10937 89/<- %ebx 0/r32/eax
10938
10939 (lookup *ebx *(ebx+4))
10940 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args/inout:1")
10941
10942 (lookup *(ebx+8) *(ebx+0xc))
10943 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:1/type:0")
10944 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:1/type:1")
10945 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:1/type:2")
10946 $test-function-header-with-multiple-args:inout2:
10947
10948 (lookup *(edx+8) *(edx+0xc))
10949 89/<- %edx 0/r32/eax
10950
10951 (lookup *edx *(edx+4))
10952 89/<- %ebx 0/r32/eax
10953
10954 (lookup *ebx *(ebx+4))
10955 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args/inout:2")
10956
10957 (lookup *(ebx+8) *(ebx+0xc))
10958 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args/inout:2/type:0")
10959 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args/inout:2/type:1")
10960 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args/inout:2/type:2")
10961
10962 89/<- %esp 5/r32/ebp
10963 5d/pop-to-ebp
10964 c3/return
10965
10966 test-function-header-with-multiple-args-and-outputs:
10967
10968 55/push-ebp
10969 89/<- %ebp 4/r32/esp
10970
10971 8b/-> *Primitive-type-ids 0/r32/eax
10972 89/<- *Type-id 0/r32/eax
10973 (clear-stream _test-input-stream)
10974 (write _test-input-stream "foo a: int, b: int, c: int -> x/ecx: int y/edx: int {\n")
10975
10976 2b/subtract *Function-size 4/r32/esp
10977 89/<- %ecx 4/r32/esp
10978 (zero-out %ecx *Function-size)
10979
10980 81 5/subop/subtract %esp 0xc0/imm32
10981 68/push 0xc0/imm32/size
10982 68/push 0/imm32/top
10983 89/<- %ebx 4/r32/esp
10984
10985 (populate-mu-function-header _test-input-stream %ecx %ebx Stderr 0)
10986
10987 (lookup *ecx *(ecx+4))
10988 (check-strings-equal %eax "foo" "F - test-function-header-with-multiple-args-and-outputs/name")
10989
10990 (lookup *(ecx+8) *(ecx+0xc))
10991 89/<- %edx 0/r32/eax
10992 $test-function-header-with-multiple-args-and-outputs:inout0:
10993
10994 (lookup *edx *(edx+4))
10995 89/<- %ebx 0/r32/eax
10996
10997 (lookup *ebx *(ebx+4))
10998 (check-strings-equal %eax "a" "F - test-function-header-with-multiple-args-and-outputs/inout:0")
10999
11000 (lookup *(ebx+8) *(ebx+0xc))
11001 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:0")
11002 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:1")
11003 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:0/type:2")
11004 $test-function-header-with-multiple-args-and-outputs:inout1:
11005
11006 (lookup *(edx+8) *(edx+0xc))
11007 89/<- %edx 0/r32/eax
11008
11009 (lookup *edx *(edx+4))
11010 89/<- %ebx 0/r32/eax
11011
11012 (lookup *ebx *(ebx+4))
11013 (check-strings-equal %eax "b" "F - test-function-header-with-multiple-args-and-outputs/inout:1")
11014
11015 (lookup *(ebx+8) *(ebx+0xc))
11016 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:0")
11017 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:1")
11018 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:1/type:2")
11019 $test-function-header-with-multiple-args-and-outputs:inout2:
11020
11021 (lookup *(edx+8) *(edx+0xc))
11022 89/<- %edx 0/r32/eax
11023
11024 (lookup *edx *(edx+4))
11025 89/<- %ebx 0/r32/eax
11026
11027 (lookup *ebx *(ebx+4))
11028 (check-strings-equal %eax "c" "F - test-function-header-with-multiple-args-and-outputs/inout:2")
11029
11030 (lookup *(ebx+8) *(ebx+0xc))
11031 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:0")
11032 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:1")
11033 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/inout:2/type:2")
11034 $test-function-header-with-multiple-args-and-outputs:out0:
11035
11036 (lookup *(ecx+0x10) *(ecx+0x14))
11037 89/<- %edx 0/r32/eax
11038
11039 (lookup *edx *(edx+4))
11040 89/<- %ebx 0/r32/eax
11041
11042 (lookup *ebx *(ebx+4))
11043 (check-strings-equal %eax "x" "F - test-function-header-with-multiple-args-and-outputs/output:0")
11044
11045 (lookup *(ebx+0x18) *(ebx+0x1c))
11046 (check-strings-equal %eax "ecx" "F - test-function-header-with-multiple-args-and-outputs/output:0/register")
11047
11048 (lookup *(ebx+8) *(ebx+0xc))
11049 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:0")
11050 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:1")
11051 (check-ints-equal *(eax+0xc) 0 "F - test-function-header-with-multiple-args-and-outputs/output:0/type:2")
11052 $test-function-header-with-multiple-args-and-outputs:out1:
11053
11054 (lookup *(edx+8) *(edx+0xc))
11055 89/<- %edx 0/r32/eax
11056
11057 (lookup *edx *(edx+4))
11058 89/<- %ebx 0/r32/eax
11059
11060 (lookup *ebx *(ebx+4))
11061 (check-strings-equal %eax "y" "F - test-function-header-with-multiple-args-and-outputs/output:1")
11062
11063 (lookup *(ebx+0x18) *(ebx+0x1c))
11064 (check-strings-equal %eax "edx" "F - test-function-header-with-multiple-args-and-outputs/output:1/register")
11065
11066 (lookup *(ebx+8) *(ebx+0xc))
11067 (check-ints-equal *eax 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:0")
11068 (check-ints-equal *(eax+4) 1 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:1")
11069 (check-ints-equal *(eax+0c) 0 "F - test-function-header-with-multiple-args-and-outputs/output:1/type:2")
11070
11071 89/<- %esp 5/r32/ebp
11072 5d/pop-to-ebp
11073 c3/return
11074
11075
11076
11077
11078
11079
11080
11081
11082 parse-var-with-type:
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099 55/push-ebp
11100 89/<- %ebp 4/r32/esp
11101
11102 50/push-eax
11103 51/push-ecx
11104 52/push-edx
11105 53/push-ebx
11106 56/push-esi
11107 57/push-edi
11108
11109 8b/-> *(ebp+8) 6/r32/esi
11110
11111 8b/-> *(esi+4) 1/r32/ecx
11112 49/decrement-ecx
11113 8a/copy-byte *ecx 1/r32/CL
11114 81 4/subop/and %ecx 0xff/imm32
11115 81 7/subop/compare %ecx 0x3a/imm32/colon
11116 0f 85/jump-if-!= $parse-var-with-type:abort/disp32
11117
11118 ff 1/subop/decrement *(esi+4)
11119
11120 68/push 0/imm32/end
11121 68/push 0/imm32/start
11122 89/<- %ecx 4/r32/esp
11123 $parse-var-with-type:parse-name:
11124 (next-token-from-slice *esi *(esi+4) 0x2f %ecx)
11125 $parse-var-with-type:create-var:
11126
11127 (new-var-from-slice Heap %ecx *(ebp+0x10))
11128
11129 $parse-var-with-type:save-register:
11130
11131 8b/-> *(ebp+0x10) 7/r32/edi
11132 (lookup *edi *(edi+4))
11133 89/<- %edi 0/r32/eax
11134
11135 (next-token-from-slice *(ecx+4) *(esi+4) 0x2f %ecx)
11136
11137 {
11138 $parse-var-with-type:write-register:
11139 (slice-empty? %ecx)
11140 3d/compare-eax-and 0/imm32/false
11141 75/jump-if-!= break/disp8
11142
11143 8d/copy-address *(edi+0x18) 0/r32/eax
11144 (slice-to-string Heap %ecx %eax)
11145 }
11146 $parse-var-with-type:save-type:
11147 8d/copy-address *(edi+8) 0/r32/eax
11148 (parse-type Heap *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
11149 $parse-var-with-type:end:
11150
11151 81 0/subop/add %esp 8/imm32
11152
11153 5f/pop-to-edi
11154 5e/pop-to-esi
11155 5b/pop-to-ebx
11156 5a/pop-to-edx
11157 59/pop-to-ecx
11158 58/pop-to-eax
11159
11160 89/<- %esp 5/r32/ebp
11161 5d/pop-to-ebp
11162 c3/return
11163
11164 $parse-var-with-type:abort:
11165
11166 (write-buffered *(ebp+0x14) "var should have form 'name: type' in '")
11167 (flush *(ebp+0x14))
11168 (rewind-stream *(ebp+0xc))
11169 (write-stream-data *(ebp+0x14) *(ebp+0xc))
11170 (write-buffered *(ebp+0x14) "'\n")
11171 (flush *(ebp+0x14))
11172 (stop *(ebp+0x18) 1)
11173
11174
11175 parse-type:
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198 55/push-ebp
11199 89/<- %ebp 4/r32/esp
11200
11201 50/push-eax
11202 51/push-ecx
11203 52/push-edx
11204
11205 (zero-out *(ebp+0x10) *Handle-size)
11206
11207 68/push 0/imm32
11208 68/push 0/imm32
11209 89/<- %ecx 4/r32/esp
11210
11211 (next-mu-token *(ebp+0xc) %ecx)
11212
11213
11214
11215
11216
11217 (slice-equal? %ecx "")
11218 3d/compare-eax-and 0/imm32/false
11219 0f 85/jump-if-!= $parse-type:abort/disp32
11220
11221 (slice-equal? %ecx "{")
11222 3d/compare-eax-and 0/imm32/false
11223 0f 85/jump-if-!= $parse-type:abort/disp32
11224
11225 (slice-equal? %ecx "}")
11226 3d/compare-eax-and 0/imm32/false
11227 0f 85/jump-if-!= $parse-type:abort/disp32
11228
11229 (slice-equal? %ecx "->")
11230 3d/compare-eax-and 0/imm32/false
11231 0f 85/jump-if-!= $parse-type:abort/disp32
11232
11233 (slice-equal? %ecx ")")
11234 3d/compare-eax-and 0/imm32/false
11235 0f 85/jump-if-!= $parse-type:end/disp32
11236
11237 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
11238
11239 8b/-> *(ebp+0x10) 2/r32/edx
11240 (lookup *edx *(edx+4))
11241 89/<- %edx 0/r32/eax
11242 {
11243
11244 (slice-equal? %ecx "(")
11245 3d/compare-eax-and 0/imm32/false
11246 0f 85/jump-if-!= break/disp32
11247
11248 {
11249 $parse-type:check-for-int:
11250
11251 8b/-> *ecx 0/r32/eax
11252 8a/copy-byte *eax 0/r32/AL
11253 81 4/subop/and %eax 0xff/imm32
11254
11255 (is-decimal-digit? %eax)
11256 3d/compare-eax-and 0/imm32/false
11257 74/jump-if-= break/disp8
11258
11259 (is-hex-int? %ecx)
11260 3d/compare-eax-and 0/imm32/false
11261 74/jump-if-= break/disp8
11262 $parse-type:int:
11263 (check-mu-hex-int %ecx *(ebp+0x14) *(ebp+0x18))
11264 (parse-hex-int-from-slice %ecx)
11265 c7 0/subop/copy *(edx+4) 9/imm32/type-id-array-capacity
11266 89/<- *(edx+8) 0/r32/eax
11267 e9/jump $parse-type:end/disp32
11268 }
11269 $parse-type:atom:
11270
11271 c7 0/subop/copy *edx 1/imm32/true
11272 {
11273 $parse-type:check-for-type-parameter:
11274
11275 8b/-> *ecx 0/r32/eax
11276 8a/copy-byte *eax 0/r32/AL
11277 81 4/subop/and %eax 0xff/imm32
11278
11279 3d/compare-eax-and 0x5f/imm32/_
11280 75/jump-if-!= break/disp8
11281 $parse-type:type-parameter:
11282
11283 c7 0/subop/copy *(edx+4) 0xa/imm32/type-parameter
11284
11285 8d/copy-address *(edx+8) 0/r32/eax
11286 (slice-to-string *(ebp+8) %ecx %eax)
11287 e9/jump $parse-type:end/disp32
11288 }
11289 $parse-type:non-type-parameter:
11290
11291 (pos-or-insert-slice Type-id %ecx)
11292 89/<- *(edx+4) 0/r32/eax
11293 e9/jump $parse-type:end/disp32
11294 }
11295 $parse-type:non-atom:
11296
11297
11298 8d/copy-address *(edx+4) 0/r32/eax
11299 (parse-type *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
11300
11301 8d/copy-address *(edx+0xc) 0/r32/eax
11302 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
11303 $parse-type:end:
11304
11305 81 0/subop/add %esp 8/imm32
11306
11307 5a/pop-to-edx
11308 59/pop-to-ecx
11309 58/pop-to-eax
11310
11311 89/<- %esp 5/r32/ebp
11312 5d/pop-to-ebp
11313 c3/return
11314
11315 $parse-type:abort:
11316
11317 (write-buffered *(ebp+0x14) "unexpected token when parsing type: '")
11318 (write-slice-buffered *(ebp+0x14) %ecx)
11319 (write-buffered *(ebp+0x14) "'\n")
11320 (flush *(ebp+0x14))
11321 (stop *(ebp+0x18) 1)
11322
11323
11324 parse-type-tree:
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334 55/push-ebp
11335 89/<- %ebp 4/r32/esp
11336
11337 50/push-eax
11338 51/push-ecx
11339 52/push-edx
11340
11341 (zero-out *(ebp+0x10) *Handle-size)
11342
11343 68/push 0/imm32
11344 68/push 0/imm32
11345 89/<- %ecx 4/r32/esp
11346
11347 (parse-type *(ebp+8) *(ebp+0xc) %ecx *(ebp+0x14) *(ebp+0x18))
11348
11349 81 7/subop/compare *ecx 0/imm32
11350 74/jump-if-= $parse-type-tree:end/disp8
11351
11352 (allocate *(ebp+8) *Type-tree-size *(ebp+0x10))
11353
11354 8b/-> *(ebp+0x10) 2/r32/edx
11355 (lookup *edx *(edx+4))
11356 89/<- %edx 0/r32/eax
11357
11358 8b/-> *ecx 0/r32/eax
11359 89/<- *(edx+4) 0/r32/eax
11360 8b/-> *(ecx+4) 0/r32/eax
11361 89/<- *(edx+8) 0/r32/eax
11362
11363 8d/copy-address *(edx+0xc) 0/r32/eax
11364 (parse-type-tree *(ebp+8) *(ebp+0xc) %eax *(ebp+0x14) *(ebp+0x18))
11365 $parse-type-tree:end:
11366
11367 81 0/subop/add %esp 8/imm32
11368
11369 5a/pop-to-edx
11370 59/pop-to-ecx
11371 58/pop-to-eax
11372
11373 89/<- %esp 5/r32/ebp
11374 5d/pop-to-ebp
11375 c3/return
11376
11377 next-mu-token:
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422 55/push-ebp
11423 89/<- %ebp 4/r32/esp
11424
11425 50/push-eax
11426 51/push-ecx
11427 56/push-esi
11428 57/push-edi
11429
11430 8b/-> *(ebp+8) 6/r32/esi
11431
11432 8b/-> *(ebp+0xc) 7/r32/edi
11433 $next-mu-token:start:
11434 (skip-chars-matching-whitespace %esi)
11435 $next-mu-token:check0:
11436
11437
11438 8b/-> *(esi+4) 1/r32/ecx
11439
11440 3b/compare<- *esi 1/r32/ecx
11441 c7 0/subop/copy *edi 0/imm32
11442 c7 0/subop/copy *(edi+4) 0/imm32
11443 0f 8d/jump-if->= $next-mu-token:end/disp32
11444
11445 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
11446 89/<- *edi 0/r32/eax
11447
11448 31/xor-with %eax 0/r32/eax
11449 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
11450 {
11451 $next-mu-token:check-for-comma:
11452
11453 3d/compare-eax-and 0x2c/imm32/comma
11454 75/jump-if-!= break/disp8
11455
11456 ff 0/subop/increment *(esi+4)
11457
11458 e9/jump $next-mu-token:start/disp32
11459 }
11460 {
11461 $next-mu-token:check-for-comment:
11462
11463 3d/compare-eax-and 0x23/imm32/pound
11464 75/jump-if-!= break/disp8
11465
11466 e9/jump $next-mu-token:done/disp32
11467 }
11468 {
11469 $next-mu-token:check-for-string-literal:
11470
11471 3d/compare-eax-and 0x22/imm32/dquote
11472 75/jump-if-!= break/disp8
11473 (skip-string %esi)
11474
11475 e9/jump $next-mu-token:done/disp32
11476 }
11477 {
11478 $next-mu-token:check-for-open-paren:
11479
11480 3d/compare-eax-and 0x28/imm32/open-paren
11481 75/jump-if-!= break/disp8
11482
11483 ff 0/subop/increment *(esi+4)
11484
11485 e9/jump $next-mu-token:done/disp32
11486 }
11487 {
11488 $next-mu-token:check-for-close-paren:
11489
11490 3d/compare-eax-and 0x29/imm32/close-paren
11491 75/jump-if-!= break/disp8
11492
11493 ff 0/subop/increment *(esi+4)
11494
11495 e9/jump $next-mu-token:done/disp32
11496 }
11497 {
11498 $next-mu-token:regular-word-without-metadata:
11499
11500
11501 8b/-> *(esi+4) 1/r32/ecx
11502
11503 3b/compare<- *esi 1/r32/ecx
11504 7d/jump-if->= break/disp8
11505
11506 31/xor-with %eax 0/r32/eax
11507 8a/copy-byte *(esi+ecx+0xc) 0/r32/AL
11508
11509 3d/compare-eax-and 0x20/imm32/space
11510 74/jump-if-= break/disp8
11511
11512 3d/compare-eax-and 0xd/imm32/carriage-return
11513 74/jump-if-= break/disp8
11514
11515 3d/compare-eax-and 0xa/imm32/newline
11516 74/jump-if-= break/disp8
11517
11518 3d/compare-eax-and 0x28/imm32/open-paren
11519 0f 84/jump-if-= break/disp32
11520
11521 3d/compare-eax-and 0x29/imm32/close-paren
11522 0f 84/jump-if-= break/disp32
11523
11524 3d/compare-eax-and 0x2c/imm32/comma
11525 0f 84/jump-if-= break/disp32
11526
11527 ff 0/subop/increment *(esi+4)
11528
11529 e9/jump loop/disp32
11530 }
11531 $next-mu-token:done:
11532
11533 8b/-> *(esi+4) 1/r32/ecx
11534 8d/copy-address *(esi+ecx+0xc) 0/r32/eax
11535 89/<- *(edi+4) 0/r32/eax
11536 $next-mu-token:end:
11537
11538 5f/pop-to-edi
11539 5e/pop-to-esi
11540 59/pop-to-ecx
11541 58/pop-to-eax
11542
11543 89/<- %esp 5/r32/ebp
11544 5d/pop-to-ebp
11545 c3/return
11546
11547 pos-or-insert-slice:
11548
11549 55/push-ebp
11550 89/<- %ebp 4/r32/esp
11551
11552 (pos-slice *(ebp+8) *(ebp+0xc))
11553 3d/compare-eax-and -1/imm32
11554 75/jump-if-!= $pos-or-insert-slice:end/disp8
11555 $pos-or-insert-slice:insert:
11556
11557 68/push 0/imm32
11558 68/push 0/imm32
11559 89/<- %eax 4/r32/esp
11560 (slice-to-string Heap *(ebp+0xc) %eax)
11561
11562 (lookup *eax *(eax+4))
11563 (write-int *(ebp+8) %eax)
11564 (pos-slice *(ebp+8) *(ebp+0xc))
11565 $pos-or-insert-slice:end:
11566
11567 81 0/subop/add %esp 8/imm32
11568
11569 89/<- %esp 5/r32/ebp
11570 5d/pop-to-ebp
11571 c3/return
11572
11573
11574
11575 pos-slice:
11576
11577 55/push-ebp
11578 89/<- %ebp 4/r32/esp
11579
11580 51/push-ecx
11581 52/push-edx
11582 53/push-ebx
11583 56/push-esi
11584
11585
11586
11587
11588
11589 8b/-> *(ebp+8) 6/r32/esi
11590
11591 b9/copy-to-ecx 0/imm32
11592
11593 8d/copy-address *(esi+0xc) 2/r32/edx
11594
11595 8b/-> *esi 3/r32/ebx
11596 8d/copy-address *(esi+ebx+0xc) 3/r32/ebx
11597 {
11598
11599
11600
11601
11602
11603 39/compare %edx 3/r32/ebx
11604 b8/copy-to-eax -1/imm32
11605 73/jump-if-addr>= $pos-slice:end/disp8
11606
11607 (slice-equal? *(ebp+0xc) *edx)
11608 3d/compare-eax-and 0/imm32/false
11609 75/jump-if-!= break/disp8
11610
11611 41/increment-ecx
11612
11613 81 0/subop/add %edx 4/imm32
11614
11615 eb/jump loop/disp8
11616 }
11617
11618 89/<- %eax 1/r32/ecx
11619 $pos-slice:end:
11620
11621
11622
11623
11624 5e/pop-to-esi
11625 5b/pop-to-ebx
11626 5a/pop-to-edx
11627 59/pop-to-ecx
11628
11629 89/<- %esp 5/r32/ebp
11630 5d/pop-to-ebp
11631 c3/return
11632
11633 test-parse-var-with-type:
11634
11635 55/push-ebp
11636 89/<- %ebp 4/r32/esp
11637
11638 8b/-> *Primitive-type-ids 0/r32/eax
11639 89/<- *Type-id 0/r32/eax
11640
11641 b8/copy-to-eax "x:"/imm32
11642 8b/-> *eax 1/r32/ecx
11643 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11644 05/add-to-eax 4/imm32
11645
11646 51/push-ecx
11647 50/push-eax
11648 89/<- %ecx 4/r32/esp
11649
11650 (clear-stream _test-input-stream)
11651 (write _test-input-stream "int")
11652
11653 68/push 0/imm32
11654 68/push 0/imm32
11655 89/<- %edx 4/r32/esp
11656
11657 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
11658
11659 (lookup *edx *(edx+4))
11660 89/<- %edx 0/r32/eax
11661
11662 (lookup *edx *(edx+4))
11663 (check-strings-equal %eax "x" "F - test-parse-var-with-type/name")
11664
11665 (lookup *(edx+8) *(edx+0xc))
11666 (check-ints-equal *eax 1 "F - test-parse-var-with-type/type:0")
11667 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type/type:1")
11668 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type/type:2")
11669
11670 89/<- %esp 5/r32/ebp
11671 5d/pop-to-ebp
11672 c3/return
11673
11674 test-parse-var-with-type-and-register:
11675
11676 55/push-ebp
11677 89/<- %ebp 4/r32/esp
11678
11679 8b/-> *Primitive-type-ids 0/r32/eax
11680 89/<- *Type-id 0/r32/eax
11681
11682 b8/copy-to-eax "x/eax:"/imm32
11683 8b/-> *eax 1/r32/ecx
11684 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11685 05/add-to-eax 4/imm32
11686
11687 51/push-ecx
11688 50/push-eax
11689 89/<- %ecx 4/r32/esp
11690
11691 (clear-stream _test-input-stream)
11692 (write _test-input-stream "int")
11693
11694 68/push 0/imm32
11695 68/push 0/imm32
11696 89/<- %edx 4/r32/esp
11697
11698 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
11699
11700 (lookup *edx *(edx+4))
11701 89/<- %edx 0/r32/eax
11702
11703 (lookup *edx *(edx+4))
11704 (check-strings-equal %eax "x" "F - test-parse-var-with-type-and-register/name")
11705
11706 (lookup *(edx+0x18) *(edx+0x1c))
11707 (check-strings-equal %eax "eax" "F - test-parse-var-with-type-and-register/register")
11708
11709 (lookup *(edx+8) *(edx+0xc))
11710 (check-ints-equal *eax 1 "F - test-parse-var-with-type-and-register/type:0")
11711 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-type-and-register/type:1")
11712 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-type-and-register/type:2")
11713
11714 89/<- %esp 5/r32/ebp
11715 5d/pop-to-ebp
11716 c3/return
11717
11718 test-parse-var-with-trailing-characters:
11719
11720 55/push-ebp
11721 89/<- %ebp 4/r32/esp
11722
11723 8b/-> *Primitive-type-ids 0/r32/eax
11724 89/<- *Type-id 0/r32/eax
11725
11726 b8/copy-to-eax "x:"/imm32
11727 8b/-> *eax 1/r32/ecx
11728 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11729 05/add-to-eax 4/imm32
11730
11731 51/push-ecx
11732 50/push-eax
11733 89/<- %ecx 4/r32/esp
11734
11735 (clear-stream _test-input-stream)
11736 (write _test-input-stream "int,")
11737
11738 68/push 0/imm32
11739 68/push 0/imm32
11740 89/<- %edx 4/r32/esp
11741
11742 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
11743
11744 (lookup *edx *(edx+4))
11745 89/<- %edx 0/r32/eax
11746
11747 (lookup *edx *(edx+4))
11748 (check-strings-equal %eax "x" "F - test-parse-var-with-trailing-characters/name")
11749
11750 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-trailing-characters/register")
11751
11752 (lookup *(edx+8) *(edx+0xc))
11753 (check-ints-equal *eax 1 "F - test-parse-var-with-trailing-characters/type:0")
11754 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-trailing-characters/type:1")
11755 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-trailing-characters/type:1")
11756
11757 89/<- %esp 5/r32/ebp
11758 5d/pop-to-ebp
11759 c3/return
11760
11761 test-parse-var-with-register-and-trailing-characters:
11762
11763 55/push-ebp
11764 89/<- %ebp 4/r32/esp
11765
11766 8b/-> *Primitive-type-ids 0/r32/eax
11767 89/<- *Type-id 0/r32/eax
11768
11769 b8/copy-to-eax "x/eax:"/imm32
11770 8b/-> *eax 1/r32/ecx
11771 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11772 05/add-to-eax 4/imm32
11773
11774 51/push-ecx
11775 50/push-eax
11776 89/<- %ecx 4/r32/esp
11777
11778 (clear-stream _test-input-stream)
11779 (write _test-input-stream "int,")
11780
11781 68/push 0/imm32
11782 68/push 0/imm32
11783 89/<- %edx 4/r32/esp
11784
11785 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
11786
11787 (lookup *edx *(edx+4))
11788 89/<- %edx 0/r32/eax
11789
11790 (lookup *edx *(edx+4))
11791 (check-strings-equal %eax "x" "F - test-parse-var-with-register-and-trailing-characters/name")
11792
11793 (lookup *(edx+0x18) *(edx+0x1c))
11794 (check-strings-equal %eax "eax" "F - test-parse-var-with-register-and-trailing-characters/register")
11795
11796 (lookup *(edx+8) *(edx+0xc))
11797 (check-ints-equal *eax 1 "F - test-parse-var-with-register-and-trailing-characters/type:0")
11798 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-register-and-trailing-characters/type:1")
11799 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-register-and-trailing-characters/type:2")
11800
11801 89/<- %esp 5/r32/ebp
11802 5d/pop-to-ebp
11803 c3/return
11804
11805 test-parse-var-with-compound-type:
11806
11807 55/push-ebp
11808 89/<- %ebp 4/r32/esp
11809
11810 8b/-> *Primitive-type-ids 0/r32/eax
11811 89/<- *Type-id 0/r32/eax
11812
11813 b8/copy-to-eax "x:"/imm32
11814 8b/-> *eax 1/r32/ecx
11815 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11816 05/add-to-eax 4/imm32
11817
11818 51/push-ecx
11819 50/push-eax
11820 89/<- %ecx 4/r32/esp
11821
11822 (clear-stream _test-input-stream)
11823 (write _test-input-stream "(addr int)")
11824
11825 68/push 0/imm32
11826 68/push 0/imm32
11827 89/<- %edx 4/r32/esp
11828
11829 (parse-var-with-type %ecx _test-input-stream %edx Stderr 0)
11830
11831 (lookup *edx *(edx+4))
11832 89/<- %edx 0/r32/eax
11833
11834 (lookup *edx *(edx+4))
11835 (check-strings-equal %eax "x" "F - test-parse-var-with-compound-type/name")
11836
11837 (check-ints-equal *(edx+0x18) 0 "F - test-parse-var-with-compound-type/register")
11838
11839
11840 (lookup *(edx+8) *(edx+0xc))
11841 89/<- %edx 0/r32/eax
11842
11843 (check-ints-equal *edx 0 "F - test-parse-var-with-compound-type/type:0")
11844
11845 (lookup *(edx+4) *(edx+8))
11846 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:1")
11847 (check-ints-equal *(eax+4) 2 "F - test-parse-var-with-compound-type/type:2")
11848
11849 (lookup *(edx+0xc) *(edx+0x10))
11850 (lookup *(eax+4) *(eax+8))
11851 (check-ints-equal *eax 1 "F - test-parse-var-with-compound-type/type:3")
11852 (check-ints-equal *(eax+4) 1 "F - test-parse-var-with-compound-type/type:4")
11853
11854 (check-ints-equal *(eax+0xc) 0 "F - test-parse-var-with-compound-type/type:5")
11855
11856 89/<- %esp 5/r32/ebp
11857 5d/pop-to-ebp
11858 c3/return
11859
11860
11861
11862
11863 is-identifier?:
11864
11865 55/push-ebp
11866 89/<- %ebp 4/r32/esp
11867
11868 (slice-empty? *(ebp+8))
11869 3d/compare-eax-and 0/imm32/false
11870 75/jump-if-!= $is-identifier?:false/disp8
11871
11872 8b/-> *(ebp+8) 0/r32/eax
11873 8b/-> *eax 0/r32/eax
11874 8a/copy-byte *eax 0/r32/AL
11875 81 4/subop/and %eax 0xff/imm32
11876
11877 3d/compare-eax-and 0x24/imm32/$
11878 74/jump-if-= $is-identifier?:true/disp8
11879
11880 3d/compare-eax-and 0x5f/imm32/_
11881 74/jump-if-= $is-identifier?:true/disp8
11882
11883 25/and-eax-with 0x5f/imm32
11884
11885 3d/compare-eax-and 0x41/imm32/A
11886 7c/jump-if-< $is-identifier?:false/disp8
11887
11888 3d/compare-eax-and 0x5a/imm32/Z
11889 7f/jump-if-> $is-identifier?:false/disp8
11890
11891 $is-identifier?:true:
11892 b8/copy-to-eax 1/imm32/true
11893 eb/jump $is-identifier?:end/disp8
11894 $is-identifier?:false:
11895 b8/copy-to-eax 0/imm32/false
11896 $is-identifier?:end:
11897
11898 89/<- %esp 5/r32/ebp
11899 5d/pop-to-ebp
11900 c3/return
11901
11902 test-is-identifier-dollar:
11903
11904 55/push-ebp
11905 89/<- %ebp 4/r32/esp
11906
11907 b8/copy-to-eax "$a"/imm32
11908 8b/-> *eax 1/r32/ecx
11909 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11910 05/add-to-eax 4/imm32
11911
11912 51/push-ecx
11913 50/push-eax
11914 89/<- %ecx 4/r32/esp
11915
11916 (is-identifier? %ecx)
11917 (check-ints-equal %eax 1 "F - test-is-identifier-dollar")
11918
11919 89/<- %esp 5/r32/ebp
11920 5d/pop-to-ebp
11921 c3/return
11922
11923 test-is-identifier-underscore:
11924
11925 55/push-ebp
11926 89/<- %ebp 4/r32/esp
11927
11928 b8/copy-to-eax "_a"/imm32
11929 8b/-> *eax 1/r32/ecx
11930 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11931 05/add-to-eax 4/imm32
11932
11933 51/push-ecx
11934 50/push-eax
11935 89/<- %ecx 4/r32/esp
11936
11937 (is-identifier? %ecx)
11938 (check-ints-equal %eax 1 "F - test-is-identifier-underscore")
11939
11940 89/<- %esp 5/r32/ebp
11941 5d/pop-to-ebp
11942 c3/return
11943
11944 test-is-identifier-a:
11945
11946 55/push-ebp
11947 89/<- %ebp 4/r32/esp
11948
11949 b8/copy-to-eax "a$"/imm32
11950 8b/-> *eax 1/r32/ecx
11951 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11952 05/add-to-eax 4/imm32
11953
11954 51/push-ecx
11955 50/push-eax
11956 89/<- %ecx 4/r32/esp
11957
11958 (is-identifier? %ecx)
11959 (check-ints-equal %eax 1 "F - test-is-identifier-a")
11960
11961 89/<- %esp 5/r32/ebp
11962 5d/pop-to-ebp
11963 c3/return
11964
11965 test-is-identifier-z:
11966
11967 55/push-ebp
11968 89/<- %ebp 4/r32/esp
11969
11970 b8/copy-to-eax "z$"/imm32
11971 8b/-> *eax 1/r32/ecx
11972 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11973 05/add-to-eax 4/imm32
11974
11975 51/push-ecx
11976 50/push-eax
11977 89/<- %ecx 4/r32/esp
11978
11979 (is-identifier? %ecx)
11980 (check-ints-equal %eax 1 "F - test-is-identifier-z")
11981
11982 89/<- %esp 5/r32/ebp
11983 5d/pop-to-ebp
11984 c3/return
11985
11986 test-is-identifier-A:
11987
11988 55/push-ebp
11989 89/<- %ebp 4/r32/esp
11990
11991 b8/copy-to-eax "A$"/imm32
11992 8b/-> *eax 1/r32/ecx
11993 8d/copy-address *(eax+ecx+4) 1/r32/ecx
11994 05/add-to-eax 4/imm32
11995
11996 51/push-ecx
11997 50/push-eax
11998 89/<- %ecx 4/r32/esp
11999
12000 (is-identifier? %ecx)
12001 (check-ints-equal %eax 1 "F - test-is-identifier-A")
12002
12003 89/<- %esp 5/r32/ebp
12004 5d/pop-to-ebp
12005 c3/return
12006
12007 test-is-identifier-Z:
12008
12009 55/push-ebp
12010 89/<- %ebp 4/r32/esp
12011
12012 b8/copy-to-eax "Z$"/imm32
12013 8b/-> *eax 1/r32/ecx
12014 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12015 05/add-to-eax 4/imm32
12016
12017 51/push-ecx
12018 50/push-eax
12019 89/<- %ecx 4/r32/esp
12020
12021 (is-identifier? %ecx)
12022 (check-ints-equal %eax 1 "F - test-is-identifier-Z")
12023
12024 89/<- %esp 5/r32/ebp
12025 5d/pop-to-ebp
12026 c3/return
12027
12028 test-is-identifier-at:
12029
12030
12031 55/push-ebp
12032 89/<- %ebp 4/r32/esp
12033
12034 b8/copy-to-eax "@a"/imm32
12035 8b/-> *eax 1/r32/ecx
12036 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12037 05/add-to-eax 4/imm32
12038
12039 51/push-ecx
12040 50/push-eax
12041 89/<- %ecx 4/r32/esp
12042
12043 (is-identifier? %ecx)
12044 (check-ints-equal %eax 0 "F - test-is-identifier-@")
12045
12046 89/<- %esp 5/r32/ebp
12047 5d/pop-to-ebp
12048 c3/return
12049
12050 test-is-identifier-square-bracket:
12051
12052
12053 55/push-ebp
12054 89/<- %ebp 4/r32/esp
12055
12056 b8/copy-to-eax "[a"/imm32
12057 8b/-> *eax 1/r32/ecx
12058 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12059 05/add-to-eax 4/imm32
12060
12061 51/push-ecx
12062 50/push-eax
12063 89/<- %ecx 4/r32/esp
12064
12065 (is-identifier? %ecx)
12066 (check-ints-equal %eax 0 "F - test-is-identifier-@")
12067
12068 89/<- %esp 5/r32/ebp
12069 5d/pop-to-ebp
12070 c3/return
12071
12072 test-is-identifier-backtick:
12073
12074
12075 55/push-ebp
12076 89/<- %ebp 4/r32/esp
12077
12078 b8/copy-to-eax "`a"/imm32
12079 8b/-> *eax 1/r32/ecx
12080 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12081 05/add-to-eax 4/imm32
12082
12083 51/push-ecx
12084 50/push-eax
12085 89/<- %ecx 4/r32/esp
12086
12087 (is-identifier? %ecx)
12088 (check-ints-equal %eax 0 "F - test-is-identifier-backtick")
12089
12090 89/<- %esp 5/r32/ebp
12091 5d/pop-to-ebp
12092 c3/return
12093
12094 test-is-identifier-curly-brace-open:
12095
12096
12097 55/push-ebp
12098 89/<- %ebp 4/r32/esp
12099
12100 b8/copy-to-eax "{a"/imm32
12101 8b/-> *eax 1/r32/ecx
12102 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12103 05/add-to-eax 4/imm32
12104
12105 51/push-ecx
12106 50/push-eax
12107 89/<- %ecx 4/r32/esp
12108
12109 (is-identifier? %ecx)
12110 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-open")
12111
12112 89/<- %esp 5/r32/ebp
12113 5d/pop-to-ebp
12114 c3/return
12115
12116 test-is-identifier-curly-brace-close:
12117
12118 55/push-ebp
12119 89/<- %ebp 4/r32/esp
12120
12121 b8/copy-to-eax "}a"/imm32
12122 8b/-> *eax 1/r32/ecx
12123 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12124 05/add-to-eax 4/imm32
12125
12126 51/push-ecx
12127 50/push-eax
12128 89/<- %ecx 4/r32/esp
12129
12130 (is-identifier? %ecx)
12131 (check-ints-equal %eax 0 "F - test-is-identifier-curly-brace-close")
12132
12133 89/<- %esp 5/r32/ebp
12134 5d/pop-to-ebp
12135 c3/return
12136
12137 test-is-identifier-hyphen:
12138
12139
12140 55/push-ebp
12141 89/<- %ebp 4/r32/esp
12142
12143 b8/copy-to-eax "-a"/imm32
12144 8b/-> *eax 1/r32/ecx
12145 8d/copy-address *(eax+ecx+4) 1/r32/ecx
12146 05/add-to-eax 4/imm32
12147
12148 51/push-ecx
12149 50/push-eax
12150 89/<- %ecx 4/r32/esp
12151
12152 (is-identifier? %ecx)
12153 (check-ints-equal %eax 0 "F - test-is-identifier-hyphen")
12154
12155 89/<- %esp 5/r32/ebp
12156 5d/pop-to-ebp
12157 c3/return
12158
12159 populate-mu-function-body:
12160
12161 55/push-ebp
12162 89/<- %ebp 4/r32/esp
12163
12164 50/push-eax
12165 56/push-esi
12166 57/push-edi
12167
12168 8b/-> *(ebp+8) 6/r32/esi
12169
12170 8b/-> *(ebp+0xc) 7/r32/edi
12171
12172 c7 0/subop/copy *Curr-block-depth 1/imm32
12173
12174 8d/copy-address *(edi+0x18) 0/r32/eax
12175 (parse-mu-block %esi *(ebp+0x10) %edi %eax *(ebp+0x14) *(ebp+0x18))
12176 $populate-mu-function-body:end:
12177
12178 5f/pop-to-edi
12179 5e/pop-to-esi
12180 58/pop-to-eax
12181
12182 89/<- %esp 5/r32/ebp
12183 5d/pop-to-ebp
12184 c3/return
12185
12186
12187 parse-mu-block:
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225 55/push-ebp
12226 89/<- %ebp 4/r32/esp
12227
12228 50/push-eax
12229 51/push-ecx
12230 52/push-edx
12231 53/push-ebx
12232 57/push-edi
12233
12234 81 5/subop/subtract %esp 0x200/imm32
12235 68/push 0x200/imm32/size
12236 68/push 0/imm32/read
12237 68/push 0/imm32/write
12238 89/<- %ecx 4/r32/esp
12239
12240 68/push 0/imm32/end
12241 68/push 0/imm32/start
12242 89/<- %edx 4/r32/esp
12243
12244 (allocate Heap *Stmt-size *(ebp+0x14))
12245
12246 8b/-> *(ebp+0x14) 7/r32/edi
12247 (lookup *edi *(edi+4))
12248 89/<- %edi 0/r32/eax
12249
12250
12251 8d/copy-address *(edi+0xc) 0/r32/eax
12252 (new-block-name *(ebp+0x10) %eax)
12253
12254 (push *(ebp+0xc) *(edi+0xc))
12255 (push *(ebp+0xc) *(edi+0x10))
12256 (push *(ebp+0xc) 0)
12257
12258 ff 0/subop/increment *Curr-block-depth
12259 {
12260 $parse-mu-block:line-loop:
12261
12262 (clear-stream %ecx)
12263 (read-line-buffered *(ebp+8) %ecx)
12264
12265
12266
12267
12268
12269
12270 81 7/subop/compare *ecx 0/imm32
12271 0f 84/jump-if-= break/disp32
12272
12273
12274
12275 (next-mu-token %ecx %edx)
12276
12277
12278
12279
12280
12281 (slice-empty? %edx)
12282 3d/compare-eax-and 0/imm32/false
12283 0f 85/jump-if-!= loop/disp32
12284
12285
12286 8b/-> *edx 0/r32/eax
12287 8a/copy-byte *eax 0/r32/AL
12288 81 4/subop/and %eax 0xff/imm32
12289
12290 3d/compare-eax-and 0x23/imm32/hash
12291 0f 84/jump-if-= loop/disp32
12292
12293 {
12294 $parse-mu-block:check-for-block:
12295 (slice-equal? %edx "{")
12296 3d/compare-eax-and 0/imm32/false
12297 74/jump-if-= break/disp8
12298 (check-no-tokens-left %ecx)
12299
12300
12301 68/push 0/imm32
12302 68/push 0/imm32
12303 89/<- %eax 4/r32/esp
12304
12305 (parse-mu-block *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
12306 (append-to-block Heap %edi *eax *(eax+4))
12307
12308 81 0/subop/add %esp 8/imm32
12309
12310 e9/jump $parse-mu-block:line-loop/disp32
12311 }
12312
12313 $parse-mu-block:check-for-end:
12314 (slice-equal? %edx "}")
12315 3d/compare-eax-and 0/imm32/false
12316 0f 85/jump-if-!= break/disp32
12317
12318 {
12319 $parse-mu-block:check-for-named-block:
12320
12321 8b/-> *(edx+4) 0/r32/eax
12322 48/decrement-eax
12323 8a/copy-byte *eax 0/r32/AL
12324 81 4/subop/and %eax 0xff/imm32
12325
12326 3d/compare-eax-and 0x3a/imm32/colon
12327 0f 85/jump-if-!= break/disp32
12328
12329
12330
12331 ff 1/subop/decrement *(edx+4)
12332
12333 68/push 0/imm32
12334 68/push 0/imm32
12335 89/<- %eax 4/r32/esp
12336
12337 (parse-mu-named-block %edx *(ebp+8) *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
12338 (append-to-block Heap %edi *eax *(eax+4))
12339
12340 81 0/subop/add %esp 8/imm32
12341
12342 e9/jump $parse-mu-block:line-loop/disp32
12343 }
12344
12345 {
12346 $parse-mu-block:check-for-var:
12347 (slice-equal? %edx "var")
12348 3d/compare-eax-and 0/imm32/false
12349 74/jump-if-= break/disp8
12350
12351 68/push 0/imm32
12352 68/push 0/imm32
12353 89/<- %eax 4/r32/esp
12354
12355 (parse-mu-var-def %ecx *(ebp+0xc) %eax *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
12356 (append-to-block Heap %edi *eax *(eax+4))
12357
12358 81 0/subop/add %esp 8/imm32
12359
12360 e9/jump $parse-mu-block:line-loop/disp32
12361 }
12362 $parse-mu-block:regular-stmt:
12363
12364
12365 68/push 0/imm32
12366 68/push 0/imm32
12367 89/<- %eax 4/r32/esp
12368
12369 (parse-mu-stmt %ecx *(ebp+0xc) *(ebp+0x10) %eax *(ebp+0x18) *(ebp+0x1c))
12370 (append-to-block Heap %edi *eax *(eax+4))
12371
12372 81 0/subop/add %esp 8/imm32
12373
12374 e9/jump loop/disp32
12375 }
12376 (clean-up-blocks *(ebp+0xc) *Curr-block-depth *(ebp+0x10))
12377
12378 ff 1/subop/decrement *Curr-block-depth
12379
12380 (pop *(ebp+0xc))
12381 (pop *(ebp+0xc))
12382 (pop *(ebp+0xc))
12383 $parse-mu-block:end:
12384
12385 81 0/subop/add %esp 0x214/imm32
12386
12387 5f/pop-to-edi
12388 5b/pop-to-ebx
12389 5a/pop-to-edx
12390 59/pop-to-ecx
12391 58/pop-to-eax
12392
12393 89/<- %esp 5/r32/ebp
12394 5d/pop-to-ebp
12395 c3/return
12396
12397 $parse-mu-block:abort:
12398
12399 (write-buffered *(ebp+0x18) "'{' or '}' should be on its own line, but got '")
12400 (rewind-stream %ecx)
12401 (write-stream-data *(ebp+0x18) %ecx)
12402 (write-buffered *(ebp+0x18) "'\n")
12403 (flush *(ebp+0x18))
12404 (stop *(ebp+0x1c) 1)
12405
12406
12407 new-block-name:
12408
12409 55/push-ebp
12410 89/<- %ebp 4/r32/esp
12411
12412 50/push-eax
12413 51/push-ecx
12414 52/push-edx
12415
12416 8b/-> *(ebp+8) 0/r32/eax
12417 (lookup *eax *(eax+4))
12418 8b/-> *eax 0/r32/eax
12419 05/add-to-eax 0xd/imm32
12420 89/<- %ecx 0/r32/eax
12421
12422 29/subtract-from %esp 1/r32/ecx
12423 ff 6/subop/push %ecx
12424 68/push 0/imm32/read
12425 68/push 0/imm32/write
12426 89/<- %edx 4/r32/esp
12427 (clear-stream %edx)
12428
12429 8b/-> *(ebp+8) 0/r32/eax
12430 (lookup *eax *(eax+4))
12431
12432 (write %edx "$")
12433 (write %edx %eax)
12434 (write %edx ":")
12435 (write-int32-hex %edx *Next-block-index)
12436 ff 0/subop/increment *Next-block-index
12437
12438
12439 8b/-> *edx 0/r32/eax
12440
12441 8d/copy-address *(edx+0xc) 2/r32/edx
12442
12443 01/add-to %eax 2/r32/edx
12444
12445 ff 6/subop/push %eax
12446 ff 6/subop/push %edx
12447 89/<- %eax 4/r32/esp
12448
12449 (new-literal Heap %eax *(ebp+0xc))
12450
12451
12452
12453
12454
12455
12456
12457 $new-block-name:end:
12458
12459 81 0/subop/add %ecx 0xc/imm32
12460 81 0/subop/add %ecx 8/imm32
12461 01/add-to %esp 1/r32/ecx
12462
12463 5a/pop-to-edx
12464 59/pop-to-ecx
12465 58/pop-to-eax
12466
12467 89/<- %esp 5/r32/ebp
12468 5d/pop-to-ebp
12469 c3/return
12470
12471 check-no-tokens-left:
12472
12473 55/push-ebp
12474 89/<- %ebp 4/r32/esp
12475
12476 50/push-eax
12477 51/push-ecx
12478
12479 68/push 0/imm32/end
12480 68/push 0/imm32/start
12481 89/<- %ecx 4/r32/esp
12482
12483 (next-mu-token *(ebp+8) %ecx)
12484
12485 (slice-empty? %ecx)
12486 3d/compare-eax-and 0/imm32/false
12487 75/jump-if-!= $check-no-tokens-left:end/disp8
12488
12489
12490 8b/-> *edx 0/r32/eax
12491 8a/copy-byte *eax 0/r32/AL
12492 81 4/subop/and %eax 0xff/imm32
12493
12494 3d/compare-eax-and 0x23/imm32/hash
12495 74/jump-if-= $check-no-tokens-left:end/disp8
12496
12497 (write-buffered Stderr "'{' or '}' should be on its own line, but got '")
12498 (rewind-stream %ecx)
12499 (write-stream 2 %ecx)
12500 (write-buffered Stderr "'\n")
12501 (flush Stderr)
12502
12503 bb/copy-to-ebx 1/imm32
12504 e8/call syscall_exit/disp32
12505
12506 $check-no-tokens-left:end:
12507
12508 81 0/subop/add %esp 8/imm32
12509
12510 59/pop-to-ecx
12511 58/pop-to-eax
12512
12513 89/<- %esp 5/r32/ebp
12514 5d/pop-to-ebp
12515 c3/return
12516
12517 parse-mu-named-block:
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528 55/push-ebp
12529 89/<- %ebp 4/r32/esp
12530
12531 50/push-eax
12532 51/push-ecx
12533 57/push-edi
12534
12535 68/push 0/imm32
12536 68/push 0/imm32
12537 89/<- %ecx 4/r32/esp
12538
12539 (new-literal Heap *(ebp+8) %ecx)
12540
12541 (push *(ebp+0x10) *ecx)
12542 (push *(ebp+0x10) *(ecx+4))
12543 (push *(ebp+0x10) 0)
12544
12545 (parse-mu-block *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c) *(ebp+0x20))
12546
12547 (pop *(ebp+0x10))
12548 (pop *(ebp+0x10))
12549 (pop *(ebp+0x10))
12550
12551 8b/-> *(ebp+0x18) 7/r32/edi
12552 (lookup *edi *(edi+4))
12553 89/<- %edi 0/r32/eax
12554
12555 c7 0/subop/copy *edi 0/imm32/block
12556
12557 8b/-> *ecx 0/r32/eax
12558 89/<- *(edi+0xc) 0/r32/eax
12559 8b/-> *(ecx+4) 0/r32/eax
12560 89/<- *(edi+0x10) 0/r32/eax
12561 $parse-mu-named-block:end:
12562
12563 81 0/subop/add %esp 8/imm32
12564
12565 5f/pop-to-edi
12566 59/pop-to-ecx
12567 58/pop-to-eax
12568
12569 89/<- %esp 5/r32/ebp
12570 5d/pop-to-ebp
12571 c3/return
12572
12573 parse-mu-var-def:
12574
12575 55/push-ebp
12576 89/<- %ebp 4/r32/esp
12577
12578 50/push-eax
12579 51/push-ecx
12580 52/push-edx
12581 53/push-ebx
12582 57/push-edi
12583
12584 8b/-> *(ebp+0x10) 7/r32/edi
12585
12586 68/push 0/imm32/end
12587 68/push 0/imm32/start
12588 89/<- %ecx 4/r32/esp
12589
12590 68/push 0/imm32
12591 68/push 0/imm32
12592 89/<- %edx 4/r32/esp
12593
12594 (next-mu-token *(ebp+8) %ecx)
12595 (parse-var-with-type %ecx *(ebp+8) %edx *(ebp+0x18) *(ebp+0x1c))
12596
12597 (lookup *edx *(edx+4))
12598
12599 8b/-> *Curr-block-depth 3/r32/ebx
12600 89/<- *(eax+0x10) 3/r32/ebx
12601
12602 8b/-> *(eax+0x18) 0/r32/eax
12603 3d/compare-eax-and 0/imm32
12604 {
12605 75/jump-if-!= break/disp8
12606
12607
12608 (next-mu-token *(ebp+8) %ecx)
12609 (slice-empty? %ecx)
12610 3d/compare-eax-and 0/imm32/false
12611 0f 84/jump-if-= $parse-mu-var-def:error2/disp32
12612
12613 (new-var-def Heap *edx *(edx+4) %edi)
12614 e9/jump $parse-mu-var-def:update-vars/disp32
12615 }
12616
12617 {
12618 0f 84/jump-if-= break/disp32
12619
12620
12621
12622 (next-mu-token *(ebp+8) %ecx)
12623 (slice-equal? %ecx "<-")
12624 3d/compare-eax-and 0/imm32/false
12625 0f 84/jump-if-= $parse-mu-var-def:error1/disp32
12626
12627 (new-reg-var-def Heap *edx *(edx+4) %edi)
12628 (lookup *edi *(edi+4))
12629 (add-operation-and-inputs-to-stmt %eax *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
12630 }
12631 $parse-mu-var-def:update-vars:
12632
12633 (push *(ebp+0xc) *edx)
12634 (push *(ebp+0xc) *(edx+4))
12635 (push *(ebp+0xc) 0)
12636 $parse-mu-var-def:end:
12637
12638 81 0/subop/add %esp 0x10/imm32
12639
12640 5f/pop-to-edi
12641 5b/pop-to-ebx
12642 5a/pop-to-edx
12643 59/pop-to-ecx
12644 58/pop-to-eax
12645
12646 89/<- %esp 5/r32/ebp
12647 5d/pop-to-ebp
12648 c3/return
12649
12650 $parse-mu-var-def:error1:
12651 (rewind-stream *(ebp+8))
12652
12653 (write-buffered *(ebp+0x18) "register variable requires a valid instruction to initialize but got '")
12654 (flush *(ebp+0x18))
12655 (write-stream-data *(ebp+0x18) *(ebp+8))
12656 (write-buffered *(ebp+0x18) "'\n")
12657 (flush *(ebp+0x18))
12658 (stop *(ebp+0x1c) 1)
12659
12660
12661 $parse-mu-var-def:error2:
12662 (rewind-stream *(ebp+8))
12663
12664 (write-buffered *(ebp+0x18) "fn ")
12665 8b/-> *(ebp+0x14) 0/r32/eax
12666 (lookup *eax *(eax+4))
12667 (write-buffered *(ebp+0x18) %eax)
12668 (write-buffered *(ebp+0x18) ": var ")
12669
12670 (lookup *edx *(edx+4))
12671 (lookup *eax *(eax+4))
12672 (write-buffered *(ebp+0x18) %eax)
12673 (write-buffered *(ebp+0x18) ": variables on the stack can't take an initializer\n")
12674 (flush *(ebp+0x18))
12675 (stop *(ebp+0x1c) 1)
12676
12677
12678 test-parse-mu-var-def:
12679
12680
12681 55/push-ebp
12682 89/<- %ebp 4/r32/esp
12683
12684 8b/-> *Primitive-type-ids 0/r32/eax
12685 89/<- *Type-id 0/r32/eax
12686 (clear-stream _test-input-stream)
12687 (write _test-input-stream "n: int\n")
12688 c7 0/subop/copy *Curr-block-depth 1/imm32
12689
12690 68/push 0/imm32
12691 68/push 0/imm32
12692 89/<- %esi 4/r32/esp
12693
12694 81 5/subop/subtract %esp 0xc0/imm32
12695 68/push 0xc0/imm32/size
12696 68/push 0/imm32/top
12697 89/<- %ecx 4/r32/esp
12698 (clear-stack %ecx)
12699
12700 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
12701
12702 (lookup *esi *(esi+4))
12703 89/<- %esi 0/r32/eax
12704
12705 (check-ints-equal *esi 2 "F - test-parse-mu-var-def/tag")
12706
12707 (lookup *(esi+4) *(esi+8))
12708 89/<- %ecx 0/r32/eax
12709
12710 (lookup *ecx *(ecx+4))
12711 (check-strings-equal %eax "n" "F - test-parse-mu-var-def/var-name")
12712
12713 (check-ints-equal *(ecx+0x18) 0 "F - test-parse-mu-var-def/var-register")
12714
12715 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-var-def/output-block-depth")
12716
12717 (lookup *(ecx+8) *(ecx+0xc))
12718 (check-ints-equal *eax 1 "F - test-parse-mu-var-def/var-type:0")
12719 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-var-def/var-type:1")
12720 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-var-def/var-type:2")
12721
12722 89/<- %esp 5/r32/ebp
12723 5d/pop-to-ebp
12724 c3/return
12725
12726 test-parse-mu-reg-var-def:
12727
12728
12729 55/push-ebp
12730 89/<- %ebp 4/r32/esp
12731
12732 8b/-> *Primitive-type-ids 0/r32/eax
12733 89/<- *Type-id 0/r32/eax
12734 (clear-stream _test-input-stream)
12735 (write _test-input-stream "n/eax: int <- copy 0\n")
12736 c7 0/subop/copy *Curr-block-depth 1/imm32
12737
12738 68/push 0/imm32
12739 68/push 0/imm32
12740 89/<- %esi 4/r32/esp
12741
12742 81 5/subop/subtract %esp 0xc0/imm32
12743 68/push 0xc0/imm32/size
12744 68/push 0/imm32/top
12745 89/<- %ecx 4/r32/esp
12746 (clear-stack %ecx)
12747
12748 (parse-mu-var-def _test-input-stream %ecx %esi 0 Stderr 0)
12749
12750 (lookup *esi *(esi+4))
12751 89/<- %esi 0/r32/eax
12752
12753 (check-ints-equal *esi 3 "F - test-parse-mu-reg-var-def/tag")
12754
12755
12756 (lookup *(esi+0x14) *(esi+0x18))
12757
12758 (check-ints-equal *(eax+8) 0 "F - test-parse-mu-reg-var-def/single-output")
12759
12760 (lookup *eax *(eax+4))
12761
12762 89/<- %ecx 0/r32/eax
12763
12764 (lookup *ecx *(ecx+4))
12765 (check-strings-equal %eax "n" "F - test-parse-mu-reg-var-def/output-name")
12766
12767 (lookup *(ecx+0x18) *(ecx+0x1c))
12768 (check-strings-equal %eax "eax" "F - test-parse-mu-reg-var-def/output-register")
12769
12770 (check-ints-equal *(ecx+0x10) 1 "F - test-parse-mu-reg-var-def/output-block-depth")
12771
12772 (lookup *(ecx+8) *(ecx+0xc))
12773 (check-ints-equal *eax 1 "F - test-parse-mu-reg-var-def/output-type:0")
12774 (check-ints-equal *(eax+4) 1 "F - test-parse-mu-reg-var-def/output-type:1")
12775 (check-ints-equal *(eax+0xc) 0 "F - test-parse-mu-reg-var-def/output-type:2")
12776
12777 89/<- %esp 5/r32/ebp
12778 5d/pop-to-ebp
12779 c3/return
12780
12781 parse-mu-stmt:
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797 55/push-ebp
12798 89/<- %ebp 4/r32/esp
12799
12800 50/push-eax
12801 51/push-ecx
12802 52/push-edx
12803 53/push-ebx
12804 57/push-edi
12805
12806 68/push 0/imm32/end
12807 68/push 0/imm32/start
12808 89/<- %ecx 4/r32/esp
12809
12810 ba/copy-to-edx 0/imm32/false
12811
12812 68/push 0/imm32
12813 68/push 0/imm32
12814 89/<- %ebx 4/r32/esp
12815
12816 (allocate Heap *Stmt-size *(ebp+0x14))
12817
12818 8b/-> *(ebp+0x14) 7/r32/edi
12819 (lookup *edi *(edi+4))
12820 89/<- %edi 0/r32/eax
12821
12822 c7 0/subop/copy *edi 1/imm32/stmt1
12823 {
12824 (stmt-has-outputs? *(ebp+8))
12825 3d/compare-eax-and 0/imm32/false
12826 0f 84/jump-if-= break/disp32
12827 {
12828 $parse-mu-stmt:read-outputs:
12829
12830 (next-mu-token *(ebp+8) %ecx)
12831
12832 (slice-empty? %ecx)
12833 3d/compare-eax-and 0/imm32/false
12834 0f 85/jump-if-!= break/disp32
12835
12836 (slice-equal? %ecx "<-")
12837 3d/compare-eax-and 0/imm32/false
12838 0f 85/jump-if-!= break/disp32
12839
12840 ba/copy-to-edx 0/imm32/false
12841
12842 8b/-> *ecx 0/r32/eax
12843 8a/copy-byte *eax 0/r32/AL
12844 81 4/subop/and %eax 0xff/imm32
12845 3d/compare-eax-and 0x2a/imm32/asterisk
12846 {
12847 75/jump-if-!= break/disp8
12848 ff 0/subop/increment *ecx
12849 ba/copy-to-edx 1/imm32/true
12850 }
12851
12852 (is-identifier? %ecx)
12853 3d/compare-eax-and 0/imm32/false
12854 0f 84/jump-if-= $parse-mu-stmt:abort/disp32
12855
12856 (lookup-var %ecx *(ebp+0xc) %ebx *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
12857 8d/copy-address *(edi+0x14) 0/r32/eax
12858 (append-stmt-var Heap *ebx *(ebx+4) *(edi+0x14) *(edi+0x18) %edx %eax)
12859
12860 e9/jump loop/disp32
12861 }
12862 }
12863 (add-operation-and-inputs-to-stmt %edi *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x18) *(ebp+0x1c))
12864 $parse-mu-stmt:end:
12865
12866 81 0/subop/add %esp 0x10/imm32
12867
12868 5f/pop-to-edi
12869 5b/pop-to-ebx
12870 5a/pop-to-edx
12871 59/pop-to-ecx
12872 58/pop-to-eax
12873
12874 89/<- %esp 5/r32/ebp
12875 5d/pop-to-ebp
12876 c3/return
12877
12878 $parse-mu-stmt:abort:
12879
12880 (write-buffered *(ebp+0x18) "invalid identifier '")
12881 (write-slice-buffered *(ebp+0x18) %ecx)
12882 (write-buffered *(ebp+0x18) "'\n")
12883 (flush *(ebp+0x18))
12884 (stop *(ebp+0x1c) 1)
12885
12886
12887 add-operation-and-inputs-to-stmt:
12888
12889
12890
12891
12892
12893
12894
12895
12896 55/push-ebp
12897 89/<- %ebp 4/r32/esp
12898
12899 50/push-eax
12900 51/push-ecx
12901 52/push-edx
12902 53/push-ebx
12903 56/push-esi
12904 57/push-edi
12905
12906 8b/-> *(ebp+8) 7/r32/edi
12907
12908 68/push 0/imm32/end
12909 68/push 0/imm32/start
12910 89/<- %ecx 4/r32/esp
12911
12912 ba/copy-to-edx 0/imm32/false
12913
12914 68/push 0/imm32
12915 68/push 0/imm32
12916 89/<- %esi 4/r32/esp
12917 $add-operation-and-inputs-to-stmt:read-operation:
12918 (next-mu-token *(ebp+0xc) %ecx)
12919 8d/copy-address *(edi+4) 0/r32/eax
12920 (slice-to-string Heap %ecx %eax)
12921
12922 (slice-equal? %ecx "get")
12923 89/<- %ebx 0/r32/eax
12924 {
12925 $add-operation-and-inputs-to-stmt:read-inouts:
12926
12927 (next-mu-token *(ebp+0xc) %ecx)
12928
12929 (slice-empty? %ecx)
12930 3d/compare-eax-and 0/imm32/false
12931 0f 85/jump-if-!= break/disp32
12932
12933 (slice-equal? %ecx "<-")
12934 3d/compare-eax-and 0/imm32/false
12935 0f 85/jump-if-!= $add-operation-and-inputs-to-stmt:abort/disp32
12936
12937 {
12938 81 7/subop/compare %ebx 0/imm32/false
12939 74/jump-if-= break/disp8
12940 (lookup *(edi+0xc) *(edi+0x10))
12941 3d/compare-eax-and 0/imm32
12942 74/jump-if-= break/disp8
12943 (lookup-or-create-constant %eax %ecx %esi)
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954 e9/jump $add-operation-and-inputs-to-stmt:save-var/disp32
12955 }
12956
12957 ba/copy-to-edx 0/imm32/false
12958
12959 8b/-> *ecx 0/r32/eax
12960 8a/copy-byte *eax 0/r32/AL
12961 81 4/subop/and %eax 0xff/imm32
12962 3d/compare-eax-and 0x2a/imm32/asterisk
12963 {
12964 75/jump-if-!= break/disp8
12965 $add-operation-and-inputs-to-stmt:inout-is-deref:
12966 ff 0/subop/increment *ecx
12967 ba/copy-to-edx 1/imm32/true
12968 }
12969 (lookup-var-or-literal %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
12970 $add-operation-and-inputs-to-stmt:save-var:
12971 8d/copy-address *(edi+0xc) 0/r32/eax
12972 (append-stmt-var Heap *esi *(esi+4) *(edi+0xc) *(edi+0x10) %edx %eax)
12973
12974 e9/jump loop/disp32
12975 }
12976 $add-operation-and-inputs-to-stmt:end:
12977
12978 81 0/subop/add %esp 0x10/imm32
12979
12980 5f/pop-to-edi
12981 5e/pop-to-esi
12982 5b/pop-to-ebx
12983 5a/pop-to-edx
12984 59/pop-to-ecx
12985 58/pop-to-eax
12986
12987 89/<- %esp 5/r32/ebp
12988 5d/pop-to-ebp
12989 c3/return
12990
12991 $add-operation-and-inputs-to-stmt:abort:
12992
12993 (write-buffered *(ebp+0x18) "fn ")
12994 8b/-> *(ebp+0x14) 0/r32/eax
12995 (lookup *eax *(eax+4))
12996 (write-buffered *(ebp+0x18) %eax)
12997 (rewind-stream *(ebp+0xc))
12998 (write-buffered *(ebp+0x18) ": invalid identifier in '")
12999 (write-stream-data *(ebp+0x18) *(ebp+0xc))
13000 (write-buffered *(ebp+0x18) "'\n")
13001 (flush *(ebp+0x18))
13002 (stop *(ebp+0x1c) 1)
13003
13004
13005 stmt-has-outputs?:
13006
13007 55/push-ebp
13008 89/<- %ebp 4/r32/esp
13009
13010 51/push-ecx
13011
13012 68/push 0/imm32/end
13013 68/push 0/imm32/start
13014 89/<- %ecx 4/r32/esp
13015
13016 b8/copy-to-eax 0/imm32/false
13017 (rewind-stream *(ebp+8))
13018 {
13019 (next-mu-token *(ebp+8) %ecx)
13020
13021 (slice-empty? %ecx)
13022 3d/compare-eax-and 0/imm32/false
13023 b8/copy-to-eax 0/imm32/false/result
13024 0f 85/jump-if-!= break/disp32
13025
13026
13027 8b/-> *ecx 0/r32/eax
13028 8a/copy-byte *eax 0/r32/AL
13029 81 4/subop/and %eax 0xff/imm32
13030
13031 3d/compare-eax-and 0x23/imm32/hash
13032 b8/copy-to-eax 0/imm32/false/result
13033 0f 84/jump-if-= break/disp32
13034
13035 (slice-equal? %ecx "<-")
13036 3d/compare-eax-and 0/imm32/false
13037 74/jump-if-= loop/disp8
13038 b8/copy-to-eax 1/imm32/true
13039 }
13040 $stmt-has-outputs:end:
13041 (rewind-stream *(ebp+8))
13042
13043 81 0/subop/add %esp 8/imm32
13044
13045 59/pop-to-ecx
13046
13047 89/<- %esp 5/r32/ebp
13048 5d/pop-to-ebp
13049 c3/return
13050
13051
13052
13053 lookup-var-or-literal:
13054
13055 55/push-ebp
13056 89/<- %ebp 4/r32/esp
13057
13058 50/push-eax
13059 51/push-ecx
13060 56/push-esi
13061
13062 8b/-> *(ebp+8) 6/r32/esi
13063
13064 (slice-empty? %esi)
13065 3d/compare-eax-and 0/imm32/false
13066 0f 85/jump-if-!= $lookup-var-or-literal:abort/disp32
13067
13068 8b/-> *esi 1/r32/ecx
13069 8a/copy-byte *ecx 1/r32/CL
13070 81 4/subop/and %ecx 0xff/imm32
13071
13072 {
13073 81 7/subop/compare %ecx 0x2d/imm32/dash
13074 74/jump-if-= $lookup-var-or-literal:literal/disp8
13075 (is-decimal-digit? %ecx)
13076 3d/compare-eax-and 0/imm32/false
13077 74/jump-if-= break/disp8
13078 $lookup-var-or-literal:literal:
13079 (new-literal-integer Heap %esi *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
13080 eb/jump $lookup-var-or-literal:end/disp8
13081 }
13082
13083 {
13084 81 7/subop/compare %ecx 0x22/imm32/dquote
13085 75/jump-if-!= break/disp8
13086 $lookup-var-or-literal:literal-string:
13087 (new-literal Heap %esi *(ebp+0x10))
13088 eb/jump $lookup-var-or-literal:end/disp8
13089 }
13090
13091 {
13092 $lookup-var-or-literal:var:
13093 (lookup-var %esi *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
13094 }
13095 $lookup-var-or-literal:end:
13096
13097 5e/pop-to-esi
13098 59/pop-to-ecx
13099 58/pop-to-eax
13100
13101 89/<- %esp 5/r32/ebp
13102 5d/pop-to-ebp
13103 c3/return
13104
13105 $lookup-var-or-literal:abort:
13106 (write-buffered *(ebp+0x18) "fn ")
13107 8b/-> *(ebp+0x14) 0/r32/eax
13108 (lookup *eax *(eax+4))
13109 (write-buffered *(ebp+0x18) %eax)
13110 (write-buffered *(ebp+0x18) ": empty variable!")
13111 (flush *(ebp+0x18))
13112 (stop *(ebp+0x1c) 1)
13113
13114
13115
13116 lookup-var:
13117
13118 55/push-ebp
13119 89/<- %ebp 4/r32/esp
13120
13121 50/push-eax
13122
13123 (lookup-var-helper *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
13124
13125 8b/-> *(ebp+0x10) 0/r32/eax
13126 81 7/subop/compare *eax 0/imm32
13127 74/jump-if-= $lookup-var:abort/disp8
13128 $lookup-var:end:
13129
13130 58/pop-to-eax
13131
13132 89/<- %esp 5/r32/ebp
13133 5d/pop-to-ebp
13134 c3/return
13135
13136 $lookup-var:abort:
13137 (write-buffered *(ebp+0x18) "fn ")
13138 8b/-> *(ebp+0x14) 0/r32/eax
13139 (lookup *eax *(eax+4))
13140 (write-buffered *(ebp+0x18) %eax)
13141 (write-buffered *(ebp+0x18) ": unknown variable '")
13142 (write-slice-buffered *(ebp+0x18) *(ebp+8))
13143 (write-buffered *(ebp+0x18) "'\n")
13144 (flush *(ebp+0x18))
13145 (stop *(ebp+0x1c) 1)
13146
13147
13148
13149
13150 lookup-var-helper:
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161 55/push-ebp
13162 89/<- %ebp 4/r32/esp
13163
13164 50/push-eax
13165 51/push-ecx
13166 52/push-edx
13167 53/push-ebx
13168 56/push-esi
13169 57/push-edi
13170
13171 (zero-out *(ebp+0x10) *Handle-size)
13172
13173 8b/-> *(ebp+0xc) 6/r32/esi
13174
13175 8b/-> *esi 3/r32/ebx
13176
13177 3b/compare<- *(esi+4) 0/r32/eax
13178 0f 8f/jump-if-> $lookup-var-helper:error1/disp32
13179
13180 8d/copy-address *(esi+8) 2/r32/edx
13181
13182 8d/copy-address *(esi+ebx-4) 3/r32/ebx
13183
13184 68/push 0/imm32
13185 68/push 0/imm32
13186 68/push 0/imm32
13187 68/push 0/imm32
13188 68/push 0/imm32
13189 68/push 0/imm32
13190 68/push 0/imm32
13191 68/push 0/imm32
13192 68/push 0/imm32
13193 68/push 0/imm32
13194 68/push 0/imm32
13195 68/push 0/imm32
13196 68/push 0/imm32
13197 68/push 0/imm32
13198 68/push 0/imm32
13199 68/push 0/imm32
13200 89/<- %edi 4/r32/esp
13201 {
13202 $lookup-var-helper:loop:
13203
13204 39/compare %ebx 2/r32/edx
13205 0f 82/jump-if-addr< break/disp32
13206
13207 (lookup *ebx *(ebx+4))
13208 89/<- %ecx 0/r32/eax
13209
13210 (lookup *ecx *(ecx+4))
13211
13212 (slice-equal? *(ebp+8) %eax)
13213 3d/compare-eax-and 0/imm32/false
13214 {
13215 74/jump-if-= break/disp8
13216 $lookup-var-helper:found:
13217
13218 (lookup *(ecx+0x18) *(ecx+0x1c))
13219 3d/compare-eax-and 0/imm32
13220 {
13221 74/jump-if-= break/disp8
13222 $lookup-var-helper:found-register:
13223
13224 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
13225 8b/-> *eax 0/r32/eax
13226
13227 8b/-> *(edi+eax<<2) 0/r32/eax
13228 3d/compare-eax-and 0/imm32
13229 0f 85/jump-if-!= $lookup-var-helper:error2/disp32
13230 }
13231 $lookup-var-helper:return:
13232
13233 8b/-> *(ebp+0x10) 6/r32/esi
13234
13235 8b/-> *ebx 0/r32/eax
13236 89/<- *esi 0/r32/eax
13237 8b/-> *(ebx+4) 0/r32/eax
13238 89/<- *(esi+4) 0/r32/eax
13239
13240 eb/jump $lookup-var-helper:end/disp8
13241 }
13242
13243
13244 (lookup *(ecx+0x18) *(ecx+0x1c))
13245
13246 3d/compare-eax-and 0/imm32
13247 74/jump-if-= $lookup-var-helper:continue/disp8
13248
13249 (get Mu-registers-unique %eax 0xc "Mu-registers-unique")
13250 8b/-> *eax 0/r32/eax
13251
13252 89/<- *(edi+eax<<2) 1/r32/ecx
13253 $lookup-var-helper:continue:
13254
13255 81 5/subop/subtract %ebx 0xc/imm32
13256 e9/jump loop/disp32
13257 }
13258 $lookup-var-helper:end:
13259
13260 81 0/subop/add %esp 0x40/imm32
13261
13262 5f/pop-to-edi
13263 5e/pop-to-esi
13264 5b/pop-to-ebx
13265 5a/pop-to-edx
13266 59/pop-to-ecx
13267 58/pop-to-eax
13268
13269 89/<- %esp 5/r32/ebp
13270 5d/pop-to-ebp
13271 c3/return
13272
13273 $lookup-var-helper:error1:
13274 (write-buffered *(ebp+0x18) "fn ")
13275 8b/-> *(ebp+0x14) 0/r32/eax
13276 (lookup *eax *(eax+4))
13277 (write-buffered *(ebp+0x18) %eax)
13278 (write-buffered *(ebp+0x18) ": malformed stack when looking up '")
13279 (write-slice-buffered *(ebp+0x18) *(ebp+8))
13280 (write-buffered *(ebp+0x18) "'\n")
13281 (flush *(ebp+0x18))
13282 (stop *(ebp+0x1c) 1)
13283
13284
13285 $lookup-var-helper:error2:
13286
13287 (write-buffered *(ebp+0x18) "fn ")
13288 50/push-eax
13289 8b/-> *(ebp+0x14) 0/r32/eax
13290 (lookup *eax *(eax+4))
13291 (write-buffered *(ebp+0x18) %eax)
13292 58/pop-eax
13293 (write-buffered *(ebp+0x18) ": register ")
13294 50/push-eax
13295 (lookup *(eax+0x18) *(eax+0x1c))
13296 (write-buffered *(ebp+0x18) %eax)
13297 58/pop-to-eax
13298 (write-buffered *(ebp+0x18) " reads var '")
13299 (write-slice-buffered *(ebp+0x18) *(ebp+8))
13300 (write-buffered *(ebp+0x18) "' after writing var '")
13301 (lookup *eax *(eax+4))
13302 (write-buffered *(ebp+0x18) %eax)
13303 (write-buffered *(ebp+0x18) "'\n")
13304 (flush *(ebp+0x18))
13305 (stop *(ebp+0x1c) 1)
13306
13307
13308 dump-vars:
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318 55/push-ebp
13319 89/<- %ebp 4/r32/esp
13320
13321 52/push-edx
13322 53/push-ebx
13323 56/push-esi
13324
13325 8b/-> *(ebp+8) 6/r32/esi
13326
13327 8b/-> *esi 3/r32/ebx
13328
13329 8d/copy-address *(esi+8) 2/r32/edx
13330
13331 8d/copy-address *(esi+ebx-4) 3/r32/ebx
13332 {
13333 $dump-vars:loop:
13334
13335 39/compare %ebx 2/r32/edx
13336 0f 82/jump-if-addr< break/disp32
13337
13338 (write-buffered Stderr " var@")
13339 (dump-var 2 %ebx)
13340
13341 81 5/subop/subtract %ebx 0xc/imm32
13342 e9/jump loop/disp32
13343 }
13344 $dump-vars:end:
13345
13346 5e/pop-to-esi
13347 5b/pop-to-ebx
13348 5a/pop-to-edx
13349
13350 89/<- %esp 5/r32/ebp
13351 5d/pop-to-ebp
13352 c3/return
13353
13354 == data
13355
13356 Mu-registers:
13357
13358 0xa8/imm32/write
13359 0/imm32/read
13360 0xa8/imm32/length
13361
13362
13363
13364 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
13365 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
13366 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
13367 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
13368 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
13369 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
13370
13371 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 0/imm32
13372 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 1/imm32
13373 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 2/imm32
13374 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 3/imm32
13375 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 4/imm32
13376 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 5/imm32
13377 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 6/imm32
13378 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 7/imm32
13379
13380
13381
13382
13383 Mu-registers-unique:
13384
13385 0xa8/imm32/write
13386 0/imm32/read
13387 0xa8/imm32/length
13388
13389
13390 0x11/imm32/alloc-id $Mu-register-eax/imm32 0/imm32
13391 0x11/imm32/alloc-id $Mu-register-ecx/imm32 1/imm32
13392 0x11/imm32/alloc-id $Mu-register-edx/imm32 2/imm32
13393 0x11/imm32/alloc-id $Mu-register-ebx/imm32 3/imm32
13394 0x11/imm32/alloc-id $Mu-register-esi/imm32 6/imm32
13395 0x11/imm32/alloc-id $Mu-register-edi/imm32 7/imm32
13396
13397 0x11/imm32/alloc-id $Mu-register-xmm0/imm32 8/imm32
13398 0x11/imm32/alloc-id $Mu-register-xmm1/imm32 9/imm32
13399 0x11/imm32/alloc-id $Mu-register-xmm2/imm32 0xa/imm32
13400 0x11/imm32/alloc-id $Mu-register-xmm3/imm32 0xb/imm32
13401 0x11/imm32/alloc-id $Mu-register-xmm4/imm32 0xc/imm32
13402 0x11/imm32/alloc-id $Mu-register-xmm5/imm32 0xd/imm32
13403 0x11/imm32/alloc-id $Mu-register-xmm6/imm32 0xe/imm32
13404 0x11/imm32/alloc-id $Mu-register-xmm7/imm32 0xf/imm32
13405
13406 $Mu-register-eax:
13407 0x11/imm32/alloc-id
13408 3/imm32/size
13409 0x65/e 0x61/a 0x78/x
13410
13411 $Mu-register-ecx:
13412 0x11/imm32/alloc-id
13413 3/imm32/size
13414 0x65/e 0x63/c 0x78/x
13415
13416 $Mu-register-edx:
13417 0x11/imm32/alloc-id
13418 3/imm32/size
13419 0x65/e 0x64/d 0x78/x
13420
13421 $Mu-register-ebx:
13422 0x11/imm32/alloc-id
13423 3/imm32/size
13424 0x65/e 0x62/b 0x78/x
13425
13426 $Mu-register-esi:
13427 0x11/imm32/alloc-id
13428 3/imm32/size
13429 0x65/e 0x73/s 0x69/i
13430
13431 $Mu-register-edi:
13432 0x11/imm32/alloc-id
13433 3/imm32/size
13434 0x65/e 0x64/d 0x69/i
13435
13436 $Mu-register-xmm0:
13437 0x11/imm32/alloc-id:fake:payload
13438
13439 0x4/imm32/size
13440 0x78/x 0x6d/m 0x6d/m 0x30/0
13441
13442 $Mu-register-xmm1:
13443 0x11/imm32/alloc-id:fake:payload
13444
13445 0x4/imm32/size
13446 0x78/x 0x6d/m 0x6d/m 0x31/1
13447
13448 $Mu-register-xmm2:
13449 0x11/imm32/alloc-id:fake:payload
13450
13451 0x4/imm32/size
13452 0x78/x 0x6d/m 0x6d/m 0x32/2
13453
13454 $Mu-register-xmm3:
13455 0x11/imm32/alloc-id:fake:payload
13456
13457 0x4/imm32/size
13458 0x78/x 0x6d/m 0x6d/m 0x33/3
13459
13460 $Mu-register-xmm4:
13461 0x11/imm32/alloc-id:fake:payload
13462
13463 0x4/imm32/size
13464 0x78/x 0x6d/m 0x6d/m 0x34/4
13465
13466 $Mu-register-xmm5:
13467 0x11/imm32/alloc-id:fake:payload
13468
13469 0x4/imm32/size
13470 0x78/x 0x6d/m 0x6d/m 0x35/5
13471
13472 $Mu-register-xmm6:
13473 0x11/imm32/alloc-id:fake:payload
13474
13475 0x4/imm32/size
13476 0x78/x 0x6d/m 0x6d/m 0x36/6
13477
13478 $Mu-register-xmm7:
13479 0x11/imm32/alloc-id:fake:payload
13480
13481 0x4/imm32/size
13482 0x78/x 0x6d/m 0x6d/m 0x37/7
13483
13484 == code
13485
13486
13487 maybe-define-var:
13488
13489 55/push-ebp
13490 89/<- %ebp 4/r32/esp
13491
13492 50/push-eax
13493
13494 (lookup *(ebp+8) *(ebp+0xc))
13495
13496 (binding-exists? %eax *(ebp+0x10))
13497 3d/compare-eax-and 0/imm32/false
13498 75/jump-if-!= $maybe-define-var:end/disp8
13499
13500 (push *(ebp+0x10) *(ebp+8))
13501 (push *(ebp+0x10) *(ebp+0xc))
13502 (push *(ebp+0x10) 0)
13503 $maybe-define-var:end:
13504
13505 58/pop-to-eax
13506
13507 89/<- %esp 5/r32/ebp
13508 5d/pop-to-ebp
13509 c3/return
13510
13511
13512 binding-exists?:
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524 55/push-ebp
13525 89/<- %ebp 4/r32/esp
13526
13527 51/push-ecx
13528 52/push-edx
13529 56/push-esi
13530
13531 8b/-> *(ebp+8) 0/r32/eax
13532 (lookup *eax *(eax+4))
13533 89/<- %ecx 0/r32/eax
13534
13535 8b/-> *(ebp+0xc) 6/r32/esi
13536
13537 8b/-> *esi 0/r32/eax
13538
13539 8d/copy-address *(esi+8) 2/r32/edx
13540
13541 8d/copy-address *(esi+eax-4) 6/r32/esi
13542 {
13543 $binding-exists?:loop:
13544
13545 39/compare %esi 2/r32/edx
13546 0f 82/jump-if-addr< break/disp32
13547
13548 (lookup *esi *(esi+4))
13549
13550 (lookup *eax *(eax+4))
13551
13552 (string-equal? %ecx %eax)
13553 3d/compare-eax-and 0/imm32/false
13554 75/jump-if-!= $binding-exists?:end/disp8
13555
13556 81 5/subop/subtract %esi 0xc/imm32
13557 e9/jump loop/disp32
13558 }
13559 b8/copy-to-eax 0/imm32/false
13560 $binding-exists?:end:
13561
13562 5e/pop-to-esi
13563 5a/pop-to-edx
13564 59/pop-to-ecx
13565
13566 89/<- %esp 5/r32/ebp
13567 5d/pop-to-ebp
13568 c3/return
13569
13570 test-parse-mu-stmt:
13571
13572 55/push-ebp
13573 89/<- %ebp 4/r32/esp
13574
13575 8b/-> *Primitive-type-ids 0/r32/eax
13576 89/<- *Type-id 0/r32/eax
13577 (clear-stream _test-input-stream)
13578 (write _test-input-stream "increment n\n")
13579
13580 81 5/subop/subtract %esp 0xc0/imm32
13581 68/push 0xc0/imm32/size
13582 68/push 0/imm32/top
13583 89/<- %ecx 4/r32/esp
13584 (clear-stack %ecx)
13585
13586 68/push 0/imm32
13587 68/push 0/imm32
13588 89/<- %edx 4/r32/esp
13589
13590 68/push 0/imm32
13591 68/push 0/imm32
13592 89/<- %eax 4/r32/esp
13593
13594 (copy-array Heap "n" %eax)
13595 (new-var Heap *eax *(eax+4) %edx)
13596
13597 (push %ecx *edx)
13598 (push %ecx *(edx+4))
13599 (push %ecx 0)
13600
13601 68/push 0/imm32
13602 68/push 0/imm32
13603 89/<- %eax 4/r32/esp
13604
13605 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
13606
13607 (lookup *eax *(eax+4))
13608 89/<- %edx 0/r32/eax
13609
13610 (check-ints-equal *edx 1 "F - test-parse-mu-stmt/tag")
13611
13612 (lookup *(edx+4) *(edx+8))
13613 (check-strings-equal %eax "increment" "F - test-parse-mu-stmt/name")
13614
13615
13616 (lookup *(edx+0xc) *(edx+0x10))
13617
13618 (lookup *eax *(eax+4))
13619
13620 (lookup *eax *(eax+4))
13621
13622 (check-strings-equal %eax "n" "F - test-parse-mu-stmt/inout:0")
13623
13624 89/<- %esp 5/r32/ebp
13625 5d/pop-to-ebp
13626 c3/return
13627
13628 test-parse-mu-stmt-with-comma:
13629
13630 55/push-ebp
13631 89/<- %ebp 4/r32/esp
13632
13633 8b/-> *Primitive-type-ids 0/r32/eax
13634 89/<- *Type-id 0/r32/eax
13635 (clear-stream _test-input-stream)
13636 (write _test-input-stream "copy-to n, 3\n")
13637
13638 81 5/subop/subtract %esp 0xc0/imm32
13639 68/push 0xc0/imm32/size
13640 68/push 0/imm32/top
13641 89/<- %ecx 4/r32/esp
13642 (clear-stack %ecx)
13643
13644 68/push 0/imm32
13645 68/push 0/imm32
13646 89/<- %edx 4/r32/esp
13647
13648 68/push 0/imm32
13649 68/push 0/imm32
13650 89/<- %eax 4/r32/esp
13651
13652 (copy-array Heap "n" %eax)
13653 (new-var Heap *eax *(eax+4) %edx)
13654
13655 (push %ecx *edx)
13656 (push %ecx *(edx+4))
13657 (push %ecx 0)
13658
13659 68/push 0/imm32
13660 68/push 0/imm32
13661 89/<- %eax 4/r32/esp
13662
13663 (parse-mu-stmt _test-input-stream %ecx 0 %eax Stderr 0)
13664
13665 (lookup *eax *(eax+4))
13666 89/<- %edx 0/r32/eax
13667
13668 (check-ints-equal *edx 1 "F - test-parse-mu-stmt-with-comma/tag")
13669
13670 (lookup *(edx+4) *(edx+8))
13671 (check-strings-equal %eax "copy-to" "F - test-parse-mu-stmt-with-comma/name")
13672
13673
13674 (lookup *(edx+0xc) *(edx+0x10))
13675
13676 (lookup *eax *(eax+4))
13677
13678 (lookup *eax *(eax+4))
13679
13680 (check-strings-equal %eax "n" "F - test-parse-mu-stmt-with-comma/inout:0")
13681
13682 89/<- %esp 5/r32/ebp
13683 5d/pop-to-ebp
13684 c3/return
13685
13686 new-var:
13687
13688 55/push-ebp
13689 89/<- %ebp 4/r32/esp
13690
13691 50/push-eax
13692 51/push-ecx
13693
13694 8b/-> *(ebp+0x14) 1/r32/ecx
13695
13696 (allocate *(ebp+8) *Var-size %ecx)
13697
13698 (lookup *ecx *(ecx+4))
13699
13700 8b/-> *(ebp+0xc) 1/r32/ecx
13701 89/<- *eax 1/r32/ecx
13702 8b/-> *(ebp+0x10) 1/r32/ecx
13703 89/<- *(eax+4) 1/r32/ecx
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713 $new-var:end:
13714
13715 59/pop-to-ecx
13716 58/pop-to-eax
13717
13718 89/<- %esp 5/r32/ebp
13719 5d/pop-to-ebp
13720 c3/return
13721
13722 new-literal-integer:
13723
13724 55/push-ebp
13725 89/<- %ebp 4/r32/esp
13726
13727 50/push-eax
13728 51/push-ecx
13729
13730 (is-hex-int? *(ebp+0xc))
13731 3d/compare-eax-and 0/imm32/false
13732 0f 84/jump-if-= $new-literal-integer:abort/disp32
13733
13734 (check-mu-hex-int *(ebp+0xc) *(ebp+0x18) *(ebp+0x1c))
13735
13736 (new-var-from-slice *(ebp+8) *(ebp+0xc) *(ebp+0x10))
13737
13738 8b/-> *(ebp+0x10) 0/r32/eax
13739 (lookup *eax *(eax+4))
13740 89/<- %ecx 0/r32/eax
13741
13742 8b/-> *Curr-block-depth 0/r32/eax
13743 89/<- *(ecx+0x10) 0/r32/eax
13744
13745 8d/copy-address *(ecx+8) 0/r32/eax
13746 (allocate *(ebp+8) *Type-tree-size %eax)
13747 (lookup *(ecx+8) *(ecx+0xc))
13748 c7 0/subop/copy *eax 1/imm32/true
13749
13750 $new-literal-integer:end:
13751
13752 81 0/subop/add %esp 8/imm32
13753
13754 59/pop-to-ecx
13755 58/pop-to-eax
13756
13757 89/<- %esp 5/r32/ebp
13758 5d/pop-to-ebp
13759 c3/return
13760
13761 $new-literal-integer:abort:
13762 (write-buffered *(ebp+0x18) "fn ")
13763 8b/-> *(ebp+0x14) 0/r32/eax
13764 (lookup *eax *(eax+4))
13765 (write-buffered *(ebp+0x18) %eax)
13766 (write-buffered *(ebp+0x18) ": variable '")
13767 (write-slice-buffered *(ebp+0x18) *(ebp+0xc))
13768 (write-buffered *(ebp+0x18) "' cannot begin with a digit (or do you have a typo in a number?)\n")
13769 (flush *(ebp+0x18))
13770 (stop *(ebp+0x1c) 1)
13771
13772
13773
13774 check-mu-hex-int:
13775
13776 55/push-ebp
13777 89/<- %ebp 4/r32/esp
13778
13779 50/push-eax
13780 51/push-ecx
13781 52/push-edx
13782
13783 8b/-> *(ebp+8) 1/r32/ecx
13784
13785 8b/-> *ecx 2/r32/edx
13786
13787 b8/copy-to-eax 0/imm32
13788 8a/copy-byte *edx 0/r32/AL
13789 3d/compare-eax-and 0x2d/imm32/dash
13790 {
13791 75/jump-if-!= break/disp8
13792 42/increment-edx
13793 }
13794
13795 8b/-> *(ecx+4) 1/r32/ecx
13796
13797 89/<- %eax 1/r32/ecx
13798 29/subtract-from %eax 2/r32/edx
13799
13800 3d/compare-eax-with 1/imm32
13801 0f 8e/jump-if-<= $check-mu-hex-int:end/disp32
13802 $check-mu-hex-int:length->-1:
13803
13804
13805 51/push-ecx
13806 52/push-edx
13807 89/<- %eax 4/r32/esp
13808
13809 (slice-starts-with? %eax "0x")
13810
13811 81 0/subop/add %esp 8/imm32
13812
13813 3d/compare-eax-with 0/imm32/false
13814 75/jump-if-!= $check-mu-hex-int:end/disp8
13815 $check-mu-hex-int:abort:
13816
13817 (write-buffered *(ebp+0xc) "literal integers are always hex in Mu; start '")
13818 (write-slice-buffered *(ebp+0xc) *(ebp+8))
13819 (write-buffered *(ebp+0xc) "' with a '0x' to be unambiguous, converting it to hexadecimal as necessary.\n")
13820 (flush *(ebp+0xc))
13821 (stop *(ebp+0x10) 1)
13822 $check-mu-hex-int:end:
13823
13824 5a/pop-to-edx
13825 59/pop-to-ecx
13826 58/pop-to-eax
13827
13828 89/<- %esp 5/r32/ebp
13829 5d/pop-to-ebp
13830 c3/return
13831
13832 new-literal:
13833
13834 55/push-ebp
13835 89/<- %ebp 4/r32/esp
13836
13837 50/push-eax
13838 51/push-ecx
13839
13840 68/push 0/imm32
13841 68/push 0/imm32
13842 89/<- %ecx 4/r32/esp
13843
13844 (slice-to-string Heap *(ebp+0xc) %ecx)
13845
13846 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
13847
13848 8b/-> *(ebp+0x10) 1/r32/ecx
13849 (lookup *ecx *(ecx+4))
13850 89/<- %ecx 0/r32/eax
13851
13852 8b/-> *Curr-block-depth 0/r32/eax
13853 89/<- *(ecx+0x10) 0/r32/eax
13854
13855 8d/copy-address *(ecx+8) 0/r32/eax
13856 (allocate *(ebp+8) *Type-tree-size %eax)
13857 (lookup *(ecx+8) *(ecx+0xc))
13858
13859 c7 0/subop/copy *eax 1/imm32/true
13860 $new-literal:end:
13861
13862 81 0/subop/add %esp 8/imm32
13863
13864 59/pop-to-ecx
13865 58/pop-to-eax
13866
13867 89/<- %esp 5/r32/ebp
13868 5d/pop-to-ebp
13869 c3/return
13870
13871 new-var-from-slice:
13872
13873 55/push-ebp
13874 89/<- %ebp 4/r32/esp
13875
13876 51/push-ecx
13877
13878 68/push 0/imm32
13879 68/push 0/imm32
13880 89/<- %ecx 4/r32/esp
13881
13882 (slice-to-string Heap *(ebp+0xc) %ecx)
13883
13884 (new-var *(ebp+8) *ecx *(ecx+4) *(ebp+0x10))
13885 $new-var-from-slice:end:
13886
13887 81 0/subop/add %esp 8/imm32
13888
13889 59/pop-to-ecx
13890
13891 89/<- %esp 5/r32/ebp
13892 5d/pop-to-ebp
13893 c3/return
13894
13895 new-var-def:
13896
13897 55/push-ebp
13898 89/<- %ebp 4/r32/esp
13899
13900 50/push-eax
13901 51/push-ecx
13902
13903 (allocate *(ebp+8) *Stmt-size *(ebp+0x14))
13904
13905 8b/-> *(ebp+0x14) 0/r32/eax
13906 (lookup *eax *(eax+4))
13907
13908 c7 0/subop/copy *eax 2/imm32/tag/var-on-stack
13909
13910 8b/-> *(ebp+0xc) 1/r32/ecx
13911 89/<- *(eax+4) 1/r32/ecx
13912 8b/-> *(ebp+0x10) 1/r32/ecx
13913 89/<- *(eax+8) 1/r32/ecx
13914 $new-var-def:end:
13915
13916 59/pop-to-ecx
13917 58/pop-to-eax
13918
13919 89/<- %esp 5/r32/ebp
13920 5d/pop-to-ebp
13921 c3/return
13922
13923 new-reg-var-def:
13924
13925 55/push-ebp
13926 89/<- %ebp 4/r32/esp
13927
13928 50/push-eax
13929
13930 8b/-> *(ebp+0x14) 0/r32/eax
13931
13932 (allocate *(ebp+8) *Stmt-size %eax)
13933
13934 (lookup *eax *(eax+4))
13935
13936 c7 0/subop/copy *eax 3/imm32/tag/var-in-register
13937
13938 8d/copy-address *(eax+0x14) 0/r32/eax
13939 (append-stmt-var Heap *(ebp+0xc) *(ebp+0x10) 0 0 0 %eax)
13940 $new-reg-var-def:end:
13941
13942 58/pop-to-eax
13943
13944 89/<- %esp 5/r32/ebp
13945 5d/pop-to-ebp
13946 c3/return
13947
13948 append-list:
13949
13950 55/push-ebp
13951 89/<- %ebp 4/r32/esp
13952
13953 50/push-eax
13954 51/push-ecx
13955 57/push-edi
13956
13957 8b/-> *(ebp+0x1c) 7/r32/edi
13958
13959 (allocate *(ebp+8) *List-size %edi)
13960
13961 (lookup *edi *(edi+4))
13962 89/<- %edi 0/r32/eax
13963
13964 8b/-> *(ebp+0xc) 0/r32/eax
13965 89/<- *edi 0/r32/eax
13966 8b/-> *(ebp+0x10) 0/r32/eax
13967 89/<- *(edi+4) 0/r32/eax
13968
13969 81 7/subop/compare *(ebp+0x14) 0/imm32
13970 74/jump-if-= $append-list:end/disp8
13971
13972 $append-list:non-empty-list:
13973
13974 (lookup *(ebp+0x14) *(ebp+0x18))
13975
13976 {
13977 81 7/subop/compare *(eax+8) 0/imm32
13978 74/jump-if-= break/disp8
13979
13980 (lookup *(eax+8) *(eax+0xc))
13981
13982 eb/jump loop/disp8
13983 }
13984
13985 8b/-> *(ebp+0x1c) 7/r32/edi
13986
13987 8b/-> *edi 1/r32/ecx
13988 89/<- *(eax+8) 1/r32/ecx
13989 8b/-> *(edi+4) 1/r32/ecx
13990 89/<- *(eax+0xc) 1/r32/ecx
13991
13992 8b/-> *(ebp+0x14) 1/r32/ecx
13993 89/<- *edi 1/r32/ecx
13994 8b/-> *(ebp+0x18) 1/r32/ecx
13995 89/<- *(edi+4) 1/r32/ecx
13996 $append-list:end:
13997
13998 5f/pop-to-edi
13999 59/pop-to-ecx
14000 58/pop-to-eax
14001
14002 89/<- %esp 5/r32/ebp
14003 5d/pop-to-ebp
14004 c3/return
14005
14006 append-stmt-var:
14007
14008 55/push-ebp
14009 89/<- %ebp 4/r32/esp
14010
14011 50/push-eax
14012 51/push-ecx
14013 57/push-edi
14014
14015 8b/-> *(ebp+0x20) 7/r32/edi
14016
14017 (allocate *(ebp+8) *Stmt-var-size %edi)
14018
14019 (lookup *edi *(edi+4))
14020 89/<- %ecx 0/r32/eax
14021
14022 8b/-> *(ebp+0xc) 0/r32/eax
14023 89/<- *ecx 0/r32/eax
14024 8b/-> *(ebp+0x10) 0/r32/eax
14025 89/<- *(ecx+4) 0/r32/eax
14026
14027 8b/-> *(ebp+0x1c) 0/r32/eax
14028 89/<- *(ecx+0x10) 0/r32/eax
14029
14030 81 7/subop/compare *(ebp+0x14) 0/imm32/null
14031 74/jump-if-= $append-stmt-var:end/disp8
14032
14033
14034 (lookup *(ebp+0x14) *(ebp+0x18))
14035
14036 {
14037 81 7/subop/compare *(eax+8) 0/imm32
14038 74/jump-if-= break/disp8
14039
14040 (lookup *(eax+8) *(eax+0xc))
14041
14042 eb/jump loop/disp8
14043 }
14044
14045 8b/-> *edi 1/r32/ecx
14046 89/<- *(eax+8) 1/r32/ecx
14047 8b/-> *(edi+4) 1/r32/ecx
14048 89/<- *(eax+0xc) 1/r32/ecx
14049
14050 8b/-> *(ebp+0x14) 1/r32/ecx
14051 89/<- *edi 1/r32/ecx
14052 8b/-> *(ebp+0x18) 1/r32/ecx
14053 89/<- *(edi+4) 1/r32/ecx
14054 $append-stmt-var:end:
14055
14056 5f/pop-to-edi
14057 59/pop-to-ecx
14058 58/pop-to-eax
14059
14060 89/<- %esp 5/r32/ebp
14061 5d/pop-to-ebp
14062 c3/return
14063
14064 append-to-block:
14065
14066 55/push-ebp
14067 89/<- %ebp 4/r32/esp
14068
14069 50/push-eax
14070 56/push-esi
14071
14072 8b/-> *(ebp+0xc) 6/r32/esi
14073
14074 8d/copy-address *(esi+4) 0/r32/eax
14075 (append-list *(ebp+8) *(ebp+0x10) *(ebp+0x14) *(esi+4) *(esi+8) %eax)
14076 $append-to-block:end:
14077
14078 5e/pop-to-esi
14079 58/pop-to-eax
14080
14081 89/<- %esp 5/r32/ebp
14082 5d/pop-to-ebp
14083 c3/return
14084
14085
14086
14087
14088
14089
14090
14091 lookup-or-create-constant:
14092
14093 55/push-ebp
14094 89/<- %ebp 4/r32/esp
14095
14096 50/push-eax
14097 56/push-esi
14098
14099 (container-type *(ebp+8))
14100 89/<- %esi 0/r32/eax
14101
14102 68/push 0/imm32
14103 68/push 0/imm32
14104 89/<- %eax 4/r32/esp
14105 (find-or-create-typeinfo %esi %eax)
14106
14107 (lookup *eax *(eax+4))
14108
14109
14110
14111
14112
14113 (find-or-create-typeinfo-output-var %eax *(ebp+0xc) *(ebp+0x10))
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127 $lookup-or-create-constant:end:
14128
14129 81 0/subop/add %esp 8/imm32
14130
14131 5e/pop-to-esi
14132 58/pop-to-eax
14133
14134 89/<- %esp 5/r32/ebp
14135 5d/pop-to-ebp
14136 c3/return
14137
14138
14139
14140
14141
14142 container-type:
14143
14144 55/push-ebp
14145 89/<- %ebp 4/r32/esp
14146
14147 8b/-> *(ebp+8) 0/r32/eax
14148 (lookup *eax *(eax+4))
14149 (lookup *(eax+8) *(eax+0xc))
14150 {
14151 81 7/subop/compare *(eax+8) 0/imm32
14152 74/jump-if-= break/disp8
14153 (lookup *(eax+0xc) *(eax+0x10))
14154 (lookup *(eax+4) *(eax+8))
14155 }
14156 8b/-> *(eax+4) 0/r32/eax
14157 $container-type:end:
14158
14159 89/<- %esp 5/r32/ebp
14160 5d/pop-to-ebp
14161 c3/return
14162
14163 is-container?:
14164
14165 55/push-ebp
14166 89/<- %ebp 4/r32/esp
14167
14168 8b/-> *(ebp+8) 0/r32/eax
14169 c1/shift 4/subop/left %eax 2/imm8
14170 3b/compare 0/r32/eax *Primitive-type-ids
14171 0f 9d/set-if->= %al
14172 81 4/subop/and %eax 0xff/imm32
14173 $is-container?:end:
14174
14175 89/<- %esp 5/r32/ebp
14176 5d/pop-to-ebp
14177 c3/return
14178
14179 find-or-create-typeinfo:
14180
14181 55/push-ebp
14182 89/<- %ebp 4/r32/esp
14183
14184 50/push-eax
14185 51/push-ecx
14186 52/push-edx
14187 57/push-edi
14188
14189 8b/-> *(ebp+0xc) 7/r32/edi
14190
14191 68/push 0/imm32
14192 68/push 0/imm32
14193 89/<- %ecx 4/r32/esp
14194
14195 (find-typeinfo *(ebp+8) %edi)
14196 {
14197
14198 81 7/subop/compare *edi 0/imm32
14199 0f 85/jump-if-!= break/disp32
14200 $find-or-create-typeinfo:create:
14201
14202 (allocate Heap *Typeinfo-size %edi)
14203
14204 (lookup *edi *(edi+4))
14205
14206
14207
14208
14209
14210
14211
14212 8b/-> *(ebp+8) 2/r32/edx
14213 89/<- *eax 2/r32/edx
14214
14215
14216 (new-stream Heap 0x40 *Typeinfo-fields-row-size %ecx)
14217
14218 8b/-> *ecx 2/r32/edx
14219 89/<- *(eax+4) 2/r32/edx
14220 8b/-> *(ecx+4) 2/r32/edx
14221 89/<- *(eax+8) 2/r32/edx
14222
14223 8b/-> *_Program-types 1/r32/ecx
14224 89/<- *(eax+0x10) 1/r32/ecx
14225 8b/-> *_Program-types->payload 1/r32/ecx
14226 89/<- *(eax+0x14) 1/r32/ecx
14227
14228 8b/-> *edi 1/r32/ecx
14229 89/<- *_Program-types 1/r32/ecx
14230 8b/-> *(edi+4) 1/r32/ecx
14231 89/<- *_Program-types->payload 1/r32/ecx
14232 }
14233 $find-or-create-typeinfo:end:
14234
14235 81 0/subop/add %esp 8/imm32
14236
14237 5f/pop-to-edi
14238 5a/pop-to-edx
14239 59/pop-to-ecx
14240 58/pop-to-eax
14241
14242 89/<- %esp 5/r32/ebp
14243 5d/pop-to-ebp
14244 c3/return
14245
14246 find-typeinfo:
14247
14248 55/push-ebp
14249 89/<- %ebp 4/r32/esp
14250
14251 50/push-eax
14252 51/push-ecx
14253 52/push-edx
14254 57/push-edi
14255
14256 8b/-> *(ebp+8) 1/r32/ecx
14257
14258 8b/-> *(ebp+0xc) 7/r32/edi
14259
14260 8b/-> *_Program-types 0/r32/eax
14261 89/<- *edi 0/r32/eax
14262 8b/-> *_Program-types->payload 0/r32/eax
14263 89/<- *(edi+4) 0/r32/eax
14264 {
14265 $find-typeinfo:loop:
14266
14267 81 7/subop/compare *edi 0/imm32
14268 74/jump-if-= break/disp8
14269 $find-typeinfo:check:
14270
14271 (lookup *edi *(edi+4))
14272
14273 39/compare *eax 1/r32/ecx
14274 74/jump-if-= break/disp8
14275 $find-typeinfo:continue:
14276
14277 8b/-> *(eax+0x10) 2/r32/edx
14278 89/<- *edi 2/r32/edx
14279 8b/-> *(eax+0x14) 2/r32/edx
14280 89/<- *(edi+4) 2/r32/edx
14281
14282 eb/jump loop/disp8
14283 }
14284 $find-typeinfo:end:
14285
14286 5f/pop-to-edi
14287 5a/pop-to-edx
14288 59/pop-to-ecx
14289 58/pop-to-eax
14290
14291 89/<- %esp 5/r32/ebp
14292 5d/pop-to-ebp
14293 c3/return
14294
14295 find-or-create-typeinfo-output-var:
14296
14297 55/push-ebp
14298 89/<- %ebp 4/r32/esp
14299
14300 50/push-eax
14301 52/push-edx
14302 57/push-edi
14303
14304 68/push 0/imm32
14305 68/push 0/imm32
14306 89/<- %edi 4/r32/esp
14307
14308 (find-or-create-typeinfo-fields *(ebp+8) *(ebp+0xc) %edi)
14309
14310 (lookup *edi *(edi+4))
14311 89/<- %edi 0/r32/eax
14312
14313 {
14314 81 7/subop/compare *(edi+0xc) 0/imm32
14315 0f 85/jump-if-!= break/disp32
14316
14317
14318 68/push 0/imm32
14319 68/push 0/imm32
14320 89/<- %eax 4/r32/esp
14321 (slice-to-string Heap *(ebp+0xc) %eax)
14322
14323 8d/copy-address *(edi+0xc) 2/r32/edx
14324 (new-var Heap *eax *(eax+4) %edx)
14325
14326 81 0/subop/add %esp 8/imm32
14327
14328 (lookup *(edi+0xc) *(edi+0x10))
14329 89/<- %edx 0/r32/eax
14330
14331 8d/copy-address *(edx+8) 0/r32/eax
14332 (allocate Heap *Type-tree-size %eax)
14333 (lookup *(edx+8) *(edx+0xc))
14334 c7 0/subop/copy *eax 1/imm32/true
14335 c7 0/subop/copy *(eax+4) 6/imm32/constant
14336 c7 0/subop/copy *(eax+8) 0/imm32
14337 c7 0/subop/copy *(eax+0xc) 0/imm32
14338 c7 0/subop/copy *(eax+0x10) 0/imm32
14339
14340 c7 0/subop/copy *(edx+0x14) -1/imm32/uninitialized
14341 }
14342
14343 8b/-> *(ebp+0x10) 2/r32/edx
14344 8b/-> *(edi+0xc) 0/r32/eax
14345 89/<- *edx 0/r32/eax
14346 8b/-> *(edi+0x10) 0/r32/eax
14347 89/<- *(edx+4) 0/r32/eax
14348 $find-or-create-typeinfo-output-var:end:
14349
14350 81 0/subop/add %esp 8/imm32
14351
14352 5f/pop-to-edi
14353 5a/pop-to-edx
14354 58/pop-to-eax
14355
14356 89/<- %esp 5/r32/ebp
14357 5d/pop-to-ebp
14358 c3/return
14359
14360 find-or-create-typeinfo-fields:
14361
14362 55/push-ebp
14363 89/<- %ebp 4/r32/esp
14364
14365 50/push-eax
14366 56/push-esi
14367 57/push-edi
14368
14369 8b/-> *(ebp+8) 0/r32/eax
14370 (lookup *(eax+4) *(eax+8))
14371
14372 8b/-> *(ebp+0x10) 7/r32/edi
14373
14374 (get-or-insert-slice %eax *(ebp+0xc) *Typeinfo-fields-row-size Heap)
14375 89/<- %esi 0/r32/eax
14376
14377 {
14378 81 7/subop/compare *esi 0/imm32
14379 75/jump-if-!= break/disp8
14380 (allocate Heap *Typeinfo-entry-size %esi)
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396 }
14397
14398
14399 8b/-> *esi 0/r32/eax
14400 89/<- *edi 0/r32/eax
14401 8b/-> *(esi+4) 0/r32/eax
14402 89/<- *(edi+4) 0/r32/eax
14403 $find-or-create-typeinfo-fields:end:
14404
14405 5f/pop-to-edi
14406 5e/pop-to-esi
14407 58/pop-to-eax
14408
14409 89/<- %esp 5/r32/ebp
14410 5d/pop-to-ebp
14411 c3/return
14412
14413 populate-mu-type:
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439 55/push-ebp
14440 89/<- %ebp 4/r32/esp
14441
14442 68/push 0/imm32
14443
14444 50/push-eax
14445 51/push-ecx
14446 52/push-edx
14447 53/push-ebx
14448 56/push-esi
14449 57/push-edi
14450
14451 8b/-> *(ebp+0xc) 7/r32/edi
14452
14453 81 5/subop/subtract %esp 0x200/imm32
14454 68/push 0x200/imm32/size
14455 68/push 0/imm32/read
14456 68/push 0/imm32/write
14457 89/<- %ecx 4/r32/esp
14458
14459 68/push 0/imm32/end
14460 68/push 0/imm32/start
14461 89/<- %edx 4/r32/esp
14462
14463 68/push 0/imm32
14464 68/push 0/imm32
14465 89/<- %esi 4/r32/esp
14466
14467 68/push 0/imm32
14468 68/push 0/imm32
14469 89/<- %ebx 4/r32/esp
14470 {
14471 $populate-mu-type:line-loop:
14472 (clear-stream %ecx)
14473 (read-line-buffered *(ebp+8) %ecx)
14474
14475 81 7/subop/compare *ecx 0/imm32
14476 0f 84/jump-if-= $populate-mu-type:error1/disp32
14477 +-- 6 lines: #? # dump line ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14483 (next-mu-token %ecx %edx)
14484
14485 (slice-empty? %edx)
14486 3d/compare-eax-and 0/imm32
14487 0f 85/jump-if-!= loop/disp32
14488
14489 (slice-equal? %edx "}")
14490 3d/compare-eax-and 0/imm32
14491 0f 85/jump-if-!= break/disp32
14492 $populate-mu-type:parse-element:
14493
14494
14495
14496
14497 (parse-var-with-type %edx %ecx %esi *(ebp+0x10) *(ebp+0x14))
14498
14499 (lookup *esi *(esi+4))
14500 (lookup *(eax+8) *(eax+0xc))
14501 (is-mu-addr-type? %eax)
14502 3d/compare-eax-and 0/imm32/false
14503 0f 85/jump-if-!= $populate-mu-type:error2/disp32
14504
14505 (lookup *esi *(esi+4))
14506 (lookup *(eax+8) *(eax+0xc))
14507 (is-mu-array-type? %eax)
14508 3d/compare-eax-and 0/imm32/false
14509 0f 85/jump-if-!= $populate-mu-type:error3/disp32
14510
14511 (lookup *esi *(esi+4))
14512 (lookup *(eax+8) *(eax+0xc))
14513 (is-simple-mu-type? %eax 8)
14514 3d/compare-eax-and 0/imm32/false
14515 0f 85/jump-if-!= $populate-mu-type:error4/disp32
14516
14517 (lookup *esi *(esi+4))
14518 (lookup *(eax+8) *(eax+0xc))
14519 (is-simple-mu-type? %eax 0xc)
14520 3d/compare-eax-and 0/imm32/false
14521 0f 85/jump-if-!= $populate-mu-type:error5/disp32
14522
14523 (lookup *esi *(esi+4))
14524 (lookup *(eax+8) *(eax+0xc))
14525 (is-mu-stream-type? %eax)
14526 3d/compare-eax-and 0/imm32/false
14527 0f 85/jump-if-!= $populate-mu-type:error6/disp32
14528
14529 51/push-ecx
14530 $populate-mu-type:create-typeinfo-fields:
14531
14532 (find-or-create-typeinfo-fields %edi %edx %ebx)
14533
14534 (lookup *ebx *(ebx+4))
14535 8b/-> *(ebp-4) 1/r32/ecx
14536
14537
14538
14539
14540
14541
14542 89/<- *(eax+8) 1/r32/ecx
14543
14544 ff 0/subop/increment *(ebp-4)
14545 $populate-mu-type:set-input-type:
14546
14547 8b/-> *esi 1/r32/ecx
14548 89/<- *eax 1/r32/ecx
14549 8b/-> *(esi+4) 1/r32/ecx
14550 89/<- *(eax+4) 1/r32/ecx
14551
14552 59/pop-to-ecx
14553 {
14554 $populate-mu-type:create-output-type:
14555
14556 81 7/subop/compare *(eax+0xc) 0/imm32
14557 75/jump-if-!= break/disp8
14558 8d/copy-address *(eax+0xc) 0/r32/eax
14559 (new-literal Heap %edx %eax)
14560 }
14561 e9/jump loop/disp32
14562 }
14563 $populate-mu-type:invalidate-total-size-in-bytes:
14564
14565
14566
14567 c7 0/subop/copy *(edi+0xc) -2/imm32/uninitialized
14568 $populate-mu-type:end:
14569
14570 81 0/subop/add %esp 0x224/imm32
14571
14572 5f/pop-to-edi
14573 5e/pop-to-esi
14574 5b/pop-to-ebx
14575 5a/pop-to-edx
14576 59/pop-to-ecx
14577 58/pop-to-eax
14578
14579 81 0/subop/add %esp 4/imm32
14580
14581 89/<- %esp 5/r32/ebp
14582 5d/pop-to-ebp
14583 c3/return
14584
14585 $populate-mu-type:error1:
14586
14587 (write-buffered *(ebp+0x10) "incomplete type definition '")
14588 (type-name *edi)
14589 (write-buffered *(ebp+0x10) %eax)
14590 (write-buffered *(ebp+0x10) "\n")
14591 (flush *(ebp+0x10))
14592 (stop *(ebp+0x14) 1)
14593
14594
14595 $populate-mu-type:error2:
14596 (write-buffered *(ebp+0x10) "type ")
14597 (type-name *edi)
14598 (write-buffered *(ebp+0x10) %eax)
14599 (write-buffered *(ebp+0x10) ": 'addr' elements not allowed\n")
14600 (flush *(ebp+0x10))
14601 (stop *(ebp+0x14) 1)
14602
14603
14604 $populate-mu-type:error3:
14605 (write-buffered *(ebp+0x10) "type ")
14606 (type-name *edi)
14607 (write-buffered *(ebp+0x10) %eax)
14608 (write-buffered *(ebp+0x10) ": 'array' elements not allowed for now\n")
14609 (flush *(ebp+0x10))
14610 (stop *(ebp+0x14) 1)
14611
14612
14613 $populate-mu-type:error4:
14614 (write-buffered *(ebp+0x10) "type ")
14615 (type-name *edi)
14616 (write-buffered *(ebp+0x10) %eax)
14617 (write-buffered *(ebp+0x10) ": 'byte' elements not allowed\n")
14618 (flush *(ebp+0x10))
14619 (stop *(ebp+0x14) 1)
14620
14621
14622 $populate-mu-type:error5:
14623 (write-buffered *(ebp+0x10) "type ")
14624 (type-name *edi)
14625 (write-buffered *(ebp+0x10) %eax)
14626 (write-buffered *(ebp+0x10) ": 'slice' elements not allowed\n")
14627 (flush *(ebp+0x10))
14628 (stop *(ebp+0x14) 1)
14629
14630
14631 $populate-mu-type:error6:
14632 (write-buffered *(ebp+0x10) "type ")
14633 (type-name *edi)
14634 (write-buffered *(ebp+0x10) %eax)
14635 (write-buffered *(ebp+0x10) ": 'stream' elements not allowed for now\n")
14636 (flush *(ebp+0x10))
14637 (stop *(ebp+0x14) 1)
14638
14639
14640 type-name:
14641
14642 55/push-ebp
14643 89/<- %ebp 4/r32/esp
14644
14645 (index Type-id *(ebp+8))
14646 $type-name:end:
14647
14648 89/<- %esp 5/r32/ebp
14649 5d/pop-to-ebp
14650 c3/return
14651
14652 index:
14653
14654 55/push-ebp
14655 89/<- %ebp 4/r32/esp
14656
14657 56/push-esi
14658
14659
14660 8b/-> *(ebp+8) 6/r32/esi
14661
14662 8b/-> *(ebp+0xc) 0/r32/eax
14663
14664 8b/-> *(esi+eax<<2+0xc) 0/r32/eax
14665 $index:end:
14666
14667 5e/pop-to-esi
14668
14669 89/<- %esp 5/r32/ebp
14670 5d/pop-to-ebp
14671 c3/return
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682 populate-mu-type-sizes:
14683
14684 55/push-ebp
14685 89/<- %ebp 4/r32/esp
14686 $populate-mu-type-sizes:total-sizes:
14687
14688 (lookup *_Program-types *_Program-types->payload)
14689 {
14690
14691 3d/compare-eax-and 0/imm32/null
14692 74/jump-if-= break/disp8
14693 (populate-mu-type-sizes-in-type %eax *(ebp+8) *(ebp+0xc))
14694
14695 (lookup *(eax+0x10) *(eax+0x14))
14696 eb/jump loop/disp8
14697 }
14698 $populate-mu-type-sizes:offsets:
14699
14700 (lookup *_Program-types *_Program-types->payload)
14701 {
14702
14703 3d/compare-eax-and 0/imm32/null
14704 74/jump-if-= break/disp8
14705 (populate-mu-type-offsets %eax *(ebp+8) *(ebp+0xc))
14706
14707 (lookup *(eax+0x10) *(eax+0x14))
14708 eb/jump loop/disp8
14709 }
14710 $populate-mu-type-sizes:end:
14711
14712 89/<- %esp 5/r32/ebp
14713 5d/pop-to-ebp
14714 c3/return
14715
14716
14717
14718
14719 populate-mu-type-sizes-in-type:
14720
14721 55/push-ebp
14722 89/<- %ebp 4/r32/esp
14723
14724 50/push-eax
14725 51/push-ecx
14726 52/push-edx
14727 56/push-esi
14728 57/push-edi
14729
14730 8b/-> *(ebp+8) 6/r32/esi
14731
14732 81 7/subop/compare *(esi+0xc) 0/imm32
14733 0f 8d/jump-if->= $populate-mu-type-sizes-in-type:end/disp32
14734
14735 81 7/subop/compare *(esi+0xc) -1/imm32/being-computed
14736 0f 84/jump-if-= $populate-mu-type-sizes-in-type:abort/disp32
14737
14738 c7 0/subop/copy *(esi+0xc) -1/imm32/being-computed
14739
14740 bf/copy-to-edi 0/imm32
14741
14742
14743 (lookup *(esi+4) *(esi+8))
14744 89/<- %ecx 0/r32/eax
14745
14746 8b/-> *ecx 2/r32/edx
14747
14748 8d/copy-address *(ecx+0xc) 1/r32/ecx
14749
14750 8d/copy-address *(ecx+edx) 2/r32/edx
14751 {
14752 $populate-mu-type-sizes-in-type:loop:
14753
14754 39/compare %ecx 2/r32/edx
14755 73/jump-if-addr>= break/disp8
14756
14757 (lookup *(ecx+8) *(ecx+0xc))
14758
14759 81 7/subop/compare *eax 0/imm32
14760 74/jump-if-= $populate-mu-type-sizes-in-type:end/disp8
14761
14762 (lookup *eax *(eax+4))
14763 (compute-size-of-var %eax *(ebp+0xc) *(ebp+0x10))
14764
14765 01/add-to %edi 0/r32/eax
14766
14767 81 0/subop/add %ecx 0x10/imm32
14768
14769 eb/jump loop/disp8
14770 }
14771
14772 89/<- *(esi+0xc) 7/r32/edi
14773 $populate-mu-type-sizes-in-type:end:
14774
14775 5f/pop-to-edi
14776 5e/pop-to-esi
14777 5a/pop-to-edx
14778 59/pop-to-ecx
14779 58/pop-to-eax
14780
14781 89/<- %esp 5/r32/ebp
14782 5d/pop-to-ebp
14783 c3/return
14784
14785 $populate-mu-type-sizes-in-type:abort:
14786 (write-buffered *(ebp+0xc) "cycle in type definitions\n")
14787 (flush *(ebp+0xc))
14788 (stop *(ebp+0x10) 1)
14789
14790
14791
14792
14793 compute-size-of-var:
14794
14795 55/push-ebp
14796 89/<- %ebp 4/r32/esp
14797
14798 51/push-ecx
14799
14800 8b/-> *(ebp+8) 1/r32/ecx
14801 (lookup *(ecx+8) *(ecx+0xc))
14802 89/<- %ecx 0/r32/eax
14803
14804 {
14805 81 7/subop/compare *ecx 0/imm32/false
14806 75/jump-if-!= break/disp8
14807 (lookup *(ecx+4) *(ecx+8))
14808 89/<- %ecx 0/r32/eax
14809 }
14810
14811 (compute-size-of-type-id *(ecx+4) *(ebp+0xc) *(ebp+0x10))
14812 $compute-size-of-var:end:
14813
14814 59/pop-to-ecx
14815
14816 89/<- %esp 5/r32/ebp
14817 5d/pop-to-ebp
14818 c3/return
14819
14820 compute-size-of-type-id:
14821
14822 55/push-ebp
14823 89/<- %ebp 4/r32/esp
14824
14825 51/push-ecx
14826
14827 68/push 0/imm32
14828 68/push 0/imm32
14829 89/<- %ecx 4/r32/esp
14830
14831 8b/-> *(ebp+8) 0/r32/eax
14832
14833 3d/compare-eax-and 0/imm32/literal
14834 0f 84/jump-if-= $compute-size-of-type-id:end/disp32
14835
14836 3d/compare-eax-and 8/imm32/byte
14837 {
14838 75/jump-if-!= break/disp8
14839 b8/copy-to-eax 4/imm32
14840 eb/jump $compute-size-of-type-id:end/disp8
14841 }
14842
14843 3d/compare-eax-and 4/imm32/handle
14844 {
14845 75/jump-if-!= break/disp8
14846 b8/copy-to-eax 8/imm32
14847 eb/jump $compute-size-of-type-id:end/disp8
14848 }
14849
14850 3d/compare-eax-and 0xc/imm32/slice
14851 {
14852 75/jump-if-!= break/disp8
14853 b8/copy-to-eax 8/imm32
14854 eb/jump $compute-size-of-type-id:end/disp8
14855 }
14856
14857
14858 (find-typeinfo %eax %ecx)
14859 {
14860 81 7/subop/compare *ecx 0/imm32
14861 74/jump-if-= break/disp8
14862 $compute-size-of-type-id:user-defined:
14863 (lookup *ecx *(ecx+4))
14864 (populate-mu-type-sizes-in-type %eax *(ebp+0xc) *(ebp+0x10))
14865 8b/-> *(eax+0xc) 0/r32/eax
14866 eb/jump $compute-size-of-type-id:end/disp8
14867 }
14868
14869 b8/copy-to-eax 4/imm32
14870 $compute-size-of-type-id:end:
14871
14872 81 0/subop/add %esp 8/imm32
14873
14874 59/pop-to-ecx
14875
14876 89/<- %esp 5/r32/ebp
14877 5d/pop-to-ebp
14878 c3/return
14879
14880
14881
14882
14883 populate-mu-type-offsets:
14884
14885 55/push-ebp
14886 89/<- %ebp 4/r32/esp
14887
14888 50/push-eax
14889 51/push-ecx
14890 52/push-edx
14891 53/push-ebx
14892 56/push-esi
14893 57/push-edi
14894
14895
14896 bf/copy-to-edi 0/imm32
14897
14898 8b/-> *(ebp+8) 1/r32/ecx
14899 (lookup *(ecx+4) *(ecx+8))
14900 89/<- %ecx 0/r32/eax
14901
14902 8b/-> *ecx 2/r32/edx
14903 c1 5/subop/shift-right-logical %edx 4/imm8
14904
14905 bb/copy-to-ebx 0/imm32
14906 {
14907 $populate-mu-type-offsets:loop:
14908 39/compare %ebx 2/r32/edx
14909 0f 8d/jump-if->= break/disp32
14910
14911
14912
14913
14914
14915
14916
14917 (locate-typeinfo-entry-with-index %ecx %ebx *(ebp+0xc) *(ebp+0x10))
14918 89/<- %esi 0/r32/eax
14919
14920 81 7/subop/compare %esi 0/imm32
14921 74/jump-if-= $populate-mu-type-offsets:end/disp8
14922
14923 81 7/subop/compare *esi 0/imm32
14924 74/jump-if-= $populate-mu-type-offsets:end/disp8
14925
14926
14927 (lookup *(esi+0xc) *(esi+0x10))
14928 89/<- *(eax+0x14) 7/r32/edi
14929
14930 (lookup *esi *(esi+4))
14931 (size-of %eax)
14932 01/add-to %edi 0/r32/eax
14933
14934 43/increment-ebx
14935 e9/jump loop/disp32
14936 }
14937 $populate-mu-type-offsets:end:
14938
14939 5f/pop-to-edi
14940 5e/pop-to-esi
14941 5b/pop-to-ebx
14942 5a/pop-to-edx
14943 59/pop-to-ecx
14944 58/pop-to-eax
14945
14946 89/<- %esp 5/r32/ebp
14947 5d/pop-to-ebp
14948 c3/return
14949
14950 locate-typeinfo-entry-with-index:
14951
14952 55/push-ebp
14953 89/<- %ebp 4/r32/esp
14954
14955 51/push-ecx
14956 52/push-edx
14957 53/push-ebx
14958 56/push-esi
14959 57/push-edi
14960
14961 8b/-> *(ebp+8) 6/r32/esi
14962
14963 8d/copy-address *(esi+0xc) 1/r32/ecx
14964
14965 8b/-> *esi 2/r32/edx
14966 8d/copy-address *(ecx+edx) 2/r32/edx
14967 {
14968 $locate-typeinfo-entry-with-index:loop:
14969 39/compare %ecx 2/r32/edx
14970 73/jump-if-addr>= break/disp8
14971
14972 (lookup *(ecx+8) *(ecx+0xc))
14973
14974 8b/-> *(eax+8) 3/r32/ebx
14975
14976
14977
14978
14979
14980
14981 39/compare *(ebp+0xc) 3/r32/ebx
14982 74/jump-if-= $locate-typeinfo-entry-with-index:end/disp8
14983
14984 81 0/subop/add %ecx 0x10/imm32
14985
14986 eb/jump loop/disp8
14987 }
14988
14989 b8/copy-to-eax 0/imm32
14990 $locate-typeinfo-entry-with-index:end:
14991
14992
14993
14994
14995
14996 5f/pop-to-edi
14997 5e/pop-to-esi
14998 5b/pop-to-ebx
14999 5a/pop-to-edx
15000 59/pop-to-ecx
15001
15002 89/<- %esp 5/r32/ebp
15003 5d/pop-to-ebp
15004 c3/return
15005
15006 dump-typeinfos:
15007
15008 55/push-ebp
15009 89/<- %ebp 4/r32/esp
15010
15011 50/push-eax
15012
15013 (write-buffered Stderr *(ebp+8))
15014 (flush Stderr)
15015
15016 (lookup *_Program-types *_Program-types->payload)
15017 {
15018
15019 3d/compare-eax-and 0/imm32
15020 74/jump-if-= break/disp8
15021 (write-buffered Stderr "---\n")
15022 (flush Stderr)
15023 (dump-typeinfo %eax)
15024
15025 (lookup *(eax+0x10) *(eax+0x14))
15026 eb/jump loop/disp8
15027 }
15028 $dump-typeinfos:end:
15029
15030 58/pop-to-eax
15031
15032 89/<- %esp 5/r32/ebp
15033 5d/pop-to-ebp
15034 c3/return
15035
15036 dump-typeinfo:
15037
15038 55/push-ebp
15039 89/<- %ebp 4/r32/esp
15040
15041 50/push-eax
15042 51/push-ecx
15043 52/push-edx
15044 53/push-ebx
15045 56/push-esi
15046 57/push-edi
15047
15048 8b/-> *(ebp+8) 6/r32/esi
15049
15050 (lookup *(esi+4) *(esi+8))
15051 89/<- %ecx 0/r32/eax
15052 (write-buffered Stderr "id:")
15053 (write-int32-hex-buffered Stderr *esi)
15054 (write-buffered Stderr "\n")
15055 (write-buffered Stderr "fields @ ")
15056 (write-int32-hex-buffered Stderr %ecx)
15057 (write-buffered Stderr Newline)
15058 (flush Stderr)
15059 (write-buffered Stderr " write: ")
15060 (write-int32-hex-buffered Stderr *ecx)
15061 (write-buffered Stderr Newline)
15062 (flush Stderr)
15063 (write-buffered Stderr " read: ")
15064 (write-int32-hex-buffered Stderr *(ecx+4))
15065 (write-buffered Stderr Newline)
15066 (flush Stderr)
15067 (write-buffered Stderr " size: ")
15068 (write-int32-hex-buffered Stderr *(ecx+8))
15069 (write-buffered Stderr Newline)
15070 (flush Stderr)
15071
15072 8b/-> *ecx 2/r32/edx
15073
15074 8d/copy-address *(ecx+0xc) 1/r32/ecx
15075
15076 8d/copy-address *(ecx+edx) 2/r32/edx
15077 {
15078 $dump-typeinfo:loop:
15079
15080 39/compare %ecx 2/r32/edx
15081 0f 83/jump-if-addr>= break/disp32
15082 (write-buffered Stderr " row:\n")
15083 (write-buffered Stderr " key: ")
15084 (write-int32-hex-buffered Stderr *ecx)
15085 (write-buffered Stderr ",")
15086 (write-int32-hex-buffered Stderr *(ecx+4))
15087 (write-buffered Stderr " = '")
15088 (lookup *ecx *(ecx+4))
15089 (write-buffered Stderr %eax)
15090 (write-buffered Stderr "' @ ")
15091 (write-int32-hex-buffered Stderr %eax)
15092 (write-buffered Stderr Newline)
15093 (flush Stderr)
15094 (write-buffered Stderr " value: ")
15095 (write-int32-hex-buffered Stderr *(ecx+8))
15096 (write-buffered Stderr ",")
15097 (write-int32-hex-buffered Stderr *(ecx+0xc))
15098 (write-buffered Stderr " = typeinfo-entry@")
15099 (lookup *(ecx+8) *(ecx+0xc))
15100 (write-int32-hex-buffered Stderr %eax)
15101 (write-buffered Stderr Newline)
15102 (flush Stderr)
15103 (write-buffered Stderr " input var@")
15104 (dump-var 5 %eax)
15105 (lookup *(ecx+8) *(ecx+0xc))
15106 (write-buffered Stderr " index: ")
15107 (write-int32-hex-buffered Stderr *(eax+8))
15108 (write-buffered Stderr Newline)
15109 (flush Stderr)
15110 (write-buffered Stderr " output var@")
15111 8d/copy-address *(eax+0xc) 0/r32/eax
15112 (dump-var 5 %eax)
15113 (flush Stderr)
15114
15115 81 0/subop/add %ecx 0x10/imm32
15116
15117 e9/jump loop/disp32
15118 }
15119 $dump-typeinfo:end:
15120
15121 5f/pop-to-edi
15122 5e/pop-to-esi
15123 5b/pop-to-ebx
15124 5a/pop-to-edx
15125 59/pop-to-ecx
15126 58/pop-to-eax
15127
15128 89/<- %esp 5/r32/ebp
15129 5d/pop-to-ebp
15130 c3/return
15131
15132 dump-var:
15133
15134 55/push-ebp
15135 89/<- %ebp 4/r32/esp
15136
15137 50/push-eax
15138 53/push-ebx
15139
15140 8b/-> *(ebp+0xc) 0/r32/eax
15141
15142 (write-int32-hex-buffered Stderr *eax)
15143 (write-buffered Stderr ",")
15144 (write-int32-hex-buffered Stderr *(eax+4))
15145 (write-buffered Stderr "->")
15146 (lookup *eax *(eax+4))
15147 (write-int32-hex-buffered Stderr %eax)
15148 (write-buffered Stderr Newline)
15149 (flush Stderr)
15150 {
15151 3d/compare-eax-and 0/imm32
15152 0f 84/jump-if-= break/disp32
15153 (emit-indent Stderr *(ebp+8))
15154 (write-buffered Stderr "name: ")
15155 89/<- %ebx 0/r32/eax
15156 (write-int32-hex-buffered Stderr *ebx)
15157 (write-buffered Stderr ",")
15158 (write-int32-hex-buffered Stderr *(ebx+4))
15159 (write-buffered Stderr "->")
15160 (lookup *ebx *(ebx+4))
15161 (write-int32-hex-buffered Stderr %eax)
15162 {
15163 3d/compare-eax-and 0/imm32
15164 74/jump-if-= break/disp8
15165 (write-buffered Stderr Space)
15166 (write-buffered Stderr %eax)
15167 }
15168 (write-buffered Stderr Newline)
15169 (flush Stderr)
15170 (emit-indent Stderr *(ebp+8))
15171 (write-buffered Stderr "block depth: ")
15172 (write-int32-hex-buffered Stderr *(ebx+0x10))
15173 (write-buffered Stderr Newline)
15174 (flush Stderr)
15175 (emit-indent Stderr *(ebp+8))
15176 (write-buffered Stderr "stack offset: ")
15177 (write-int32-hex-buffered Stderr *(ebx+0x14))
15178 (write-buffered Stderr Newline)
15179 (flush Stderr)
15180 (emit-indent Stderr *(ebp+8))
15181 (write-buffered Stderr "reg: ")
15182 (write-int32-hex-buffered Stderr *(ebx+0x18))
15183 (write-buffered Stderr ",")
15184 (write-int32-hex-buffered Stderr *(ebx+0x1c))
15185 (write-buffered Stderr "->")
15186 (flush Stderr)
15187 (lookup *(ebx+0x18) *(ebx+0x1c))
15188 (write-int32-hex-buffered Stderr %eax)
15189 {
15190 3d/compare-eax-and 0/imm32
15191 74/jump-if-= break/disp8
15192 (write-buffered Stderr Space)
15193 (write-buffered Stderr %eax)
15194 }
15195 (write-buffered Stderr Newline)
15196 (flush Stderr)
15197 }
15198 $dump-var:end:
15199
15200 5b/pop-to-ebx
15201 58/pop-to-eax
15202
15203 89/<- %esp 5/r32/ebp
15204 5d/pop-to-ebp
15205 c3/return
15206
15207
15208
15209
15210
15211 check-mu-types:
15212
15213 55/push-ebp
15214 89/<- %ebp 4/r32/esp
15215
15216 50/push-eax
15217
15218 (lookup *_Program-functions *_Program-functions->payload)
15219 {
15220 $check-mu-types:loop:
15221
15222 3d/compare-eax-and 0/imm32
15223 0f 84/jump-if-= break/disp32
15224 +-- 8 lines: #? # dump curr->name ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
15232 (check-mu-function %eax *(ebp+8) *(ebp+0xc))
15233
15234 (lookup *(eax+0x20) *(eax+0x24))
15235 e9/jump loop/disp32
15236 }
15237 $check-mu-types:end:
15238
15239 58/pop-to-eax
15240
15241 89/<- %esp 5/r32/ebp
15242 5d/pop-to-ebp
15243 c3/return
15244
15245 check-mu-function:
15246
15247 55/push-ebp
15248 89/<- %ebp 4/r32/esp
15249
15250 50/push-eax
15251
15252 8b/-> *(ebp+8) 0/r32/eax
15253
15254
15255 (lookup *(eax+0x18) *(eax+0x1c))
15256 (check-mu-block %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10))
15257 $check-mu-function:end:
15258
15259 58/pop-to-eax
15260
15261 89/<- %esp 5/r32/ebp
15262 5d/pop-to-ebp
15263 c3/return
15264
15265 check-mu-block:
15266
15267 55/push-ebp
15268 89/<- %ebp 4/r32/esp
15269
15270 50/push-eax
15271
15272 8b/-> *(ebp+8) 0/r32/eax
15273
15274 (lookup *(eax+4) *(eax+8))
15275
15276 {
15277 $check-mu-block:check-empty:
15278 3d/compare-eax-and 0/imm32
15279 0f 84/jump-if-= break/disp32
15280
15281 (check-mu-stmt-list %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15282 }
15283 $check-mu-block:end:
15284
15285 58/pop-to-eax
15286
15287 89/<- %esp 5/r32/ebp
15288 5d/pop-to-ebp
15289 c3/return
15290
15291 check-mu-stmt-list:
15292
15293 55/push-ebp
15294 89/<- %ebp 4/r32/esp
15295
15296 50/push-eax
15297 56/push-esi
15298
15299 8b/-> *(ebp+8) 6/r32/esi
15300 {
15301 $check-mu-stmt-list:loop:
15302 81 7/subop/compare %esi 0/imm32
15303 0f 84/jump-if-= break/disp32
15304
15305 (lookup *esi *(esi+4))
15306 {
15307 $check-mu-stmt-list:check-for-block:
15308 81 7/subop/compare *eax 0/imm32/block
15309 75/jump-if-!= break/disp8
15310 $check-mu-stmt-list:block:
15311 (check-mu-block %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15312 eb/jump $check-mu-stmt-list:continue/disp8
15313 }
15314 {
15315 $check-mu-stmt-list:check-for-stmt1:
15316 81 7/subop/compare *eax 1/imm32/stmt1
15317 0f 85/jump-if-!= break/disp32
15318 $check-mu-stmt-list:stmt1:
15319 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15320 eb/jump $check-mu-stmt-list:continue/disp8
15321 }
15322 {
15323 $check-mu-stmt-list:check-for-reg-var-def:
15324 81 7/subop/compare *eax 3/imm32/reg-var-def
15325 0f 85/jump-if-!= break/disp32
15326 $check-mu-stmt-list:reg-var-def:
15327 (check-mu-stmt %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15328 eb/jump $check-mu-stmt-list:continue/disp8
15329 }
15330 $check-mu-stmt-list:continue:
15331
15332 (lookup *(esi+8) *(esi+0xc))
15333 89/<- %esi 0/r32/eax
15334 e9/jump loop/disp32
15335 }
15336 $check-mu-stmt-list:end:
15337
15338 5e/pop-to-esi
15339 58/pop-to-eax
15340
15341 89/<- %esp 5/r32/ebp
15342 5d/pop-to-ebp
15343 c3/return
15344
15345 check-mu-stmt:
15346
15347 55/push-ebp
15348 89/<- %ebp 4/r32/esp
15349
15350 50/push-eax
15351
15352 (has-primitive-name? *(ebp+8))
15353 3d/compare-eax-and 0/imm32/false
15354 {
15355 74/jump-if-= break/disp8
15356 (check-mu-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15357 e9/jump $check-mu-stmt:end/disp32
15358 }
15359
15360
15361 (lookup *_Program-functions *_Program-functions->payload)
15362 (find-matching-function %eax *(ebp+8))
15363 3d/compare-eax-and 0/imm32
15364 {
15365 74/jump-if-= break/disp8
15366 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15367 eb/jump $check-mu-stmt:end/disp8
15368 }
15369
15370 (lookup *_Program-signatures *_Program-signatures->payload)
15371 (find-matching-function %eax *(ebp+8))
15372 3d/compare-eax-and 0/imm32
15373 {
15374 74/jump-if-= break/disp8
15375 (check-mu-call *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15376 eb/jump $check-mu-stmt:end/disp8
15377 }
15378
15379 e9/jump $check-mu-stmt:unknown-call/disp32
15380 $check-mu-stmt:end:
15381
15382 58/pop-to-eax
15383
15384 89/<- %esp 5/r32/ebp
15385 5d/pop-to-ebp
15386 c3/return
15387
15388 $check-mu-stmt:unknown-call:
15389 (write-buffered *(ebp+0x10) "unknown function '")
15390 8b/-> *(ebp+8) 0/r32/eax
15391 (lookup *(eax+4) *(eax+8))
15392 (write-buffered *(ebp+0x10) %eax)
15393 (write-buffered *(ebp+0x10) "'\n")
15394 (flush *(ebp+0x10))
15395 (stop *(ebp+0x14) 1)
15396
15397
15398 has-primitive-name?:
15399
15400 55/push-ebp
15401 89/<- %ebp 4/r32/esp
15402
15403 51/push-ecx
15404 56/push-esi
15405
15406 8b/-> *(ebp+8) 6/r32/esi
15407 (lookup *(esi+4) *(esi+8))
15408 89/<- %esi 0/r32/eax
15409
15410 (string-equal? %esi "return")
15411 3d/compare-eax-and 0/imm32/false
15412 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15413
15414 (string-equal? %esi "get")
15415 3d/compare-eax-and 0/imm32/false
15416 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15417
15418 (string-equal? %esi "index")
15419 3d/compare-eax-and 0/imm32/false
15420 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15421
15422 (string-equal? %esi "length")
15423 3d/compare-eax-and 0/imm32/false
15424 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15425
15426 (string-equal? %esi "compute-offset")
15427 3d/compare-eax-and 0/imm32/false
15428 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15429
15430 (string-equal? %esi "copy-object")
15431 3d/compare-eax-and 0/imm32/false
15432 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15433
15434 (string-equal? %esi "allocate")
15435 3d/compare-eax-and 0/imm32/false
15436 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15437
15438 (string-equal? %esi "populate")
15439 3d/compare-eax-and 0/imm32/false
15440 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15441
15442 (string-equal? %esi "populate-stream")
15443 3d/compare-eax-and 0/imm32/false
15444 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15445
15446 (string-equal? %esi "read-from-stream")
15447 3d/compare-eax-and 0/imm32/false
15448 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15449
15450 (string-equal? %esi "write-to-stream")
15451 3d/compare-eax-and 0/imm32/false
15452 0f 85/jump-if-!= $has-primitive-name?:end/disp32
15453
15454 b9/copy-to-ecx Primitives/imm32
15455 {
15456 $has-primitive-name?:loop:
15457
15458 81 7/subop/compare %ecx 0/imm32
15459 74/jump-if-= break/disp8
15460
15461 (lookup *ecx *(ecx+4))
15462
15463
15464
15465 (string-equal? %esi %eax)
15466 3d/compare-eax-and 0/imm32/false
15467 75/jump-if-!= $has-primitive-name?:end/disp8
15468 $has-primitive-name?:next-primitive:
15469
15470 (lookup *(ecx+0x3c) *(ecx+0x40))
15471 89/<- %ecx 0/r32/eax
15472
15473 e9/jump loop/disp32
15474 }
15475
15476 b8/copy-to-eax 0/imm32
15477 $has-primitive-name?:end:
15478
15479 5e/pop-to-esi
15480 59/pop-to-ecx
15481
15482 89/<- %esp 5/r32/ebp
15483 5d/pop-to-ebp
15484 c3/return
15485
15486 check-mu-primitive:
15487
15488 55/push-ebp
15489 89/<- %ebp 4/r32/esp
15490
15491 50/push-eax
15492 51/push-ecx
15493
15494 8b/-> *(ebp+8) 0/r32/eax
15495 (lookup *(eax+4) *(eax+8))
15496 89/<- %ecx 0/r32/eax
15497
15498 {
15499 (string-equal? %ecx "copy")
15500 3d/compare-eax-and 0/imm32/false
15501 74/jump-if-= break/disp8
15502 (check-mu-copy-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15503 e9/jump $check-mu-primitive:end/disp32
15504 }
15505
15506 {
15507 (string-equal? %ecx "copy-to")
15508 3d/compare-eax-and 0/imm32/false
15509 74/jump-if-= break/disp8
15510 (check-mu-copy-to-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15511 e9/jump $check-mu-primitive:end/disp32
15512 }
15513
15514 {
15515 (string-equal? %ecx "compare")
15516 3d/compare-eax-and 0/imm32/false
15517 74/jump-if-= break/disp8
15518 (check-mu-compare-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15519 e9/jump $check-mu-primitive:end/disp32
15520 }
15521
15522 {
15523 (string-equal? %ecx "address")
15524 3d/compare-eax-and 0/imm32/false
15525 74/jump-if-= break/disp8
15526 (check-mu-address-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15527 e9/jump $check-mu-primitive:end/disp32
15528 }
15529
15530 {
15531 (string-equal? %ecx "return")
15532 3d/compare-eax-and 0/imm32/false
15533 74/jump-if-= break/disp8
15534 (check-mu-return-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15535 e9/jump $check-mu-primitive:end/disp32
15536 }
15537
15538 {
15539 (string-equal? %ecx "get")
15540 3d/compare-eax-and 0/imm32/false
15541 74/jump-if-= break/disp8
15542 (check-mu-get-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15543 e9/jump $check-mu-primitive:end/disp32
15544 }
15545
15546 {
15547 (string-equal? %ecx "index")
15548 3d/compare-eax-and 0/imm32/false
15549 74/jump-if-= break/disp8
15550 (check-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15551 e9/jump $check-mu-primitive:end/disp32
15552 }
15553
15554 {
15555 (string-equal? %ecx "length")
15556 3d/compare-eax-and 0/imm32/false
15557 74/jump-if-= break/disp8
15558 (check-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15559 e9/jump $check-mu-primitive:end/disp32
15560 }
15561
15562 {
15563 (string-equal? %ecx "compute-offset")
15564 3d/compare-eax-and 0/imm32/false
15565 74/jump-if-= break/disp8
15566 (check-mu-compute-offset-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15567 e9/jump $check-mu-primitive:end/disp32
15568 }
15569
15570 {
15571 (string-equal? %ecx "copy-object")
15572 3d/compare-eax-and 0/imm32/false
15573 74/jump-if-= break/disp8
15574 (check-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15575 e9/jump $check-mu-primitive:end/disp32
15576 }
15577
15578 {
15579 (string-equal? %ecx "allocate")
15580 3d/compare-eax-and 0/imm32/false
15581 74/jump-if-= break/disp8
15582 (check-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15583 e9/jump $check-mu-primitive:end/disp32
15584 }
15585
15586 {
15587 (string-equal? %ecx "populate")
15588 3d/compare-eax-and 0/imm32/false
15589 74/jump-if-= break/disp8
15590 (check-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15591 e9/jump $check-mu-primitive:end/disp32
15592 }
15593
15594 {
15595 (string-equal? %ecx "populate-stream")
15596 3d/compare-eax-and 0/imm32/false
15597 74/jump-if-= break/disp8
15598 (check-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15599 e9/jump $check-mu-primitive:end/disp32
15600 }
15601
15602 {
15603 (string-equal? %ecx "read-from-stream")
15604 3d/compare-eax-and 0/imm32/false
15605 74/jump-if-= break/disp8
15606 (check-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15607 e9/jump $check-mu-primitive:end/disp32
15608 }
15609
15610 {
15611 (string-equal? %ecx "write-to-stream")
15612 3d/compare-eax-and 0/imm32/false
15613 74/jump-if-= break/disp8
15614 (check-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15615 e9/jump $check-mu-primitive:end/disp32
15616 }
15617
15618 {
15619 (string-equal? %ecx "convert")
15620 3d/compare-eax-and 0/imm32/false
15621 74/jump-if-= break/disp8
15622 (check-mu-convert-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15623 e9/jump $check-mu-primitive:end/disp32
15624 }
15625
15626 (check-mu-numberlike-primitive *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15627 $check-mu-primitive:end:
15628
15629 59/pop-to-ecx
15630 58/pop-to-eax
15631
15632 89/<- %esp 5/r32/ebp
15633 5d/pop-to-ebp
15634 c3/return
15635
15636
15637 check-mu-numberlike-primitive:
15638
15639 55/push-ebp
15640 89/<- %ebp 4/r32/esp
15641
15642 50/push-eax
15643 51/push-ecx
15644 56/push-esi
15645
15646 8b/-> *(ebp+8) 6/r32/esi
15647
15648 b9/copy-to-ecx 2/imm32
15649
15650
15651 (lookup *(esi+0x14) *(esi+0x18))
15652 {
15653 3d/compare-eax-and 0/imm32
15654 74/jump-if-= break/disp8
15655 $check-mu-numberlike-primitive:output:
15656 (check-mu-numberlike-output %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15657 (lookup *(eax+8) *(eax+0xc))
15658 3d/compare-eax-and 0/imm32
15659 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-outputs/disp32
15660
15661
15662 49/decrement-ecx
15663 }
15664
15665 (lookup *(esi+0xc) *(esi+0x10))
15666 {
15667 3d/compare-eax-and 0/imm32
15668 0f 84/jump-if-= $check-mu-numberlike-primitive:end/disp32
15669 $check-mu-numberlike-primitive:first-inout:
15670 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15671
15672 49/decrement-ecx
15673 }
15674
15675 (lookup *(eax+8) *(eax+0xc))
15676 {
15677 3d/compare-eax-and 0/imm32
15678 74/jump-if-= $check-mu-numberlike-primitive:end/disp8
15679 $check-mu-numberlike-primitive:second-inout:
15680
15681 81 7/subop/compare %ecx 0/imm32
15682 0f 84/jump-if-= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
15683 $check-mu-numberlike-primitive:second-inout-permitted:
15684 (check-mu-numberlike-arg %eax *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
15685 }
15686 $check-mu-numberlike-primitive:third-inout:
15687
15688 81 7/subop/compare *(eax+8) 0/imm32
15689 0f 85/jump-if-!= $check-mu-numberlike-primitive:error-too-many-inouts/disp32
15690 $check-mu-numberlike-primitive:end:
15691
15692 5e/pop-to-esi
15693 59/pop-to-ecx
15694 58/pop-to-eax
15695
15696 89/<- %esp 5/r32/ebp
15697 5d/pop-to-ebp
15698 c3/return
15699
15700 $check-mu-numberlike-primitive:error-too-many-inouts:
15701 (write-buffered *(ebp+0x10) "fn ")
15702 8b/-> *(ebp+0xc) 0/r32/eax
15703 (lookup *eax *(eax+4))
15704 (write-buffered *(ebp+0x10) %eax)
15705 (write-buffered *(ebp+0x10) ": stmt ")
15706 (lookup *(esi+4) *(esi+8))
15707 (write-buffered *(ebp+0x10) %eax)
15708 (write-buffered *(ebp+0x10) ": too many inouts; most primitives support at most two arguments, across inouts and outputs\n")
15709 (flush *(ebp+0x10))
15710 (stop *(ebp+0x14) 1)
15711
15712
15713 $check-mu-numberlike-primitive:error-too-many-outputs:
15714 (write-buffered *(ebp+0x10) "fn ")
15715 8b/-> *(ebp+0xc) 0/r32/eax
15716 (lookup *eax *(eax+4))
15717 (write-buffered *(ebp+0x10) %eax)
15718 (write-buffered *(ebp+0x10) ": stmt ")
15719 (lookup *(esi+4) *(esi+8))
15720 (write-buffered *(ebp+0x10) %eax)
15721 (write-buffered *(ebp+0x10) ": too many outputs; most primitives support at most one output\n")
15722 (flush *(ebp+0x10))
15723 (stop *(ebp+0x14) 1)
15724
15725
15726 check-mu-numberlike-arg:
15727
15728 55/push-ebp
15729 89/<- %ebp 4/r32/esp
15730
15731 50/push-eax
15732 56/push-esi
15733
15734 8b/-> *(ebp+8) 0/r32/eax
15735 (lookup *eax *(eax+4))
15736 (lookup *(eax+8) *(eax+0xc))
15737 89/<- %esi 0/r32/eax
15738 $check-mu-numberlike-arg:check-literal:
15739
15740 (is-simple-mu-type? %esi 0)
15741 3d/compare-eax-and 0/imm32/false
15742 75/jump-if-!= $check-mu-numberlike-arg:end/disp8
15743 $check-mu-numberlike-arg:check-addr:
15744
15745 {
15746 (is-mu-addr-type? %esi)
15747 3d/compare-eax-and 0/imm32/false
15748 74/jump-if-= break/disp8
15749 8b/-> *(ebp+8) 0/r32/eax
15750 8b/-> *(eax+0x10) 0/r32/eax
15751 3d/compare-eax-and 0/imm32/false
15752 75/jump-if-!= $check-mu-numberlike-arg:end/disp8
15753 }
15754 $check-mu-numberlike-arg:output-checks:
15755 (check-mu-numberlike-output *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14) *(ebp+0x18))
15756 $check-mu-numberlike-arg:end:
15757
15758 5e/pop-to-esi
15759 58/pop-to-eax
15760
15761 89/<- %esp 5/r32/ebp
15762 5d/pop-to-ebp
15763 c3/return
15764
15765 check-mu-numberlike-output:
15766
15767 55/push-ebp
15768 89/<- %ebp 4/r32/esp
15769
15770 50/push-eax
15771 56/push-esi
15772
15773 8b/-> *(ebp+8) 0/r32/eax
15774 (lookup *eax *(eax+4))
15775 (lookup *(eax+8) *(eax+0xc))
15776 89/<- %esi 0/r32/eax
15777 $check-mu-numberlike-output:check-int:
15778
15779 (is-simple-mu-type? %esi 1)
15780 3d/compare-eax-and 0/imm32/false
15781 0f 85/jump-if-!= $check-mu-numberlike-output:end/disp32
15782 $check-mu-numberlike-output:check-float:
15783
15784 (is-simple-mu-type? %esi 0xf)
15785 3d/compare-eax-and 0/imm32/false
15786 75/jump-if-!= $check-mu-numberlike-output:end/disp8
15787 $check-mu-numberlike-output:check-boolean:
15788
15789 (is-simple-mu-type? %esi 5)
15790 3d/compare-eax-and 0/imm32/false
15791 75/jump-if-!= $check-mu-numberlike-output:end/disp8
15792 $check-mu-numberlike-output:check-byte:
15793
15794 (is-simple-mu-type? %esi 8)
15795 3d/compare-eax-and 0/imm32/false
15796 75/jump-if-!= $check-mu-numberlike-output:end/disp8
15797 $check-mu-numberlike-output:check-code-point:
15798
15799 (is-simple-mu-type? %esi 0xd)
15800 3d/compare-eax-and 0/imm32/false
15801 75/jump-if-!= $check-mu-numberlike-output:end/disp8
15802 $check-mu-numberlike-output:check-grapheme:
15803
15804 (is-simple-mu-type? %esi 0xe)
15805 3d/compare-eax-and 0/imm32/false
15806 75/jump-if-!= $check-mu-numberlike-output:end/disp8
15807 e9/jump $check-mu-numberlike-output:fail/disp32
15808 $check-mu-numberlike-output:end:
15809
15810 5e/pop-to-esi
15811 58/pop-to-eax
15812
15813 89/<- %esp 5/r32/ebp
15814 5d/pop-to-ebp
15815 c3/return
15816
15817 $check-mu-numberlike-output:fail:
15818
15819 (write-buffered *(ebp+0x14) "fn ")
15820 8b/-> *(ebp+0x10) 0/r32/eax
15821 (lookup *eax *(eax+4))
15822 (write-buffered *(ebp+0x14) %eax)
15823 (write-buffered *(ebp+0x14) ": stmt ")
15824 8b/-> *(ebp+0xc) 0/r32/eax
15825 (lookup *(eax+4) *(eax+8))
15826 (write-buffered *(ebp+0x14) %eax)
15827 (write-buffered *(ebp+0x14) ": only non-addr scalar args permitted\n")
15828 (flush *(ebp+0x14))
15829 (stop *(ebp+0x18) 1)
15830
15831
15832 check-mu-copy-stmt:
15833
15834 55/push-ebp
15835 89/<- %ebp 4/r32/esp
15836
15837 $check-mu-copy-stmt:end:
15838
15839
15840 89/<- %esp 5/r32/ebp
15841 5d/pop-to-ebp
15842 c3/return
15843
15844 check-mu-copy-to-stmt:
15845
15846 55/push-ebp
15847 89/<- %ebp 4/r32/esp
15848
15849 $check-mu-copy-to-stmt:end:
15850
15851
15852 89/<- %esp 5/r32/ebp
15853 5d/pop-to-ebp
15854 c3/return
15855
15856 check-mu-compare-stmt:
15857
15858 55/push-ebp
15859 89/<- %ebp 4/r32/esp
15860
15861 $check-mu-compare-stmt:end:
15862
15863
15864 89/<- %esp 5/r32/ebp
15865 5d/pop-to-ebp
15866 c3/return
15867
15868 check-mu-address-stmt:
15869
15870 55/push-ebp
15871 89/<- %ebp 4/r32/esp
15872
15873 $check-mu-address-stmt:end:
15874
15875
15876 89/<- %esp 5/r32/ebp
15877 5d/pop-to-ebp
15878 c3/return
15879
15880 check-mu-return-stmt:
15881
15882 55/push-ebp
15883 89/<- %ebp 4/r32/esp
15884
15885 $check-mu-return-stmt:end:
15886
15887
15888 89/<- %esp 5/r32/ebp
15889 5d/pop-to-ebp
15890 c3/return
15891
15892 check-mu-get-stmt:
15893
15894 55/push-ebp
15895 89/<- %ebp 4/r32/esp
15896
15897 50/push-eax
15898 51/push-ecx
15899 52/push-edx
15900 53/push-ebx
15901 56/push-esi
15902 57/push-edi
15903
15904 8b/-> *(ebp+8) 6/r32/esi
15905
15906
15907 (lookup *(esi+0xc) *(esi+0x10))
15908 3d/compare-eax-and 0/imm32/false
15909 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
15910 (lookup *eax *(eax+4))
15911 89/<- %ecx 0/r32/eax
15912 $check-mu-get-stmt:check-base:
15913
15914
15915
15916 (lookup *(ecx+8) *(ecx+0xc))
15917 89/<- %ebx 0/r32/eax
15918 {
15919 81 7/subop/compare *ebx 0/imm32/false
15920 0f 85/jump-if-!= break/disp32
15921 $check-mu-get-stmt:base-is-compound:
15922
15923 (lookup *(ebx+4) *(ebx+8))
15924 (is-simple-mu-type? %eax 2)
15925 3d/compare-eax-and 0/imm32/false
15926 74/jump-if-= break/disp8
15927 $check-mu-get-stmt:base-is-addr:
15928
15929 81 7/subop/compare *(ecx+0x18) 0/imm32
15930 0f 84/jump-if-= $check-mu-get-stmt:error-base-type-addr-but-not-register/disp32
15931 $check-mu-get-stmt:base-is-addr-in-register:
15932
15933 (lookup *(ebx+0xc) *(ebx+0x10))
15934 81 7/subop/compare *(eax+0xc) 0/imm32
15935 0f 85/jump-if-!= $check-mu-get-stmt:error-bad-base/disp32
15936 $check-mu-get-stmt:base-is-addr-to-atom-in-register:
15937 (lookup *(eax+4) *(eax+8))
15938 89/<- %ebx 0/r32/eax
15939 }
15940 $check-mu-get-stmt:check-base-typeinfo:
15941
15942
15943 8b/-> *(ebx+4) 3/r32/ebx
15944 (is-container? %ebx)
15945 3d/compare-eax-and 0/imm32/false
15946 0f 84/jump-if-= $check-mu-get-stmt:error-bad-base/disp32
15947
15948
15949 68/push 0/imm32
15950 68/push 0/imm32
15951 89/<- %ecx 4/r32/esp
15952
15953 (find-typeinfo %ebx %ecx)
15954 (lookup *ecx *(ecx+4))
15955
15956 81 0/subop/add %esp 8/imm32
15957
15958 89/<- %edx 0/r32/eax
15959
15960 (lookup *(esi+0xc) *(esi+0x10))
15961 (lookup *(eax+8) *(eax+0xc))
15962 89/<- %ecx 0/r32/eax
15963
15964 3d/compare-eax-and 0/imm32/false
15965 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-inouts/disp32
15966
15967 (lookup *ecx *(ecx+4))
15968 89/<- %ecx 0/r32/eax
15969
15970 81 7/subop/compare *(ecx+0x14) -1/imm32/uninitialized
15971 0f 84/jump-if-= $check-mu-get-stmt:error-bad-field/disp32
15972
15973 (lookup *(esi+0xc) *(esi+0x10))
15974 (lookup *(eax+8) *(eax+0xc))
15975 (lookup *(eax+8) *(eax+0xc))
15976 3d/compare-eax-and 0/imm32/false
15977 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-inouts/disp32
15978
15979 (lookup *(esi+0x14) *(esi+0x18))
15980
15981 3d/compare-eax-and 0/imm32/false
15982 0f 84/jump-if-= $check-mu-get-stmt:error-too-few-outputs/disp32
15983 (lookup *eax *(eax+4))
15984 89/<- %edi 0/r32/eax
15985 $check-mu-get-stmt:check-output-type:
15986
15987
15988 (lookup *(edi+0x18) *(edi+0x1c))
15989 3d/compare-eax-and 0/imm32
15990 0f 84/jump-if-= $check-mu-get-stmt:error-output-not-in-register/disp32
15991
15992 (lookup *(edi+8) *(edi+0xc))
15993 81 7/subop/compare *eax 0/imm32/false
15994 0f 85/jump-if-!= $check-mu-get-stmt:error-output-type-not-address/disp32
15995
15996 (lookup *(eax+4) *(eax+8))
15997 (is-simple-mu-type? %eax 2)
15998 3d/compare-eax-and 0/imm32/false
15999 0f 84/jump-if-= $check-mu-get-stmt:error-output-type-not-address/disp32
16000 $check-mu-get-stmt:check-output-type-match:
16001
16002 (lookup *(edi+8) *(edi+0xc))
16003 (lookup *(eax+0xc) *(eax+0x10))
16004
16005 81 7/subop/compare *(eax+0xc) 0/imm32/null
16006 {
16007 75/jump-if-!= break/disp8
16008 (lookup *(eax+4) *(eax+8))
16009 }
16010 89/<- %edi 0/r32/eax
16011
16012 (lookup *ecx *(ecx+4))
16013 89/<- %ecx 0/r32/eax
16014
16015 (lookup *(edx+4) *(edx+8))
16016 (get %eax %ecx 0x10)
16017
16018 (lookup *eax *(eax+4))
16019 (lookup *eax *(eax+4))
16020 (lookup *(eax+8) *(eax+0xc))
16021
16022 (type-equal? %edi %eax)
16023 3d/compare-eax-and 0/imm32/false
16024 0f 84/jump-if-= $check-mu-get-stmt:error-bad-output-type/disp32
16025
16026 (lookup *(esi+0x14) *(esi+0x18))
16027 (lookup *(eax+8) *(eax+0xc))
16028 3d/compare-eax-and 0/imm32/false
16029 0f 85/jump-if-!= $check-mu-get-stmt:error-too-many-outputs/disp32
16030 $check-mu-get-stmt:end:
16031
16032 5f/pop-to-edi
16033 5e/pop-to-esi
16034 5b/pop-to-ebx
16035 5a/pop-to-edx
16036 59/pop-to-ecx
16037 58/pop-to-eax
16038
16039 89/<- %esp 5/r32/ebp
16040 5d/pop-to-ebp
16041 c3/return
16042
16043 $check-mu-get-stmt:error-too-few-inouts:
16044 (write-buffered *(ebp+0x10) "fn ")
16045 8b/-> *(ebp+0xc) 0/r32/eax
16046 (lookup *eax *(eax+4))
16047 (write-buffered *(ebp+0x10) %eax)
16048 (write-buffered *(ebp+0x10) ": stmt get: too few inouts (2 required)\n")
16049 (flush *(ebp+0x10))
16050 (stop *(ebp+0x14) 1)
16051
16052
16053 $check-mu-get-stmt:error-too-many-inouts:
16054 (write-buffered *(ebp+0x10) "fn ")
16055 8b/-> *(ebp+0xc) 0/r32/eax
16056 (lookup *eax *(eax+4))
16057 (write-buffered *(ebp+0x10) %eax)
16058 (write-buffered *(ebp+0x10) ": stmt get: too many inouts (2 required)\n")
16059 (flush *(ebp+0x10))
16060 (stop *(ebp+0x14) 1)
16061
16062
16063 $check-mu-get-stmt:error-too-few-outputs:
16064 (write-buffered *(ebp+0x10) "fn ")
16065 8b/-> *(ebp+0xc) 0/r32/eax
16066 (lookup *eax *(eax+4))
16067 (write-buffered *(ebp+0x10) %eax)
16068 (write-buffered *(ebp+0x10) ": stmt get: must have an output\n")
16069 (flush *(ebp+0x10))
16070 (stop *(ebp+0x14) 1)
16071
16072
16073 $check-mu-get-stmt:error-too-many-outputs:
16074 (write-buffered *(ebp+0x10) "fn ")
16075 8b/-> *(ebp+0xc) 0/r32/eax
16076 (lookup *eax *(eax+4))
16077 (write-buffered *(ebp+0x10) %eax)
16078 (write-buffered *(ebp+0x10) ": stmt get: too many outputs (1 required)\n")
16079 (flush *(ebp+0x10))
16080 (stop *(ebp+0x14) 1)
16081
16082
16083 $check-mu-get-stmt:error-bad-base:
16084
16085 (write-buffered *(ebp+0x10) "fn ")
16086 8b/-> *(ebp+0xc) 0/r32/eax
16087 (lookup *eax *(eax+4))
16088 (write-buffered *(ebp+0x10) %eax)
16089 (write-buffered *(ebp+0x10) ": stmt get: var '")
16090 (lookup *(esi+0xc) *(esi+0x10))
16091 (lookup *eax *(eax+4))
16092 (lookup *eax *(eax+4))
16093 (write-buffered *(ebp+0x10) %eax)
16094 (write-buffered *(ebp+0x10) "' must have a 'type' definition\n")
16095 (flush *(ebp+0x10))
16096 (stop *(ebp+0x14) 1)
16097
16098
16099 $check-mu-get-stmt:error-base-type-addr-but-not-register:
16100 (write-buffered *(ebp+0x10) "fn ")
16101 8b/-> *(ebp+0xc) 0/r32/eax
16102 (lookup *eax *(eax+4))
16103 (write-buffered *(ebp+0x10) %eax)
16104 (write-buffered *(ebp+0x10) ": stmt get: var '")
16105 (lookup *(esi+0xc) *(esi+0x10))
16106 (lookup *eax *(eax+4))
16107 (lookup *eax *(eax+4))
16108 (write-buffered *(ebp+0x10) %eax)
16109 (write-buffered *(ebp+0x10) "' is an 'addr' type, and so must live in a register\n")
16110 (flush *(ebp+0x10))
16111 (stop *(ebp+0x14) 1)
16112
16113
16114 $check-mu-get-stmt:error-bad-field:
16115
16116 (write-buffered *(ebp+0x10) "fn ")
16117 8b/-> *(ebp+0xc) 0/r32/eax
16118 (lookup *eax *(eax+4))
16119 (write-buffered *(ebp+0x10) %eax)
16120 (write-buffered *(ebp+0x10) ": stmt get: type '")
16121
16122 bf/copy-to-edi Type-id/imm32
16123 (write-buffered *(ebp+0x10) *(edi+ebx<<2+0xc))
16124
16125 (write-buffered *(ebp+0x10) "' has no member called '")
16126 (lookup *ecx *(ecx+4))
16127 (write-buffered *(ebp+0x10) %eax)
16128 (write-buffered *(ebp+0x10) "'\n")
16129 (flush *(ebp+0x10))
16130 (stop *(ebp+0x14) 1)
16131
16132
16133 $check-mu-get-stmt:error-output-not-in-register:
16134 (write-buffered *(ebp+0x10) "fn ")
16135 8b/-> *(ebp+0xc) 0/r32/eax
16136 (lookup *eax *(eax+4))
16137 (write-buffered *(ebp+0x10) %eax)
16138 (write-buffered *(ebp+0x10) ": stmt get: output '")
16139 (lookup *edi *(edi+4))
16140 (write-buffered *(ebp+0x10) %eax)
16141 (write-buffered *(ebp+0x10) "' is not in a register\n")
16142 (flush *(ebp+0x10))
16143 (stop *(ebp+0x14) 1)
16144
16145
16146 $check-mu-get-stmt:error-output-type-not-address:
16147 (write-buffered *(ebp+0x10) "fn ")
16148 8b/-> *(ebp+0xc) 0/r32/eax
16149 (lookup *eax *(eax+4))
16150 (write-buffered *(ebp+0x10) %eax)
16151 (write-buffered *(ebp+0x10) ": stmt get: output must be an addr\n")
16152 (flush *(ebp+0x10))
16153 (stop *(ebp+0x14) 1)
16154
16155
16156 $check-mu-get-stmt:error-bad-output-type:
16157 (write-buffered *(ebp+0x10) "fn ")
16158 8b/-> *(ebp+0xc) 0/r32/eax
16159 (lookup *eax *(eax+4))
16160 (write-buffered *(ebp+0x10) %eax)
16161 (write-buffered *(ebp+0x10) ": stmt get: wrong output type for member '")
16162 (write-buffered *(ebp+0x10) %ecx)
16163 (write-buffered *(ebp+0x10) "' of type '")
16164 bf/copy-to-edi Type-id/imm32
16165 (write-buffered *(ebp+0x10) *(edi+ebx<<2+0xc))
16166 (write-buffered *(ebp+0x10) "'\n")
16167 (flush *(ebp+0x10))
16168 (stop *(ebp+0x14) 1)
16169
16170
16171 check-mu-index-stmt:
16172
16173 55/push-ebp
16174 89/<- %ebp 4/r32/esp
16175
16176 50/push-eax
16177 51/push-ecx
16178 52/push-edx
16179 53/push-ebx
16180 56/push-esi
16181 57/push-edi
16182
16183 8b/-> *(ebp+8) 6/r32/esi
16184
16185
16186 (lookup *(esi+0xc) *(esi+0x10))
16187 $check-mu-index-stmt:check-no-inouts:
16188 3d/compare-eax-and 0/imm32
16189 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
16190 (lookup *eax *(eax+4))
16191 89/<- %ecx 0/r32/eax
16192
16193
16194 (lookup *(ecx+8) *(ecx+0xc))
16195 89/<- %ebx 0/r32/eax
16196
16197 81 7/subop/compare *ebx 0/imm32/false
16198 {
16199 74/jump-if-= break/disp8
16200 (is-simple-mu-type? %ebx 3)
16201 3d/compare-eax-and 0/imm32/false
16202 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-atom-type/disp32
16203 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
16204 }
16205 $check-mu-index-stmt:base-is-compound:
16206
16207 {
16208 (lookup *(ebx+4) *(ebx+8))
16209 (is-simple-mu-type? %eax 2)
16210 3d/compare-eax-and 0/imm32/false
16211 75/jump-if-!= break/disp8
16212 (lookup *(ebx+4) *(ebx+8))
16213 (is-simple-mu-type? %eax 3)
16214 3d/compare-eax-and 0/imm32/false
16215 75/jump-if-!= break/disp8
16216 e9/jump $check-mu-index-stmt:error-base-non-array-type/disp32
16217 }
16218
16219 {
16220 (lookup *(ebx+4) *(ebx+8))
16221 (is-simple-mu-type? %eax 2)
16222 3d/compare-eax-and 0/imm32/false
16223 74/jump-if-= break/disp8
16224 $check-mu-index-stmt:base-is-addr:
16225 (lookup *(ebx+0xc) *(ebx+0x10))
16226 (lookup *(eax+4) *(eax+8))
16227 (is-simple-mu-type? %eax 3)
16228 3d/compare-eax-and 0/imm32/false
16229 0f 84/jump-if-= $check-mu-index-stmt:error-base-non-array-type/disp32
16230 $check-mu-index-stmt:check-base-addr-is-register:
16231 81 7/subop/compare *(ecx+0x18) 0/imm32
16232 0f 84/jump-if-= $check-mu-index-stmt:error-base-address-array-type-on-stack/disp32
16233 }
16234
16235 {
16236 (lookup *(ebx+4) *(ebx+8))
16237 (is-simple-mu-type? %eax 3)
16238 3d/compare-eax-and 0/imm32/false
16239 74/jump-if-= break/disp8
16240 $check-mu-index-stmt:base-is-array:
16241 81 7/subop/compare *(ecx+0x18) 0/imm32
16242 0f 85/jump-if-!= $check-mu-index-stmt:error-base-array-type-in-register/disp32
16243 }
16244
16245 {
16246 (lookup *(ebx+4) *(ebx+8))
16247 (is-simple-mu-type? %eax 2)
16248 3d/compare-eax-and 0/imm32/false
16249 74/jump-if-= break/disp8
16250 (lookup *(ebx+0xc) *(ebx+0x10))
16251 89/<- %ebx 0/r32/eax
16252 }
16253
16254
16255 (lookup *(esi+0xc) *(esi+0x10))
16256 (lookup *(eax+8) *(eax+0xc))
16257 $check-mu-index-stmt:check-single-inout:
16258 3d/compare-eax-and 0/imm32
16259 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-inouts/disp32
16260 (lookup *eax *(eax+4))
16261 89/<- %ecx 0/r32/eax
16262
16263
16264 (lookup *(ecx+8) *(ecx+0xc))
16265 89/<- %edx 0/r32/eax
16266
16267 81 7/subop/compare *edx 0/imm32/false
16268 {
16269 74/jump-if-= break/disp8
16270 $check-mu-index-stmt:index-type-is-atom:
16271 (is-simple-mu-type? %edx 0)
16272 3d/compare-eax-and 0/imm32/false
16273 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
16274 (is-simple-mu-type? %edx 1)
16275 3d/compare-eax-and 0/imm32/false
16276 75/jump-if-!= $check-mu-index-stmt:index-type-done/disp8
16277 (is-simple-mu-type? %edx 7)
16278 3d/compare-eax-and 0/imm32/false
16279 0f 85/jump-if-!= $check-mu-index-stmt:error-index-offset-atom-type/disp32
16280 e9/jump $check-mu-index-stmt:error-invalid-index-type/disp32
16281 }
16282
16283 {
16284 75/jump-if-!= break/disp8
16285 $check-mu-index-stmt:index-type-is-non-atom:
16286 (lookup *(edx+4) *(edx+8))
16287 (is-simple-mu-type? %eax 7)
16288 3d/compare-eax-and 0/imm32/false
16289 0f 84/jump-if-= $check-mu-index-stmt:error-invalid-index-type/disp32
16290 }
16291 $check-mu-index-stmt:index-type-done:
16292
16293 {
16294 (is-simple-mu-type? %edx 0)
16295 3d/compare-eax-and 0/imm32/false
16296 75/jump-if-!= break/disp8
16297 $check-mu-index-stmt:check-index-in-register:
16298 81 7/subop/compare *(ecx+0x18) 0/imm32
16299 0f 84/jump-if-= $check-mu-index-stmt:error-index-on-stack/disp32
16300 }
16301
16302 {
16303 (is-simple-mu-type? %edx 1)
16304 3d/compare-eax-and 0/imm32/false
16305 74/jump-if-= break/disp8
16306 $check-mu-index-stmt:check-index-can-be-int:
16307 (lookup *(esi+0xc) *(esi+0x10))
16308 (lookup *eax *(eax+4))
16309 (array-element-size %eax)
16310 3d/compare-eax-and 1/imm32
16311 74/jump-if-= break/disp8
16312 3d/compare-eax-and 2/imm32
16313 74/jump-if-= break/disp8
16314 3d/compare-eax-and 4/imm32
16315 74/jump-if-= break/disp8
16316 3d/compare-eax-and 8/imm32
16317 74/jump-if-= break/disp8
16318 e9/jump $check-mu-index-stmt:error-index-needs-offset/disp32
16319 }
16320
16321 (lookup *(esi+0xc) *(esi+0x10))
16322 (lookup *(eax+8) *(eax+0xc))
16323 (lookup *(eax+8) *(eax+0xc))
16324 3d/compare-eax-and 0/imm32/false
16325 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-inouts/disp32
16326
16327
16328 (lookup *(esi+0x14) *(esi+0x18))
16329 3d/compare-eax-and 0/imm32/false
16330 0f 84/jump-if-= $check-mu-index-stmt:error-too-few-outputs/disp32
16331 (lookup *eax *(eax+4))
16332 89/<- %edi 0/r32/eax
16333
16334
16335 (lookup *(edi+8) *(edi+0xc))
16336 89/<- %edx 0/r32/eax
16337 81 7/subop/compare *edx 0/imm32/false
16338 0f 85/jump-if-!= $check-mu-index-stmt:error-output-type-not-address/disp32
16339
16340 (lookup *(edx+4) *(edx+8))
16341 (is-simple-mu-type? %eax 2)
16342 3d/compare-eax-and 0/imm32/false
16343 0f 84/jump-if-= $check-mu-index-stmt:error-output-type-not-address/disp32
16344
16345 (type-tail %ebx)
16346 89/<- %ebx 0/r32/eax
16347 (type-tail %edx)
16348 (type-equal? %ebx %eax)
16349 3d/compare-eax-and 0/imm32/false
16350 0f 84/jump-if-= $check-mu-index-stmt:error-bad-output-type/disp32
16351
16352 (lookup *(esi+0x14) *(esi+0x18))
16353 (lookup *(eax+8) *(eax+0xc))
16354 3d/compare-eax-and 0/imm32/false
16355 0f 85/jump-if-!= $check-mu-index-stmt:error-too-many-outputs/disp32
16356 $check-mu-index-stmt:end:
16357
16358 5f/pop-to-edi
16359 5e/pop-to-esi
16360 5b/pop-to-ebx
16361 5a/pop-to-edx
16362 59/pop-to-ecx
16363 58/pop-to-eax
16364
16365 89/<- %esp 5/r32/ebp
16366 5d/pop-to-ebp
16367 c3/return
16368
16369 $check-mu-index-stmt:error-base-non-array-type:
16370 (write-buffered *(ebp+0x10) "fn ")
16371 8b/-> *(ebp+0xc) 0/r32/eax
16372 (lookup *eax *(eax+4))
16373 (write-buffered *(ebp+0x10) %eax)
16374 (write-buffered *(ebp+0x10) ": stmt index: var '")
16375 (lookup *ecx *(ecx+4))
16376 (write-buffered *(ebp+0x10) %eax)
16377 (write-buffered *(ebp+0x10) "' is not an array\n")
16378 (flush *(ebp+0x10))
16379 (stop *(ebp+0x14) 1)
16380
16381
16382 $check-mu-index-stmt:error-base-array-atom-type:
16383 (write-buffered *(ebp+0x10) "fn ")
16384 8b/-> *(ebp+0xc) 0/r32/eax
16385 (lookup *eax *(eax+4))
16386 (write-buffered *(ebp+0x10) %eax)
16387 (write-buffered *(ebp+0x10) ": stmt index: array '")
16388 (lookup *ecx *(ecx+4))
16389 (write-buffered *(ebp+0x10) %eax)
16390 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
16391 (flush *(ebp+0x10))
16392 (stop *(ebp+0x14) 1)
16393
16394
16395 $check-mu-index-stmt:error-base-address-array-type-on-stack:
16396 (write-buffered *(ebp+0x10) "fn ")
16397 8b/-> *(ebp+0xc) 0/r32/eax
16398 (lookup *eax *(eax+4))
16399 (write-buffered *(ebp+0x10) %eax)
16400 (write-buffered *(ebp+0x10) ": stmt index: var '")
16401 (lookup *ecx *(ecx+4))
16402 (write-buffered *(ebp+0x10) %eax)
16403 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
16404 (flush *(ebp+0x10))
16405 (stop *(ebp+0x14) 1)
16406
16407
16408 $check-mu-index-stmt:error-base-array-type-in-register:
16409 (write-buffered *(ebp+0x10) "fn ")
16410 8b/-> *(ebp+0xc) 0/r32/eax
16411 (lookup *eax *(eax+4))
16412 (write-buffered *(ebp+0x10) %eax)
16413 (write-buffered *(ebp+0x10) ": stmt index: var '")
16414 (lookup *ecx *(ecx+4))
16415 (write-buffered *(ebp+0x10) %eax)
16416 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
16417 (flush *(ebp+0x10))
16418 (stop *(ebp+0x14) 1)
16419
16420
16421 $check-mu-index-stmt:error-too-few-inouts:
16422 (write-buffered *(ebp+0x10) "fn ")
16423 8b/-> *(ebp+0xc) 0/r32/eax
16424 (lookup *eax *(eax+4))
16425 (write-buffered *(ebp+0x10) %eax)
16426 (write-buffered *(ebp+0x10) ": stmt index: too few inouts (2 required)\n")
16427 (flush *(ebp+0x10))
16428 (stop *(ebp+0x14) 1)
16429
16430
16431 $check-mu-index-stmt:error-invalid-index-type:
16432 (write-buffered *(ebp+0x10) "fn ")
16433 8b/-> *(ebp+0xc) 0/r32/eax
16434 (lookup *eax *(eax+4))
16435 (write-buffered *(ebp+0x10) %eax)
16436 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
16437 (lookup *ecx *(ecx+4))
16438 (write-buffered *(ebp+0x10) %eax)
16439 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
16440 (flush *(ebp+0x10))
16441 (stop *(ebp+0x14) 1)
16442
16443
16444 $check-mu-index-stmt:error-index-offset-atom-type:
16445 (write-buffered *(ebp+0x10) "fn ")
16446 8b/-> *(ebp+0xc) 0/r32/eax
16447 (lookup *eax *(eax+4))
16448 (write-buffered *(ebp+0x10) %eax)
16449 (write-buffered *(ebp+0x10) ": stmt index: offset '")
16450 (lookup *ecx *(ecx+4))
16451 (write-buffered *(ebp+0x10) %eax)
16452 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
16453 (flush *(ebp+0x10))
16454 (stop *(ebp+0x14) 1)
16455
16456
16457 $check-mu-index-stmt:error-index-on-stack:
16458 (write-buffered *(ebp+0x10) "fn ")
16459 8b/-> *(ebp+0xc) 0/r32/eax
16460 (lookup *eax *(eax+4))
16461 (write-buffered *(ebp+0x10) %eax)
16462 (write-buffered *(ebp+0x10) ": stmt index: second argument '")
16463 (lookup *ecx *(ecx+4))
16464 (write-buffered *(ebp+0x10) %eax)
16465 (write-buffered *(ebp+0x10) "' must be in a register\n")
16466 (flush *(ebp+0x10))
16467 (stop *(ebp+0x14) 1)
16468
16469
16470 $check-mu-index-stmt:error-index-needs-offset:
16471 (write-buffered *(ebp+0x10) "fn ")
16472 8b/-> *(ebp+0xc) 0/r32/eax
16473 (lookup *eax *(eax+4))
16474 (write-buffered *(ebp+0x10) %eax)
16475 (write-buffered *(ebp+0x10) ": stmt index: cannot take an int for array '")
16476 (lookup *(esi+0xc) *(esi+0x10))
16477 (lookup *eax *(eax+4))
16478 (lookup *eax *(eax+4))
16479 (write-buffered *(ebp+0x10) %eax)
16480 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
16481 (flush *(ebp+0x10))
16482 (stop *(ebp+0x14) 1)
16483
16484
16485 $check-mu-index-stmt:error-too-many-inouts:
16486 (write-buffered *(ebp+0x10) "fn ")
16487 8b/-> *(ebp+0xc) 0/r32/eax
16488 (lookup *eax *(eax+4))
16489 (write-buffered *(ebp+0x10) %eax)
16490 (write-buffered *(ebp+0x10) ": stmt index: too many inouts (2 required)\n")
16491 (flush *(ebp+0x10))
16492 (stop *(ebp+0x14) 1)
16493
16494
16495 $check-mu-index-stmt:error-too-few-outputs:
16496 (write-buffered *(ebp+0x10) "fn ")
16497 8b/-> *(ebp+0xc) 0/r32/eax
16498 (lookup *eax *(eax+4))
16499 (write-buffered *(ebp+0x10) %eax)
16500 (write-buffered *(ebp+0x10) ": stmt index: must have an output\n")
16501 (flush *(ebp+0x10))
16502 (stop *(ebp+0x14) 1)
16503
16504
16505 $check-mu-index-stmt:error-too-many-outputs:
16506 (write-buffered *(ebp+0x10) "fn ")
16507 8b/-> *(ebp+0xc) 0/r32/eax
16508 (lookup *eax *(eax+4))
16509 (write-buffered *(ebp+0x10) %eax)
16510 (write-buffered *(ebp+0x10) ": stmt index: too many outputs (1 required)\n")
16511 (flush *(ebp+0x10))
16512 (stop *(ebp+0x14) 1)
16513
16514
16515 $check-mu-index-stmt:error-output-not-in-register:
16516 (write-buffered *(ebp+0x10) "fn ")
16517 8b/-> *(ebp+0xc) 0/r32/eax
16518 (lookup *eax *(eax+4))
16519 (write-buffered *(ebp+0x10) %eax)
16520 (write-buffered *(ebp+0x10) ": stmt index: output '")
16521 (lookup *edi *(edi+4))
16522 (write-buffered *(ebp+0x10) %eax)
16523 (write-buffered *(ebp+0x10) "' is not in a register\n")
16524 (flush *(ebp+0x10))
16525 (stop *(ebp+0x14) 1)
16526
16527
16528 $check-mu-index-stmt:error-output-type-not-address:
16529 (write-buffered *(ebp+0x10) "fn ")
16530 8b/-> *(ebp+0xc) 0/r32/eax
16531 (lookup *eax *(eax+4))
16532 (write-buffered *(ebp+0x10) %eax)
16533 (write-buffered *(ebp+0x10) ": stmt index: output '")
16534 (lookup *edi *(edi+4))
16535 (write-buffered *(ebp+0x10) %eax)
16536 (write-buffered *(ebp+0x10) "' must be an addr\n")
16537 (flush *(ebp+0x10))
16538 (stop *(ebp+0x14) 1)
16539
16540
16541 $check-mu-index-stmt:error-bad-output-type:
16542 (write-buffered *(ebp+0x10) "fn ")
16543 8b/-> *(ebp+0xc) 0/r32/eax
16544 (lookup *eax *(eax+4))
16545 (write-buffered *(ebp+0x10) %eax)
16546 (write-buffered *(ebp+0x10) ": stmt index: output '")
16547 (lookup *edi *(edi+4))
16548 (write-buffered *(ebp+0x10) %eax)
16549 (write-buffered *(ebp+0x10) "' does not have the right type\n")
16550 (flush *(ebp+0x10))
16551 (stop *(ebp+0x14) 1)
16552
16553
16554 check-mu-length-stmt:
16555
16556 55/push-ebp
16557 89/<- %ebp 4/r32/esp
16558
16559 50/push-eax
16560 51/push-ecx
16561 52/push-edx
16562 53/push-ebx
16563 56/push-esi
16564 57/push-edi
16565
16566 8b/-> *(ebp+8) 6/r32/esi
16567
16568
16569 (lookup *(esi+0xc) *(esi+0x10))
16570 $check-mu-length-stmt:check-no-inouts:
16571 3d/compare-eax-and 0/imm32
16572 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-inouts/disp32
16573 (lookup *eax *(eax+4))
16574 89/<- %ecx 0/r32/eax
16575
16576
16577 (lookup *(ecx+8) *(ecx+0xc))
16578 89/<- %ebx 0/r32/eax
16579
16580 81 7/subop/compare *ebx 0/imm32/false
16581 {
16582 74/jump-if-= break/disp8
16583 (is-simple-mu-type? %ebx 3)
16584 3d/compare-eax-and 0/imm32/false
16585 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-atom-type/disp32
16586 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
16587 }
16588 $check-mu-length-stmt:base-is-compound:
16589
16590 {
16591 (lookup *(ebx+4) *(ebx+8))
16592 (is-simple-mu-type? %eax 2)
16593 3d/compare-eax-and 0/imm32/false
16594 75/jump-if-!= break/disp8
16595 (lookup *(ebx+4) *(ebx+8))
16596 (is-simple-mu-type? %eax 3)
16597 3d/compare-eax-and 0/imm32/false
16598 75/jump-if-!= break/disp8
16599 e9/jump $check-mu-length-stmt:error-base-non-array-type/disp32
16600 }
16601
16602 {
16603 (lookup *(ebx+4) *(ebx+8))
16604 (is-simple-mu-type? %eax 2)
16605 3d/compare-eax-and 0/imm32/false
16606 74/jump-if-= break/disp8
16607 $check-mu-length-stmt:base-is-addr:
16608 (lookup *(ebx+0xc) *(ebx+0x10))
16609 (lookup *(eax+4) *(eax+8))
16610 (is-simple-mu-type? %eax 3)
16611 3d/compare-eax-and 0/imm32/false
16612 0f 84/jump-if-= $check-mu-length-stmt:error-base-non-array-type/disp32
16613 $check-mu-length-stmt:check-base-addr-is-register:
16614 81 7/subop/compare *(ecx+0x18) 0/imm32
16615 0f 84/jump-if-= $check-mu-length-stmt:error-base-address-array-type-on-stack/disp32
16616 }
16617
16618 {
16619 (lookup *(ebx+4) *(ebx+8))
16620 (is-simple-mu-type? %eax 3)
16621 3d/compare-eax-and 0/imm32/false
16622 74/jump-if-= break/disp8
16623 $check-mu-length-stmt:base-is-array:
16624 81 7/subop/compare *(ecx+0x18) 0/imm32
16625 0f 85/jump-if-!= $check-mu-length-stmt:error-base-array-type-in-register/disp32
16626 }
16627
16628 {
16629 (lookup *(ebx+4) *(ebx+8))
16630 (is-simple-mu-type? %eax 2)
16631 3d/compare-eax-and 0/imm32/false
16632 74/jump-if-= break/disp8
16633 (lookup *(ebx+0xc) *(ebx+0x10))
16634 89/<- %ebx 0/r32/eax
16635 }
16636
16637 (lookup *(esi+0xc) *(esi+0x10))
16638 (lookup *(eax+8) *(eax+0xc))
16639 3d/compare-eax-and 0/imm32/false
16640 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-inouts/disp32
16641
16642
16643 (lookup *(esi+0x14) *(esi+0x18))
16644 3d/compare-eax-and 0/imm32/false
16645 0f 84/jump-if-= $check-mu-length-stmt:error-too-few-outputs/disp32
16646 (lookup *eax *(eax+4))
16647 89/<- %edi 0/r32/eax
16648
16649
16650 (lookup *(edi+8) *(edi+0xc))
16651 (is-simple-mu-type? %eax 1)
16652 3d/compare-eax-and 0/imm32/false
16653 0f 84/jump-if-= $check-mu-length-stmt:error-invalid-output-type/disp32
16654
16655 (lookup *(esi+0x14) *(esi+0x18))
16656 (lookup *(eax+8) *(eax+0xc))
16657 3d/compare-eax-and 0/imm32/false
16658 0f 85/jump-if-!= $check-mu-length-stmt:error-too-many-outputs/disp32
16659 $check-mu-length-stmt:end:
16660
16661 5f/pop-to-edi
16662 5e/pop-to-esi
16663 5b/pop-to-ebx
16664 5a/pop-to-edx
16665 59/pop-to-ecx
16666 58/pop-to-eax
16667
16668 89/<- %esp 5/r32/ebp
16669 5d/pop-to-ebp
16670 c3/return
16671
16672 $check-mu-length-stmt:error-base-non-array-type:
16673 (write-buffered *(ebp+0x10) "fn ")
16674 8b/-> *(ebp+0xc) 0/r32/eax
16675 (lookup *eax *(eax+4))
16676 (write-buffered *(ebp+0x10) %eax)
16677 (write-buffered *(ebp+0x10) ": stmt length: var '")
16678 (lookup *ecx *(ecx+4))
16679 (write-buffered *(ebp+0x10) %eax)
16680 (write-buffered *(ebp+0x10) "' is not an array\n")
16681 (flush *(ebp+0x10))
16682 (stop *(ebp+0x14) 1)
16683
16684
16685 $check-mu-length-stmt:error-base-array-atom-type:
16686 (write-buffered *(ebp+0x10) "fn ")
16687 8b/-> *(ebp+0xc) 0/r32/eax
16688 (lookup *eax *(eax+4))
16689 (write-buffered *(ebp+0x10) %eax)
16690 (write-buffered *(ebp+0x10) ": stmt length: array '")
16691 (lookup *ecx *(ecx+4))
16692 (write-buffered *(ebp+0x10) %eax)
16693 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
16694 (flush *(ebp+0x10))
16695 (stop *(ebp+0x14) 1)
16696
16697
16698 $check-mu-length-stmt:error-base-address-array-type-on-stack:
16699 (write-buffered *(ebp+0x10) "fn ")
16700 8b/-> *(ebp+0xc) 0/r32/eax
16701 (lookup *eax *(eax+4))
16702 (write-buffered *(ebp+0x10) %eax)
16703 (write-buffered *(ebp+0x10) ": stmt length: var '")
16704 (lookup *ecx *(ecx+4))
16705 (write-buffered *(ebp+0x10) %eax)
16706 (write-buffered *(ebp+0x10) "' is an addr to an array, and so must live in a register\n")
16707 (flush *(ebp+0x10))
16708 (stop *(ebp+0x14) 1)
16709
16710
16711 $check-mu-length-stmt:error-base-array-type-in-register:
16712 (write-buffered *(ebp+0x10) "fn ")
16713 8b/-> *(ebp+0xc) 0/r32/eax
16714 (lookup *eax *(eax+4))
16715 (write-buffered *(ebp+0x10) %eax)
16716 (write-buffered *(ebp+0x10) ": stmt length: var '")
16717 (lookup *ecx *(ecx+4))
16718 (write-buffered *(ebp+0x10) %eax)
16719 (write-buffered *(ebp+0x10) "' is an array, and so must live on the stack\n")
16720 (flush *(ebp+0x10))
16721 (stop *(ebp+0x14) 1)
16722
16723
16724 $check-mu-length-stmt:error-too-few-inouts:
16725 (write-buffered *(ebp+0x10) "fn ")
16726 8b/-> *(ebp+0xc) 0/r32/eax
16727 (lookup *eax *(eax+4))
16728 (write-buffered *(ebp+0x10) %eax)
16729 (write-buffered *(ebp+0x10) ": stmt length: too few inouts (1 required)\n")
16730 (flush *(ebp+0x10))
16731 (stop *(ebp+0x14) 1)
16732
16733
16734 $check-mu-length-stmt:error-invalid-index-type:
16735 (write-buffered *(ebp+0x10) "fn ")
16736 8b/-> *(ebp+0xc) 0/r32/eax
16737 (lookup *eax *(eax+4))
16738 (write-buffered *(ebp+0x10) %eax)
16739 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
16740 (lookup *ecx *(ecx+4))
16741 (write-buffered *(ebp+0x10) %eax)
16742 (write-buffered *(ebp+0x10) "' must be an int or offset\n")
16743 (flush *(ebp+0x10))
16744 (stop *(ebp+0x14) 1)
16745
16746
16747 $check-mu-length-stmt:error-index-offset-atom-type:
16748 (write-buffered *(ebp+0x10) "fn ")
16749 8b/-> *(ebp+0xc) 0/r32/eax
16750 (lookup *eax *(eax+4))
16751 (write-buffered *(ebp+0x10) %eax)
16752 (write-buffered *(ebp+0x10) ": stmt length: offset '")
16753 (lookup *ecx *(ecx+4))
16754 (write-buffered *(ebp+0x10) %eax)
16755 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
16756 (flush *(ebp+0x10))
16757 (stop *(ebp+0x14) 1)
16758
16759
16760 $check-mu-length-stmt:error-index-on-stack:
16761 (write-buffered *(ebp+0x10) "fn ")
16762 8b/-> *(ebp+0xc) 0/r32/eax
16763 (lookup *eax *(eax+4))
16764 (write-buffered *(ebp+0x10) %eax)
16765 (write-buffered *(ebp+0x10) ": stmt length: second argument '")
16766 (lookup *ecx *(ecx+4))
16767 (write-buffered *(ebp+0x10) %eax)
16768 (write-buffered *(ebp+0x10) "' must be in a register\n")
16769 (flush *(ebp+0x10))
16770 (stop *(ebp+0x14) 1)
16771
16772
16773 $check-mu-length-stmt:error-index-needs-offset:
16774 (write-buffered *(ebp+0x10) "fn ")
16775 8b/-> *(ebp+0xc) 0/r32/eax
16776 (lookup *eax *(eax+4))
16777 (write-buffered *(ebp+0x10) %eax)
16778 (write-buffered *(ebp+0x10) ": stmt length: cannot take an int for array '")
16779 (lookup *(esi+0xc) *(esi+0x10))
16780 (lookup *eax *(eax+4))
16781 (lookup *eax *(eax+4))
16782 (write-buffered *(ebp+0x10) %eax)
16783 (write-buffered *(ebp+0x10) "'; create an offset instead. See mu.md for details.\n")
16784 (flush *(ebp+0x10))
16785 (stop *(ebp+0x14) 1)
16786
16787
16788 $check-mu-length-stmt:error-too-many-inouts:
16789 (write-buffered *(ebp+0x10) "fn ")
16790 8b/-> *(ebp+0xc) 0/r32/eax
16791 (lookup *eax *(eax+4))
16792 (write-buffered *(ebp+0x10) %eax)
16793 (write-buffered *(ebp+0x10) ": stmt length: too many inouts (1 required)\n")
16794 (flush *(ebp+0x10))
16795 (stop *(ebp+0x14) 1)
16796
16797
16798 $check-mu-length-stmt:error-too-few-outputs:
16799 (write-buffered *(ebp+0x10) "fn ")
16800 8b/-> *(ebp+0xc) 0/r32/eax
16801 (lookup *eax *(eax+4))
16802 (write-buffered *(ebp+0x10) %eax)
16803 (write-buffered *(ebp+0x10) ": stmt length: must have an output\n")
16804 (flush *(ebp+0x10))
16805 (stop *(ebp+0x14) 1)
16806
16807
16808 $check-mu-length-stmt:error-too-many-outputs:
16809 (write-buffered *(ebp+0x10) "fn ")
16810 8b/-> *(ebp+0xc) 0/r32/eax
16811 (lookup *eax *(eax+4))
16812 (write-buffered *(ebp+0x10) %eax)
16813 (write-buffered *(ebp+0x10) ": stmt length: too many outputs (1 required)\n")
16814 (flush *(ebp+0x10))
16815 (stop *(ebp+0x14) 1)
16816
16817
16818 $check-mu-length-stmt:error-output-not-in-register:
16819 (write-buffered *(ebp+0x10) "fn ")
16820 8b/-> *(ebp+0xc) 0/r32/eax
16821 (lookup *eax *(eax+4))
16822 (write-buffered *(ebp+0x10) %eax)
16823 (write-buffered *(ebp+0x10) ": stmt length: output '")
16824 (lookup *edi *(edi+4))
16825 (write-buffered *(ebp+0x10) %eax)
16826 (write-buffered *(ebp+0x10) "' is not in a register\n")
16827 (flush *(ebp+0x10))
16828 (stop *(ebp+0x14) 1)
16829
16830
16831 $check-mu-length-stmt:error-invalid-output-type:
16832 (write-buffered *(ebp+0x10) "fn ")
16833 8b/-> *(ebp+0xc) 0/r32/eax
16834 (lookup *eax *(eax+4))
16835 (write-buffered *(ebp+0x10) %eax)
16836 (write-buffered *(ebp+0x10) ": stmt length: output '")
16837 (lookup *edi *(edi+4))
16838 (write-buffered *(ebp+0x10) %eax)
16839 (write-buffered *(ebp+0x10) "' does not have the right type\n")
16840 (flush *(ebp+0x10))
16841 (stop *(ebp+0x14) 1)
16842
16843
16844 check-mu-compute-offset-stmt:
16845
16846 55/push-ebp
16847 89/<- %ebp 4/r32/esp
16848
16849 50/push-eax
16850 51/push-ecx
16851 52/push-edx
16852 53/push-ebx
16853 56/push-esi
16854 57/push-edi
16855
16856 8b/-> *(ebp+8) 6/r32/esi
16857
16858
16859 (lookup *(esi+0xc) *(esi+0x10))
16860 $check-mu-compute-offset-stmt:check-no-inouts:
16861 3d/compare-eax-and 0/imm32
16862 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
16863 (lookup *eax *(eax+4))
16864 89/<- %ecx 0/r32/eax
16865
16866
16867 (lookup *(ecx+8) *(ecx+0xc))
16868 89/<- %ebx 0/r32/eax
16869
16870 81 7/subop/compare *ebx 0/imm32/false
16871 {
16872 74/jump-if-= break/disp8
16873 (is-simple-mu-type? %ebx 3)
16874 3d/compare-eax-and 0/imm32/false
16875 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-base-array-atom-type/disp32
16876 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
16877 }
16878 $check-mu-compute-offset-stmt:base-is-compound:
16879
16880 {
16881 (lookup *(ebx+4) *(ebx+8))
16882 (is-simple-mu-type? %eax 2)
16883 3d/compare-eax-and 0/imm32/false
16884 75/jump-if-!= break/disp8
16885 (lookup *(ebx+4) *(ebx+8))
16886 (is-simple-mu-type? %eax 3)
16887 3d/compare-eax-and 0/imm32/false
16888 75/jump-if-!= break/disp8
16889 e9/jump $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
16890 }
16891
16892 {
16893 (lookup *(ebx+4) *(ebx+8))
16894 (is-simple-mu-type? %eax 2)
16895 3d/compare-eax-and 0/imm32/false
16896 74/jump-if-= break/disp8
16897 $check-mu-compute-offset-stmt:base-is-addr:
16898 (lookup *(ebx+0xc) *(ebx+0x10))
16899 (lookup *(eax+4) *(eax+8))
16900 (is-simple-mu-type? %eax 3)
16901 3d/compare-eax-and 0/imm32/false
16902 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-base-non-array-type/disp32
16903 }
16904
16905 {
16906 (lookup *(ebx+4) *(ebx+8))
16907 (is-simple-mu-type? %eax 2)
16908 3d/compare-eax-and 0/imm32/false
16909 74/jump-if-= break/disp8
16910 (lookup *(ebx+0xc) *(ebx+0x10))
16911 89/<- %ebx 0/r32/eax
16912 }
16913
16914
16915 (lookup *(esi+0xc) *(esi+0x10))
16916 (lookup *(eax+8) *(eax+0xc))
16917 $check-mu-compute-offset-stmt:check-single-inout:
16918 3d/compare-eax-and 0/imm32
16919 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-inouts/disp32
16920 (lookup *eax *(eax+4))
16921 89/<- %ecx 0/r32/eax
16922
16923
16924 (lookup *(ecx+8) *(ecx+0xc))
16925 89/<- %edx 0/r32/eax
16926
16927 81 7/subop/compare *edx 0/imm32/false
16928 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
16929 {
16930 $check-mu-compute-offset-stmt:index-type-is-atom:
16931 (is-simple-mu-type? %edx 0)
16932 3d/compare-eax-and 0/imm32/false
16933 75/jump-if-!= break/disp8
16934 (is-simple-mu-type? %edx 1)
16935 3d/compare-eax-and 0/imm32/false
16936 75/jump-if-!= break/disp8
16937 e9/jump $check-mu-compute-offset-stmt:error-invalid-index-type/disp32
16938 }
16939
16940 (lookup *(esi+0xc) *(esi+0x10))
16941 (lookup *(eax+8) *(eax+0xc))
16942 (lookup *(eax+8) *(eax+0xc))
16943 3d/compare-eax-and 0/imm32/false
16944 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-inouts/disp32
16945
16946
16947 (lookup *(esi+0x14) *(esi+0x18))
16948 3d/compare-eax-and 0/imm32/false
16949 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-too-few-outputs/disp32
16950 (lookup *eax *(eax+4))
16951 89/<- %edi 0/r32/eax
16952
16953
16954 (lookup *(edi+8) *(edi+0xc))
16955 89/<- %edx 0/r32/eax
16956 81 7/subop/compare *edx 0/imm32/false
16957 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
16958
16959 (lookup *(edx+4) *(edx+8))
16960 (is-simple-mu-type? %eax 7)
16961 3d/compare-eax-and 0/imm32/false
16962 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-output-type-not-offset/disp32
16963
16964 (type-tail %ebx)
16965 89/<- %ebx 0/r32/eax
16966 (type-tail %edx)
16967 (type-equal? %ebx %eax)
16968 3d/compare-eax-and 0/imm32/false
16969 0f 84/jump-if-= $check-mu-compute-offset-stmt:error-bad-output-type/disp32
16970
16971 (lookup *(esi+0x14) *(esi+0x18))
16972 (lookup *(eax+8) *(eax+0xc))
16973 3d/compare-eax-and 0/imm32/false
16974 0f 85/jump-if-!= $check-mu-compute-offset-stmt:error-too-many-outputs/disp32
16975 $check-mu-compute-offset-stmt:end:
16976
16977 5f/pop-to-edi
16978 5e/pop-to-esi
16979 5b/pop-to-ebx
16980 5a/pop-to-edx
16981 59/pop-to-ecx
16982 58/pop-to-eax
16983
16984 89/<- %esp 5/r32/ebp
16985 5d/pop-to-ebp
16986 c3/return
16987
16988 $check-mu-compute-offset-stmt:error-base-non-array-type:
16989 (write-buffered *(ebp+0x10) "fn ")
16990 8b/-> *(ebp+0xc) 0/r32/eax
16991 (lookup *eax *(eax+4))
16992 (write-buffered *(ebp+0x10) %eax)
16993 (write-buffered *(ebp+0x10) ": stmt compute-offset: var '")
16994 (lookup *ecx *(ecx+4))
16995 (write-buffered *(ebp+0x10) %eax)
16996 (write-buffered *(ebp+0x10) "' is not an array\n")
16997 (flush *(ebp+0x10))
16998 (stop *(ebp+0x14) 1)
16999
17000
17001 $check-mu-compute-offset-stmt:error-base-array-atom-type:
17002 (write-buffered *(ebp+0x10) "fn ")
17003 8b/-> *(ebp+0xc) 0/r32/eax
17004 (lookup *eax *(eax+4))
17005 (write-buffered *(ebp+0x10) %eax)
17006 (write-buffered *(ebp+0x10) ": stmt compute-offset: array '")
17007 (lookup *ecx *(ecx+4))
17008 (write-buffered *(ebp+0x10) %eax)
17009 (write-buffered *(ebp+0x10) "' must specify the type of its elements\n")
17010 (flush *(ebp+0x10))
17011 (stop *(ebp+0x14) 1)
17012
17013
17014 $check-mu-compute-offset-stmt:error-too-few-inouts:
17015 (write-buffered *(ebp+0x10) "fn ")
17016 8b/-> *(ebp+0xc) 0/r32/eax
17017 (lookup *eax *(eax+4))
17018 (write-buffered *(ebp+0x10) %eax)
17019 (write-buffered *(ebp+0x10) ": stmt compute-offset: too few inouts (2 required)\n")
17020 (flush *(ebp+0x10))
17021 (stop *(ebp+0x14) 1)
17022
17023
17024 $check-mu-compute-offset-stmt:error-invalid-index-type:
17025 (write-buffered *(ebp+0x10) "fn ")
17026 8b/-> *(ebp+0xc) 0/r32/eax
17027 (lookup *eax *(eax+4))
17028 (write-buffered *(ebp+0x10) %eax)
17029 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
17030 (lookup *ecx *(ecx+4))
17031 (write-buffered *(ebp+0x10) %eax)
17032 (write-buffered *(ebp+0x10) "' must be an int\n")
17033 (flush *(ebp+0x10))
17034 (stop *(ebp+0x14) 1)
17035
17036
17037 $check-mu-compute-offset-stmt:error-index-offset-atom-type:
17038 (write-buffered *(ebp+0x10) "fn ")
17039 8b/-> *(ebp+0xc) 0/r32/eax
17040 (lookup *eax *(eax+4))
17041 (write-buffered *(ebp+0x10) %eax)
17042 (write-buffered *(ebp+0x10) ": stmt compute-offset: offset '")
17043 (lookup *ecx *(ecx+4))
17044 (write-buffered *(ebp+0x10) %eax)
17045 (write-buffered *(ebp+0x10) "' must specify the type of array elements\n")
17046 (flush *(ebp+0x10))
17047 (stop *(ebp+0x14) 1)
17048
17049
17050 $check-mu-compute-offset-stmt:error-index-on-stack:
17051 (write-buffered *(ebp+0x10) "fn ")
17052 8b/-> *(ebp+0xc) 0/r32/eax
17053 (lookup *eax *(eax+4))
17054 (write-buffered *(ebp+0x10) %eax)
17055 (write-buffered *(ebp+0x10) ": stmt compute-offset: second argument '")
17056 (lookup *ecx *(ecx+4))
17057 (write-buffered *(ebp+0x10) %eax)
17058 (write-buffered *(ebp+0x10) "' must be in a register\n")
17059 (flush *(ebp+0x10))
17060 (stop *(ebp+0x14) 1)
17061
17062
17063 $check-mu-compute-offset-stmt:error-too-many-inouts:
17064 (write-buffered *(ebp+0x10) "fn ")
17065 8b/-> *(ebp+0xc) 0/r32/eax
17066 (lookup *eax *(eax+4))
17067 (write-buffered *(ebp+0x10) %eax)
17068 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many inouts (2 required)\n")
17069 (flush *(ebp+0x10))
17070 (stop *(ebp+0x14) 1)
17071
17072
17073 $check-mu-compute-offset-stmt:error-too-few-outputs:
17074 (write-buffered *(ebp+0x10) "fn ")
17075 8b/-> *(ebp+0xc) 0/r32/eax
17076 (lookup *eax *(eax+4))
17077 (write-buffered *(ebp+0x10) %eax)
17078 (write-buffered *(ebp+0x10) ": stmt compute-offset: must have an output\n")
17079 (flush *(ebp+0x10))
17080 (stop *(ebp+0x14) 1)
17081
17082
17083 $check-mu-compute-offset-stmt:error-too-many-outputs:
17084 (write-buffered *(ebp+0x10) "fn ")
17085 8b/-> *(ebp+0xc) 0/r32/eax
17086 (lookup *eax *(eax+4))
17087 (write-buffered *(ebp+0x10) %eax)
17088 (write-buffered *(ebp+0x10) ": stmt compute-offset: too many outputs (1 required)\n")
17089 (flush *(ebp+0x10))
17090 (stop *(ebp+0x14) 1)
17091
17092
17093 $check-mu-compute-offset-stmt:error-output-not-in-register:
17094 (write-buffered *(ebp+0x10) "fn ")
17095 8b/-> *(ebp+0xc) 0/r32/eax
17096 (lookup *eax *(eax+4))
17097 (write-buffered *(ebp+0x10) %eax)
17098 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
17099 (lookup *edi *(edi+4))
17100 (write-buffered *(ebp+0x10) %eax)
17101 (write-buffered *(ebp+0x10) "' is not in a register\n")
17102 (flush *(ebp+0x10))
17103 (stop *(ebp+0x14) 1)
17104
17105
17106 $check-mu-compute-offset-stmt:error-output-type-not-offset:
17107 (write-buffered *(ebp+0x10) "fn ")
17108 8b/-> *(ebp+0xc) 0/r32/eax
17109 (lookup *eax *(eax+4))
17110 (write-buffered *(ebp+0x10) %eax)
17111 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
17112 (lookup *edi *(edi+4))
17113 (write-buffered *(ebp+0x10) %eax)
17114 (write-buffered *(ebp+0x10) "' must be an offset\n")
17115 (flush *(ebp+0x10))
17116 (stop *(ebp+0x14) 1)
17117
17118
17119 $check-mu-compute-offset-stmt:error-bad-output-type:
17120 (write-buffered *(ebp+0x10) "fn ")
17121 8b/-> *(ebp+0xc) 0/r32/eax
17122 (lookup *eax *(eax+4))
17123 (write-buffered *(ebp+0x10) %eax)
17124 (write-buffered *(ebp+0x10) ": stmt compute-offset: output '")
17125 (lookup *edi *(edi+4))
17126 (write-buffered *(ebp+0x10) %eax)
17127 (write-buffered *(ebp+0x10) "' does not have the right type\n")
17128 (flush *(ebp+0x10))
17129 (stop *(ebp+0x14) 1)
17130
17131
17132 check-mu-copy-object-stmt:
17133
17134 55/push-ebp
17135 89/<- %ebp 4/r32/esp
17136
17137 $check-mu-copy-object-stmt:end:
17138
17139
17140 89/<- %esp 5/r32/ebp
17141 5d/pop-to-ebp
17142 c3/return
17143
17144 check-mu-allocate-stmt:
17145
17146 55/push-ebp
17147 89/<- %ebp 4/r32/esp
17148
17149 $check-mu-allocate-stmt:end:
17150
17151
17152 89/<- %esp 5/r32/ebp
17153 5d/pop-to-ebp
17154 c3/return
17155
17156 check-mu-populate-stmt:
17157
17158 55/push-ebp
17159 89/<- %ebp 4/r32/esp
17160
17161 $check-mu-populate-stmt:end:
17162
17163
17164 89/<- %esp 5/r32/ebp
17165 5d/pop-to-ebp
17166 c3/return
17167
17168 check-mu-populate-stream-stmt:
17169
17170 55/push-ebp
17171 89/<- %ebp 4/r32/esp
17172
17173 $check-mu-populate-stream-stmt:end:
17174
17175
17176 89/<- %esp 5/r32/ebp
17177 5d/pop-to-ebp
17178 c3/return
17179
17180 check-mu-read-from-stream-stmt:
17181
17182 55/push-ebp
17183 89/<- %ebp 4/r32/esp
17184
17185 50/push-eax
17186 51/push-ecx
17187 52/push-edx
17188 53/push-ebx
17189 56/push-esi
17190 57/push-edi
17191
17192 8b/-> *(ebp+8) 6/r32/esi
17193
17194
17195 (lookup *(esi+0xc) *(esi+0x10))
17196 $check-mu-read-from-stream-stmt:check-no-inouts:
17197 3d/compare-eax-and 0/imm32
17198 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
17199 (lookup *eax *(eax+4))
17200 89/<- %ecx 0/r32/eax
17201
17202
17203 (lookup *(ecx+8) *(ecx+0xc))
17204 89/<- %ebx 0/r32/eax
17205 $check-mu-read-from-stream-stmt:check-base-is-compound:
17206
17207 81 7/subop/compare *ebx 0/imm32/false
17208 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
17209 $check-mu-read-from-stream-stmt:check-base-is-addr:
17210
17211 (lookup *(ebx+4) *(ebx+8))
17212 (is-simple-mu-type? %eax 2)
17213 3d/compare-eax-and 0/imm32/false
17214 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
17215 $check-mu-read-from-stream-stmt:check-base-is-addr-to-stream:
17216
17217 (lookup *(ebx+0xc) *(ebx+0x10))
17218 89/<- %ebx 0/r32/eax
17219
17220 (lookup *(eax+4) *(eax+8))
17221 (is-simple-mu-type? %eax 0xb)
17222 3d/compare-eax-and 0/imm32/false
17223 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-base-type/disp32
17224
17225
17226 (lookup *(esi+0xc) *(esi+0x10))
17227 (lookup *(eax+8) *(eax+0xc))
17228 $check-mu-read-from-stream-stmt:check-single-inout:
17229 3d/compare-eax-and 0/imm32
17230 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-too-few-inouts/disp32
17231 (lookup *eax *(eax+4))
17232 89/<- %ecx 0/r32/eax
17233
17234 (lookup *(ecx+8) *(ecx+0xc))
17235 89/<- %edx 0/r32/eax
17236
17237 $check-mu-read-from-stream-stmt:check-target-is-compound:
17238 81 7/subop/compare *edx 0/imm32/false
17239 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
17240 $check-mu-read-from-stream-stmt:check-target-type:
17241
17242 (lookup *(edx+4) *(edx+8))
17243 (is-simple-mu-type? %eax 2)
17244 3d/compare-eax-and 0/imm32/false
17245 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-target-type-not-address/disp32
17246
17247 (type-tail %ebx)
17248 89/<- %ebx 0/r32/eax
17249 (type-tail %edx)
17250 (type-equal? %ebx %eax)
17251 3d/compare-eax-and 0/imm32/false
17252 0f 84/jump-if-= $check-mu-read-from-stream-stmt:error-invalid-target-type/disp32
17253 $check-mu-read-from-stream-stmt:check-too-many-inouts:
17254
17255 (lookup *(esi+0xc) *(esi+0x10))
17256 (lookup *(eax+8) *(eax+0xc))
17257 (lookup *(eax+8) *(eax+0xc))
17258 3d/compare-eax-and 0/imm32/false
17259 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-too-many-inouts/disp32
17260 $check-mu-read-from-stream-stmt:check-unexpected-output:
17261
17262 (lookup *(esi+0x14) *(esi+0x18))
17263 3d/compare-eax-and 0/imm32/false
17264 0f 85/jump-if-!= $check-mu-read-from-stream-stmt:error-unexpected-output/disp32
17265 $check-mu-read-from-stream-stmt:end:
17266
17267 5f/pop-to-edi
17268 5e/pop-to-esi
17269 5b/pop-to-ebx
17270 5a/pop-to-edx
17271 59/pop-to-ecx
17272 58/pop-to-eax
17273
17274 89/<- %esp 5/r32/ebp
17275 5d/pop-to-ebp
17276 c3/return
17277
17278 $check-mu-read-from-stream-stmt:error-invalid-base-type:
17279 (write-buffered *(ebp+0x10) "fn ")
17280 8b/-> *(ebp+0xc) 0/r32/eax
17281 (lookup *eax *(eax+4))
17282 (write-buffered *(ebp+0x10) %eax)
17283 (write-buffered *(ebp+0x10) ": stmt read-from-stream: var '")
17284 (lookup *ecx *(ecx+4))
17285 (write-buffered *(ebp+0x10) %eax)
17286 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
17287 (flush *(ebp+0x10))
17288 (stop *(ebp+0x14) 1)
17289
17290
17291 $check-mu-read-from-stream-stmt:error-too-few-inouts:
17292 (write-buffered *(ebp+0x10) "fn ")
17293 8b/-> *(ebp+0xc) 0/r32/eax
17294 (lookup *eax *(eax+4))
17295 (write-buffered *(ebp+0x10) %eax)
17296 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too few inouts (2 required)\n")
17297 (flush *(ebp+0x10))
17298 (stop *(ebp+0x14) 1)
17299
17300
17301 $check-mu-read-from-stream-stmt:error-target-type-not-address:
17302 (write-buffered *(ebp+0x10) "fn ")
17303 8b/-> *(ebp+0xc) 0/r32/eax
17304 (lookup *eax *(eax+4))
17305 (write-buffered *(ebp+0x10) %eax)
17306 (write-buffered *(ebp+0x10) ": stmt read-from-stream: target '")
17307 (lookup *ecx *(ecx+4))
17308 (write-buffered *(ebp+0x10) %eax)
17309 (write-buffered *(ebp+0x10) "' must be an addr\n")
17310 (flush *(ebp+0x10))
17311 (stop *(ebp+0x14) 1)
17312
17313
17314 $check-mu-read-from-stream-stmt:error-invalid-target-type:
17315 (write-buffered *(ebp+0x10) "fn ")
17316 8b/-> *(ebp+0xc) 0/r32/eax
17317 (lookup *eax *(eax+4))
17318 (write-buffered *(ebp+0x10) %eax)
17319 (write-buffered *(ebp+0x10) ": stmt read-from-stream: second inout '")
17320 (lookup *ecx *(ecx+4))
17321 (write-buffered *(ebp+0x10) %eax)
17322 (write-buffered *(ebp+0x10) "' does not have the right type\n")
17323 (flush *(ebp+0x10))
17324 (stop *(ebp+0x14) 1)
17325
17326
17327 $check-mu-read-from-stream-stmt:error-too-many-inouts:
17328 (write-buffered *(ebp+0x10) "fn ")
17329 8b/-> *(ebp+0xc) 0/r32/eax
17330 (lookup *eax *(eax+4))
17331 (write-buffered *(ebp+0x10) %eax)
17332 (write-buffered *(ebp+0x10) ": stmt read-from-stream: too many inouts (2 required)\n")
17333 (flush *(ebp+0x10))
17334 (stop *(ebp+0x14) 1)
17335
17336
17337 $check-mu-read-from-stream-stmt:error-unexpected-output:
17338 (write-buffered *(ebp+0x10) "fn ")
17339 8b/-> *(ebp+0xc) 0/r32/eax
17340 (lookup *eax *(eax+4))
17341 (write-buffered *(ebp+0x10) %eax)
17342 (write-buffered *(ebp+0x10) ": stmt read-from-stream: unexpected output\n")
17343 (flush *(ebp+0x10))
17344 (stop *(ebp+0x14) 1)
17345
17346
17347 check-mu-write-to-stream-stmt:
17348
17349 55/push-ebp
17350 89/<- %ebp 4/r32/esp
17351
17352 50/push-eax
17353 51/push-ecx
17354 52/push-edx
17355 53/push-ebx
17356 56/push-esi
17357 57/push-edi
17358
17359 8b/-> *(ebp+8) 6/r32/esi
17360
17361
17362 (lookup *(esi+0xc) *(esi+0x10))
17363 $check-mu-write-to-stream-stmt:check-no-inouts:
17364 3d/compare-eax-and 0/imm32
17365 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
17366 (lookup *eax *(eax+4))
17367 89/<- %ecx 0/r32/eax
17368
17369
17370 (lookup *(ecx+8) *(ecx+0xc))
17371 89/<- %ebx 0/r32/eax
17372 $check-mu-write-to-stream-stmt:check-base-is-compound:
17373
17374 81 7/subop/compare *ebx 0/imm32/false
17375 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
17376 $check-mu-write-to-stream-stmt:check-base-is-addr:
17377
17378 (lookup *(ebx+4) *(ebx+8))
17379 (is-simple-mu-type? %eax 2)
17380 3d/compare-eax-and 0/imm32/false
17381 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
17382 $check-mu-write-to-stream-stmt:check-base-is-addr-to-stream:
17383
17384 (lookup *(ebx+0xc) *(ebx+0x10))
17385 89/<- %ebx 0/r32/eax
17386
17387 (lookup *(eax+4) *(eax+8))
17388 (is-simple-mu-type? %eax 0xb)
17389 3d/compare-eax-and 0/imm32/false
17390 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-base-type/disp32
17391
17392
17393 (lookup *(esi+0xc) *(esi+0x10))
17394 (lookup *(eax+8) *(eax+0xc))
17395 $check-mu-write-to-stream-stmt:check-single-inout:
17396 3d/compare-eax-and 0/imm32
17397 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-too-few-inouts/disp32
17398 (lookup *eax *(eax+4))
17399 89/<- %ecx 0/r32/eax
17400
17401 (lookup *(ecx+8) *(ecx+0xc))
17402 89/<- %edx 0/r32/eax
17403
17404 $check-mu-write-to-stream-stmt:check-target-is-compound:
17405 81 7/subop/compare *edx 0/imm32/false
17406 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
17407 $check-mu-write-to-stream-stmt:check-target-type:
17408
17409 (lookup *(edx+4) *(edx+8))
17410 (is-simple-mu-type? %eax 2)
17411 3d/compare-eax-and 0/imm32/false
17412 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-target-type-not-address/disp32
17413
17414 (type-tail %ebx)
17415 89/<- %ebx 0/r32/eax
17416 (type-tail %edx)
17417 (type-equal? %ebx %eax)
17418 3d/compare-eax-and 0/imm32/false
17419 0f 84/jump-if-= $check-mu-write-to-stream-stmt:error-invalid-target-type/disp32
17420 $check-mu-write-to-stream-stmt:check-too-many-inouts:
17421
17422 (lookup *(esi+0xc) *(esi+0x10))
17423 (lookup *(eax+8) *(eax+0xc))
17424 (lookup *(eax+8) *(eax+0xc))
17425 3d/compare-eax-and 0/imm32/false
17426 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-too-many-inouts/disp32
17427 $check-mu-write-to-stream-stmt:check-unexpected-output:
17428
17429 (lookup *(esi+0x14) *(esi+0x18))
17430 3d/compare-eax-and 0/imm32/false
17431 0f 85/jump-if-!= $check-mu-write-to-stream-stmt:error-unexpected-output/disp32
17432 $check-mu-write-to-stream-stmt:end:
17433
17434 5f/pop-to-edi
17435 5e/pop-to-esi
17436 5b/pop-to-ebx
17437 5a/pop-to-edx
17438 59/pop-to-ecx
17439 58/pop-to-eax
17440
17441 89/<- %esp 5/r32/ebp
17442 5d/pop-to-ebp
17443 c3/return
17444
17445 $check-mu-write-to-stream-stmt:error-invalid-base-type:
17446 (write-buffered *(ebp+0x10) "fn ")
17447 8b/-> *(ebp+0xc) 0/r32/eax
17448 (lookup *eax *(eax+4))
17449 (write-buffered *(ebp+0x10) %eax)
17450 (write-buffered *(ebp+0x10) ": stmt write-to-stream: var '")
17451 (lookup *ecx *(ecx+4))
17452 (write-buffered *(ebp+0x10) %eax)
17453 (write-buffered *(ebp+0x10) "' must be an addr to a stream\n")
17454 (flush *(ebp+0x10))
17455 (stop *(ebp+0x14) 1)
17456
17457
17458 $check-mu-write-to-stream-stmt:error-too-few-inouts:
17459 (write-buffered *(ebp+0x10) "fn ")
17460 8b/-> *(ebp+0xc) 0/r32/eax
17461 (lookup *eax *(eax+4))
17462 (write-buffered *(ebp+0x10) %eax)
17463 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too few inouts (2 required)\n")
17464 (flush *(ebp+0x10))
17465 (stop *(ebp+0x14) 1)
17466
17467
17468 $check-mu-write-to-stream-stmt:error-target-type-not-address:
17469 (write-buffered *(ebp+0x10) "fn ")
17470 8b/-> *(ebp+0xc) 0/r32/eax
17471 (lookup *eax *(eax+4))
17472 (write-buffered *(ebp+0x10) %eax)
17473 (write-buffered *(ebp+0x10) ": stmt write-to-stream: target '")
17474 (lookup *ecx *(ecx+4))
17475 (write-buffered *(ebp+0x10) %eax)
17476 (write-buffered *(ebp+0x10) "' must be an addr\n")
17477 (flush *(ebp+0x10))
17478 (stop *(ebp+0x14) 1)
17479
17480
17481 $check-mu-write-to-stream-stmt:error-invalid-target-type:
17482 (write-buffered *(ebp+0x10) "fn ")
17483 8b/-> *(ebp+0xc) 0/r32/eax
17484 (lookup *eax *(eax+4))
17485 (write-buffered *(ebp+0x10) %eax)
17486 (write-buffered *(ebp+0x10) ": stmt write-to-stream: second inout '")
17487 (lookup *ecx *(ecx+4))
17488 (write-buffered *(ebp+0x10) %eax)
17489 (write-buffered *(ebp+0x10) "' does not have the right type\n")
17490 (flush *(ebp+0x10))
17491 (stop *(ebp+0x14) 1)
17492
17493
17494 $check-mu-write-to-stream-stmt:error-too-many-inouts:
17495 (write-buffered *(ebp+0x10) "fn ")
17496 8b/-> *(ebp+0xc) 0/r32/eax
17497 (lookup *eax *(eax+4))
17498 (write-buffered *(ebp+0x10) %eax)
17499 (write-buffered *(ebp+0x10) ": stmt write-to-stream: too many inouts (2 required)\n")
17500 (flush *(ebp+0x10))
17501 (stop *(ebp+0x14) 1)
17502
17503
17504 $check-mu-write-to-stream-stmt:error-unexpected-output:
17505 (write-buffered *(ebp+0x10) "fn ")
17506 8b/-> *(ebp+0xc) 0/r32/eax
17507 (lookup *eax *(eax+4))
17508 (write-buffered *(ebp+0x10) %eax)
17509 (write-buffered *(ebp+0x10) ": stmt write-to-stream: unexpected output\n")
17510 (flush *(ebp+0x10))
17511 (stop *(ebp+0x14) 1)
17512
17513
17514 check-mu-convert-stmt:
17515
17516 55/push-ebp
17517 89/<- %ebp 4/r32/esp
17518
17519 $check-mu-convert-stmt:end:
17520
17521
17522 89/<- %esp 5/r32/ebp
17523 5d/pop-to-ebp
17524 c3/return
17525
17526 check-mu-call:
17527
17528 55/push-ebp
17529 89/<- %ebp 4/r32/esp
17530
17531 68/push 0/imm32
17532
17533 81 5/subop/subtract %esp 0x60/imm32
17534 68/push 0x60/imm32/size
17535 68/push 0/imm32/read
17536 68/push 0/imm32/write
17537
17538 89/<- *(ebp-4) 4/r32/esp
17539 (clear-stream *(ebp-4))
17540
17541 50/push-eax
17542 51/push-ecx
17543 52/push-edx
17544 53/push-ebx
17545 56/push-esi
17546 57/push-edi
17547
17548 8b/-> *(ebp+8) 6/r32/esi
17549
17550 8b/-> *(ebp+0xc) 7/r32/edi
17551
17552 (lookup *(esi+0xc) *(esi+0x10))
17553 89/<- %ecx 0/r32/eax
17554
17555 (lookup *(edi+8) *(edi+0xc))
17556 89/<- %edx 0/r32/eax
17557 {
17558 $check-mu-call:check-for-inouts:
17559
17560 81 7/subop/compare %ecx 0/imm32
17561 0f 84/jump-if-= break/disp32
17562
17563 81 7/subop/compare %edx 0/imm32
17564 0f 84/jump-if-= break/disp32
17565 $check-mu-call:check-inout-type:
17566
17567 (lookup *ecx *(ecx+4))
17568
17569 (lookup *(eax+8) *(eax+0xc))
17570 89/<- %ebx 0/r32/eax
17571
17572 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17573 {
17574 74/jump-if-= break/disp8
17575 (lookup *(ebx+0xc) *(ebx+0x10))
17576 89/<- %ebx 0/r32/eax
17577
17578 81 7/subop/compare *(ebx+0xc) 0/imm32
17579 75/jump-if-!= break/disp8
17580 (lookup *(ebx+4) *(ebx+8))
17581 89/<- %ebx 0/r32/eax
17582 }
17583
17584 (lookup *edx *(edx+4))
17585
17586 (lookup *(eax+8) *(eax+0xc))
17587
17588 (type-match? %eax %ebx *(ebp-4))
17589 3d/compare-eax-and 0/imm32/false
17590 {
17591 0f 85/jump-if-!= break/disp32
17592 (write-buffered *(ebp+0x14) "fn ")
17593 8b/-> *(ebp+0x10) 0/r32/eax
17594 (lookup *eax *(eax+4))
17595 (write-buffered *(ebp+0x14) %eax)
17596 (write-buffered *(ebp+0x14) ": call ")
17597 (lookup *edi *(edi+4))
17598 (write-buffered *(ebp+0x14) %eax)
17599 (write-buffered *(ebp+0x14) ": type for inout '")
17600 (lookup *ecx *(ecx+4))
17601 (lookup *eax *(eax+4))
17602 (write-buffered *(ebp+0x14) %eax)
17603 (write-buffered *(ebp+0x14) "' is not right\n")
17604 (flush *(ebp+0x14))
17605 (stop *(ebp+0x18) 1)
17606 }
17607 $check-mu-call:continue-to-next-inout:
17608
17609 (lookup *(ecx+8) *(ecx+0xc))
17610 89/<- %ecx 0/r32/eax
17611
17612 (lookup *(edx+8) *(edx+0xc))
17613 89/<- %edx 0/r32/eax
17614
17615 e9/jump loop/disp32
17616 }
17617 $check-mu-call:check-inout-count:
17618
17619 39/compare %ecx 2/r32/edx
17620 {
17621 0f 84/jump-if-= break/disp32
17622
17623
17624 {
17625 81 7/subop/compare %ecx 0/imm32
17626 0f 84/jump-if-= break/disp32
17627 (write-buffered *(ebp+0x14) "fn ")
17628 8b/-> *(ebp+0x10) 0/r32/eax
17629 (lookup *eax *(eax+4))
17630 (write-buffered *(ebp+0x14) %eax)
17631 (write-buffered *(ebp+0x14) ": call ")
17632 (lookup *edi *(edi+4))
17633 (write-buffered *(ebp+0x14) %eax)
17634 (write-buffered *(ebp+0x14) ": too many inouts\n")
17635 (flush *(ebp+0x14))
17636 (stop *(ebp+0x18) 1)
17637 }
17638
17639 {
17640 81 7/subop/compare %edx 0/imm32
17641 0f 84/jump-if-= break/disp32
17642 (write-buffered *(ebp+0x14) "fn ")
17643 8b/-> *(ebp+0x10) 0/r32/eax
17644 (lookup *eax *(eax+4))
17645 (write-buffered *(ebp+0x14) %eax)
17646 (write-buffered *(ebp+0x14) ": call ")
17647 (lookup *edi *(edi+4))
17648 (write-buffered *(ebp+0x14) %eax)
17649 (write-buffered *(ebp+0x14) ": too few inouts\n")
17650 (flush *(ebp+0x14))
17651 (stop *(ebp+0x18) 1)
17652 }
17653 }
17654 $check-mu-call:check-outputs:
17655
17656 (lookup *(esi+0x14) *(esi+0x18))
17657 89/<- %ecx 0/r32/eax
17658
17659 (lookup *(edi+0x10) *(edi+0x14))
17660 89/<- %edx 0/r32/eax
17661 {
17662 $check-mu-call:check-for-outputs:
17663
17664 81 7/subop/compare %ecx 0/imm32
17665 0f 84/jump-if-= break/disp32
17666
17667 81 7/subop/compare %edx 0/imm32
17668 0f 84/jump-if-= break/disp32
17669 $check-mu-call:check-output-type:
17670
17671 (lookup *ecx *(ecx+4))
17672
17673 (lookup *(eax+8) *(eax+0xc))
17674 89/<- %ebx 0/r32/eax
17675
17676 81 7/subop/compare *(ecx+0x10) 0/imm32/false
17677 {
17678 74/jump-if-= break/disp8
17679 (lookup *(ebx+0xc) *(ebx+0x10))
17680 89/<- %ebx 0/r32/eax
17681 }
17682
17683 (lookup *edx *(edx+4))
17684
17685 (lookup *(eax+8) *(eax+0xc))
17686
17687 (type-match? %eax %ebx *(ebp-4))
17688 3d/compare-eax-and 0/imm32/false
17689 {
17690 0f 85/jump-if-!= break/disp32
17691 (write-buffered *(ebp+0x14) "fn ")
17692 8b/-> *(ebp+0x10) 0/r32/eax
17693 (lookup *eax *(eax+4))
17694 (write-buffered *(ebp+0x14) %eax)
17695 (write-buffered *(ebp+0x14) ": call ")
17696 (lookup *edi *(edi+4))
17697 (write-buffered *(ebp+0x14) %eax)
17698 (write-buffered *(ebp+0x14) ": type for output '")
17699 (lookup *ecx *(ecx+4))
17700 (lookup *eax *(eax+4))
17701 (write-buffered *(ebp+0x14) %eax)
17702 (write-buffered *(ebp+0x14) "' is not right\n")
17703 (flush *(ebp+0x14))
17704 (stop *(ebp+0x18) 1)
17705 }
17706 $check-mu-call:check-output-register:
17707
17708 (lookup *ecx *(ecx+4))
17709
17710 (lookup *(eax+18) *(eax+0x1c))
17711 89/<- %ebx 0/r32/eax
17712
17713 3d/compare-eax-and 0/imm32
17714 {
17715 0f 85/jump-if-!= break/disp32
17716 (write-buffered *(ebp+0x14) "fn ")
17717 8b/-> *(ebp+0x10) 0/r32/eax
17718 (lookup *eax *(eax+4))
17719 (write-buffered *(ebp+0x14) %eax)
17720 (write-buffered *(ebp+0x14) ": call ")
17721 (lookup *edi *(edi+4))
17722 (write-buffered *(ebp+0x14) %eax)
17723 (write-buffered *(ebp+0x14) ": output '")
17724 (lookup *ecx *(ecx+4))
17725 (lookup *eax *(eax+4))
17726 (write-buffered *(ebp+0x14) %eax)
17727 (write-buffered *(ebp+0x14) "' is not in a register\n")
17728 (flush *(ebp+0x14))
17729 (stop *(ebp+0x18) 1)
17730 }
17731
17732 (lookup *edx *(edx+4))
17733
17734 (lookup *(eax+18) *(eax+0x1c))
17735
17736 (string-equal? %eax %ebx)
17737 3d/compare-eax-and 0/imm32/false
17738 {
17739 0f 85/jump-if-!= break/disp32
17740 (write-buffered *(ebp+0x14) "fn ")
17741 8b/-> *(ebp+0x10) 0/r32/eax
17742 (lookup *eax *(eax+4))
17743 (write-buffered *(ebp+0x14) %eax)
17744 (write-buffered *(ebp+0x14) ": call ")
17745 (lookup *edi *(edi+4))
17746 (write-buffered *(ebp+0x14) %eax)
17747 (write-buffered *(ebp+0x14) ": register for output '")
17748 (lookup *ecx *(ecx+4))
17749 (lookup *eax *(eax+4))
17750 (write-buffered *(ebp+0x14) %eax)
17751 (write-buffered *(ebp+0x14) "' is not right\n")
17752 (flush *(ebp+0x14))
17753 (stop *(ebp+0x18) 1)
17754 }
17755 $check-mu-call:continue-to-next-output:
17756
17757 (lookup *(ecx+8) *(ecx+0xc))
17758 89/<- %ecx 0/r32/eax
17759
17760 (lookup *(edx+8) *(edx+0xc))
17761 89/<- %edx 0/r32/eax
17762
17763 e9/jump loop/disp32
17764 }
17765 $check-mu-call:check-output-count:
17766
17767 39/compare %ecx 2/r32/edx
17768 {
17769 0f 84/jump-if-= break/disp32
17770
17771
17772 {
17773 81 7/subop/compare %ecx 0/imm32
17774 0f 84/jump-if-= break/disp32
17775 (write-buffered *(ebp+0x14) "fn ")
17776 8b/-> *(ebp+0x10) 0/r32/eax
17777 (lookup *eax *(eax+4))
17778 (write-buffered *(ebp+0x14) %eax)
17779 (write-buffered *(ebp+0x14) ": call ")
17780 (lookup *edi *(edi+4))
17781 (write-buffered *(ebp+0x14) %eax)
17782 (write-buffered *(ebp+0x14) ": too many outputs\n")
17783 (flush *(ebp+0x14))
17784 (stop *(ebp+0x18) 1)
17785 }
17786
17787 {
17788 81 7/subop/compare %edx 0/imm32
17789 0f 84/jump-if-= break/disp32
17790 (write-buffered *(ebp+0x14) "fn ")
17791 8b/-> *(ebp+0x10) 0/r32/eax
17792 (lookup *eax *(eax+4))
17793 (write-buffered *(ebp+0x14) %eax)
17794 (write-buffered *(ebp+0x14) ": call ")
17795 (lookup *edi *(edi+4))
17796 (write-buffered *(ebp+0x14) %eax)
17797 (write-buffered *(ebp+0x14) ": too few outputs\n")
17798 (flush *(ebp+0x14))
17799 (stop *(ebp+0x18) 1)
17800 }
17801 }
17802 $check-mu-call:end:
17803
17804 5f/pop-to-edi
17805 5e/pop-to-esi
17806 5b/pop-to-ebx
17807 5a/pop-to-edx
17808 59/pop-to-ecx
17809 58/pop-to-eax
17810
17811 81 0/subop/add %esp 0x70/imm32
17812
17813 89/<- %esp 5/r32/ebp
17814 5d/pop-to-ebp
17815 c3/return
17816
17817
17818 type-match?:
17819
17820 55/push-ebp
17821 89/<- %ebp 4/r32/esp
17822
17823 (is-simple-mu-type? *(ebp+0xc) 0)
17824 3d/compare-eax-and 0/imm32/false
17825 b8/copy-to-eax 1/imm32/true
17826 75/jump-if-!= $type-match?:end/disp8
17827 $type-match?:baseline:
17828
17829 (type-component-match? *(ebp+8) *(ebp+0xc) *(ebp+0x10))
17830 $type-match?:end:
17831
17832 89/<- %esp 5/r32/ebp
17833 5d/pop-to-ebp
17834 c3/return
17835
17836 type-component-match?:
17837
17838 55/push-ebp
17839 89/<- %ebp 4/r32/esp
17840
17841 51/push-ecx
17842 52/push-edx
17843 53/push-ebx
17844
17845 8b/-> *(ebp+8) 1/r32/ecx
17846
17847 8b/-> *(ebp+0xc) 2/r32/edx
17848 $type-component-match?:compare-addr:
17849
17850 8b/-> %ecx 0/r32/eax
17851 39/compare %edx 0/r32/eax
17852 b8/copy-to-eax 1/imm32/true
17853 0f 84/jump-if-= $type-component-match?:end/disp32
17854
17855 b8/copy-to-eax 0/imm32/false
17856 81 7/subop/compare %ecx 0/imm32
17857 0f 84/jump-if-= $type-component-match?:end/disp32
17858
17859 81 7/subop/compare %edx 0/imm32
17860 0f 84/jump-if-= $type-component-match?:end/disp32
17861
17862 {
17863 $type-component-match?:check-type-parameter:
17864 81 7/subop/compare *ecx 0/imm32/false
17865 74/jump-if-= break/disp8
17866 81 7/subop/compare *(ecx+4) 0xa/imm32/type-parameter
17867 75/jump-if-!= break/disp8
17868 $type-component-match?:type-parameter:
17869 (type-parameter-match? *(ecx+8) *(ecx+0xc) %edx *(ebp+0x10))
17870 e9/jump $type-component-match?:end/disp32
17871 }
17872
17873 {
17874 $type-component-match?:check-list-type-parameter:
17875
17876 81 7/subop/compare *ecx 0/imm32/false
17877 75/jump-if-!= break/disp8
17878
17879 81 7/subop/compare *(ecx+0xc) 0/imm32
17880 75/jump-if-!= break/disp8
17881
17882 (lookup *(ecx+4) *(ecx+8))
17883 81 7/subop/compare *eax 0/imm32/false
17884 74/jump-if-= break/disp8
17885 81 7/subop/compare *(eax+4) 0xa/imm32/type-parameter
17886 75/jump-if-!= break/disp8
17887 $type-component-match?:list-type-parameter:
17888 (type-parameter-match? *(eax+8) *(eax+0xc) %edx *(ebp+0x10))
17889 e9/jump $type-component-match?:end/disp32
17890 }
17891 $type-component-match?:compare-atom-state:
17892
17893 8b/-> *ecx 3/r32/ebx
17894 39/compare *edx 3/r32/ebx
17895 b8/copy-to-eax 0/imm32/false
17896 0f 85/jump-if-!= $type-component-match?:end/disp32
17897
17898 {
17899 $type-component-match?:check-atom:
17900 81 7/subop/compare %ebx 0/imm32/false
17901 74/jump-if-= break/disp8
17902 $type-component-match?:is-atom:
17903 8b/-> *(ecx+4) 0/r32/eax
17904 39/compare *(edx+4) 0/r32/eax
17905 0f 94/set-if-= %al
17906 81 4/subop/and %eax 0xff/imm32
17907 e9/jump $type-component-match?:end/disp32
17908 }
17909 $type-component-match?:check-left:
17910
17911 (lookup *(ecx+4) *(ecx+8))
17912 89/<- %ebx 0/r32/eax
17913 (lookup *(edx+4) *(edx+8))
17914 (type-component-match? %ebx %eax *(ebp+0x10))
17915 3d/compare-eax-and 0/imm32/false
17916 74/jump-if-= $type-component-match?:end/disp8
17917 $type-component-match?:check-right:
17918
17919 (lookup *(ecx+0xc) *(ecx+0x10))
17920 89/<- %ebx 0/r32/eax
17921 (lookup *(edx+0xc) *(edx+0x10))
17922 (type-component-match? %ebx %eax *(ebp+0x10))
17923 $type-component-match?:end:
17924
17925 5b/pop-to-ebx
17926 5a/pop-to-edx
17927 59/pop-to-ecx
17928
17929 89/<- %esp 5/r32/ebp
17930 5d/pop-to-ebp
17931 c3/return
17932
17933 type-parameter-match?:
17934
17935 55/push-ebp
17936 89/<- %ebp 4/r32/esp
17937
17938 51/push-ecx
17939
17940 (get-or-insert-handle *(ebp+0x14) *(ebp+8) *(ebp+0xc) 0xc)
17941
17942 {
17943 81 7/subop/compare *eax 0/imm32
17944 75/jump-if-!= break/disp8
17945 8b/-> *(ebp+0x10) 1/r32/ecx
17946 89/<- *eax 1/r32/ecx
17947 }
17948
17949 (type-equal? *(ebp+0x10) *eax)
17950 $type-parameter-match?:end:
17951
17952 59/pop-to-ecx
17953
17954 89/<- %esp 5/r32/ebp
17955 5d/pop-to-ebp
17956 c3/return
17957
17958 size-of:
17959
17960 55/push-ebp
17961 89/<- %ebp 4/r32/esp
17962
17963 51/push-ecx
17964
17965 8b/-> *(ebp+8) 1/r32/ecx
17966
17967
17968
17969
17970
17971
17972
17973 (lookup *(ecx+8) *(ecx+0xc))
17974 89/<- %ecx 0/r32/eax
17975
17976 {
17977 (is-mu-array? %ecx)
17978 3d/compare-eax-and 0/imm32/false
17979 74/jump-if-= break/disp8
17980 (size-of-array %ecx)
17981 eb/jump $size-of:end/disp8
17982 }
17983
17984 {
17985 (is-mu-stream? %ecx)
17986 3d/compare-eax-and 0/imm32/false
17987 74/jump-if-= break/disp8
17988 (size-of-stream %ecx)
17989 eb/jump $size-of:end/disp8
17990 }
17991
17992 {
17993 81 7/subop/compare *ecx 0/imm32/false
17994 75/jump-if-!= break/disp8
17995 (lookup *(ecx+4) *(ecx+8))
17996 89/<- %ecx 0/r32/eax
17997 }
17998
17999 (size-of-type-id *(ecx+4))
18000 $size-of:end:
18001
18002 59/pop-to-ecx
18003
18004 89/<- %esp 5/r32/ebp
18005 5d/pop-to-ebp
18006 c3/return
18007
18008 size-of-deref:
18009
18010 55/push-ebp
18011 89/<- %ebp 4/r32/esp
18012
18013 51/push-ecx
18014
18015 8b/-> *(ebp+8) 1/r32/ecx
18016 (lookup *(ecx+8) *(ecx+0xc))
18017 89/<- %ecx 0/r32/eax
18018
18019
18020 (lookup *(ecx+0xc) *(ecx+0x10))
18021 89/<- %ecx 0/r32/eax
18022
18023 {
18024 (is-mu-array? %ecx)
18025 3d/compare-eax-and 0/imm32/false
18026 74/jump-if-= break/disp8
18027 (size-of-array %ecx)
18028 eb/jump $size-of-deref:end/disp8
18029 }
18030
18031 {
18032 (is-mu-stream? %ecx)
18033 3d/compare-eax-and 0/imm32/false
18034 74/jump-if-= break/disp8
18035 (size-of-stream %ecx)
18036 eb/jump $size-of-deref:end/disp8
18037 }
18038
18039 {
18040 81 7/subop/compare *ecx 0/imm32/false
18041 75/jump-if-!= break/disp8
18042 (lookup *(ecx+4) *(ecx+8))
18043 89/<- %ecx 0/r32/eax
18044 }
18045
18046 (size-of-type-id *(ecx+4))
18047 $size-of-deref:end:
18048
18049 59/pop-to-ecx
18050
18051 89/<- %esp 5/r32/ebp
18052 5d/pop-to-ebp
18053 c3/return
18054
18055 is-mu-array?:
18056
18057 55/push-ebp
18058 89/<- %ebp 4/r32/esp
18059
18060 51/push-ecx
18061
18062 8b/-> *(ebp+8) 1/r32/ecx
18063
18064 81 7/subop/compare *ecx 0/imm32/false
18065 75/jump-if-!= $is-mu-array?:return-false/disp8
18066
18067 (lookup *(ecx+4) *(ecx+8))
18068 81 7/subop/compare *eax 0/imm32/false
18069 74/jump-if-= $is-mu-array?:return-false/disp8
18070
18071 81 7/subop/compare *(eax+4) 3/imm32/array-type-id
18072 0f 94/set-if-= %al
18073 81 4/subop/and %eax 0xff/imm32
18074 eb/jump $is-mu-array?:end/disp8
18075 $is-mu-array?:return-false:
18076 b8/copy-to-eax 0/imm32/false
18077 $is-mu-array?:end:
18078
18079 59/pop-to-ecx
18080
18081 89/<- %esp 5/r32/ebp
18082 5d/pop-to-ebp
18083 c3/return
18084
18085
18086 size-of-array:
18087
18088 55/push-ebp
18089 89/<- %ebp 4/r32/esp
18090
18091 51/push-ecx
18092 52/push-edx
18093
18094 8b/-> *(ebp+8) 1/r32/ecx
18095
18096 (lookup *(ecx+0xc) *(ecx+0x10))
18097 89/<- %ecx 0/r32/eax
18098
18099 (lookup *(ecx+4) *(ecx+8))
18100 8b/-> *(eax+4) 2/r32/edx
18101
18102
18103 (lookup *(ecx+0xc) *(ecx+0x10))
18104 (lookup *(eax+4) *(eax+8))
18105 8b/-> *(eax+8) 1/r32/ecx
18106
18107 (size-of-type-id-as-array-element %edx)
18108 f7 4/subop/multiply-into-edx-eax %ecx
18109 05/add-to-eax 4/imm32
18110
18111 $size-of-array:end:
18112
18113 5a/pop-to-edx
18114 59/pop-to-ecx
18115
18116 89/<- %esp 5/r32/ebp
18117 5d/pop-to-ebp
18118 c3/return
18119
18120 is-mu-stream?:
18121
18122 55/push-ebp
18123 89/<- %ebp 4/r32/esp
18124
18125 51/push-ecx
18126
18127 8b/-> *(ebp+8) 1/r32/ecx
18128
18129 81 7/subop/compare *ecx 0/imm32/false
18130 75/jump-if-!= $is-mu-stream?:return-false/disp8
18131
18132 (lookup *(ecx+4) *(ecx+8))
18133 81 7/subop/compare *eax 0/imm32/false
18134 74/jump-if-= $is-mu-stream?:return-false/disp8
18135
18136 81 7/subop/compare *(eax+4) 0xb/imm32/stream-type-id
18137 0f 94/set-if-= %al
18138 81 4/subop/and %eax 0xff/imm32
18139 eb/jump $is-mu-stream?:end/disp8
18140 $is-mu-stream?:return-false:
18141 b8/copy-to-eax 0/imm32/false
18142 $is-mu-stream?:end:
18143
18144 59/pop-to-ecx
18145
18146 89/<- %esp 5/r32/ebp
18147 5d/pop-to-ebp
18148 c3/return
18149
18150
18151 size-of-stream:
18152
18153 55/push-ebp
18154 89/<- %ebp 4/r32/esp
18155
18156 (size-of-array *(ebp+8))
18157 05/add-to-eax 8/imm32
18158 $size-of-stream:end:
18159
18160 89/<- %esp 5/r32/ebp
18161 5d/pop-to-ebp
18162 c3/return
18163
18164 size-of-type-id:
18165
18166 55/push-ebp
18167 89/<- %ebp 4/r32/esp
18168
18169 51/push-ecx
18170
18171 68/push 0/imm32
18172 68/push 0/imm32
18173 89/<- %ecx 4/r32/esp
18174
18175 8b/-> *(ebp+8) 0/r32/eax
18176
18177 3d/compare-eax-and 0/imm32
18178 0f 84/jump-if-= $size-of-type-id:end/disp32
18179
18180 3d/compare-eax-and 8/imm32/byte
18181 {
18182 75/jump-if-!= break/disp8
18183 b8/copy-to-eax 4/imm32
18184 eb/jump $size-of-type-id:end/disp8
18185 }
18186
18187 3d/compare-eax-and 4/imm32/handle
18188 {
18189 75/jump-if-!= break/disp8
18190 b8/copy-to-eax 8/imm32
18191 eb/jump $size-of-type-id:end/disp8
18192 }
18193
18194 3d/compare-eax-and 0xc/imm32/slice
18195 {
18196 75/jump-if-!= break/disp8
18197 b8/copy-to-eax 8/imm32
18198 eb/jump $size-of-type-id:end/disp8
18199 }
18200
18201
18202 (find-typeinfo %eax %ecx)
18203 {
18204 81 7/subop/compare *ecx 0/imm32
18205 74/jump-if-= break/disp8
18206 $size-of-type-id:user-defined:
18207 (lookup *ecx *(ecx+4))
18208 8b/-> *(eax+0xc) 0/r32/eax
18209 eb/jump $size-of-type-id:end/disp8
18210 }
18211
18212 b8/copy-to-eax 4/imm32
18213 $size-of-type-id:end:
18214
18215 81 0/subop/add %esp 8/imm32
18216
18217 59/pop-to-ecx
18218
18219 89/<- %esp 5/r32/ebp
18220 5d/pop-to-ebp
18221 c3/return
18222
18223
18224
18225
18226 type-tail:
18227
18228 55/push-ebp
18229 89/<- %ebp 4/r32/esp
18230
18231 51/push-ecx
18232
18233 b8/copy-to-eax 0/imm32
18234
18235 8b/-> *(ebp+8) 1/r32/ecx
18236 $type-tail:check-atom:
18237
18238 81 7/subop/compare *ecx 0/imm32/false
18239 0f 85/jump-if-!= $type-tail:end/disp32
18240
18241 (lookup *(ecx+0xc) *(ecx+0x10))
18242 89/<- %ecx 0/r32/eax
18243 $type-tail:check-singleton:
18244
18245 {
18246 81 7/subop/compare *(ecx+0xc) 0/imm32
18247 75/jump-if-!= break/disp8
18248 (lookup *(ecx+4) *(ecx+8))
18249 e9/jump $type-tail:end/disp32
18250 }
18251
18252 {
18253 $type-tail:check-array-capacity:
18254 (lookup *(ecx+0xc) *(ecx+0x10))
18255 81 7/subop/compare *eax 0/imm32/false
18256 75/jump-if-!= break/disp8
18257 $type-tail:check-array-capacity-1:
18258 (lookup *(eax+4) *(eax+8))
18259 3d/compare-eax-and 0/imm32
18260 74/jump-if-= break/disp8
18261 $type-tail:check-array-capacity-2:
18262 (is-simple-mu-type? %eax 9)
18263 3d/compare-eax-and 0/imm32/false
18264 74/jump-if-= break/disp8
18265 $type-tail:array-capacity:
18266 (lookup *(ecx+4) *(ecx+8))
18267 eb/jump $type-tail:end/disp8
18268 }
18269 $type-tail:check-compound-left:
18270
18271 (lookup *(ecx+4) *(ecx+8))
18272 81 7/subop/compare *eax 0/imm32/false
18273 74/jump-if-= $type-tail:end/disp8
18274 $type-tail:return-tail:
18275
18276 89/<- %eax 1/r32/ecx
18277 $type-tail:end:
18278
18279 59/pop-to-ecx
18280
18281 89/<- %esp 5/r32/ebp
18282 5d/pop-to-ebp
18283 c3/return
18284
18285 type-equal?:
18286
18287 55/push-ebp
18288 89/<- %ebp 4/r32/esp
18289
18290 51/push-ecx
18291 52/push-edx
18292 53/push-ebx
18293
18294 8b/-> *(ebp+8) 1/r32/ecx
18295
18296 8b/-> *(ebp+0xc) 2/r32/edx
18297 $type-equal?:compare-addr:
18298
18299 8b/-> %ecx 0/r32/eax
18300 39/compare %edx 0/r32/eax
18301 b8/copy-to-eax 1/imm32/true
18302 0f 84/jump-if-= $type-equal?:end/disp32
18303 $type-equal?:compare-null-a:
18304
18305 b8/copy-to-eax 0/imm32/false
18306 81 7/subop/compare %ecx 0/imm32
18307 0f 84/jump-if-= $type-equal?:end/disp32
18308 $type-equal?:compare-null-b:
18309
18310 81 7/subop/compare %edx 0/imm32
18311 0f 84/jump-if-= $type-equal?:end/disp32
18312 $type-equal?:compare-atom-state:
18313
18314 8b/-> *ecx 3/r32/ebx
18315 39/compare *edx 3/r32/ebx
18316 b8/copy-to-eax 0/imm32/false
18317 0f 85/jump-if-!= $type-equal?:end/disp32
18318
18319 {
18320 $type-equal?:check-atom:
18321 81 7/subop/compare %ebx 0/imm32/false
18322 74/jump-if-= break/disp8
18323 $type-equal?:is-atom:
18324 8b/-> *(ecx+4) 0/r32/eax
18325 39/compare *(edx+4) 0/r32/eax
18326 0f 94/set-if-= %al
18327 81 4/subop/and %eax 0xff/imm32
18328 e9/jump $type-equal?:end/disp32
18329 }
18330 $type-equal?:check-left:
18331
18332 (lookup *(ecx+4) *(ecx+8))
18333 89/<- %ebx 0/r32/eax
18334 (lookup *(edx+4) *(edx+8))
18335 (type-equal? %eax %ebx)
18336 3d/compare-eax-and 0/imm32/false
18337 74/jump-if-= $type-equal?:end/disp8
18338 $type-equal?:check-right:
18339
18340 (lookup *(ecx+0xc) *(ecx+0x10))
18341 89/<- %ebx 0/r32/eax
18342 (lookup *(edx+0xc) *(edx+0x10))
18343 (type-equal? %eax %ebx)
18344 $type-equal?:end:
18345
18346 5b/pop-to-ebx
18347 5a/pop-to-edx
18348 59/pop-to-ecx
18349
18350 89/<- %esp 5/r32/ebp
18351 5d/pop-to-ebp
18352 c3/return
18353
18354
18355
18356
18357
18358 == data
18359
18360
18361 Curr-local-stack-offset:
18362 0/imm32
18363
18364 == code
18365
18366 emit-subx:
18367
18368 55/push-ebp
18369 89/<- %ebp 4/r32/esp
18370
18371 50/push-eax
18372
18373 (lookup *_Program-functions *_Program-functions->payload)
18374 {
18375
18376 3d/compare-eax-and 0/imm32
18377 0f 84/jump-if-= break/disp32
18378 (emit-subx-function *(ebp+8) %eax *(ebp+0xc) *(ebp+0x10))
18379
18380 (lookup *(eax+0x20) *(eax+0x24))
18381 e9/jump loop/disp32
18382 }
18383 $emit-subx:end:
18384
18385 58/pop-to-eax
18386
18387 89/<- %esp 5/r32/ebp
18388 5d/pop-to-ebp
18389 c3/return
18390
18391 emit-subx-function:
18392
18393 55/push-ebp
18394 89/<- %ebp 4/r32/esp
18395
18396 (populate-mu-type-offsets-in-inouts *(ebp+0xc))
18397
18398 50/push-eax
18399 51/push-ecx
18400 52/push-edx
18401
18402 c7 0/subop/copy *Curr-block-depth 1/imm32
18403 c7 0/subop/copy *Curr-local-stack-offset 0/imm32
18404
18405 8b/-> *(ebp+0xc) 1/r32/ecx
18406
18407 81 5/subop/subtract %esp 0xc00/imm32
18408 68/push 0xc00/imm32/size
18409 68/push 0/imm32/top
18410 89/<- %edx 4/r32/esp
18411
18412 (lookup *ecx *(ecx+4))
18413
18414 (write-buffered *(ebp+8) %eax)
18415 (write-buffered *(ebp+8) ":\n")
18416 (emit-subx-prologue *(ebp+8))
18417
18418 (lookup *(ecx+0x18) *(ecx+0x1c))
18419
18420 (emit-subx-block *(ebp+8) %eax %edx *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
18421 (emit-subx-epilogue *(ebp+8))
18422
18423
18424 $emit-subx-function:end:
18425
18426 81 0/subop/add %esp 0xc08/imm32
18427
18428 5a/pop-to-edx
18429 59/pop-to-ecx
18430 58/pop-to-eax
18431
18432 89/<- %esp 5/r32/ebp
18433 5d/pop-to-ebp
18434 c3/return
18435
18436 populate-mu-type-offsets-in-inouts:
18437
18438 55/push-ebp
18439 89/<- %ebp 4/r32/esp
18440
18441 50/push-eax
18442 51/push-ecx
18443 52/push-edx
18444 53/push-ebx
18445 57/push-edi
18446
18447 ba/copy-to-edx 8/imm32
18448
18449 8b/-> *(ebp+8) 1/r32/ecx
18450 (lookup *(ecx+8) *(ecx+0xc))
18451 89/<- %ecx 0/r32/eax
18452 {
18453 $populate-mu-type-offsets-in-inouts:loop:
18454 81 7/subop/compare %ecx 0/imm32
18455 74/jump-if-= break/disp8
18456
18457 (lookup *ecx *(ecx+4))
18458 89/<- %ebx 0/r32/eax
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469 89/<- *(ebx+0x14) 2/r32/edx
18470
18471 (size-of %ebx)
18472 01/add-to %edx 0/r32/eax
18473
18474 (lookup *(ecx+8) *(ecx+0xc))
18475 89/<- %ecx 0/r32/eax
18476
18477 eb/jump loop/disp8
18478 }
18479 $populate-mu-type-offsets-in-inouts:end:
18480
18481 5f/pop-to-edi
18482 5b/pop-to-ebx
18483 5a/pop-to-edx
18484 59/pop-to-ecx
18485 58/pop-to-eax
18486
18487 89/<- %esp 5/r32/ebp
18488 5d/pop-to-ebp
18489 c3/return
18490
18491 emit-subx-stmt-list:
18492
18493 55/push-ebp
18494 89/<- %ebp 4/r32/esp
18495
18496 50/push-eax
18497 51/push-ecx
18498 53/push-ebx
18499 56/push-esi
18500
18501 8b/-> *(ebp+0xc) 6/r32/esi
18502
18503 {
18504 $emit-subx-stmt-list:loop:
18505 81 7/subop/compare %esi 0/imm32
18506 0f 84/jump-if-= break/disp32
18507
18508 (lookup *esi *(esi+4))
18509 89/<- %ecx 0/r32/eax
18510 {
18511 $emit-subx-stmt-list:check-for-block:
18512 81 7/subop/compare *ecx 0/imm32/block
18513 75/jump-if-!= break/disp8
18514 $emit-subx-stmt-list:block:
18515 (emit-subx-block *(ebp+8) %ecx *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
18516 }
18517 {
18518 $emit-subx-stmt-list:check-for-stmt:
18519 81 7/subop/compare *ecx 1/imm32/stmt1
18520 0f 85/jump-if-!= break/disp32
18521 $emit-subx-stmt-list:stmt1:
18522 {
18523 (is-mu-branch? %ecx)
18524 3d/compare-eax-and 0/imm32/false
18525 0f 84/jump-if-= break/disp32
18526 $emit-subx-stmt-list:branch-stmt:
18527 +-- 25 lines: # unconditional return -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18552 +-- 27 lines: # unconditional loops --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18579 +-- 16 lines: # unconditional breaks -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18595 +-- 38 lines: # simple conditional branches without a target -------------------------------------------------------------------------------------------------------------------------------------------------------
18633 +-- 19 lines: # conditional branches with an explicit target -------------------------------------------------------------------------------------------------------------------------------------------------------
18652 }
18653 $emit-subx-stmt-list:1-to-1:
18654 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
18655 e9/jump $emit-subx-stmt-list:continue/disp32
18656 }
18657 {
18658 $emit-subx-stmt-list:check-for-var-def:
18659 81 7/subop/compare *ecx 2/imm32/var-def
18660 75/jump-if-!= break/disp8
18661 $emit-subx-stmt-list:var-def:
18662 (emit-subx-var-def *(ebp+8) %ecx)
18663 (push *(ebp+0x10) *(ecx+4))
18664 (push *(ebp+0x10) *(ecx+8))
18665 (push *(ebp+0x10) 0)
18666
18667 eb/jump $emit-subx-stmt-list:continue/disp8
18668 }
18669 {
18670 $emit-subx-stmt-list:check-for-reg-var-def:
18671 81 7/subop/compare *ecx 3/imm32/reg-var-def
18672 0f 85/jump-if-!= break/disp32
18673 $emit-subx-stmt-list:reg-var-def:
18674
18675 (push-output-and-maybe-emit-spill *(ebp+8) %ecx *(ebp+0x10) %esi *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
18676
18677 (emit-subx-stmt *(ebp+8) %ecx Primitives *(ebp+0x18) *(ebp+0x1c))
18678
18679 eb/jump $emit-subx-stmt-list:continue/disp8
18680 }
18681 $emit-subx-stmt-list:continue:
18682
18683 (lookup *(esi+8) *(esi+0xc))
18684 89/<- %esi 0/r32/eax
18685 e9/jump loop/disp32
18686 }
18687 $emit-subx-stmt-list:emit-cleanup:
18688 (emit-cleanup-code-until-depth *(ebp+8) *(ebp+0x10) *Curr-block-depth)
18689 $emit-subx-stmt-list:clean-up:
18690 (clean-up-stack-offset-state *(ebp+0x10) *Curr-block-depth)
18691 (clean-up-blocks *(ebp+0x10) *Curr-block-depth *(ebp+0x14))
18692 $emit-subx-stmt-list:end:
18693
18694 5e/pop-to-esi
18695 5b/pop-to-ebx
18696 59/pop-to-ecx
18697 58/pop-to-eax
18698
18699 89/<- %esp 5/r32/ebp
18700 5d/pop-to-ebp
18701 c3/return
18702
18703
18704 push-output-and-maybe-emit-spill:
18705
18706 55/push-ebp
18707 89/<- %ebp 4/r32/esp
18708
18709 50/push-eax
18710 51/push-ecx
18711 52/push-edx
18712
18713 8b/-> *(ebp+0xc) 1/r32/ecx
18714
18715 (lookup *(ecx+0x14) *(ecx+0x18))
18716
18717
18718 (lookup *eax *(eax+4))
18719 89/<- %ecx 0/r32/eax
18720
18721 8b/-> *Curr-block-depth 0/r32/eax
18722 89/<- *(ecx+0x10) 0/r32/eax
18723
18724
18725
18726
18727
18728
18729
18730
18731 81 7/subop/compare *(ecx+0x18) 0/imm32
18732 0f 84/jump-if-= $push-output-and-maybe-emit-spill:abort/disp32
18733
18734 (not-yet-spilled-this-block? %ecx *(ebp+0x10))
18735 89/<- %edx 0/r32/eax
18736 3d/compare-eax-and 0/imm32/false
18737 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
18738 (will-not-write-some-register? %ecx *(ebp+0x14) *(ebp+0x18))
18739 89/<- %edx 0/r32/eax
18740
18741 3d/compare-eax-and 0/imm32/false
18742 0f 84/jump-if-= $push-output-and-maybe-emit-spill:push/disp32
18743
18744
18745 81 5/subop/subtract *Curr-local-stack-offset 4/imm32
18746
18747 (lookup *(ecx+0x18) *(ecx+0x1c))
18748 (emit-push-register *(ebp+8) %eax)
18749 $push-output-and-maybe-emit-spill:push:
18750 8b/-> *(ebp+0xc) 1/r32/ecx
18751 (lookup *(ecx+0x14) *(ecx+0x18))
18752
18753 (push *(ebp+0x10) *eax)
18754 (push *(ebp+0x10) *(eax+4))
18755 (push *(ebp+0x10) %edx)
18756 $push-output-and-maybe-emit-spill:end:
18757
18758 5a/pop-to-edx
18759 59/pop-to-ecx
18760 58/pop-to-eax
18761
18762 89/<- %esp 5/r32/ebp
18763 5d/pop-to-ebp
18764 c3/return
18765
18766 $push-output-and-maybe-emit-spill:abort:
18767
18768 (write-buffered *(ebp+0x1c) "var '")
18769 (write-buffered *(ebp+0x1c) *eax)
18770 (write-buffered *(ebp+0x1c) "' initialized from an instruction must live in a register\n")
18771 (flush *(ebp+0x1c))
18772 (stop *(ebp+0x20) 1)
18773
18774
18775 emit-subx-cleanup-and-unconditional-nonlocal-branch:
18776
18777 55/push-ebp
18778 89/<- %ebp 4/r32/esp
18779
18780 50/push-eax
18781 51/push-ecx
18782
18783 8b/-> *(ebp+0xc) 1/r32/ecx
18784
18785 (lookup *(ecx+0xc) *(ecx+0x10))
18786 (lookup *eax *(eax+4))
18787 (lookup *eax *(eax+4))
18788
18789 (emit-cleanup-code-until-target *(ebp+8) *(ebp+0x10) %eax)
18790
18791 (emit-indent *(ebp+8) *Curr-block-depth)
18792 (write-buffered *(ebp+8) "e9/jump ")
18793 (write-buffered *(ebp+8) %eax)
18794 (lookup *(ecx+4) *(ecx+8))
18795 (string-starts-with? %eax "break")
18796 3d/compare-eax-and 0/imm32/false
18797 {
18798 74/jump-if-= break/disp8
18799 (write-buffered *(ebp+8) ":break/disp32\n")
18800 eb/jump $emit-subx-cleanup-and-unconditional-nonlocal-branch:end/disp8
18801 }
18802 (write-buffered *(ebp+8) ":loop/disp32\n")
18803 $emit-subx-cleanup-and-unconditional-nonlocal-branch:end:
18804
18805 59/pop-to-ecx
18806 58/pop-to-eax
18807
18808 89/<- %esp 5/r32/ebp
18809 5d/pop-to-ebp
18810 c3/return
18811
18812 emit-outputs:
18813
18814
18815
18816
18817
18818
18819
18820
18821 55/push-ebp
18822 89/<- %ebp 4/r32/esp
18823
18824 50/push-eax
18825 51/push-ecx
18826 56/push-esi
18827 57/push-edi
18828
18829 8b/-> *(ebp+0xc) 0/r32/eax
18830 (lookup *(eax+0xc) *(eax+0x10))
18831 89/<- %esi 0/r32/eax
18832
18833 8b/-> *(ebp+0x10) 0/r32/eax
18834 (lookup *(eax+0x10) *(eax+0x14))
18835 89/<- %edi 0/r32/eax
18836 {
18837 $emit-outputs:loop:
18838 81 7/subop/compare %esi 0/imm32
18839 0f 84/jump-if-= break/disp32
18840
18841
18842 (lookup *esi *(esi+4))
18843 89/<- %ecx 0/r32/eax
18844
18845 (lookup *(ecx+8) *(ecx+0xc))
18846 (is-simple-mu-type? %eax 0)
18847 {
18848 3d/compare-eax-and 0/imm32/false
18849 0f 84/jump-if-= break/disp32
18850 (emit-indent *(ebp+8) *Curr-block-depth)
18851 (write-buffered *(ebp+8) "c7 0/subop/copy %")
18852 (lookup *edi *(edi+4))
18853 (lookup *(eax+0x18) *(eax+0x1c))
18854 (write-buffered *(ebp+8) %eax)
18855 (write-buffered *(ebp+8) " ")
18856 (lookup *ecx *(ecx+4))
18857 (write-buffered *(ebp+8) %eax)
18858 (write-buffered *(ebp+8) "/imm32\n")
18859 e9/jump $emit-outputs:continue/disp32
18860 }
18861
18862 (lookup *(ecx+0x18) *(ecx+0x1c))
18863 {
18864 3d/compare-eax-and 0/imm32
18865 0f 84/jump-if-= break/disp32
18866 8a/copy-byte *(eax+4) 0/r32/AL
18867 81 4/subop/and %eax 0xff/imm32
18868 3d/compare-eax-and 0x78/imm32/x
18869 0f 85/jump-if-!= break/disp32
18870 (emit-indent *(ebp+8) *Curr-block-depth)
18871 (write-buffered *(ebp+8) "f3 0f 10/->")
18872 (emit-subx-var-as-rm32 *(ebp+8) %esi)
18873 (write-buffered *(ebp+8) " ")
18874 (lookup *edi *(edi+4))
18875 (lookup *(eax+0x18) *(eax+0x1c))
18876 (get Mu-registers %eax 0xc "Mu-registers")
18877 (write-int32-hex-buffered *(ebp+8) *eax)
18878 (write-buffered *(ebp+8) "/x32\n")
18879 e9/jump $emit-outputs:continue/disp32
18880 }
18881
18882 (emit-indent *(ebp+8) *Curr-block-depth)
18883 (write-buffered *(ebp+8) "8b/->")
18884 (emit-subx-var-as-rm32 *(ebp+8) %esi)
18885 (write-buffered *(ebp+8) " ")
18886 (lookup *edi *(edi+4))
18887 (lookup *(eax+0x18) *(eax+0x1c))
18888 (get Mu-registers %eax 0xc "Mu-registers")
18889 (write-int32-hex-buffered *(ebp+8) *eax)
18890 (write-buffered *(ebp+8) "/r32\n")
18891 $emit-outputs:continue:
18892
18893 (lookup *(esi+8) *(esi+0xc))
18894 89/<- %esi 0/r32/eax
18895
18896 (lookup *(edi+8) *(edi+0xc))
18897 89/<- %edi 0/r32/eax
18898
18899 e9/jump loop/disp32
18900 }
18901 $emit-outputs:end:
18902
18903 5f/pop-to-edi
18904 5e/pop-to-esi
18905 59/pop-to-ecx
18906 58/pop-to-eax
18907
18908 89/<- %esp 5/r32/ebp
18909 5d/pop-to-ebp
18910 c3/return
18911
18912 is-mu-branch?:
18913
18914 55/push-ebp
18915 89/<- %ebp 4/r32/esp
18916
18917 51/push-ecx
18918
18919 8b/-> *(ebp+8) 1/r32/ecx
18920 (lookup *(ecx+4) *(ecx+8))
18921 89/<- %ecx 0/r32/eax
18922
18923 (string-starts-with? %ecx "loop")
18924 3d/compare-eax-and 0/imm32/false
18925 75/jump-if-not-equal $is-mu-branch?:end/disp8
18926
18927 (string-starts-with? %ecx "break")
18928 3d/compare-eax-and 0/imm32/false
18929 75/jump-if-not-equal $is-mu-branch?:end/disp8
18930
18931 (string-starts-with? %ecx "return")
18932 $is-mu-branch?:end:
18933
18934 59/pop-to-ecx
18935
18936 89/<- %esp 5/r32/ebp
18937 5d/pop-to-ebp
18938 c3/return
18939
18940 emit-reverse-break:
18941
18942 55/push-ebp
18943 89/<- %ebp 4/r32/esp
18944
18945 50/push-eax
18946
18947 8b/-> *(ebp+0xc) 0/r32/eax
18948
18949 (lookup *(eax+4) *(eax+8))
18950 (get Reverse-branch %eax 0x10 "reverse-branch: ")
18951 (emit-indent *(ebp+8) *Curr-block-depth)
18952 (lookup *eax *(eax+4))
18953 (write-buffered *(ebp+8) %eax)
18954 (write-buffered *(ebp+8) " break/disp32\n")
18955 $emit-reverse-break:end:
18956
18957 58/pop-to-eax
18958
18959 89/<- %esp 5/r32/ebp
18960 5d/pop-to-ebp
18961 c3/return
18962
18963 == data
18964
18965
18966 Reverse-branch:
18967
18968 0x1c0/imm32/write
18969 0/imm32/read
18970 0x1c0/imm32/size
18971
18972 0x11/imm32/alloc-id _string-break-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
18973 0x11/imm32/alloc-id _string-loop-if-=/imm32 0x11/imm32/alloc-id _string_0f_85_jump_label/imm32
18974 0x11/imm32/alloc-id _string-break-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
18975 0x11/imm32/alloc-id _string-loop-if-!=/imm32 0x11/imm32/alloc-id _string_0f_84_jump_label/imm32
18976 0x11/imm32/alloc-id _string-break-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
18977 0x11/imm32/alloc-id _string-loop-if-</imm32 0x11/imm32/alloc-id _string_0f_8d_jump_label/imm32
18978 0x11/imm32/alloc-id _string-break-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
18979 0x11/imm32/alloc-id _string-loop-if->/imm32 0x11/imm32/alloc-id _string_0f_8e_jump_label/imm32
18980 0x11/imm32/alloc-id _string-break-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18981 0x11/imm32/alloc-id _string-loop-if-<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18982 0x11/imm32/alloc-id _string-break-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
18983 0x11/imm32/alloc-id _string-loop-if->=/imm32 0x11/imm32/alloc-id _string_0f_8c_jump_label/imm32
18984 0x11/imm32/alloc-id _string-break-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
18985 0x11/imm32/alloc-id _string-loop-if-addr</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
18986 0x11/imm32/alloc-id _string-break-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
18987 0x11/imm32/alloc-id _string-loop-if-addr>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
18988 0x11/imm32/alloc-id _string-break-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18989 0x11/imm32/alloc-id _string-loop-if-addr<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18990 0x11/imm32/alloc-id _string-break-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
18991 0x11/imm32/alloc-id _string-loop-if-addr>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
18992 0x11/imm32/alloc-id _string-break-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
18993 0x11/imm32/alloc-id _string-loop-if-float</imm32 0x11/imm32/alloc-id _string_0f_83_jump_label/imm32
18994 0x11/imm32/alloc-id _string-break-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
18995 0x11/imm32/alloc-id _string-loop-if-float>/imm32 0x11/imm32/alloc-id _string_0f_86_jump_label/imm32
18996 0x11/imm32/alloc-id _string-break-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18997 0x11/imm32/alloc-id _string-loop-if-float<=/imm32 0x11/imm32/alloc-id _string_0f_87_jump_label/imm32
18998 0x11/imm32/alloc-id _string-break-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
18999 0x11/imm32/alloc-id _string-loop-if-float>=/imm32 0x11/imm32/alloc-id _string_0f_82_jump_label/imm32
19000
19001 == code
19002
19003 emit-unconditional-jump-to-depth:
19004
19005 55/push-ebp
19006 89/<- %ebp 4/r32/esp
19007
19008 50/push-eax
19009 51/push-ecx
19010 52/push-edx
19011 53/push-ebx
19012 56/push-esi
19013
19014 8b/-> *(ebp+0xc) 1/r32/ecx
19015
19016 8b/-> *ecx 0/r32/eax
19017
19018 8d/copy-address *(ecx+eax-4) 6/r32/esi
19019
19020 8d/copy-address *(ecx+8) 1/r32/ecx
19021
19022 8b/-> *(ebp+0x10) 2/r32/edx
19023 {
19024 $emit-unconditional-jump-to-depth:loop:
19025
19026 39/compare %esi 1/r32/ecx
19027 0f 82/jump-if-addr< break/disp32
19028
19029 (lookup *esi *(esi+4))
19030 89/<- %ebx 0/r32/eax
19031
19032 39/compare *(ebx+0x10) 2/r32/edx
19033 0f 8c/jump-if-< break/disp32
19034 {
19035 $emit-unconditional-jump-to-depth:check:
19036
19037 39/compare *(ebx+0x10) 2/r32/edx
19038 0f 85/jump-if-!= break/disp32
19039 $emit-unconditional-jump-to-depth:depth-found:
19040
19041 (size-of %ebx)
19042 3d/compare-eax-and 0/imm32
19043 0f 85/jump-if-!= break/disp32
19044 $emit-unconditional-jump-to-depth:label-found:
19045
19046 (emit-indent *(ebp+8) *Curr-block-depth)
19047 (write-buffered *(ebp+8) "e9/jump ")
19048 (lookup *ebx *(ebx+4))
19049 (write-buffered *(ebp+8) %eax)
19050 (write-buffered *(ebp+8) ":")
19051 (write-buffered *(ebp+8) *(ebp+0x14))
19052 (write-buffered *(ebp+8) "/disp32\n")
19053 eb/jump $emit-unconditional-jump-to-depth:end/disp8
19054 }
19055
19056 81 5/subop/subtract %esi 0xc/imm32
19057 e9/jump loop/disp32
19058 }
19059
19060 $emit-unconditional-jump-to-depth:end:
19061
19062 5e/pop-to-esi
19063 5b/pop-to-ebx
19064 5a/pop-to-edx
19065 59/pop-to-ecx
19066 58/pop-to-eax
19067
19068 89/<- %esp 5/r32/ebp
19069 5d/pop-to-ebp
19070 c3/return
19071
19072
19073
19074 emit-cleanup-code-until-depth:
19075
19076 55/push-ebp
19077 89/<- %ebp 4/r32/esp
19078
19079 50/push-eax
19080 51/push-ecx
19081 52/push-edx
19082 53/push-ebx
19083 56/push-esi
19084
19085
19086
19087 8b/-> *(ebp+0xc) 1/r32/ecx
19088
19089 8b/-> *ecx 6/r32/esi
19090
19091 8d/copy-address *(ecx+esi-4) 6/r32/esi
19092
19093 81 0/subop/add %ecx 8/imm32
19094
19095 8b/-> *(ebp+0x10) 2/r32/edx
19096 {
19097 $emit-cleanup-code-until-depth:loop:
19098
19099 39/compare %esi 1/r32/ecx
19100 0f 82/jump-if-addr< break/disp32
19101
19102 (lookup *esi *(esi+4))
19103 89/<- %ebx 0/r32/eax
19104
19105
19106
19107
19108
19109
19110 39/compare *(ebx+0x10) 2/r32/edx
19111 0f 8c/jump-if-< break/disp32
19112
19113 81 7/subop/compare *(ebx+0x18) 0/imm32
19114 {
19115 0f 84/jump-if-= break/disp32
19116 {
19117 $emit-cleanup-code-until-depth:check-for-previous-spill:
19118 8b/-> *(esi+8) 0/r32/eax
19119 3d/compare-eax-and 0/imm32/false
19120 74/jump-if-= break/disp8
19121 $emit-cleanup-code-until-depth:reclaim-var-in-register:
19122 (lookup *(ebx+0x18) *(ebx+0x1c))
19123 (emit-pop-register *(ebp+8) %eax)
19124 }
19125 eb/jump $emit-cleanup-code-until-depth:continue/disp8
19126 }
19127
19128 {
19129 75/jump-if-!= break/disp8
19130 $emit-cleanup-code-until-depth:var-on-stack:
19131 (size-of %ebx)
19132
19133 3d/compare-eax-and 0/imm32
19134 74/jump-if-= break/disp8
19135 $emit-cleanup-code-until-depth:reclaim-var-on-stack:
19136 (emit-indent *(ebp+8) *Curr-block-depth)
19137 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
19138 (write-int32-hex-buffered *(ebp+8) %eax)
19139 (write-buffered *(ebp+8) "/imm32\n")
19140 }
19141 $emit-cleanup-code-until-depth:continue:
19142
19143 81 5/subop/subtract %esi 0xc/imm32
19144 e9/jump loop/disp32
19145 }
19146 $emit-cleanup-code-until-depth:end:
19147
19148 5e/pop-to-esi
19149 5b/pop-to-ebx
19150 5a/pop-to-edx
19151 59/pop-to-ecx
19152 58/pop-to-eax
19153
19154 89/<- %esp 5/r32/ebp
19155 5d/pop-to-ebp
19156 c3/return
19157
19158
19159
19160 emit-cleanup-code-for-non-outputs:
19161
19162 55/push-ebp
19163 89/<- %ebp 4/r32/esp
19164
19165 50/push-eax
19166 51/push-ecx
19167 52/push-edx
19168 53/push-ebx
19169 56/push-esi
19170 57/push-edi
19171
19172 8b/-> *(ebp+0xc) 1/r32/ecx
19173
19174 8b/-> *ecx 6/r32/esi
19175
19176 8d/copy-address *(ecx+esi-4) 6/r32/esi
19177
19178 81 0/subop/add %ecx 8/imm32
19179 {
19180 $emit-cleanup-code-for-non-outputs:loop:
19181
19182 39/compare %esi 1/r32/ecx
19183 0f 82/jump-if-addr< break/disp32
19184
19185 (lookup *esi *(esi+4))
19186 89/<- %ebx 0/r32/eax
19187
19188 81 7/subop/compare *(ebx+0x18) 0/imm32
19189 {
19190 0f 84/jump-if-= break/disp32
19191 {
19192 $emit-cleanup-code-for-non-outputs:check-for-previous-spill:
19193 8b/-> *(esi+8) 0/r32/eax
19194 3d/compare-eax-and 0/imm32/false
19195 0f 84/jump-if-= break/disp32
19196 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register:
19197
19198 (lookup *(ebx+0x18) *(ebx+0x1c))
19199 89/<- %edi 0/r32/eax
19200
19201 (reg-in-function-outputs? *(ebp+0x10) %edi)
19202 3d/compare-eax-and 0/imm32/false
19203 {
19204 75/jump-if-!= break/disp8
19205 (emit-pop-register *(ebp+8) %edi)
19206 eb/jump $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done/disp8
19207 }
19208
19209 (emit-indent *(ebp+8) *Curr-block-depth)
19210 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
19211 }
19212 $emit-cleanup-code-for-non-outputs:reclaim-var-in-register-done:
19213 eb/jump $emit-cleanup-code-for-non-outputs:continue/disp8
19214 }
19215
19216 {
19217 75/jump-if-!= break/disp8
19218 $emit-cleanup-code-for-non-outputs:var-on-stack:
19219 (size-of %ebx)
19220
19221 3d/compare-eax-and 0/imm32
19222 74/jump-if-= break/disp8
19223 $emit-cleanup-code-for-non-outputs:reclaim-var-on-stack:
19224 (emit-indent *(ebp+8) *Curr-block-depth)
19225 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
19226 (write-int32-hex-buffered *(ebp+8) %eax)
19227 (write-buffered *(ebp+8) "/imm32\n")
19228 }
19229 $emit-cleanup-code-for-non-outputs:continue:
19230
19231 81 5/subop/subtract %esi 0xc/imm32
19232 e9/jump loop/disp32
19233 }
19234 $emit-cleanup-code-for-non-outputs:end:
19235
19236 5f/pop-to-edi
19237 5e/pop-to-esi
19238 5b/pop-to-ebx
19239 5a/pop-to-edx
19240 59/pop-to-ecx
19241 58/pop-to-eax
19242
19243 89/<- %esp 5/r32/ebp
19244 5d/pop-to-ebp
19245 c3/return
19246
19247 emit-push-register:
19248
19249 55/push-ebp
19250 89/<- %ebp 4/r32/esp
19251
19252 8b/-> *(ebp+0xc) 0/r32/eax
19253
19254 8a/copy-byte *(eax+4) 0/r32/AL
19255 81 4/subop/and %eax 0xff/imm32
19256
19257 {
19258 3d/compare-eax-and 0x78/imm32/x
19259 0f 85/jump-if-!= break/disp32
19260
19261 (emit-indent *(ebp+8) *Curr-block-depth)
19262 (write-buffered *(ebp+8) "81 5/subop/subtract %esp 4/imm32\n")
19263 (emit-indent *(ebp+8) *Curr-block-depth)
19264 (write-buffered *(ebp+8) "f3 0f 11/<- *esp ")
19265
19266 8b/-> *(ebp+0xc) 0/r32/eax
19267 8a/copy-byte *(eax+7) 0/r32/AL
19268 81 4/subop/and %eax 0xff/imm32
19269 (write-byte-buffered *(ebp+8) %eax)
19270 (write-buffered *(ebp+8) "/x32\n")
19271 e9/jump $emit-push-register:end/disp32
19272 }
19273
19274 (emit-indent *(ebp+8) *Curr-block-depth)
19275 (write-buffered *(ebp+8) "ff 6/subop/push %")
19276 (write-buffered *(ebp+8) *(ebp+0xc))
19277 (write-buffered *(ebp+8) Newline)
19278 $emit-push-register:end:
19279
19280 89/<- %esp 5/r32/ebp
19281 5d/pop-to-ebp
19282 c3/return
19283
19284 emit-pop-register:
19285
19286 55/push-ebp
19287 89/<- %ebp 4/r32/esp
19288
19289 50/push-eax
19290
19291 8b/-> *(ebp+0xc) 0/r32/eax
19292
19293 8a/copy-byte *(eax+4) 0/r32/AL
19294 81 4/subop/and %eax 0xff/imm32
19295
19296 {
19297 3d/compare-eax-and 0x78/imm32/x
19298 0f 85/jump-if-!= break/disp32
19299
19300 (emit-indent *(ebp+8) *Curr-block-depth)
19301 (write-buffered *(ebp+8) "f3 0f 10/-> *esp ")
19302
19303 8b/-> *(ebp+0xc) 0/r32/eax
19304 8a/copy-byte *(eax+7) 0/r32/AL
19305 81 4/subop/and %eax 0xff/imm32
19306 (write-byte-buffered *(ebp+8) %eax)
19307 (write-buffered *(ebp+8) "/x32\n")
19308 (emit-indent *(ebp+8) *Curr-block-depth)
19309 (write-buffered *(ebp+8) "81 0/subop/add %esp 4/imm32\n")
19310 e9/jump $emit-pop-register:end/disp32
19311 }
19312
19313 (emit-indent *(ebp+8) *Curr-block-depth)
19314 (write-buffered *(ebp+8) "8f 0/subop/pop %")
19315 (write-buffered *(ebp+8) *(ebp+0xc))
19316 (write-buffered *(ebp+8) Newline)
19317 $emit-pop-register:end:
19318
19319 58/pop-to-eax
19320
19321 89/<- %esp 5/r32/ebp
19322 5d/pop-to-ebp
19323 c3/return
19324
19325
19326
19327 emit-cleanup-code-until-target:
19328
19329 55/push-ebp
19330 89/<- %ebp 4/r32/esp
19331
19332 50/push-eax
19333 51/push-ecx
19334 52/push-edx
19335 53/push-ebx
19336
19337 8b/-> *(ebp+0xc) 1/r32/ecx
19338
19339 8b/-> *ecx 0/r32/eax
19340
19341 8d/copy-address *(ecx+eax-4) 2/r32/edx
19342
19343 81 0/subop/add %ecx 8/imm32
19344 {
19345 $emit-cleanup-code-until-target:loop:
19346
19347 39/compare %edx 1/r32/ecx
19348 0f 82/jump-if-addr< break/disp32
19349
19350 (lookup *edx *(edx+4))
19351 89/<- %ebx 0/r32/eax
19352
19353 (lookup *ebx *(ebx+4))
19354 (string-equal? %eax *(ebp+0x10))
19355 3d/compare-eax-and 0/imm32/false
19356 0f 85/jump-if-!= break/disp32
19357
19358 81 7/subop/compare *(ebx+0x18) 0/imm32
19359 {
19360 0f 84/jump-if-= break/disp32
19361 {
19362 $emit-cleanup-code-until-target:check-for-previous-spill:
19363 8b/-> *(edx+8) 0/r32/eax
19364 3d/compare-eax-and 0/imm32/false
19365 74/jump-if-= break/disp8
19366 $emit-cleanup-code-until-target:reclaim-var-in-register:
19367 (lookup *(ebx+0x18) *(ebx+0x1c))
19368 (emit-pop-register *(ebp+8) %eax)
19369 }
19370 eb/jump $emit-cleanup-code-until-target:continue/disp8
19371 }
19372
19373 {
19374 75/jump-if-!= break/disp8
19375 $emit-cleanup-code-until-target:reclaim-var-on-stack:
19376 (size-of %ebx)
19377
19378 3d/compare-eax-and 0/imm32
19379 74/jump-if-= break/disp8
19380
19381 (emit-indent *(ebp+8) *Curr-block-depth)
19382 (write-buffered *(ebp+8) "81 0/subop/add %esp ")
19383 (write-int32-hex-buffered *(ebp+8) %eax)
19384 (write-buffered *(ebp+8) "/imm32\n")
19385 }
19386 $emit-cleanup-code-until-target:continue:
19387
19388 81 5/subop/subtract %edx 0xc/imm32
19389 e9/jump loop/disp32
19390 }
19391 $emit-cleanup-code-until-target:end:
19392
19393 5b/pop-to-ebx
19394 5a/pop-to-edx
19395 59/pop-to-ecx
19396 58/pop-to-eax
19397
19398 89/<- %esp 5/r32/ebp
19399 5d/pop-to-ebp
19400 c3/return
19401
19402
19403
19404 clean-up-stack-offset-state:
19405
19406 55/push-ebp
19407 89/<- %ebp 4/r32/esp
19408
19409 50/push-eax
19410 51/push-ecx
19411 52/push-edx
19412 53/push-ebx
19413 56/push-esi
19414
19415 8b/-> *(ebp+8) 1/r32/ecx
19416
19417 8b/-> *ecx 6/r32/esi
19418
19419 8d/copy-address *(ecx+esi-4) 6/r32/esi
19420
19421 81 0/subop/add %ecx 8/imm32
19422
19423 8b/-> *(ebp+0xc) 2/r32/edx
19424 {
19425 $clean-up-stack-offset-state:loop:
19426
19427 39/compare %esi 1/r32/ecx
19428 0f 82/jump-if-addr< break/disp32
19429
19430 (lookup *esi *(esi+4))
19431 89/<- %ebx 0/r32/eax
19432
19433 39/compare *(ebx+0x10) 2/r32/edx
19434 0f 8c/jump-if-< break/disp32
19435
19436 81 7/subop/compare *(ebx+0x18) 0/imm32
19437 {
19438 0f 84/jump-if-= break/disp32
19439 {
19440 $clean-up-stack-offset-state:check-for-previous-spill:
19441 8b/-> *(esi+8) 0/r32/eax
19442 3d/compare-eax-and 0/imm32/false
19443 74/jump-if-= break/disp8
19444 $clean-up-stack-offset-state:reclaim-var-in-register:
19445 81 0/subop/add *Curr-local-stack-offset 4/imm32
19446 }
19447 eb/jump $clean-up-stack-offset-state:continue/disp8
19448 }
19449
19450 {
19451 75/jump-if-!= break/disp8
19452 $clean-up-stack-offset-state:var-on-stack:
19453 (size-of %ebx)
19454 01/add-to *Curr-local-stack-offset 0/r32/eax
19455 }
19456 $clean-up-stack-offset-state:continue:
19457
19458 81 5/subop/subtract %esi 0xc/imm32
19459 e9/jump loop/disp32
19460 }
19461 $clean-up-stack-offset-state:end:
19462
19463 5e/pop-to-esi
19464 5b/pop-to-ebx
19465 5a/pop-to-edx
19466 59/pop-to-ecx
19467 58/pop-to-eax
19468
19469 89/<- %esp 5/r32/ebp
19470 5d/pop-to-ebp
19471 c3/return
19472
19473
19474
19475
19476 not-yet-spilled-this-block?:
19477
19478 55/push-ebp
19479 89/<- %ebp 4/r32/esp
19480
19481 51/push-ecx
19482 52/push-edx
19483 53/push-ebx
19484 56/push-esi
19485 57/push-edi
19486
19487 8b/-> *(ebp+0xc) 1/r32/ecx
19488
19489 8b/-> *ecx 0/r32/eax
19490
19491 8d/copy-address *(ecx+eax-4) 2/r32/edx
19492
19493 8d/copy-address *(ecx+8) 1/r32/ecx
19494
19495 8b/-> *(ebp+8) 3/r32/ebx
19496 8b/-> *(ebx+0x10) 3/r32/ebx
19497
19498 8b/-> *(ebp+8) 6/r32/esi
19499 (lookup *(esi+0x18) *(esi+0x1c))
19500 89/<- %esi 0/r32/eax
19501 {
19502 $not-yet-spilled-this-block?:loop:
19503
19504 39/compare %edx 1/r32/ecx
19505 0f 82/jump-if-addr< break/disp32
19506
19507 (lookup *edx *(edx+4))
19508 89/<- %edi 0/r32/eax
19509
19510 39/compare *(edi+0x10) 3/r32/ebx
19511 0f 8c/jump-if-< break/disp32
19512
19513 (lookup *(edi+0x18) *(edi+0x1c))
19514 89/<- %edi 0/r32/eax
19515
19516 {
19517 $not-yet-spilled-this-block?:check-reg:
19518 81 7/subop/compare %edi 0/imm32
19519 0f 84/jump-if-= break/disp32
19520
19521 (string-equal? %esi %edi)
19522 3d/compare-eax-and 0/imm32/false
19523 74/jump-if-= break/disp8
19524 $not-yet-spilled-this-block?:return-false:
19525 b8/copy-to-eax 0/imm32/false
19526 eb/jump $not-yet-spilled-this-block?:end/disp8
19527 }
19528 $not-yet-spilled-this-block?:continue:
19529
19530 81 5/subop/subtract %edx 0xc/imm32
19531 e9/jump loop/disp32
19532 }
19533 $not-yet-spilled-this-block?:return-true:
19534
19535 b8/copy-to-eax 1/imm32/true
19536 $not-yet-spilled-this-block?:end:
19537
19538 5f/pop-to-edi
19539 5e/pop-to-esi
19540 5b/pop-to-ebx
19541 5a/pop-to-edx
19542 59/pop-to-ecx
19543
19544 89/<- %esp 5/r32/ebp
19545 5d/pop-to-ebp
19546 c3/return
19547
19548
19549 will-not-write-some-register?:
19550
19551 55/push-ebp
19552 89/<- %ebp 4/r32/esp
19553
19554 8b/-> *(ebp+8) 0/r32/eax
19555
19556 (lookup *(eax+0x18) *(eax+0x1c))
19557
19558 (find-register *(ebp+0x10) %eax)
19559
19560 {
19561 3d/compare-eax-and 0/imm32
19562 75/jump-if-!= break/disp8
19563 b8/copy-to-eax 1/imm32/true
19564 eb/jump $will-not-write-some-register?:end/disp8
19565 }
19566
19567 (assigns-in-stmts? *(ebp+0xc) %eax)
19568 3d/compare-eax-and 0/imm32/false
19569
19570 0f 94/set-if-= %al
19571 $will-not-write-some-register?:end:
19572
19573 89/<- %esp 5/r32/ebp
19574 5d/pop-to-ebp
19575 c3/return
19576
19577
19578
19579 find-register:
19580
19581 55/push-ebp
19582 89/<- %ebp 4/r32/esp
19583
19584 51/push-ecx
19585
19586 8b/-> *(ebp+8) 1/r32/ecx
19587 (lookup *(ecx+0x10) *(ecx+0x14))
19588 89/<- %ecx 0/r32/eax
19589 {
19590 $find-register:loop:
19591
19592 81 7/subop/compare %ecx 0/imm32
19593 74/jump-if-= break/disp8
19594
19595 (lookup *ecx *(ecx+4))
19596 (lookup *(eax+0x18) *(eax+0x1c))
19597
19598 $find-register:compare:
19599 (string-equal? *(ebp+0xc) %eax)
19600 {
19601 3d/compare-eax-and 0/imm32/false
19602 74/jump-if-= break/disp8
19603 $find-register:found:
19604 (lookup *ecx *(ecx+4))
19605 eb/jump $find-register:end/disp8
19606 }
19607
19608 (lookup *(ecx+8) *(ecx+0xc))
19609 89/<- %ecx 0/r32/eax
19610
19611 eb/jump loop/disp8
19612 }
19613 $find-register:end:
19614
19615 59/pop-to-ecx
19616
19617 89/<- %esp 5/r32/ebp
19618 5d/pop-to-ebp
19619 c3/return
19620
19621 assigns-in-stmts?:
19622
19623 55/push-ebp
19624 89/<- %ebp 4/r32/esp
19625
19626 51/push-ecx
19627
19628 8b/-> *(ebp+8) 1/r32/ecx
19629 {
19630
19631 81 7/subop/compare %ecx 0/imm32
19632 74/jump-if-= break/disp8
19633
19634 (lookup *ecx *(ecx+4))
19635 (assigns-in-stmt? %eax *(ebp+0xc))
19636 3d/compare-eax-and 0/imm32/false
19637 75/jump-if-!= break/disp8
19638
19639 (lookup *(ecx+8) *(ecx+0xc))
19640 89/<- %ecx 0/r32/eax
19641
19642 eb/jump loop/disp8
19643 }
19644 $assigns-in-stmts?:end:
19645
19646 59/pop-to-ecx
19647
19648 89/<- %esp 5/r32/ebp
19649 5d/pop-to-ebp
19650 c3/return
19651
19652 assigns-in-stmt?:
19653
19654 55/push-ebp
19655 89/<- %ebp 4/r32/esp
19656
19657 51/push-ecx
19658
19659 8b/-> *(ebp+8) 1/r32/ecx
19660
19661 {
19662 81 7/subop/compare *ecx 1/imm32/stmt1
19663 75/jump-if-!= break/disp8
19664 (lookup *(ecx+0x14) *(ecx+0x18))
19665 (assigns-in-stmt-vars? %eax *(ebp+0xc))
19666 eb/jump $assigns-in-stmt?:end/disp8
19667 }
19668
19669 {
19670 81 7/subop/compare *ecx 0/imm32/block
19671 75/jump-if-!= break/disp8
19672 (lookup *(ecx+4) *(ecx+8))
19673 (assigns-in-stmts? %eax *(ebp+0xc))
19674 eb/jump $assigns-in-stmt?:end/disp8
19675 }
19676
19677 b8/copy 0/imm32/false
19678 $assigns-in-stmt?:end:
19679
19680 59/pop-to-ecx
19681
19682 89/<- %esp 5/r32/ebp
19683 5d/pop-to-ebp
19684 c3/return
19685
19686 assigns-in-stmt-vars?:
19687
19688 55/push-ebp
19689 89/<- %ebp 4/r32/esp
19690
19691 51/push-ecx
19692
19693 8b/-> *(ebp+8) 1/r32/ecx
19694 {
19695
19696 81 7/subop/compare %ecx 0/imm32
19697 74/jump-if-= break/disp8
19698
19699 (lookup *ecx *(ecx+4))
19700
19701 {
19702 39/compare *(ebp+0xc) 0/r32/eax
19703 75/jump-if-!= break/disp8
19704 81 7/subop/compare *(ecx+0x10) 0/imm32/false
19705 75/jump-if-!= break/disp8
19706 b8/copy-to-eax 1/imm32/true
19707 eb/jump $assigns-in-stmt-vars?:end/disp8
19708 }
19709
19710 (lookup *(ecx+8) *(ecx+0xc))
19711 89/<- %ecx 0/r32/eax
19712
19713 eb/jump loop/disp8
19714 }
19715 $assigns-in-stmt-vars?:end:
19716
19717 59/pop-to-ecx
19718
19719 89/<- %esp 5/r32/ebp
19720 5d/pop-to-ebp
19721 c3/return
19722
19723
19724
19725
19726
19727 same-register-spilled-before?:
19728
19729 55/push-ebp
19730 89/<- %ebp 4/r32/esp
19731
19732 51/push-ecx
19733 52/push-edx
19734 53/push-ebx
19735 56/push-esi
19736 57/push-edi
19737
19738 8b/-> *(ebp+8) 1/r32/ecx
19739
19740 (lookup *(ecx+0x18) *(ecx+0x1c))
19741 89/<- %edx 0/r32/eax
19742
19743 8b/-> *(ecx+0x10) 3/r32/ebx
19744
19745 8b/-> *(ebp+0xc) 1/r32/ecx
19746 81 0/subop/add %ecx 8/imm32
19747
19748
19749
19750 8b/-> *(ebp+0x10) 6/r32/esi
19751
19752 81 5/subop/subtract %esi 8/imm32
19753 {
19754 $same-register-spilled-before?:loop:
19755
19756 39/compare %esi 1/r32/ecx
19757 0f 82/jump-if-addr< break/disp32
19758
19759 (lookup *esi *(esi+4))
19760
19761 39/compare *(eax+0x10) 3/r32/ebx
19762 0f 8c/jump-if-< break/disp32
19763
19764 81 7/subop/compare *(eax+0x18) 0/imm32
19765 74/jump-if-= $same-register-spilled-before?:continue/disp8
19766
19767 (lookup *(eax+0x18) *(eax+0x1c))
19768 (string-equal? %eax %edx)
19769 3d/compare-eax-and 0/imm32/false
19770 b8/copy-to-eax 1/imm32/true
19771 75/jump-if-!= $same-register-spilled-before?:end/disp8
19772 $same-register-spilled-before?:continue:
19773
19774 81 5/subop/subtract %esi 8/imm32
19775 e9/jump loop/disp32
19776 }
19777 $same-register-spilled-before?:false:
19778 b8/copy-to-eax 0/imm32/false
19779 $same-register-spilled-before?:end:
19780
19781 5f/pop-to-edi
19782 5e/pop-to-esi
19783 5b/pop-to-ebx
19784 5a/pop-to-edx
19785 59/pop-to-ecx
19786
19787 89/<- %esp 5/r32/ebp
19788 5d/pop-to-ebp
19789 c3/return
19790
19791
19792 clean-up-blocks:
19793
19794 55/push-ebp
19795 89/<- %ebp 4/r32/esp
19796
19797 50/push-eax
19798 51/push-ecx
19799 56/push-esi
19800
19801 8b/-> *(ebp+8) 6/r32/esi
19802
19803 8b/-> *(ebp+0xc) 1/r32/ecx
19804 {
19805 $clean-up-blocks:reclaim-loop:
19806
19807 8b/-> *esi 0/r32/eax
19808 3d/compare-eax-and 0/imm32
19809 0f 8e/jump-if-<= break/disp32
19810
19811 (lookup *(esi+eax-4) *(esi+eax))
19812
19813 39/compare *(eax+0x10) 1/r32/ecx
19814 0f 8c/jump-if-< break/disp32
19815 (pop %esi)
19816 (pop %esi)
19817 (pop %esi)
19818 e9/jump loop/disp32
19819 }
19820 $clean-up-blocks:end:
19821
19822 5e/pop-to-esi
19823 59/pop-to-ecx
19824 58/pop-to-eax
19825
19826 89/<- %esp 5/r32/ebp
19827 5d/pop-to-ebp
19828 c3/return
19829
19830 reg-in-function-outputs?:
19831
19832 55/push-ebp
19833 89/<- %ebp 4/r32/esp
19834
19835 51/push-ecx
19836
19837 8b/-> *(ebp+8) 1/r32/ecx
19838 (lookup *(ecx+0x10) *(ecx+0x14))
19839 89/<- %ecx 0/r32/eax
19840
19841 {
19842 81 7/subop/compare %ecx 0/imm32
19843 74/jump-if-= break/disp8
19844
19845 (lookup *ecx *(ecx+4))
19846
19847 (lookup *(eax+0x18) *(eax+0x1c))
19848
19849 (string-equal? %eax *(ebp+0xc))
19850 3d/compare-eax-and 0/imm32/false
19851 75/jump-if-!= $reg-in-function-outputs?:end/disp8
19852
19853 (lookup *(ecx+8) *(ecx+0xc))
19854 89/<- %ecx 0/r32/eax
19855
19856 eb/jump loop/disp8
19857 }
19858
19859 b8/copy-to-eax 0/imm32
19860 $reg-in-function-outputs?:end:
19861
19862 59/pop-to-ecx
19863
19864 89/<- %esp 5/r32/ebp
19865 5d/pop-to-ebp
19866 c3/return
19867
19868 emit-subx-var-def:
19869
19870 55/push-ebp
19871 89/<- %ebp 4/r32/esp
19872
19873 50/push-eax
19874 51/push-ecx
19875 52/push-edx
19876
19877 8b/-> *(ebp+0xc) 0/r32/eax
19878
19879 (lookup *(eax+4) *(eax+8))
19880 89/<- %ecx 0/r32/eax
19881
19882 8b/-> *Curr-block-depth 0/r32/eax
19883 89/<- *(ecx+0x10) 0/r32/eax
19884
19885 (size-of %ecx)
19886 89/<- %edx 0/r32/eax
19887
19888 29/subtract-from *Curr-local-stack-offset 2/r32/edx
19889
19890 8b/-> *Curr-local-stack-offset 0/r32/eax
19891 89/<- *(ecx+0x14) 0/r32/eax
19892
19893 {
19894 (lookup *(ecx+8) *(ecx+0xc))
19895 (is-mu-array? %eax)
19896 3d/compare-eax-and 0/imm32/false
19897 0f 84/jump-if-= break/disp32
19898
19899 81 5/subop/subtract %edx 4/imm32
19900
19901 (emit-array-data-initialization *(ebp+8) %edx)
19902 e9/jump $emit-subx-var-def:end/disp32
19903 }
19904
19905
19906 {
19907 (lookup *(ecx+8) *(ecx+0xc))
19908 (is-mu-stream? %eax)
19909 3d/compare-eax-and 0/imm32/false
19910 0f 84/jump-if-= break/disp32
19911
19912 81 5/subop/subtract %edx 0xc/imm32
19913 (emit-array-data-initialization *(ebp+8) %edx)
19914
19915 (emit-indent *(ebp+8) *Curr-block-depth)
19916 (write-buffered *(ebp+8) "68/push 0/imm32\n")
19917 (emit-indent *(ebp+8) *Curr-block-depth)
19918 (write-buffered *(ebp+8) "68/push 0/imm32\n")
19919
19920 eb/jump $emit-subx-var-def:end/disp8
19921 }
19922
19923 {
19924 81 7/subop/compare %edx 0/imm32
19925 7e/jump-if-<= break/disp8
19926 (emit-indent *(ebp+8) *Curr-block-depth)
19927 (write-buffered *(ebp+8) "68/push 0/imm32\n")
19928
19929 81 5/subop/subtract %edx 4/imm32
19930
19931 eb/jump loop/disp8
19932 }
19933 $emit-subx-var-def:end:
19934
19935 5a/pop-to-edx
19936 59/pop-to-ecx
19937 58/pop-to-eax
19938
19939 89/<- %esp 5/r32/ebp
19940 5d/pop-to-ebp
19941 c3/return
19942
19943 emit-array-data-initialization:
19944
19945 55/push-ebp
19946 89/<- %ebp 4/r32/esp
19947
19948 (emit-indent *(ebp+8) *Curr-block-depth)
19949 (write-buffered *(ebp+8) "(push-n-zero-bytes ")
19950 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
19951 (write-buffered *(ebp+8) ")\n")
19952 (emit-indent *(ebp+8) *Curr-block-depth)
19953 (write-buffered *(ebp+8) "68/push ")
19954 (write-int32-hex-buffered *(ebp+8) *(ebp+0xc))
19955 (write-buffered *(ebp+8) "/imm32\n")
19956 $emit-array-data-initialization:end:
19957
19958 89/<- %esp 5/r32/ebp
19959 5d/pop-to-ebp
19960 c3/return
19961
19962 emit-subx-stmt:
19963
19964 55/push-ebp
19965 89/<- %ebp 4/r32/esp
19966
19967 50/push-eax
19968 51/push-ecx
19969
19970
19971 8b/-> *(ebp+0xc) 1/r32/ecx
19972 (lookup *(ecx+4) *(ecx+8))
19973 89/<- %ecx 0/r32/eax
19974
19975 {
19976
19977 (string-equal? %ecx "length")
19978 3d/compare-eax-and 0/imm32
19979 0f 84/jump-if-= break/disp32
19980 (translate-mu-length-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
19981 e9/jump $emit-subx-stmt:end/disp32
19982 }
19983
19984 {
19985
19986 (string-equal? %ecx "index")
19987 3d/compare-eax-and 0/imm32
19988 0f 84/jump-if-= break/disp32
19989 (translate-mu-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
19990 e9/jump $emit-subx-stmt:end/disp32
19991 }
19992
19993 {
19994
19995 (string-equal? %ecx "compute-offset")
19996 3d/compare-eax-and 0/imm32
19997 0f 84/jump-if-= break/disp32
19998 (translate-mu-compute-index-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
19999 e9/jump $emit-subx-stmt:end/disp32
20000 }
20001
20002 {
20003
20004 (string-equal? %ecx "get")
20005 3d/compare-eax-and 0/imm32
20006 0f 84/jump-if-= break/disp32
20007 (translate-mu-get-stmt *(ebp+8) *(ebp+0xc))
20008 e9/jump $emit-subx-stmt:end/disp32
20009 }
20010
20011 {
20012
20013 (string-equal? %ecx "allocate")
20014 3d/compare-eax-and 0/imm32
20015 0f 84/jump-if-= break/disp32
20016 (translate-mu-allocate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20017 e9/jump $emit-subx-stmt:end/disp32
20018 }
20019
20020 {
20021
20022 (string-equal? %ecx "copy-object")
20023 3d/compare-eax-and 0/imm32
20024 0f 84/jump-if-= break/disp32
20025 (translate-mu-copy-object-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20026 e9/jump $emit-subx-stmt:end/disp32
20027 }
20028
20029 {
20030
20031 (string-equal? %ecx "populate")
20032 3d/compare-eax-and 0/imm32
20033 0f 84/jump-if-= break/disp32
20034 (translate-mu-populate-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20035 e9/jump $emit-subx-stmt:end/disp32
20036 }
20037
20038 {
20039
20040 (string-equal? %ecx "populate-stream")
20041 3d/compare-eax-and 0/imm32
20042 0f 84/jump-if-= break/disp32
20043 (translate-mu-populate-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20044 e9/jump $emit-subx-stmt:end/disp32
20045 }
20046
20047 {
20048
20049 (string-equal? %ecx "read-from-stream")
20050 3d/compare-eax-and 0/imm32
20051 0f 84/jump-if-= break/disp32
20052 (translate-mu-read-from-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20053 e9/jump $emit-subx-stmt:end/disp32
20054 }
20055
20056 {
20057
20058 (string-equal? %ecx "write-to-stream")
20059 3d/compare-eax-and 0/imm32
20060 0f 84/jump-if-= break/disp32
20061 (translate-mu-write-to-stream-stmt *(ebp+8) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
20062 e9/jump $emit-subx-stmt:end/disp32
20063 }
20064
20065 {
20066 $emit-subx-stmt:check-for-primitive:
20067
20068 (find-matching-primitive *(ebp+0x10) *(ebp+0xc))
20069 3d/compare-eax-and 0/imm32
20070 74/jump-if-= break/disp8
20071 $emit-subx-stmt:primitive:
20072 (emit-subx-primitive *(ebp+8) *(ebp+0xc) %eax)
20073 e9/jump $emit-subx-stmt:end/disp32
20074 }
20075
20076
20077 $emit-subx-stmt:call:
20078 (emit-call *(ebp+8) *(ebp+0xc))
20079 $emit-subx-stmt:end:
20080
20081 59/pop-to-ecx
20082 58/pop-to-eax
20083
20084 89/<- %esp 5/r32/ebp
20085 5d/pop-to-ebp
20086 c3/return
20087
20088 translate-mu-length-stmt:
20089
20090 55/push-ebp
20091 89/<- %ebp 4/r32/esp
20092
20093 50/push-eax
20094 51/push-ecx
20095 52/push-edx
20096 53/push-ebx
20097 56/push-esi
20098
20099 8b/-> *(ebp+0xc) 6/r32/esi
20100
20101 (lookup *(esi+0xc) *(esi+0x10))
20102 (lookup *eax *(eax+4))
20103 89/<- %ebx 0/r32/eax
20104
20105 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
20106 89/<- %ecx 0/r32/eax
20107
20108 (lookup *(esi+0x14) *(esi+0x18))
20109 (lookup *eax *(eax+4))
20110 (lookup *(eax+0x18) *(eax+0x1c))
20111 89/<- %edx 0/r32/eax
20112
20113 {
20114 81 7/subop/compare %ecx 1/imm32
20115 75/jump-if-!= break/disp8
20116 $translate-mu-length-stmt:size-1:
20117 (emit-save-size-to *(ebp+8) %ebx %edx)
20118 e9/jump $translate-mu-length-stmt:end/disp32
20119 }
20120
20121 {
20122 (power-of-2? %ecx *(ebp+0x10) *(ebp+0x14))
20123 3d/compare-eax-and 0/imm32/false
20124 74/jump-if-= break/disp8
20125 81 7/subop/compare %ecx 0xff/imm32
20126 7f/jump-if-> break/disp8
20127 $translate-mu-length-stmt:size-power-of-2:
20128 (emit-save-size-to *(ebp+8) %ebx %edx)
20129 (emit-divide-by-shift-right *(ebp+8) %edx %ecx)
20130 e9/jump $translate-mu-length-stmt:end/disp32
20131 }
20132
20133
20134 {
20135 $translate-mu-length-stmt:complex:
20136 (string-equal? %edx "eax")
20137 3d/compare-eax-and 0/imm32/false
20138 75/break-if-!= break/disp8
20139 (emit-indent *(ebp+8) *Curr-block-depth)
20140 (write-buffered *(ebp+8) "50/push-eax\n")
20141 }
20142 {
20143 (string-equal? %edx "ecx")
20144 3d/compare-eax-and 0/imm32/false
20145 75/break-if-!= break/disp8
20146 (emit-indent *(ebp+8) *Curr-block-depth)
20147 (write-buffered *(ebp+8) "51/push-ecx\n")
20148 }
20149 {
20150 (string-equal? %edx "edx")
20151 3d/compare-eax-and 0/imm32/false
20152 75/break-if-!= break/disp8
20153 (emit-indent *(ebp+8) *Curr-block-depth)
20154 (write-buffered *(ebp+8) "52/push-edx\n")
20155 }
20156
20157 (emit-save-size-to *(ebp+8) %ebx "eax")
20158 (emit-indent *(ebp+8) *Curr-block-depth)
20159 (write-buffered *(ebp+8) "31/xor %edx 2/r32/edx\n")
20160 (emit-indent *(ebp+8) *Curr-block-depth)
20161 (write-buffered *(ebp+8) "b9/copy-to-ecx ")
20162 (write-int32-hex-buffered *(ebp+8) %ecx)
20163 (write-buffered *(ebp+8) "/imm32\n")
20164 (emit-indent *(ebp+8) *Curr-block-depth)
20165 (write-buffered *(ebp+8) "f7 7/subop/idiv-eax-edx-by %ecx\n")
20166 {
20167 (string-equal? %edx "eax")
20168 3d/compare-eax-and 0/imm32/false
20169 75/break-if-!= break/disp8
20170 (emit-indent *(ebp+8) *Curr-block-depth)
20171 (write-buffered *(ebp+8) "89/<- %")
20172 (write-buffered *(ebp+8) %edx)
20173 (write-buffered *(ebp+8) " 0/r32/eax\n")
20174 }
20175
20176 {
20177 (string-equal? %edx "edx")
20178 3d/compare-eax-and 0/imm32/false
20179 75/break-if-!= break/disp8
20180 (emit-indent *(ebp+8) *Curr-block-depth)
20181 (write-buffered *(ebp+8) "5a/pop-to-edx\n")
20182 }
20183 {
20184 (string-equal? %edx "ecx")
20185 3d/compare-eax-and 0/imm32/false
20186 75/break-if-!= break/disp8
20187 (emit-indent *(ebp+8) *Curr-block-depth)
20188 (write-buffered *(ebp+8) "59/pop-to-ecx\n")
20189 }
20190 {
20191 (string-equal? %edx "eax")
20192 3d/compare-eax-and 0/imm32/false
20193 75/break-if-!= break/disp8
20194 (emit-indent *(ebp+8) *Curr-block-depth)
20195 (write-buffered *(ebp+8) "58/pop-to-eax\n")
20196 }
20197 $translate-mu-length-stmt:end:
20198
20199 5e/pop-to-esi
20200 5b/pop-to-ebx
20201 5a/pop-to-edx
20202 59/pop-to-ecx
20203 58/pop-to-eax
20204
20205 89/<- %esp 5/r32/ebp
20206 5d/pop-to-ebp
20207 c3/return
20208
20209 array-element-size:
20210
20211 55/push-ebp
20212 89/<- %ebp 4/r32/esp
20213
20214 (array-element-type-id *(ebp+8) *(ebp+0xc) *(ebp+0x10))
20215 (size-of-type-id-as-array-element %eax)
20216 $array-element-size:end:
20217
20218 89/<- %esp 5/r32/ebp
20219 5d/pop-to-ebp
20220 c3/return
20221
20222 array-element-type-id:
20223
20224
20225 55/push-ebp
20226 89/<- %ebp 4/r32/esp
20227
20228 8b/-> *(ebp+8) 0/r32/eax
20229
20230 (lookup *(eax+8) *(eax+0xc))
20231
20232 3d/compare-eax-with 0/imm32
20233 0f 84/jump-if-== $array-element-type-id:error0/disp32
20234
20235 81 7/subop/compare *eax 0/imm32/false
20236 0f 85/jump-if-!= $array-element-type-id:error1/disp32
20237
20238 {
20239 50/push-eax
20240 (lookup *(eax+4) *(eax+8))
20241 (is-simple-mu-type? %eax 2)
20242 3d/compare-eax-with 0/imm32/false
20243 58/pop-to-eax
20244 74/jump-if-= break/disp8
20245 $array-element-type-id:skip-addr:
20246 (lookup *(eax+0xc) *(eax+0x10))
20247 }
20248
20249 3d/compare-eax-with 0/imm32
20250 0f 84/jump-if-= $array-element-type-id:error2/disp32
20251
20252 81 7/subop/compare *eax 0/imm32/false
20253 0f 85/jump-if-!= $array-element-type-id:error2/disp32
20254
20255 {
20256 50/push-eax
20257 (lookup *(eax+4) *(eax+8))
20258 (is-simple-mu-type? %eax 3)
20259 3d/compare-eax-with 0/imm32/false
20260 58/pop-to-eax
20261 $array-element-type-id:no-array:
20262 0f 84/jump-if-= $array-element-type-id:error2/disp32
20263 }
20264 $array-element-type-id:skip-array:
20265
20266 (lookup *(eax+0xc) *(eax+0x10))
20267
20268 3d/compare-eax-with 0/imm32
20269 0f 84/jump-if-= $array-element-type-id:error2/disp32
20270
20271 81 7/subop/compare *eax 0/imm32/false
20272 0f 85/jump-if-!= $array-element-type-id:error2/disp32
20273
20274 (lookup *(eax+4) *(eax+8))
20275
20276
20277 {
20278 81 7/subop/compare *eax 0/imm32/false
20279 75/jump-if-!= break/disp8
20280 (lookup *(eax+4) *(eax+8))
20281 }
20282
20283 8b/-> *(eax+4) 0/r32/eax
20284 $array-element-type-id:end:
20285
20286 89/<- %esp 5/r32/ebp
20287 5d/pop-to-ebp
20288 c3/return
20289
20290 $array-element-type-id:error0:
20291 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
20292 50/push-eax
20293 8b/-> *(ebp+8) 0/r32/eax
20294 (lookup *eax *(eax+4))
20295 (write-buffered *(ebp+0xc) %eax)
20296 58/pop-to-eax
20297 (write-buffered *(ebp+0xc) "' has no type\n")
20298 (flush *(ebp+0xc))
20299 (stop *(ebp+0x10) 1)
20300
20301
20302 $array-element-type-id:error1:
20303 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
20304 50/push-eax
20305 8b/-> *(ebp+8) 0/r32/eax
20306 (lookup *eax *(eax+4))
20307 (write-buffered *(ebp+0xc) %eax)
20308 58/pop-to-eax
20309 (write-buffered *(ebp+0xc) "' has atomic type ")
20310 (write-int32-hex-buffered *(ebp+0xc) *(eax+4))
20311 (write-buffered *(ebp+0xc) Newline)
20312 (flush *(ebp+0xc))
20313 (stop *(ebp+0x10) 1)
20314
20315
20316 $array-element-type-id:error2:
20317 (write-buffered *(ebp+0xc) "array-element-type-id: var '")
20318 50/push-eax
20319 8b/-> *(ebp+8) 0/r32/eax
20320 (lookup *eax *(eax+4))
20321 (write-buffered *(ebp+0xc) %eax)
20322 58/pop-to-eax
20323 (write-buffered *(ebp+0xc) "' has non-array type\n")
20324 (flush *(ebp+0xc))
20325 (stop *(ebp+0x10) 1)
20326
20327
20328 size-of-type-id-as-array-element:
20329
20330 55/push-ebp
20331 89/<- %ebp 4/r32/esp
20332
20333 8b/-> *(ebp+8) 0/r32/eax
20334
20335 3d/compare-eax-and 8/imm32/byte
20336 {
20337 75/jump-if-!= break/disp8
20338 b8/copy-to-eax 1/imm32
20339 eb/jump $size-of-type-id-as-array-element:end/disp8
20340 }
20341
20342 (size-of-type-id %eax)
20343 $size-of-type-id-as-array-element:end:
20344
20345 89/<- %esp 5/r32/ebp
20346 5d/pop-to-ebp
20347 c3/return
20348
20349 emit-save-size-to:
20350
20351 55/push-ebp
20352 89/<- %ebp 4/r32/esp
20353
20354 50/push-eax
20355 53/push-ebx
20356
20357 8b/-> *(ebp+0xc) 3/r32/ebx
20358 (emit-indent *(ebp+8) *Curr-block-depth)
20359 (write-buffered *(ebp+8) "8b/-> *")
20360
20361 {
20362 81 7/subop/compare *(ebx+0x18)) 0/imm32
20363 74/jump-if-= break/disp8
20364 $emit-save-size-to:emit-base-from-register:
20365 (lookup *(ebx+0x18) *(ebx+0x1c))
20366 (write-buffered *(ebp+8) %eax)
20367 eb/jump $emit-save-size-to:emit-output/disp8
20368 }
20369
20370 {
20371 81 7/subop/compare *(ebx+0x14)) 0/imm32
20372 74/jump-if-= break/disp8
20373 $emit-save-size-to:emit-base-from-stack:
20374 (write-buffered *(ebp+8) "(ebp+")
20375 (write-int32-hex-buffered *(ebp+8) *(ebx+0x14))
20376 (write-buffered *(ebp+8) ")")
20377 }
20378 $emit-save-size-to:emit-output:
20379 (write-buffered *(ebp+8) " ")
20380 (get Mu-registers *(ebp+0x10) 0xc "Mu-registers")
20381 (write-int32-hex-buffered *(ebp+8) *eax)
20382 (write-buffered *(ebp+8) "/r32\n")
20383 $emit-save-size-to:end:
20384
20385 5b/pop-to-ebx
20386 58/pop-to-eax
20387
20388 89/<- %esp 5/r32/ebp
20389 5d/pop-to-ebp
20390 c3/return
20391
20392 emit-divide-by-shift-right:
20393
20394 55/push-ebp
20395 89/<- %ebp 4/r32/esp
20396
20397 50/push-eax
20398
20399 (emit-indent *(ebp+8) *Curr-block-depth)
20400 (write-buffered *(ebp+8) "c1/shift 5/subop/>> %")
20401 (write-buffered *(ebp+8) *(ebp+0xc))
20402 (write-buffered *(ebp+8) Space)
20403 (num-shift-rights *(ebp+0x10))
20404 (write-int32-hex-buffered *(ebp+8) %eax)
20405 (write-buffered *(ebp+8) "/imm8\n")
20406 $emit-divide-by-shift-right:end:
20407
20408 58/pop-to-eax
20409
20410 89/<- %esp 5/r32/ebp
20411 5d/pop-to-ebp
20412 c3/return
20413
20414 translate-mu-index-stmt:
20415
20416 55/push-ebp
20417 89/<- %ebp 4/r32/esp
20418
20419 51/push-ecx
20420
20421 8b/-> *(ebp+0xc) 1/r32/ecx
20422
20423 (lookup *(ecx+0xc) *(ecx+0x10))
20424 (lookup *eax *(eax+4))
20425 89/<- %ecx 0/r32/eax
20426
20427 {
20428 81 7/subop/compare *(ecx+0x18) 0/imm32
20429 74/jump-if-= break/disp8
20430
20431 (translate-mu-index-stmt-with-array-in-register *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20432 eb/jump $translate-mu-index-stmt:end/disp8
20433 }
20434
20435 {
20436 81 7/subop/compare *(ecx+0x14) 0/imm32
20437 74/jump-if-= break/disp8
20438
20439 (translate-mu-index-stmt-with-array-on-stack *(ebp+8) *(ebp+0xc) *(ebp+0x10) *(ebp+0x14))
20440 eb/jump $translate-mu-index-stmt:end/disp8
20441 }
20442 $translate-mu-index-stmt:end:
20443
20444 59/pop-to-ecx
20445
20446 89/<- %esp 5/r32/ebp
20447 5d/pop-to-ebp
20448 c3/return
20449
20450 $translate-mu-index-stmt-with-array:error1:
20451 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input must either lie in a register or be a literal\n")
20452 (flush *(ebp+0x10))
20453 (stop *(ebp+0x14) 1)
20454
20455
20456 $translate-mu-index-stmt-with-array:error2:
20457 (write-buffered *(ebp+0x10) "couldn't translate an index instruction. second (index) input when in a register must be an int or offset\n")
20458 (flush *(ebp+0x10))
20459 (stop *(ebp+0x14) 1)
20460
20461
20462 translate-mu-index-stmt-with-array-in-register:
20463
20464 55/push-ebp
20465 89/<- %ebp 4/r32/esp
20466
20467 50/push-eax
20468 51/push-ecx
20469 52/push-edx
20470 53/push-ebx
20471
20472 (emit-indent *(ebp+8) *Curr-block-depth)
20473 (write-buffered *(ebp+8) "8d/copy-address *(")
20474
20475 $translate-mu-index-stmt-with-array-in-register:emit-base:
20476
20477 8b/-> *(ebp+0xc) 1/r32/ecx
20478
20479 (lookup *(ecx+0xc) *(ecx+0x10))
20480 (lookup *eax *(eax+4))
20481 89/<- %ebx 0/r32/eax
20482
20483 (lookup *(ebx+0x18) *(ebx+0x1c))
20484 (write-buffered *(ebp+8) %eax)
20485 (write-buffered *(ebp+8) " + ")
20486
20487 (lookup *(ecx+0xc) *(ecx+0x10))
20488 (lookup *(eax+8) *(eax+0xc))
20489 (lookup *eax *(eax+4))
20490 89/<- %edx 0/r32/eax
20491
20492 81 7/subop/compare *(edx+0x18) 0/imm32
20493 {
20494 0f 84/jump-if-= break/disp32
20495 $translate-mu-index-stmt-with-array-in-register:emit-register-index:
20496
20497 (lookup *(edx+8) *(edx+0xc))
20498 (is-simple-mu-type? %eax 1)
20499 3d/compare-eax-and 0/imm32/false
20500 {
20501 0f 84/jump-if-= break/disp32
20502 $translate-mu-index-stmt-with-array-in-register:emit-int-register-index:
20503
20504
20505 (lookup *(edx+0x18) *(edx+0x1c))
20506 (write-buffered *(ebp+8) %eax)
20507 (write-buffered *(ebp+8) "<<")
20508
20509
20510 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
20511 (num-shift-rights %eax)
20512 (write-int32-hex-buffered *(ebp+8) %eax)
20513 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-register-index-done/disp32
20514 }
20515
20516 (lookup *(edx+8) *(edx+0xc))
20517 81 7/subop/compare *eax 0/imm32/false
20518 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
20519
20520 (lookup *(eax+4) *(eax+8))
20521 (is-simple-mu-type? %eax 7)
20522 3d/compare-eax-and 0/imm32/false
20523 {
20524 0f 84/jump-if-= break/disp32
20525
20526 $translate-mu-index-stmt-with-array-in-register:emit-offset-register-index:
20527 (lookup *(edx+0x18) *(edx+0x1c))
20528 (write-buffered *(ebp+8) %eax)
20529 }
20530 $translate-mu-index-stmt-with-array-in-register:emit-register-index-done:
20531 (write-buffered *(ebp+8) " + 4) ")
20532 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
20533 }
20534
20535 (lookup *(edx+8) *(edx+0xc))
20536 (is-simple-mu-type? %eax 0)
20537 3d/compare-eax-and 0/imm32/false
20538 {
20539 0f 84/jump-if-= break/disp32
20540 $translate-mu-index-stmt-with-array-in-register:emit-literal-index:
20541
20542 (lookup *edx *(edx+4))
20543 (parse-hex-int %eax)
20544 89/<- %edx 0/r32/eax
20545
20546 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
20547 f7 4/subop/multiply-into-edx-eax %edx
20548
20549 05/add-to-eax 4/imm32
20550
20551
20552 (write-int32-hex-buffered *(ebp+8) %eax)
20553 (write-buffered *(ebp+8) ") ")
20554 e9/jump $translate-mu-index-stmt-with-array-in-register:emit-output/disp32
20555 }
20556
20557 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
20558 $translate-mu-index-stmt-with-array-in-register:emit-output:
20559
20560 8b/-> *(ebp+0xc) 1/r32/ecx
20561 (lookup *(ecx+0x14) *(ecx+0x18))
20562 (lookup *eax *(eax+4))
20563 (lookup *(eax+0x18) *(eax+0x1c))
20564 (get Mu-registers %eax 0xc "Mu-registers")
20565 (write-int32-hex-buffered *(ebp+8) *eax)
20566 (write-buffered *(ebp+8) "/r32\n")
20567 $translate-mu-index-stmt-with-array-in-register:end:
20568
20569 5b/pop-to-ebx
20570 5a/pop-to-edx
20571 59/pop-to-ecx
20572 58/pop-to-eax
20573
20574 89/<- %esp 5/r32/ebp
20575 5d/pop-to-ebp
20576 c3/return
20577
20578 translate-mu-index-stmt-with-array-on-stack:
20579
20580 55/push-ebp
20581 89/<- %ebp 4/r32/esp
20582
20583 50/push-eax
20584 51/push-ecx
20585 52/push-edx
20586 53/push-ebx
20587
20588 (emit-indent *(ebp+8) *Curr-block-depth)
20589 (write-buffered *(ebp+8) "8d/copy-address *(ebp + ")
20590
20591 8b/-> *(ebp+0xc) 0/r32/eax
20592 (lookup *(eax+0xc) *(eax+0x10))
20593 89/<- %edx 0/r32/eax
20594
20595 (lookup *eax *(eax+4))
20596 89/<- %ecx 0/r32/eax
20597
20598 (lookup *(edx+8) *(edx+0xc))
20599
20600 (lookup *eax *(eax+4))
20601 89/<- %edx 0/r32/eax
20602
20603 81 7/subop/compare *(edx+0x18) 0/imm32
20604 {
20605 0f 84/jump-if-= break/disp32
20606 $translate-mu-index-stmt-with-array-on-stack:emit-register-index:
20607
20608 (lookup *(edx+8) *(edx+0xc))
20609 (is-simple-mu-type? %eax 1)
20610 3d/compare-eax-and 0/imm32/false
20611 {
20612 0f 84/jump-if-= break/disp32
20613 $translate-mu-index-stmt-with-array-on-stack:emit-int-register-index:
20614
20615
20616 (lookup *(edx+0x18) *(edx+0x1c))
20617 (write-buffered *(ebp+8) %eax)
20618 (write-buffered *(ebp+8) "<<")
20619
20620
20621 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
20622 (num-shift-rights %eax)
20623 (write-int32-hex-buffered *(ebp+8) %eax)
20624
20625 (write-buffered *(ebp+8) " + ")
20626
20627 8b/-> *(ecx+0x14) 0/r32/eax
20628 05/add-to-eax 4/imm32
20629 (write-int32-hex-buffered *(ebp+8) %eax)
20630 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done/disp32
20631 }
20632
20633 (lookup *(edx+8) *(edx+0xc))
20634 81 7/subop/compare *eax 0/imm32/false
20635 0f 85/jump-if-!= $translate-mu-index-stmt-with-array:error2/disp32
20636
20637 (lookup *(eax+4) *(eax+8))
20638 (is-simple-mu-type? %eax 7)
20639 3d/compare-eax-and 0/imm32/false
20640 {
20641 0f 84/jump-if-= break/disp32
20642
20643 $translate-mu-index-stmt-with-array-on-stack:emit-offset-register-index:
20644 (lookup *(edx+0x18) *(edx+0x1c))
20645 (write-buffered *(ebp+8) %eax)
20646 }
20647 $translate-mu-index-stmt-with-array-on-stack:emit-register-index-done:
20648 (write-buffered *(ebp+8) ") ")
20649 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
20650 }
20651
20652 (lookup *(edx+8) *(edx+0xc))
20653 (is-simple-mu-type? %eax 0)
20654 3d/compare-eax-and 0/imm32/false
20655 {
20656 0f 84/jump-if-= break/disp32
20657 $translate-mu-index-stmt-with-array-on-stack:emit-literal-index:
20658
20659 (lookup *edx *(edx+4))
20660 (parse-hex-int %eax)
20661 89/<- %edx 0/r32/eax
20662
20663 (array-element-size %ecx *(ebp+0x10) *(ebp+0x14))
20664 f7 4/subop/multiply-into-edx-eax %edx
20665
20666 03/add *(ecx+0x14) 0/r32/eax
20667
20668 05/add-to-eax 4/imm32
20669
20670
20671 (write-int32-hex-buffered *(ebp+8) %eax)
20672 (write-buffered *(ebp+8) ") ")
20673 e9/jump $translate-mu-index-stmt-with-array-on-stack:emit-output/disp32
20674 }
20675
20676 e9/jump $translate-mu-index-stmt-with-array:error1/disp32
20677 $translate-mu-index-stmt-with-array-on-stack:emit-output:
20678
20679 8b/-> *(ebp+0xc) 0/r32/eax
20680 (lookup *(eax+0x14) *(eax+0x18))
20681 (lookup *eax *(eax+4))
20682 (lookup *(eax+0x18) *(eax+0x1c))
20683 (get Mu-registers %eax 0xc "Mu-registers")
20684 (write-int32-hex-buffered *(ebp+8) *eax)
20685 (write-buffered *(ebp+8) "/r32\n")
20686 $translate-mu-index-stmt-with-array-on-stack:end:
20687
20688 5b/pop-to-ebx
20689 5a/pop-to-edx
20690 59/pop-to-ecx
20691 58/pop-to-eax
20692
20693 89/<- %esp 5/r32/ebp
20694 5d/pop-to-ebp
20695 c3/return
20696
20697 translate-mu-compute-index-stmt:
20698
20699 55/push-ebp
20700 89/<- %ebp 4/r32/esp
20701
20702 50/push-eax
20703 51/push-ecx
20704 52/push-edx
20705 53/push-ebx
20706
20707 (emit-indent *(ebp+8) *Curr-block-depth)
20708 (write-buffered *(ebp+8) "69/multiply")
20709
20710 8b/-> *(ebp+0xc) 1/r32/ecx
20711
20712 (lookup *(ecx+0xc) *(ecx+0x10))
20713 89/<- %ebx 0/r32/eax
20714 $translate-mu-compute-index-stmt:emit-index:
20715 (lookup *(ebx+8) *(ebx+0xc))
20716 (emit-subx-var-as-rm32 *(ebp+8) %eax)
20717 (write-buffered *(ebp+8) Space)
20718 $translate-mu-compute-index-stmt:emit-elem-size:
20719
20720 (lookup *ebx *(ebx+4))
20721 89/<- %ebx 0/r32/eax
20722
20723 (array-element-size %ebx *(ebp+0x10) *(ebp+0x14))
20724 (write-int32-hex-buffered *(ebp+8) %eax)
20725 (write-buffered *(ebp+8) "/imm32 ")
20726 $translate-mu-compute-index-stmt:emit-output:
20727
20728 (lookup *(ecx+0x14) *(ecx+0x18))
20729 (lookup *eax *(eax+4))
20730 (lookup *(eax+0x18) *(eax+0x1c))
20731 (get Mu-registers %eax 0xc "Mu-registers")
20732 (write-int32-hex-buffered *(ebp+8) *eax)
20733 (write-buffered *(ebp+8) "/r32\n")
20734 $translate-mu-compute-index-stmt:end:
20735
20736 5b/pop-to-ebx
20737 5a/pop-to-edx
20738 59/pop-to-ecx
20739 58/pop-to-eax
20740
20741 89/<- %esp 5/r32/ebp
20742 5d/pop-to-ebp
20743 c3/return
20744
20745 translate-mu-get-stmt:
20746
20747 55/push-ebp
20748 89/<- %ebp 4/r32/esp
20749
20750 50/push-eax
20751 51/push-ecx
20752 52/push-edx
20753
20754 (emit-indent *(ebp+8) *Curr-block-depth)
20755 (write-buffered *(ebp+8) "8d/copy-address ")
20756
20757 8b/-> *(ebp+0xc) 1/r32/ecx
20758
20759 (mu-get-offset %ecx)
20760 89/<- %edx 0/r32/eax
20761
20762 (lookup *(ecx+0xc) *(ecx+0x10))
20763 (lookup *eax *(eax+4))
20764
20765 81 7/subop/compare *(eax+0x18) 0/imm32
20766 {
20767 0f 84/jump-if-= break/disp32
20768 $translate-mu-get-stmt:emit-register-input:
20769
20770 (write-buffered *(ebp+8) "*(")
20771 (lookup *(eax+0x18) *(eax+0x1c))
20772 (write-buffered *(ebp+8) %eax)
20773 (write-buffered *(ebp+8) " + ")
20774 (write-int32-hex-buffered *(ebp+8) %edx)
20775 (write-buffered *(ebp+8) ") ")
20776 e9/jump $translate-mu-get-stmt:emit-output/disp32
20777 }
20778
20779 {
20780 $translate-mu-get-stmt:emit-stack-input:
20781
20782 (write-buffered *(ebp+8) "*(ebp+")
20783 03/add *(eax+0x14) 2/r32/edx
20784 (write-int32-hex-buffered *(ebp+8) %edx)
20785 (write-buffered *(ebp+8) ") ")
20786 eb/jump $translate-mu-get-stmt:emit-output/disp8
20787 }
20788 $translate-mu-get-stmt:emit-output:
20789
20790 (lookup *(ecx+0x14) *(ecx+0x18))
20791 (lookup *eax *(eax+4))
20792
20793 (lookup *(eax+0x18) *(eax+0x1c))
20794 (get Mu-registers %eax 0xc "Mu-registers")
20795 (write-int32-hex-buffered *(ebp+8) *eax)
20796 (write-buffered *(ebp+8) "/r32\n")
20797 $translate-mu-get-stmt:end:
20798
20799 5a/pop-to-edx
20800 59/pop-to-ecx
20801 58/pop-to-eax
20802
20803 89/<- %esp 5/r32/ebp
20804 5d/pop-to-ebp
20805 c3/return
20806
20807 translate-mu-copy-object-stmt:
20808
20809 55/push-ebp
20810 89/<- %ebp 4/r32/esp
20811
20812 50/push-eax
20813
20814 (emit-indent *(ebp+8) *Curr-block-depth)
20815 (write-buffered *(ebp+8) "(copy-bytes")
20816
20817 8b/-> *(ebp+0xc) 0/r32/eax
20818
20819 (lookup *(eax+0xc) *(eax+0x10))
20820 (emit-subx-call-operand *(ebp+8) %eax)
20821 (lookup *(eax+8) *(eax+0xc))
20822 (emit-subx-call-operand *(ebp+8) %eax)
20823 (write-buffered *(ebp+8) Space)
20824 (addr-payload-size %eax *(ebp+0x10) *(ebp+0x14))
20825 (write-int32-hex-buffered *(ebp+8) %eax)
20826 (write-buffered *(ebp+8) ")\n")
20827 $translate-mu-copy-object-stmt:end:
20828
20829 58/pop-to-eax
20830
20831 89/<- %esp 5/r32/ebp
20832 5d/pop-to-ebp
20833 c3/return
20834
20835 translate-mu-allocate-stmt:
20836
20837 55/push-ebp
20838 89/<- %ebp 4/r32/esp
20839
20840 50/push-eax
20841 56/push-esi
20842 57/push-edi
20843
20844 8b/-> *(ebp+0xc) 6/r32/esi
20845
20846 (lookup *(esi+0xc) *(esi+0x10))
20847 89/<- %edi 0/r32/eax
20848
20849 (emit-indent *(ebp+8) *Curr-block-depth)
20850 (write-buffered *(ebp+8) "(allocate Heap ")
20851 (addr-handle-payload-size %edi *(ebp+0x10) *(ebp+0x14))
20852 (write-int32-hex-buffered *(ebp+8) %eax)
20853 (emit-subx-call-operand *(ebp+8) %edi)
20854 (write-buffered *(ebp+8) ")\n")
20855 $translate-mu-allocate-stmt:end:
20856
20857 5f/pop-to-edi
20858 5e/pop-to-esi
20859 58/pop-to-eax
20860
20861 89/<- %esp 5/r32/ebp
20862 5d/pop-to-ebp
20863 c3/return
20864
20865 addr-handle-payload-size:
20866
20867 55/push-ebp
20868 89/<- %ebp 4/r32/esp
20869
20870 8b/-> *(ebp+8) 0/r32/eax
20871 (lookup *eax *(eax+4))
20872 (lookup *(eax+8) *(eax+0xc))
20873
20874
20875
20876
20877 $addr-handle-payload-size:skip-addr:
20878 (lookup *(eax+0xc) *(eax+0x10))
20879
20880
20881
20882
20883 $addr-handle-payload-size:skip-handle:
20884 (lookup *(eax+0xc) *(eax+0x10))
20885
20886
20887 81 7/subop/compare *eax 0/imm32/false
20888 {
20889 75/jump-if-!= break/disp8
20890 (lookup *(eax+4) *(eax+8))
20891 }
20892
20893
20894 (size-of-type-id *(eax+4))
20895 $addr-handle-payload-size:end:
20896
20897 89/<- %esp 5/r32/ebp
20898 5d/pop-to-ebp
20899 c3/return
20900
20901 addr-payload-size:
20902
20903 55/push-ebp
20904 89/<- %ebp 4/r32/esp
20905
20906 8b/-> *(ebp+8) 0/r32/eax
20907 (lookup *eax *(eax+4))
20908 (lookup *(eax+8) *(eax+0xc))
20909
20910
20911
20912
20913 $addr-payload-size:skip-addr:
20914 (lookup *(eax+0xc) *(eax+0x10))
20915
20916
20917 81 7/subop/compare *eax 0/imm32/false
20918 {
20919 75/jump-if-!= break/disp8
20920 (lookup *(eax+4) *(eax+8))
20921 }
20922
20923
20924 (size-of-type-id *(eax+4))
20925 $addr-payload-size:end:
20926
20927 89/<- %esp 5/r32/ebp
20928 5d/pop-to-ebp
20929 c3/return
20930
20931 translate-mu-populate-stmt:
20932
20933 55/push-ebp
20934 89/<- %ebp 4/r32/esp
20935
20936 50/push-eax
20937 51/push-ecx
20938 56/push-esi
20939 57/push-edi
20940
20941 8b/-> *(ebp+0xc) 6/r32/esi
20942
20943 (lookup *(esi+0xc) *(esi+0x10))
20944 89/<- %edi 0/r32/eax
20945
20946 (lookup *(edi+8) *(edi+0xc))
20947 89/<- %ecx 0/r32/eax
20948
20949 (emit-indent *(ebp+8) *Curr-block-depth)
20950 (write-buffered *(ebp+8) "(allocate-array2 Heap ")
20951 (addr-handle-array-payload-size %edi *(ebp+0x10) *(ebp+0x14))
20952 (write-int32-hex-buffered *(ebp+8) %eax)
20953 (emit-subx-call-operand *(ebp+8) %ecx)
20954 (emit-subx-call-operand *(ebp+8) %edi)
20955 (write-buffered *(ebp+8) ")\n")
20956 $translate-mu-populate-stmt:end:
20957
20958 5f/pop-to-edi
20959 5e/pop-to-esi
20960 59/pop-to-ecx
20961 58/pop-to-eax
20962
20963 89/<- %esp 5/r32/ebp
20964 5d/pop-to-ebp
20965 c3/return
20966
20967 translate-mu-populate-stream-stmt:
20968
20969 55/push-ebp
20970 89/<- %ebp 4/r32/esp
20971
20972 50/push-eax
20973 51/push-ecx
20974 56/push-esi
20975 57/push-edi
20976
20977 8b/-> *(ebp+0xc) 6/r32/esi
20978
20979 (lookup *(esi+0xc) *(esi+0x10))
20980 89/<- %edi 0/r32/eax
20981
20982 (lookup *(edi+8) *(edi+0xc))
20983 89/<- %ecx 0/r32/eax
20984
20985 (emit-indent *(ebp+8) *Curr-block-depth)
20986 (write-buffered *(ebp+8) "(new-stream Heap ")
20987 (addr-handle-stream-payload-size %edi *(ebp+0x10) *(ebp+0x14))
20988 (write-int32-hex-buffered *(ebp+8) %eax)
20989 (emit-subx-call-operand *(ebp+8) %ecx)
20990 (emit-subx-call-operand *(ebp+8) %edi)
20991 (write-buffered *(ebp+8) ")\n")
20992 $translate-mu-populate-stream-stmt:end:
20993
20994 5f/pop-to-edi
20995 5e/pop-to-esi
20996 59/pop-to-ecx
20997 58/pop-to-eax
20998
20999 89/<- %esp 5/r32/ebp
21000 5d/pop-to-ebp
21001 c3/return
21002
21003 translate-mu-read-from-stream-stmt:
21004
21005 55/push-ebp
21006 89/<- %ebp 4/r32/esp
21007
21008 50/push-eax
21009 51/push-ecx
21010 56/push-esi
21011 57/push-edi
21012
21013 8b/-> *(ebp+0xc) 6/r32/esi
21014
21015 (lookup *(esi+0xc) *(esi+0x10))
21016 89/<- %ecx 0/r32/eax
21017
21018 (lookup *(ecx+8) *(ecx+0xc))
21019 89/<- %edi 0/r32/eax
21020
21021 (emit-indent *(ebp+8) *Curr-block-depth)
21022 (write-buffered *(ebp+8) "(read-from-stream")
21023 (emit-subx-call-operand *(ebp+8) %ecx)
21024 (emit-subx-call-operand *(ebp+8) %edi)
21025 (write-buffered *(ebp+8) Space)
21026 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
21027 (write-int32-hex-buffered *(ebp+8) %eax)
21028 (write-buffered *(ebp+8) ")\n")
21029 $translate-mu-read-from-stream-stmt:end:
21030
21031 5f/pop-to-edi
21032 5e/pop-to-esi
21033 59/pop-to-ecx
21034 58/pop-to-eax
21035
21036 89/<- %esp 5/r32/ebp
21037 5d/pop-to-ebp
21038 c3/return
21039
21040 translate-mu-write-to-stream-stmt:
21041
21042 55/push-ebp
21043 89/<- %ebp 4/r32/esp
21044
21045 50/push-eax
21046 51/push-ecx
21047 56/push-esi
21048 57/push-edi
21049
21050 8b/-> *(ebp+0xc) 6/r32/esi
21051
21052 (lookup *(esi+0xc) *(esi+0x10))
21053 89/<- %ecx 0/r32/eax
21054
21055 (lookup *(ecx+8) *(ecx+0xc))
21056 89/<- %edi 0/r32/eax
21057
21058 (emit-indent *(ebp+8) *Curr-block-depth)
21059 (write-buffered *(ebp+8) "(write-to-stream")
21060 (emit-subx-call-operand *(ebp+8) %ecx)
21061 (flush *(ebp+8))
21062 (emit-subx-call-operand *(ebp+8) %edi)
21063 (flush *(ebp+8))
21064 (write-buffered *(ebp+8) Space)
21065 (flush *(ebp+8))
21066 (addr-payload-size %edi *(ebp+0x10) *(ebp+0x14))
21067 (write-int32-hex-buffered *(ebp+8) %eax)
21068 (write-buffered *(ebp+8) ")\n")
21069 $translate-mu-write-to-stream-stmt:end:
21070
21071 5f/pop-to-edi
21072 5e/pop-to-esi
21073 59/pop-to-ecx
21074 58/pop-to-eax
21075
21076 89/<- %esp 5/r32/ebp
21077 5d/pop-to-ebp
21078 c3/return
21079
21080 addr-handle-array-payload-size:
21081
21082 55/push-ebp
21083 89/<- %ebp 4/r32/esp
21084
21085 8b/-> *(ebp+8) 0/r32/eax
21086 (lookup *eax *(eax+4))
21087 (lookup *(eax+8) *(eax+0xc))
21088
21089
21090
21091
21092 $addr-handle-array-payload-size:skip-addr:
21093 (lookup *(eax+0xc) *(eax+0x10))
21094
21095
21096
21097
21098 $addr-handle-array-payload-size:skip-handle:
21099 (lookup *(eax+0xc) *(eax+0x10))
21100
21101
21102
21103
21104 $addr-handle-array-payload-size:skip-array:
21105 (lookup *(eax+0xc) *(eax+0x10))
21106
21107
21108 81 7/subop/compare *eax 0/imm32/false
21109 {
21110 75/jump-if-!= break/disp8
21111 (lookup *(eax+4) *(eax+8))
21112 }
21113 $addr-handle-array-payload-size:compute-size:
21114
21115
21116 (size-of-type-id-as-array-element *(eax+4))
21117 $addr-handle-array-payload-size:end:
21118
21119 89/<- %esp 5/r32/ebp
21120 5d/pop-to-ebp
21121 c3/return
21122
21123 addr-handle-stream-payload-size:
21124
21125 55/push-ebp
21126 89/<- %ebp 4/r32/esp
21127
21128 8b/-> *(ebp+8) 0/r32/eax
21129 (lookup *eax *(eax+4))
21130 (lookup *(eax+8) *(eax+0xc))
21131
21132
21133
21134
21135 $addr-handle-stream-payload-size:skip-addr:
21136 (lookup *(eax+0xc) *(eax+0x10))
21137
21138
21139
21140
21141 $addr-handle-stream-payload-size:skip-handle:
21142 (lookup *(eax+0xc) *(eax+0x10))
21143
21144
21145
21146
21147 $addr-handle-stream-payload-size:skip-stream:
21148 (lookup *(eax+0xc) *(eax+0x10))
21149
21150
21151 81 7/subop/compare *eax 0/imm32/false
21152 {
21153 75/jump-if-!= break/disp8
21154 (lookup *(eax+4) *(eax+8))
21155 }
21156 $addr-handle-stream-payload-size:compute-size:
21157
21158
21159 (size-of-type-id-as-array-element *(eax+4))
21160 $addr-handle-stream-payload-size:end:
21161
21162 89/<- %esp 5/r32/ebp
21163 5d/pop-to-ebp
21164 c3/return
21165
21166 power-of-2?:
21167
21168
21169 55/push-ebp
21170 89/<- %ebp 4/r32/esp
21171
21172 8b/-> *(ebp+8) 0/r32/eax
21173
21174 3d/compare-eax-with 0/imm32
21175 0f 8c/jump-if-< $power-of-2?:abort/disp32
21176
21177 48/decrement-eax
21178
21179 23/and-> *(ebp+8) 0/r32/eax
21180
21181 3d/compare-eax-and 0/imm32
21182 0f 94/set-byte-if-= %al
21183 81 4/subop/and %eax 0xff/imm32
21184 $power-of-2?:end:
21185
21186 89/<- %esp 5/r32/ebp
21187 5d/pop-to-ebp
21188 c3/return
21189
21190 $power-of-2?:abort:
21191 (write-buffered *(ebp+0xc) "power-of-2?: negative number\n")
21192 (flush *(ebp+0xc))
21193 (stop *(ebp+0x10) 1)
21194
21195
21196 num-shift-rights:
21197
21198
21199 55/push-ebp
21200 89/<- %ebp 4/r32/esp
21201
21202 51/push-ecx
21203
21204 8b/-> *(ebp+8) 1/r32/ecx
21205
21206 b8/copy-to-eax 0/imm32
21207 {
21208
21209 81 7/subop/compare %ecx 1/imm32
21210 7e/jump-if-<= break/disp8
21211 40/increment-eax
21212 c1/shift 5/subop/arithmetic-right %ecx 1/imm8
21213 eb/jump loop/disp8
21214 }
21215 $num-shift-rights:end:
21216
21217 59/pop-to-ecx
21218
21219 89/<- %esp 5/r32/ebp
21220 5d/pop-to-ebp
21221 c3/return
21222
21223 mu-get-offset:
21224
21225 55/push-ebp
21226 89/<- %ebp 4/r32/esp
21227
21228 8b/-> *(ebp+8) 0/r32/eax
21229 (lookup *(eax+0xc) *(eax+0x10))
21230 (lookup *(eax+8) *(eax+0xc))
21231
21232 (lookup *eax *(eax+4))
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243 8b/-> *(eax+0x14) 0/r32/eax
21244
21245
21246
21247
21248 $emit-get-offset:end:
21249
21250 89/<- %esp 5/r32/ebp
21251 5d/pop-to-ebp
21252 c3/return
21253
21254 emit-subx-block:
21255
21256 55/push-ebp
21257 89/<- %ebp 4/r32/esp
21258
21259 50/push-eax
21260 51/push-ecx
21261 56/push-esi
21262
21263 8b/-> *(ebp+0xc) 6/r32/esi
21264
21265 (lookup *(esi+0xc) *(esi+0x10))
21266 8b/-> *Curr-block-depth 1/r32/ecx
21267 89/<- *(eax+0x10) 1/r32/ecx
21268
21269 (lookup *(esi+4) *(esi+8))
21270
21271 {
21272 $emit-subx-block:check-empty:
21273 3d/compare-eax-and 0/imm32
21274 0f 84/jump-if-= break/disp32
21275 (emit-indent *(ebp+8) *Curr-block-depth)
21276 (write-buffered *(ebp+8) "{\n")
21277
21278 (lookup *(esi+0xc) *(esi+0x10))
21279 89/<- %ecx 0/r32/eax
21280
21281 (lookup *ecx *(ecx+4))
21282 (write-buffered *(ebp+8) %eax)
21283 (write-buffered *(ebp+8) ":loop:\n")
21284 ff 0/subop/increment *Curr-block-depth
21285 (push *(ebp+0x10) *(esi+0xc))
21286 (push *(ebp+0x10) *(esi+0x10))
21287 (push *(ebp+0x10) 0)
21288
21289 (lookup *(esi+4) *(esi+8))
21290 (emit-subx-stmt-list *(ebp+8) %eax *(ebp+0x10) *(ebp+0x14) *(ebp+0x18) *(ebp+0x1c))
21291 (pop *(ebp+0x10))
21292 (pop *(ebp+0x10))
21293 (pop *(ebp+0x10))
21294 ff 1/subop/decrement *Curr-block-depth
21295 (emit-indent *(ebp+8) *Curr-block-depth)
21296 (write-buffered *(ebp+8) "}\n")
21297 (lookup *ecx *(ecx+4))
21298 (write-buffered *(ebp+8) %eax)
21299 (write-buffered *(ebp+8) ":break:\n")
21300 }
21301 $emit-subx-block:end:
21302
21303 5e/pop-to-esi
21304 59/pop-to-ecx
21305 58/pop-to-eax
21306
21307 89/<- %esp 5/r32/ebp
21308 5d/pop-to-ebp
21309 c3/return
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360 == data
21361 Primitives:
21362
21363 _Primitive-increment-eax:
21364
21365 0x11/imm32/alloc-id:fake
21366 _string-increment/imm32/name
21367 0/imm32/no-inouts
21368 0/imm32/no-inouts
21369 0x11/imm32/alloc-id:fake
21370 Single-int-var-in-eax/imm32/outputs
21371 0x11/imm32/alloc-id:fake
21372 _string_40_increment_eax/imm32/subx-name
21373 0/imm32/no-rm32
21374 0/imm32/no-r32
21375 0/imm32/no-imm32
21376 0/imm32/no-imm8
21377 0/imm32/no-disp32
21378 0/imm32/no-xm32
21379 0/imm32/no-x32
21380 0x11/imm32/alloc-id:fake
21381 _Primitive-increment-ecx/imm32/next
21382 _Primitive-increment-ecx:
21383 0x11/imm32/alloc-id:fake:payload
21384
21385 0x11/imm32/alloc-id:fake
21386 _string-increment/imm32/name
21387 0/imm32/no-inouts
21388 0/imm32/no-inouts
21389 0x11/imm32/alloc-id:fake
21390 Single-int-var-in-ecx/imm32/outputs
21391 0x11/imm32/alloc-id:fake
21392 _string_41_increment_ecx/imm32/subx-name
21393 0/imm32/no-rm32
21394 0/imm32/no-r32
21395 0/imm32/no-imm32
21396 0/imm32/no-imm8
21397 0/imm32/no-disp32
21398 0/imm32/no-xm32
21399 0/imm32/no-x32
21400 0x11/imm32/alloc-id:fake
21401 _Primitive-increment-edx/imm32/next
21402 _Primitive-increment-edx:
21403 0x11/imm32/alloc-id:fake:payload
21404
21405 0x11/imm32/alloc-id:fake
21406 _string-increment/imm32/name
21407 0/imm32/no-inouts
21408 0/imm32/no-inouts
21409 0x11/imm32/alloc-id:fake
21410 Single-int-var-in-edx/imm32/outputs
21411 0x11/imm32/alloc-id:fake
21412 _string_42_increment_edx/imm32/subx-name
21413 0/imm32/no-rm32
21414 0/imm32/no-r32
21415 0/imm32/no-imm32
21416 0/imm32/no-imm8
21417 0/imm32/no-disp32
21418 0/imm32/no-xm32
21419 0/imm32/no-x32
21420 0x11/imm32/alloc-id:fake
21421 _Primitive-increment-ebx/imm32/next
21422 _Primitive-increment-ebx:
21423 0x11/imm32/alloc-id:fake:payload
21424
21425 0x11/imm32/alloc-id:fake
21426 _string-increment/imm32/name
21427 0/imm32/no-inouts
21428 0/imm32/no-inouts
21429 0x11/imm32/alloc-id:fake
21430 Single-int-var-in-ebx/imm32/outputs
21431 0x11/imm32/alloc-id:fake
21432 _string_43_increment_ebx/imm32/subx-name
21433 0/imm32/no-rm32
21434 0/imm32/no-r32
21435 0/imm32/no-imm32
21436 0/imm32/no-imm8
21437 0/imm32/no-disp32
21438 0/imm32/no-xm32
21439 0/imm32/no-x32
21440 0x11/imm32/alloc-id:fake
21441 _Primitive-increment-esi/imm32/next
21442 _Primitive-increment-esi:
21443 0x11/imm32/alloc-id:fake:payload
21444
21445 0x11/imm32/alloc-id:fake
21446 _string-increment/imm32/name
21447 0/imm32/no-inouts
21448 0/imm32/no-inouts
21449 0x11/imm32/alloc-id:fake
21450 Single-int-var-in-esi/imm32/outputs
21451 0x11/imm32/alloc-id:fake
21452 _string_46_increment_esi/imm32/subx-name
21453 0/imm32/no-rm32
21454 0/imm32/no-r32
21455 0/imm32/no-imm32
21456 0/imm32/no-imm8
21457 0/imm32/no-disp32
21458 0/imm32/no-xm32
21459 0/imm32/no-x32
21460 0x11/imm32/alloc-id:fake
21461 _Primitive-increment-edi/imm32/next
21462 _Primitive-increment-edi:
21463 0x11/imm32/alloc-id:fake:payload
21464
21465 0x11/imm32/alloc-id:fake
21466 _string-increment/imm32/name
21467 0/imm32/no-inouts
21468 0/imm32/no-inouts
21469 0x11/imm32/alloc-id:fake
21470 Single-int-var-in-edi/imm32/outputs
21471 0x11/imm32/alloc-id:fake
21472 _string_47_increment_edi/imm32/subx-name
21473 0/imm32/no-rm32
21474 0/imm32/no-r32
21475 0/imm32/no-imm32
21476 0/imm32/no-imm8
21477 0/imm32/no-disp32
21478 0/imm32/no-xm32
21479 0/imm32/no-x32
21480 0x11/imm32/alloc-id:fake
21481 _Primitive-decrement-eax/imm32/next
21482 _Primitive-decrement-eax:
21483 0x11/imm32/alloc-id:fake:payload
21484
21485 0x11/imm32/alloc-id:fake
21486 _string-decrement/imm32/name
21487 0/imm32/no-inouts
21488 0/imm32/no-inouts
21489 0x11/imm32/alloc-id:fake
21490 Single-int-var-in-eax/imm32/outputs
21491 0x11/imm32/alloc-id:fake
21492 _string_48_decrement_eax/imm32/subx-name
21493 0/imm32/no-rm32
21494 0/imm32/no-r32
21495 0/imm32/no-imm32
21496 0/imm32/no-imm8
21497 0/imm32/no-disp32
21498 0/imm32/no-xm32
21499 0/imm32/no-x32
21500 0x11/imm32/alloc-id:fake
21501 _Primitive-decrement-ecx/imm32/next
21502 _Primitive-decrement-ecx:
21503 0x11/imm32/alloc-id:fake:payload
21504
21505 0x11/imm32/alloc-id:fake
21506 _string-decrement/imm32/name
21507 0/imm32/no-inouts
21508 0/imm32/no-inouts
21509 0x11/imm32/alloc-id:fake
21510 Single-int-var-in-ecx/imm32/outputs
21511 0x11/imm32/alloc-id:fake
21512 _string_49_decrement_ecx/imm32/subx-name
21513 0/imm32/no-rm32
21514 0/imm32/no-r32
21515 0/imm32/no-imm32
21516 0/imm32/no-imm8
21517 0/imm32/no-disp32
21518 0/imm32/no-xm32
21519 0/imm32/no-x32
21520 0x11/imm32/alloc-id:fake
21521 _Primitive-decrement-edx/imm32/next
21522 _Primitive-decrement-edx:
21523 0x11/imm32/alloc-id:fake:payload
21524
21525 0x11/imm32/alloc-id:fake
21526 _string-decrement/imm32/name
21527 0/imm32/no-inouts
21528 0/imm32/no-inouts
21529 0x11/imm32/alloc-id:fake
21530 Single-int-var-in-edx/imm32/outputs
21531 0x11/imm32/alloc-id:fake
21532 _string_4a_decrement_edx/imm32/subx-name
21533 0/imm32/no-rm32
21534 0/imm32/no-r32
21535 0/imm32/no-imm32
21536 0/imm32/no-imm8
21537 0/imm32/no-disp32
21538 0/imm32/no-xm32
21539 0/imm32/no-x32
21540 0x11/imm32/alloc-id:fake
21541 _Primitive-decrement-ebx/imm32/next
21542 _Primitive-decrement-ebx:
21543 0x11/imm32/alloc-id:fake:payload
21544
21545 0x11/imm32/alloc-id:fake
21546 _string-decrement/imm32/name
21547 0/imm32/no-inouts
21548 0/imm32/no-inouts
21549 0x11/imm32/alloc-id:fake
21550 Single-int-var-in-ebx/imm32/outputs
21551 0x11/imm32/alloc-id:fake
21552 _string_4b_decrement_ebx/imm32/subx-name
21553 0/imm32/no-rm32
21554 0/imm32/no-r32
21555 0/imm32/no-imm32
21556 0/imm32/no-imm8
21557 0/imm32/no-disp32
21558 0/imm32/no-xm32
21559 0/imm32/no-x32
21560 0x11/imm32/alloc-id:fake
21561 _Primitive-decrement-esi/imm32/next
21562 _Primitive-decrement-esi:
21563 0x11/imm32/alloc-id:fake:payload
21564
21565 0x11/imm32/alloc-id:fake
21566 _string-decrement/imm32/name
21567 0/imm32/no-inouts
21568 0/imm32/no-inouts
21569 0x11/imm32/alloc-id:fake
21570 Single-int-var-in-esi/imm32/outputs
21571 0x11/imm32/alloc-id:fake
21572 _string_4e_decrement_esi/imm32/subx-name
21573 0/imm32/no-rm32
21574 0/imm32/no-r32
21575 0/imm32/no-imm32
21576 0/imm32/no-imm8
21577 0/imm32/no-disp32
21578 0/imm32/no-xm32
21579 0/imm32/no-x32
21580 0x11/imm32/alloc-id:fake
21581 _Primitive-decrement-edi/imm32/next
21582 _Primitive-decrement-edi:
21583 0x11/imm32/alloc-id:fake:payload
21584
21585 0x11/imm32/alloc-id:fake
21586 _string-decrement/imm32/name
21587 0/imm32/no-inouts
21588 0/imm32/no-inouts
21589 0x11/imm32/alloc-id:fake
21590 Single-int-var-in-edi/imm32/outputs
21591 0x11/imm32/alloc-id:fake
21592 _string_4f_decrement_edi/imm32/subx-name
21593 0/imm32/no-rm32
21594 0/imm32/no-r32
21595 0/imm32/no-imm32
21596 0/imm32/no-imm8
21597 0/imm32/no-disp32
21598 0/imm32/no-xm32
21599 0/imm32/no-x32
21600 0x11/imm32/alloc-id:fake
21601 _Primitive-increment-mem/imm32/next
21602 _Primitive-increment-mem:
21603 0x11/imm32/alloc-id:fake:payload
21604
21605 0x11/imm32/alloc-id:fake
21606 _string-increment/imm32/name
21607 0x11/imm32/alloc-id:fake
21608 Single-int-var-in-mem/imm32/inouts
21609 0/imm32/no-outputs
21610 0/imm32/no-outputs
21611 0x11/imm32/alloc-id:fake
21612 _string_ff_subop_increment/imm32/subx-name
21613 1/imm32/rm32-is-first-inout
21614 0/imm32/no-r32
21615 0/imm32/no-imm32
21616 0/imm32/no-imm8
21617 0/imm32/no-disp32
21618 0/imm32/no-xm32
21619 0/imm32/no-x32
21620 0x11/imm32/alloc-id:fake
21621 _Primitive-increment-reg/imm32/next
21622 _Primitive-increment-reg:
21623 0x11/imm32/alloc-id:fake:payload
21624
21625 0x11/imm32/alloc-id:fake
21626 _string-increment/imm32/name
21627 0/imm32/no-inouts
21628 0/imm32/no-inouts
21629 0x11/imm32/alloc-id:fake
21630 Single-int-var-in-some-register/imm32/outputs
21631 0x11/imm32/alloc-id:fake
21632 _string_ff_subop_increment/imm32/subx-name
21633 3/imm32/rm32-is-first-output
21634 0/imm32/no-r32
21635 0/imm32/no-imm32
21636 0/imm32/no-imm8
21637 0/imm32/no-disp32
21638 0/imm32/no-xm32
21639 0/imm32/no-x32
21640 0x11/imm32/alloc-id:fake
21641 _Primitive-decrement-mem/imm32/next
21642 _Primitive-decrement-mem:
21643 0x11/imm32/alloc-id:fake:payload
21644
21645 0x11/imm32/alloc-id:fake
21646 _string-decrement/imm32/name
21647 0x11/imm32/alloc-id:fake
21648 Single-int-var-in-mem/imm32/inouts
21649 0/imm32/no-outputs
21650 0/imm32/no-outputs
21651 0x11/imm32/alloc-id:fake
21652 _string_ff_subop_decrement/imm32/subx-name
21653 1/imm32/rm32-is-first-inout
21654 0/imm32/no-r32
21655 0/imm32/no-imm32
21656 0/imm32/no-imm8
21657 0/imm32/no-disp32
21658 0/imm32/no-xm32
21659 0/imm32/no-x32
21660 0x11/imm32/alloc-id:fake
21661 _Primitive-decrement-reg/imm32/next
21662 _Primitive-decrement-reg:
21663 0x11/imm32/alloc-id:fake:payload
21664
21665 0x11/imm32/alloc-id:fake
21666 _string-decrement/imm32/name
21667 0/imm32/no-inouts
21668 0/imm32/no-inouts
21669 0x11/imm32/alloc-id:fake
21670 Single-int-var-in-some-register/imm32/outputs
21671 0x11/imm32/alloc-id:fake
21672 _string_ff_subop_decrement/imm32/subx-name
21673 3/imm32/rm32-is-first-output
21674 0/imm32/no-r32
21675 0/imm32/no-imm32
21676 0/imm32/no-imm8
21677 0/imm32/no-disp32
21678 0/imm32/no-xm32
21679 0/imm32/no-x32
21680 0x11/imm32/alloc-id:fake
21681 _Primitive-add-to-eax/imm32/next
21682
21683 _Primitive-add-to-eax:
21684 0x11/imm32/alloc-id:fake:payload
21685
21686 0x11/imm32/alloc-id:fake
21687 _string-add/imm32/name
21688 0x11/imm32/alloc-id:fake
21689 Single-lit-var/imm32/inouts
21690 0x11/imm32/alloc-id:fake
21691 Single-int-var-in-eax/imm32/outputs
21692 0x11/imm32/alloc-id:fake
21693 _string_05_add_to_eax/imm32/subx-name
21694 0/imm32/no-rm32
21695 0/imm32/no-r32
21696 1/imm32/imm32-is-first-inout
21697 0/imm32/no-imm8
21698 0/imm32/no-disp32
21699 0/imm32/no-xm32
21700 0/imm32/no-x32
21701 0x11/imm32/alloc-id:fake
21702 _Primitive-add-reg-to-reg/imm32/next
21703 _Primitive-add-reg-to-reg:
21704 0x11/imm32/alloc-id:fake:payload
21705
21706 0x11/imm32/alloc-id:fake
21707 _string-add/imm32/name
21708 0x11/imm32/alloc-id:fake
21709 Single-int-var-in-some-register/imm32/inouts
21710 0x11/imm32/alloc-id:fake
21711 Single-int-var-in-some-register/imm32/outputs
21712 0x11/imm32/alloc-id:fake
21713 _string_01_add_to/imm32/subx-name
21714 3/imm32/rm32-is-first-output
21715 1/imm32/r32-is-first-inout
21716 0/imm32/no-imm32
21717 0/imm32/no-imm8
21718 0/imm32/no-disp32
21719 0/imm32/no-xm32
21720 0/imm32/no-x32
21721 0x11/imm32/alloc-id:fake
21722 _Primitive-add-reg-to-mem/imm32/next
21723 _Primitive-add-reg-to-mem:
21724 0x11/imm32/alloc-id:fake:payload
21725
21726 0x11/imm32/alloc-id:fake
21727 _string-add-to/imm32/name
21728 0x11/imm32/alloc-id:fake
21729 Two-args-int-stack-int-reg/imm32/inouts
21730 0/imm32/no-outputs
21731 0/imm32/no-outputs
21732 0x11/imm32/alloc-id:fake
21733 _string_01_add_to/imm32/subx-name
21734 1/imm32/rm32-is-first-inout
21735 2/imm32/r32-is-second-inout
21736 0/imm32/no-imm32
21737 0/imm32/no-imm8
21738 0/imm32/no-disp32
21739 0/imm32/no-xm32
21740 0/imm32/no-x32
21741 0x11/imm32/alloc-id:fake
21742 _Primitive-add-mem-to-reg/imm32/next
21743 _Primitive-add-mem-to-reg:
21744 0x11/imm32/alloc-id:fake:payload
21745
21746 0x11/imm32/alloc-id:fake
21747 _string-add/imm32/name
21748 0x11/imm32/alloc-id:fake
21749 Single-int-var-in-mem/imm32/inouts
21750 0x11/imm32/alloc-id:fake
21751 Single-int-var-in-some-register/imm32/outputs
21752 0x11/imm32/alloc-id:fake
21753 _string_03_add/imm32/subx-name
21754 1/imm32/rm32-is-first-inout
21755 3/imm32/r32-is-first-output
21756 0/imm32/no-imm32
21757 0/imm32/no-imm8
21758 0/imm32/no-disp32
21759 0/imm32/no-xm32
21760 0/imm32/no-x32
21761 0x11/imm32/alloc-id:fake
21762 _Primitive-add-lit-to-reg/imm32/next
21763 _Primitive-add-lit-to-reg:
21764 0x11/imm32/alloc-id:fake:payload
21765
21766 0x11/imm32/alloc-id:fake
21767 _string-add/imm32/name
21768 0x11/imm32/alloc-id:fake
21769 Single-lit-var/imm32/inouts
21770 0x11/imm32/alloc-id:fake
21771 Single-int-var-in-some-register/imm32/outputs
21772 0x11/imm32/alloc-id:fake
21773 _string_81_subop_add/imm32/subx-name
21774 3/imm32/rm32-is-first-output
21775 0/imm32/no-r32
21776 1/imm32/imm32-is-first-inout
21777 0/imm32/no-imm8
21778 0/imm32/no-disp32
21779 0/imm32/no-xm32
21780 0/imm32/no-x32
21781 0x11/imm32/alloc-id:fake
21782 _Primitive-add-lit-to-mem/imm32/next
21783 _Primitive-add-lit-to-mem:
21784 0x11/imm32/alloc-id:fake:payload
21785
21786 0x11/imm32/alloc-id:fake
21787 _string-add-to/imm32/name
21788 0x11/imm32/alloc-id:fake
21789 Int-var-and-literal/imm32/inouts
21790 0/imm32/no-outputs
21791 0/imm32/no-outputs
21792 0x11/imm32/alloc-id:fake
21793 _string_81_subop_add/imm32/subx-name
21794 1/imm32/rm32-is-first-inout
21795 0/imm32/no-r32
21796 2/imm32/imm32-is-second-inout
21797 0/imm32/no-imm8
21798 0/imm32/no-disp32
21799 0/imm32/no-xm32
21800 0/imm32/no-x32
21801 0x11/imm32/alloc-id:fake
21802 _Primitive-subtract-from-eax/imm32/next
21803
21804 _Primitive-subtract-from-eax:
21805 0x11/imm32/alloc-id:fake:payload
21806
21807 0x11/imm32/alloc-id:fake
21808 _string-subtract/imm32/name
21809 0x11/imm32/alloc-id:fake
21810 Single-lit-var/imm32/inouts
21811 0x11/imm32/alloc-id:fake
21812 Single-int-var-in-eax/imm32/outputs
21813 0x11/imm32/alloc-id:fake
21814 _string_2d_subtract_from_eax/imm32/subx-name
21815 0/imm32/no-rm32
21816 0/imm32/no-r32
21817 1/imm32/imm32-is-first-inout
21818 0/imm32/no-imm8
21819 0/imm32/no-disp32
21820 0/imm32/no-xm32
21821 0/imm32/no-x32
21822 0x11/imm32/alloc-id:fake
21823 _Primitive-subtract-reg-from-reg/imm32/next
21824 _Primitive-subtract-reg-from-reg:
21825 0x11/imm32/alloc-id:fake:payload
21826
21827 0x11/imm32/alloc-id:fake
21828 _string-subtract/imm32/name
21829 0x11/imm32/alloc-id:fake
21830 Single-int-var-in-some-register/imm32/inouts
21831 0x11/imm32/alloc-id:fake
21832 Single-int-var-in-some-register/imm32/outputs
21833 0x11/imm32/alloc-id:fake
21834 _string_29_subtract_from/imm32/subx-name
21835 3/imm32/rm32-is-first-output
21836 1/imm32/r32-is-first-inout
21837 0/imm32/no-imm32
21838 0/imm32/no-imm8
21839 0/imm32/no-disp32
21840 0/imm32/no-xm32
21841 0/imm32/no-x32
21842 0x11/imm32/alloc-id:fake
21843 _Primitive-subtract-reg-from-mem/imm32/next
21844 _Primitive-subtract-reg-from-mem:
21845 0x11/imm32/alloc-id:fake:payload
21846
21847 0x11/imm32/alloc-id:fake
21848 _string-subtract-from/imm32/name
21849 0x11/imm32/alloc-id:fake
21850 Two-args-int-stack-int-reg/imm32/inouts
21851 0/imm32/no-outputs
21852 0/imm32/no-outputs
21853 0x11/imm32/alloc-id:fake
21854 _string_29_subtract_from/imm32/subx-name
21855 1/imm32/rm32-is-first-inout
21856 2/imm32/r32-is-second-inout
21857 0/imm32/no-imm32
21858 0/imm32/no-imm8
21859 0/imm32/no-disp32
21860 0/imm32/no-xm32
21861 0/imm32/no-x32
21862 0x11/imm32/alloc-id:fake
21863 _Primitive-subtract-mem-from-reg/imm32/next
21864 _Primitive-subtract-mem-from-reg:
21865 0x11/imm32/alloc-id:fake:payload
21866
21867 0x11/imm32/alloc-id:fake
21868 _string-subtract/imm32/name
21869 0x11/imm32/alloc-id:fake
21870 Single-int-var-in-mem/imm32/inouts
21871 0x11/imm32/alloc-id:fake
21872 Single-int-var-in-some-register/imm32/outputs
21873 0x11/imm32/alloc-id:fake
21874 _string_2b_subtract/imm32/subx-name
21875 1/imm32/rm32-is-first-inout
21876 3/imm32/r32-is-first-output
21877 0/imm32/no-imm32
21878 0/imm32/no-imm8
21879 0/imm32/no-disp32
21880 0/imm32/no-xm32
21881 0/imm32/no-x32
21882 0x11/imm32/alloc-id:fake
21883 _Primitive-subtract-lit-from-reg/imm32/next
21884 _Primitive-subtract-lit-from-reg:
21885 0x11/imm32/alloc-id:fake:payload
21886
21887 0x11/imm32/alloc-id:fake
21888 _string-subtract/imm32/name
21889 0x11/imm32/alloc-id:fake
21890 Single-lit-var/imm32/inouts
21891 0x11/imm32/alloc-id:fake
21892 Single-int-var-in-some-register/imm32/outputs
21893 0x11/imm32/alloc-id:fake
21894 _string_81_subop_subtract/imm32/subx-name
21895 3/imm32/rm32-is-first-output
21896 0/imm32/no-r32
21897 1/imm32/imm32-is-first-inout
21898 0/imm32/no-imm8
21899 0/imm32/no-disp32
21900 0/imm32/no-xm32
21901 0/imm32/no-x32
21902 0x11/imm32/alloc-id:fake
21903 _Primitive-subtract-lit-from-mem/imm32/next
21904 _Primitive-subtract-lit-from-mem:
21905 0x11/imm32/alloc-id:fake:payload
21906
21907 0x11/imm32/alloc-id:fake
21908 _string-subtract-from/imm32/name
21909 0x11/imm32/alloc-id:fake
21910 Int-var-and-literal/imm32/inouts
21911 0/imm32/no-outputs
21912 0/imm32/no-outputs
21913 0x11/imm32/alloc-id:fake
21914 _string_81_subop_subtract/imm32/subx-name
21915 1/imm32/rm32-is-first-inout
21916 0/imm32/no-r32
21917 2/imm32/imm32-is-second-inout
21918 0/imm32/no-imm8
21919 0/imm32/no-disp32
21920 0/imm32/no-xm32
21921 0/imm32/no-x32
21922 0x11/imm32/alloc-id:fake
21923 _Primitive-and-with-eax/imm32/next
21924
21925 _Primitive-and-with-eax:
21926 0x11/imm32/alloc-id:fake:payload
21927
21928 0x11/imm32/alloc-id:fake
21929 _string-and/imm32/name
21930 0x11/imm32/alloc-id:fake
21931 Single-lit-var/imm32/inouts
21932 0x11/imm32/alloc-id:fake
21933 Single-int-var-in-eax/imm32/outputs
21934 0x11/imm32/alloc-id:fake
21935 _string_25_and_with_eax/imm32/subx-name
21936 0/imm32/no-rm32
21937 0/imm32/no-r32
21938 1/imm32/imm32-is-first-inout
21939 0/imm32/no-imm8
21940 0/imm32/no-disp32
21941 0/imm32/no-xm32
21942 0/imm32/no-x32
21943 0x11/imm32/alloc-id:fake
21944 _Primitive-and-reg-with-reg/imm32/next
21945 _Primitive-and-reg-with-reg:
21946 0x11/imm32/alloc-id:fake:payload
21947
21948 0x11/imm32/alloc-id:fake
21949 _string-and/imm32/name
21950 0x11/imm32/alloc-id:fake
21951 Single-int-var-in-some-register/imm32/inouts
21952 0x11/imm32/alloc-id:fake
21953 Single-int-var-in-some-register/imm32/outputs
21954 0x11/imm32/alloc-id:fake
21955 _string_21_and_with/imm32/subx-name
21956 3/imm32/rm32-is-first-output
21957 1/imm32/r32-is-first-inout
21958 0/imm32/no-imm32
21959 0/imm32/no-imm8
21960 0/imm32/no-disp32
21961 0/imm32/no-xm32
21962 0/imm32/no-x32
21963 0x11/imm32/alloc-id:fake
21964 _Primitive-and-reg-with-mem/imm32/next
21965 _Primitive-and-reg-with-mem:
21966 0x11/imm32/alloc-id:fake:payload
21967
21968 0x11/imm32/alloc-id:fake
21969 _string-and-with/imm32/name
21970 0x11/imm32/alloc-id:fake
21971 Two-args-int-stack-int-reg/imm32/inouts
21972 0/imm32/no-outputs
21973 0/imm32/no-outputs
21974 0x11/imm32/alloc-id:fake
21975 _string_21_and_with/imm32/subx-name
21976 1/imm32/rm32-is-first-inout
21977 2/imm32/r32-is-second-inout
21978 0/imm32/no-imm32
21979 0/imm32/no-imm8
21980 0/imm32/no-disp32
21981 0/imm32/no-xm32
21982 0/imm32/no-x32
21983 0x11/imm32/alloc-id:fake
21984 _Primitive-and-mem-with-reg/imm32/next
21985 _Primitive-and-mem-with-reg:
21986 0x11/imm32/alloc-id:fake:payload
21987
21988 0x11/imm32/alloc-id:fake
21989 _string-and/imm32/name
21990 0x11/imm32/alloc-id:fake
21991 Single-int-var-in-mem/imm32/inouts
21992 0x11/imm32/alloc-id:fake
21993 Single-int-var-in-some-register/imm32/outputs
21994 0x11/imm32/alloc-id:fake
21995 _string_23_and/imm32/subx-name
21996 1/imm32/rm32-is-first-inout
21997 3/imm32/r32-is-first-output
21998 0/imm32/no-imm32
21999 0/imm32/no-imm8
22000 0/imm32/no-disp32
22001 0/imm32/no-xm32
22002 0/imm32/no-x32
22003 0x11/imm32/alloc-id:fake
22004 _Primitive-and-lit-with-reg/imm32/next
22005 _Primitive-and-lit-with-reg:
22006 0x11/imm32/alloc-id:fake:payload
22007
22008 0x11/imm32/alloc-id:fake
22009 _string-and/imm32/name
22010 0x11/imm32/alloc-id:fake
22011 Single-lit-var/imm32/inouts
22012 0x11/imm32/alloc-id:fake
22013 Single-int-var-in-some-register/imm32/outputs
22014 0x11/imm32/alloc-id:fake
22015 _string_81_subop_and/imm32/subx-name
22016 3/imm32/rm32-is-first-output
22017 0/imm32/no-r32
22018 1/imm32/imm32-is-first-inout
22019 0/imm32/no-imm8
22020 0/imm32/no-disp32
22021 0/imm32/no-xm32
22022 0/imm32/no-x32
22023 0x11/imm32/alloc-id:fake
22024 _Primitive-and-lit-with-mem/imm32/next
22025 _Primitive-and-lit-with-mem:
22026 0x11/imm32/alloc-id:fake:payload
22027
22028 0x11/imm32/alloc-id:fake
22029 _string-and-with/imm32/name
22030 0x11/imm32/alloc-id:fake
22031 Int-var-and-literal/imm32/inouts
22032 0/imm32/no-outputs
22033 0/imm32/no-outputs
22034 0x11/imm32/alloc-id:fake
22035 _string_81_subop_and/imm32/subx-name
22036 1/imm32/rm32-is-first-inout
22037 0/imm32/no-r32
22038 2/imm32/imm32-is-second-inout
22039 0/imm32/no-imm8
22040 0/imm32/no-disp32
22041 0/imm32/no-xm32
22042 0/imm32/no-x32
22043 0x11/imm32/alloc-id:fake
22044 _Primitive-or-with-eax/imm32/next
22045
22046 _Primitive-or-with-eax:
22047 0x11/imm32/alloc-id:fake:payload
22048
22049 0x11/imm32/alloc-id:fake
22050 _string-or/imm32/name
22051 0x11/imm32/alloc-id:fake
22052 Single-lit-var/imm32/inouts
22053 0x11/imm32/alloc-id:fake
22054 Single-int-var-in-eax/imm32/outputs
22055 0x11/imm32/alloc-id:fake
22056 _string_0d_or_with_eax/imm32/subx-name
22057 0/imm32/no-rm32
22058 0/imm32/no-r32
22059 1/imm32/imm32-is-first-inout
22060 0/imm32/no-imm8
22061 0/imm32/no-disp32
22062 0/imm32/no-xm32
22063 0/imm32/no-x32
22064 0x11/imm32/alloc-id:fake
22065 _Primitive-or-reg-with-reg/imm32/next
22066 _Primitive-or-reg-with-reg:
22067 0x11/imm32/alloc-id:fake:payload
22068
22069 0x11/imm32/alloc-id:fake
22070 _string-or/imm32/name
22071 0x11/imm32/alloc-id:fake
22072 Single-int-var-in-some-register/imm32/inouts
22073 0x11/imm32/alloc-id:fake
22074 Single-int-var-in-some-register/imm32/outputs
22075 0x11/imm32/alloc-id:fake
22076 _string_09_or_with/imm32/subx-name
22077 3/imm32/rm32-is-first-output
22078 1/imm32/r32-is-first-inout
22079 0/imm32/no-imm32
22080 0/imm32/no-imm8
22081 0/imm32/no-disp32
22082 0/imm32/no-xm32
22083 0/imm32/no-x32
22084 0x11/imm32/alloc-id:fake
22085 _Primitive-or-reg-with-mem/imm32/next
22086 _Primitive-or-reg-with-mem:
22087 0x11/imm32/alloc-id:fake:payload
22088
22089 0x11/imm32/alloc-id:fake
22090 _string-or-with/imm32/name
22091 0x11/imm32/alloc-id:fake
22092 Two-args-int-stack-int-reg/imm32/inouts
22093 0/imm32/no-outputs
22094 0/imm32/no-outputs
22095 0x11/imm32/alloc-id:fake
22096 _string_09_or_with/imm32/subx-name
22097 1/imm32/rm32-is-first-inout
22098 2/imm32/r32-is-second-inout
22099 0/imm32/no-imm32
22100 0/imm32/no-imm8
22101 0/imm32/no-disp32
22102 0/imm32/no-xm32
22103 0/imm32/no-x32
22104 0x11/imm32/alloc-id:fake
22105 _Primitive-or-mem-with-reg/imm32/next
22106 _Primitive-or-mem-with-reg:
22107 0x11/imm32/alloc-id:fake:payload
22108
22109 0x11/imm32/alloc-id:fake
22110 _string-or/imm32/name
22111 0x11/imm32/alloc-id:fake
22112 Single-int-var-in-mem/imm32/inouts
22113 0x11/imm32/alloc-id:fake
22114 Single-int-var-in-some-register/imm32/outputs
22115 0x11/imm32/alloc-id:fake
22116 _string_0b_or/imm32/subx-name
22117 1/imm32/rm32-is-first-inout
22118 3/imm32/r32-is-first-output
22119 0/imm32/no-imm32
22120 0/imm32/no-imm8
22121 0/imm32/no-disp32
22122 0/imm32/no-xm32
22123 0/imm32/no-x32
22124 0x11/imm32/alloc-id:fake
22125 _Primitive-or-lit-with-reg/imm32/next
22126 _Primitive-or-lit-with-reg:
22127 0x11/imm32/alloc-id:fake:payload
22128
22129 0x11/imm32/alloc-id:fake
22130 _string-or/imm32/name
22131 0x11/imm32/alloc-id:fake
22132 Single-lit-var/imm32/inouts
22133 0x11/imm32/alloc-id:fake
22134 Single-int-var-in-some-register/imm32/outputs
22135 0x11/imm32/alloc-id:fake
22136 _string_81_subop_or/imm32/subx-name
22137 3/imm32/rm32-is-first-output
22138 0/imm32/no-r32
22139 1/imm32/imm32-is-first-inout
22140 0/imm32/no-imm8
22141 0/imm32/no-disp32
22142 0/imm32/no-xm32
22143 0/imm32/no-x32
22144 0x11/imm32/alloc-id:fake
22145 _Primitive-or-lit-with-mem/imm32/next
22146 _Primitive-or-lit-with-mem:
22147 0x11/imm32/alloc-id:fake:payload
22148
22149 0x11/imm32/alloc-id:fake
22150 _string-or-with/imm32/name
22151 0x11/imm32/alloc-id:fake
22152 Int-var-and-literal/imm32/inouts
22153 0/imm32/no-outputs
22154 0/imm32/no-outputs
22155 0x11/imm32/alloc-id:fake
22156 _string_81_subop_or/imm32/subx-name
22157 1/imm32/rm32-is-first-inout
22158 0/imm32/no-r32
22159 2/imm32/imm32-is-second-inout
22160 0/imm32/no-imm8
22161 0/imm32/no-disp32
22162 0/imm32/no-xm32
22163 0/imm32/no-x32
22164 0x11/imm32/alloc-id:fake
22165 _Primitive-xor-with-eax/imm32/next
22166
22167 _Primitive-xor-with-eax:
22168 0x11/imm32/alloc-id:fake:payload
22169
22170 0x11/imm32/alloc-id:fake
22171 _string-xor/imm32/name
22172 0x11/imm32/alloc-id:fake
22173 Single-lit-var/imm32/inouts
22174 0x11/imm32/alloc-id:fake
22175 Single-int-var-in-eax/imm32/outputs
22176 0x11/imm32/alloc-id:fake
22177 _string_35_xor_with_eax/imm32/subx-name
22178 0/imm32/no-rm32
22179 0/imm32/no-r32
22180 1/imm32/imm32-is-first-inout
22181 0/imm32/no-imm8
22182 0/imm32/no-disp32
22183 0/imm32/no-xm32
22184 0/imm32/no-x32
22185 0x11/imm32/alloc-id:fake
22186 _Primitive-xor-reg-with-reg/imm32/next
22187 _Primitive-xor-reg-with-reg:
22188 0x11/imm32/alloc-id:fake:payload
22189
22190 0x11/imm32/alloc-id:fake
22191 _string-xor/imm32/name
22192 0x11/imm32/alloc-id:fake
22193 Single-int-var-in-some-register/imm32/inouts
22194 0x11/imm32/alloc-id:fake
22195 Single-int-var-in-some-register/imm32/outputs
22196 0x11/imm32/alloc-id:fake
22197 _string_31_xor_with/imm32/subx-name
22198 3/imm32/rm32-is-first-output
22199 1/imm32/r32-is-first-inout
22200 0/imm32/no-imm32
22201 0/imm32/no-imm8
22202 0/imm32/no-disp32
22203 0/imm32/no-xm32
22204 0/imm32/no-x32
22205 0x11/imm32/alloc-id:fake
22206 _Primitive-xor-reg-with-mem/imm32/next
22207 _Primitive-xor-reg-with-mem:
22208 0x11/imm32/alloc-id:fake:payload
22209
22210 0x11/imm32/alloc-id:fake
22211 _string-xor-with/imm32/name
22212 0x11/imm32/alloc-id:fake
22213 Two-args-int-stack-int-reg/imm32/inouts
22214 0/imm32/no-outputs
22215 0/imm32/no-outputs
22216 0x11/imm32/alloc-id:fake
22217 _string_31_xor_with/imm32/subx-name
22218 1/imm32/rm32-is-first-inout
22219 2/imm32/r32-is-second-inout
22220 0/imm32/no-imm32
22221 0/imm32/no-imm8
22222 0/imm32/no-disp32
22223 0/imm32/no-xm32
22224 0/imm32/no-x32
22225 0x11/imm32/alloc-id:fake
22226 _Primitive-xor-mem-with-reg/imm32/next
22227 _Primitive-xor-mem-with-reg:
22228 0x11/imm32/alloc-id:fake:payload
22229
22230 0x11/imm32/alloc-id:fake
22231 _string-xor/imm32/name
22232 0x11/imm32/alloc-id:fake
22233 Single-int-var-in-mem/imm32/inouts
22234 0x11/imm32/alloc-id:fake
22235 Single-int-var-in-some-register/imm32/outputs
22236 0x11/imm32/alloc-id:fake
22237 _string_33_xor/imm32/subx-name
22238 1/imm32/rm32-is-first-inout
22239 3/imm32/r32-is-first-output
22240 0/imm32/no-imm32
22241 0/imm32/no-imm8
22242 0/imm32/no-disp32
22243 0/imm32/no-xm32
22244 0/imm32/no-x32
22245 0x11/imm32/alloc-id:fake
22246 _Primitive-xor-lit-with-reg/imm32/next
22247 _Primitive-xor-lit-with-reg:
22248 0x11/imm32/alloc-id:fake:payload
22249
22250 0x11/imm32/alloc-id:fake
22251 _string-xor/imm32/name
22252 0x11/imm32/alloc-id:fake
22253 Single-lit-var/imm32/inouts
22254 0x11/imm32/alloc-id:fake
22255 Single-int-var-in-some-register/imm32/outputs
22256 0x11/imm32/alloc-id:fake
22257 _string_81_subop_xor/imm32/subx-name
22258 3/imm32/rm32-is-first-output
22259 0/imm32/no-r32
22260 1/imm32/imm32-is-first-inout
22261 0/imm32/no-imm8
22262 0/imm32/no-disp32
22263 0/imm32/no-xm32
22264 0/imm32/no-x32
22265 0x11/imm32/alloc-id:fake
22266 _Primitive-xor-lit-with-mem/imm32/next
22267 _Primitive-xor-lit-with-mem:
22268 0x11/imm32/alloc-id:fake:payload
22269
22270 0x11/imm32/alloc-id:fake
22271 _string-xor-with/imm32/name
22272 0x11/imm32/alloc-id:fake
22273 Int-var-and-literal/imm32/inouts
22274 0/imm32/no-outputs
22275 0/imm32/no-outputs
22276 0x11/imm32/alloc-id:fake
22277 _string_81_subop_xor/imm32/subx-name
22278 1/imm32/rm32-is-first-inout
22279 0/imm32/no-r32
22280 2/imm32/imm32-is-second-inout
22281 0/imm32/no-imm8
22282 0/imm32/no-disp32
22283 0/imm32/no-xm32
22284 0/imm32/no-x32
22285 0x11/imm32/alloc-id:fake
22286 _Primitive-shift-reg-left-by-lit/imm32/next
22287 _Primitive-shift-reg-left-by-lit:
22288 0x11/imm32/alloc-id:fake:payload
22289
22290 0x11/imm32/alloc-id:fake
22291 _string-shift-left/imm32/name
22292 0x11/imm32/alloc-id:fake
22293 Single-lit-var/imm32/inouts
22294 0x11/imm32/alloc-id:fake
22295 Single-int-var-in-some-register/imm32/outputs
22296 0x11/imm32/alloc-id:fake
22297 _string_c1_subop_shift_left/imm32/subx-name
22298 3/imm32/rm32-is-first-output
22299 0/imm32/no-r32
22300 0/imm32/no-imm32
22301 1/imm32/imm8-is-first-inout
22302 0/imm32/no-disp32
22303 0/imm32/no-xm32
22304 0/imm32/no-x32
22305 0x11/imm32/alloc-id:fake
22306 _Primitive-shift-reg-right-by-lit/imm32/next
22307 _Primitive-shift-reg-right-by-lit:
22308 0x11/imm32/alloc-id:fake:payload
22309
22310 0x11/imm32/alloc-id:fake
22311 _string-shift-right/imm32/name
22312 0x11/imm32/alloc-id:fake
22313 Single-lit-var/imm32/inouts
22314 0x11/imm32/alloc-id:fake
22315 Single-int-var-in-some-register/imm32/outputs
22316 0x11/imm32/alloc-id:fake
22317 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
22318 3/imm32/rm32-is-first-output
22319 0/imm32/no-r32
22320 0/imm32/no-imm32
22321 1/imm32/imm8-is-first-inout
22322 0/imm32/no-disp32
22323 0/imm32/no-xm32
22324 0/imm32/no-x32
22325 0x11/imm32/alloc-id:fake
22326 _Primitive-shift-reg-right-signed-by-lit/imm32/next
22327 _Primitive-shift-reg-right-signed-by-lit:
22328 0x11/imm32/alloc-id:fake:payload
22329
22330 0x11/imm32/alloc-id:fake
22331 _string-shift-right-signed/imm32/name
22332 0x11/imm32/alloc-id:fake
22333 Single-lit-var/imm32/inouts
22334 0x11/imm32/alloc-id:fake
22335 Single-int-var-in-some-register/imm32/outputs
22336 0x11/imm32/alloc-id:fake
22337 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
22338 3/imm32/rm32-is-first-output
22339 0/imm32/no-r32
22340 0/imm32/no-imm32
22341 1/imm32/imm8-is-first-inout
22342 0/imm32/no-disp32
22343 0/imm32/no-xm32
22344 0/imm32/no-x32
22345 0x11/imm32/alloc-id:fake
22346 _Primitive-shift-mem-left-by-lit/imm32/next
22347 _Primitive-shift-mem-left-by-lit:
22348 0x11/imm32/alloc-id:fake:payload
22349
22350 0x11/imm32/alloc-id:fake
22351 _string-shift-left/imm32/name
22352 0x11/imm32/alloc-id:fake
22353 Int-var-and-literal/imm32/inouts
22354 0/imm32/no-outputs
22355 0/imm32/no-outputs
22356 0x11/imm32/alloc-id:fake
22357 _string_c1_subop_shift_left/imm32/subx-name
22358 1/imm32/rm32-is-first-inout
22359 0/imm32/no-r32
22360 0/imm32/no-imm32
22361 2/imm32/imm8-is-second-inout
22362 0/imm32/no-disp32
22363 0/imm32/no-xm32
22364 0/imm32/no-x32
22365 0x11/imm32/alloc-id:fake
22366 _Primitive-shift-mem-right-by-lit/imm32/next
22367 _Primitive-shift-mem-right-by-lit:
22368 0x11/imm32/alloc-id:fake:payload
22369
22370 0x11/imm32/alloc-id:fake
22371 _string-shift-right/imm32/name
22372 0x11/imm32/alloc-id:fake
22373 Int-var-and-literal/imm32/inouts
22374 0/imm32/no-outputs
22375 0/imm32/no-outputs
22376 0x11/imm32/alloc-id:fake
22377 _string_c1_subop_shift_right_padding_zeroes/imm32/subx-name
22378 1/imm32/rm32-is-first-inout
22379 0/imm32/no-r32
22380 0/imm32/no-imm32
22381 2/imm32/imm8-is-second-inout
22382 0/imm32/no-disp32
22383 0/imm32/no-xm32
22384 0/imm32/no-x32
22385 0x11/imm32/alloc-id:fake
22386 _Primitive-shift-mem-right-signed-by-lit/imm32/next
22387 _Primitive-shift-mem-right-signed-by-lit:
22388 0x11/imm32/alloc-id:fake:payload
22389
22390 0x11/imm32/alloc-id:fake
22391 _string-shift-right-signed/imm32/name
22392 0x11/imm32/alloc-id:fake
22393 Int-var-and-literal/imm32/inouts
22394 0/imm32/no-outputs
22395 0/imm32/no-outputs
22396 0x11/imm32/alloc-id:fake
22397 _string_c1_subop_shift_right_preserving_sign/imm32/subx-name
22398 1/imm32/rm32-is-first-inout
22399 0/imm32/no-r32
22400 0/imm32/no-imm32
22401 2/imm32/imm8-is-second-inout
22402 0/imm32/no-disp32
22403 0/imm32/no-xm32
22404 0/imm32/no-x32
22405 0x11/imm32/alloc-id:fake
22406 _Primitive-copy-to-eax/imm32/next
22407
22408 _Primitive-copy-to-eax:
22409 0x11/imm32/alloc-id:fake:payload
22410
22411 0x11/imm32/alloc-id:fake
22412 _string-copy/imm32/name
22413 0x11/imm32/alloc-id:fake
22414 Single-lit-var/imm32/inouts
22415 0x11/imm32/alloc-id:fake
22416 Single-int-var-in-eax/imm32/outputs
22417 0x11/imm32/alloc-id:fake
22418 _string_b8_copy_to_eax/imm32/subx-name
22419 0/imm32/no-rm32
22420 0/imm32/no-r32
22421 1/imm32/imm32-is-first-inout
22422 0/imm32/no-imm8
22423 0/imm32/no-disp32
22424 0/imm32/no-xm32
22425 0/imm32/no-x32
22426 0x11/imm32/alloc-id:fake
22427 _Primitive-copy-to-ecx/imm32/next
22428 _Primitive-copy-to-ecx:
22429 0x11/imm32/alloc-id:fake:payload
22430
22431 0x11/imm32/alloc-id:fake
22432 _string-copy/imm32/name
22433 0x11/imm32/alloc-id:fake
22434 Single-lit-var/imm32/inouts
22435 0x11/imm32/alloc-id:fake
22436 Single-int-var-in-ecx/imm32/outputs
22437 0x11/imm32/alloc-id:fake
22438 _string_b9_copy_to_ecx/imm32/subx-name
22439 0/imm32/no-rm32
22440 0/imm32/no-r32
22441 1/imm32/imm32-is-first-inout
22442 0/imm32/no-imm8
22443 0/imm32/no-disp32
22444 0/imm32/no-xm32
22445 0/imm32/no-x32
22446 0x11/imm32/alloc-id:fake
22447 _Primitive-copy-to-edx/imm32/next
22448 _Primitive-copy-to-edx:
22449 0x11/imm32/alloc-id:fake:payload
22450
22451 0x11/imm32/alloc-id:fake
22452 _string-copy/imm32/name
22453 0x11/imm32/alloc-id:fake
22454 Single-lit-var/imm32/inouts
22455 0x11/imm32/alloc-id:fake
22456 Single-int-var-in-edx/imm32/outputs
22457 0x11/imm32/alloc-id:fake
22458 _string_ba_copy_to_edx/imm32/subx-name
22459 0/imm32/no-rm32
22460 0/imm32/no-r32
22461 1/imm32/imm32-is-first-inout
22462 0/imm32/no-imm8
22463 0/imm32/no-disp32
22464 0/imm32/no-xm32
22465 0/imm32/no-x32
22466 0x11/imm32/alloc-id:fake
22467 _Primitive-copy-to-ebx/imm32/next
22468 _Primitive-copy-to-ebx:
22469 0x11/imm32/alloc-id:fake:payload
22470
22471 0x11/imm32/alloc-id:fake
22472 _string-copy/imm32/name
22473 0x11/imm32/alloc-id:fake
22474 Single-lit-var/imm32/inouts
22475 0x11/imm32/alloc-id:fake
22476 Single-int-var-in-ebx/imm32/outputs
22477 0x11/imm32/alloc-id:fake
22478 _string_bb_copy_to_ebx/imm32/subx-name
22479 0/imm32/no-rm32
22480 0/imm32/no-r32
22481 1/imm32/imm32-is-first-inout
22482 0/imm32/no-imm8
22483 0/imm32/no-disp32
22484 0/imm32/no-xm32
22485 0/imm32/no-x32
22486 0x11/imm32/alloc-id:fake
22487 _Primitive-copy-to-esi/imm32/next
22488 _Primitive-copy-to-esi:
22489 0x11/imm32/alloc-id:fake:payload
22490
22491 0x11/imm32/alloc-id:fake
22492 _string-copy/imm32/name
22493 0x11/imm32/alloc-id:fake
22494 Single-lit-var/imm32/inouts
22495 0x11/imm32/alloc-id:fake
22496 Single-int-var-in-esi/imm32/outputs
22497 0x11/imm32/alloc-id:fake
22498 _string_be_copy_to_esi/imm32/subx-name
22499 0/imm32/no-rm32
22500 0/imm32/no-r32
22501 1/imm32/imm32-is-first-inout
22502 0/imm32/no-imm8
22503 0/imm32/no-disp32
22504 0/imm32/no-xm32
22505 0/imm32/no-x32
22506 0x11/imm32/alloc-id:fake
22507 _Primitive-copy-to-edi/imm32/next
22508 _Primitive-copy-to-edi:
22509 0x11/imm32/alloc-id:fake:payload
22510
22511 0x11/imm32/alloc-id:fake
22512 _string-copy/imm32/name
22513 0x11/imm32/alloc-id:fake
22514 Single-lit-var/imm32/inouts
22515 0x11/imm32/alloc-id:fake
22516 Single-int-var-in-edi/imm32/outputs
22517 0x11/imm32/alloc-id:fake
22518 _string_bf_copy_to_edi/imm32/subx-name
22519 0/imm32/no-rm32
22520 0/imm32/no-r32
22521 1/imm32/imm32-is-first-inout
22522 0/imm32/no-imm8
22523 0/imm32/no-disp32
22524 0/imm32/no-xm32
22525 0/imm32/no-x32
22526 0x11/imm32/alloc-id:fake
22527 _Primitive-copy-reg-to-reg/imm32/next
22528 _Primitive-copy-reg-to-reg:
22529 0x11/imm32/alloc-id:fake:payload
22530
22531 0x11/imm32/alloc-id:fake
22532 _string-copy/imm32/name
22533 0x11/imm32/alloc-id:fake
22534 Single-int-var-in-some-register/imm32/inouts
22535 0x11/imm32/alloc-id:fake
22536 Single-int-var-in-some-register/imm32/outputs
22537 0x11/imm32/alloc-id:fake
22538 _string_89_<-/imm32/subx-name
22539 3/imm32/rm32-is-first-output
22540 1/imm32/r32-is-first-inout
22541 0/imm32/no-imm32
22542 0/imm32/no-imm8
22543 0/imm32/no-disp32
22544 0/imm32/no-xm32
22545 0/imm32/no-x32
22546 0x11/imm32/alloc-id:fake
22547 _Primitive-copy-reg-to-mem/imm32/next
22548 _Primitive-copy-reg-to-mem:
22549 0x11/imm32/alloc-id:fake:payload
22550
22551 0x11/imm32/alloc-id:fake
22552 _string-copy-to/imm32/name
22553 0x11/imm32/alloc-id:fake
22554 Two-args-int-stack-int-reg/imm32/inouts
22555 0/imm32/no-outputs
22556 0/imm32/no-outputs
22557 0x11/imm32/alloc-id:fake
22558 _string_89_<-/imm32/subx-name
22559 1/imm32/rm32-is-first-inout
22560 2/imm32/r32-is-second-inout
22561 0/imm32/no-imm32
22562 0/imm32/no-imm8
22563 0/imm32/no-disp32
22564 0/imm32/no-xm32
22565 0/imm32/no-x32
22566 0x11/imm32/alloc-id:fake
22567 _Primitive-copy-mem-to-reg/imm32/next
22568 _Primitive-copy-mem-to-reg:
22569 0x11/imm32/alloc-id:fake:payload
22570
22571 0x11/imm32/alloc-id:fake
22572 _string-copy/imm32/name
22573 0x11/imm32/alloc-id:fake
22574 Single-int-var-in-mem/imm32/inouts
22575 0x11/imm32/alloc-id:fake
22576 Single-int-var-in-some-register/imm32/outputs
22577 0x11/imm32/alloc-id:fake
22578 _string_8b_->/imm32/subx-name
22579 1/imm32/rm32-is-first-inout
22580 3/imm32/r32-is-first-output
22581 0/imm32/no-imm32
22582 0/imm32/no-imm8
22583 0/imm32/no-disp32
22584 0/imm32/no-xm32
22585 0/imm32/no-x32
22586 0x11/imm32/alloc-id:fake
22587 _Primitive-copy-lit-to-reg/imm32/next
22588 _Primitive-copy-lit-to-reg:
22589 0x11/imm32/alloc-id:fake:payload
22590
22591 0x11/imm32/alloc-id:fake
22592 _string-copy/imm32/name
22593 0x11/imm32/alloc-id:fake
22594 Single-lit-var/imm32/inouts
22595 0x11/imm32/alloc-id:fake
22596 Single-int-var-in-some-register/imm32/outputs
22597 0x11/imm32/alloc-id:fake
22598 _string_c7_subop_copy/imm32/subx-name
22599 3/imm32/rm32-is-first-output
22600 0/imm32/no-r32
22601 1/imm32/imm32-is-first-inout
22602 0/imm32/no-imm8
22603 0/imm32/no-disp32
22604 0/imm32/no-xm32
22605 0/imm32/no-x32
22606 0x11/imm32/alloc-id:fake
22607 _Primitive-copy-lit-to-mem/imm32/next
22608 _Primitive-copy-lit-to-mem:
22609 0x11/imm32/alloc-id:fake:payload
22610
22611 0x11/imm32/alloc-id:fake
22612 _string-copy-to/imm32/name
22613 0x11/imm32/alloc-id:fake
22614 Int-var-and-literal/imm32/inouts
22615 0/imm32/no-outputs
22616 0/imm32/no-outputs
22617 0x11/imm32/alloc-id:fake
22618 _string_c7_subop_copy/imm32/subx-name
22619 1/imm32/rm32-is-first-inout
22620 0/imm32/no-r32
22621 2/imm32/imm32-is-second-inout
22622 0/imm32/no-imm8
22623 0/imm32/no-disp32
22624 0/imm32/no-xm32
22625 0/imm32/no-x32
22626 0x11/imm32/alloc-id:fake
22627 _Primitive-copy-byte-from-reg/imm32/next
22628
22629 _Primitive-copy-byte-from-reg:
22630 0x11/imm32/alloc-id:fake:payload
22631
22632 0x11/imm32/alloc-id:fake
22633 _string-copy-byte/imm32/name
22634 0x11/imm32/alloc-id:fake
22635 Single-byte-var-in-some-register/imm32/inouts
22636 0x11/imm32/alloc-id:fake
22637 Single-byte-var-in-some-register/imm32/outputs
22638 0x11/imm32/alloc-id:fake
22639 _string_8a_copy_byte/imm32/subx-name
22640 1/imm32/rm32-is-first-inout
22641 3/imm32/r32-is-first-output
22642 0/imm32/no-imm32
22643 0/imm32/no-imm8
22644 0/imm32/no-disp32
22645 0/imm32/no-xm32
22646 0/imm32/no-x32
22647 0x11/imm32/alloc-id:fake
22648 _Primitive-copy-byte-from-mem/imm32/next
22649 _Primitive-copy-byte-from-mem:
22650 0x11/imm32/alloc-id:fake:payload
22651
22652 0x11/imm32/alloc-id:fake
22653 _string-copy-byte/imm32/name
22654 0x11/imm32/alloc-id:fake
22655 Single-byte-var-in-mem/imm32/inouts
22656 0x11/imm32/alloc-id:fake
22657 Single-byte-var-in-some-register/imm32/outputs
22658 0x11/imm32/alloc-id:fake
22659 _string_8a_copy_byte/imm32/subx-name
22660 1/imm32/rm32-is-first-inout
22661 3/imm32/r32-is-first-output
22662 0/imm32/no-imm32
22663 0/imm32/no-imm8
22664 0/imm32/no-disp32
22665 0/imm32/no-xm32
22666 0/imm32/no-x32
22667 0x11/imm32/alloc-id:fake
22668 _Primitive-copy-byte-to-mem/imm32/next
22669 _Primitive-copy-byte-to-mem:
22670 0x11/imm32/alloc-id:fake:payload
22671
22672 0x11/imm32/alloc-id:fake
22673 _string-copy-byte-to/imm32/name
22674 0x11/imm32/alloc-id:fake
22675 Two-args-byte-stack-byte-reg/imm32/inouts
22676 0/imm32/no-outputs
22677 0/imm32/no-outputs
22678 0x11/imm32/alloc-id:fake
22679 _string_88_copy_byte/imm32/subx-name
22680 1/imm32/rm32-is-first-inout
22681 2/imm32/r32-is-second-inout
22682 0/imm32/no-imm32
22683 0/imm32/no-imm8
22684 0/imm32/no-disp32
22685 0/imm32/no-xm32
22686 0/imm32/no-x32
22687 0x11/imm32/alloc-id:fake
22688 _Primitive-address/imm32/next
22689
22690 _Primitive-address:
22691 0x11/imm32/alloc-id:fake:payload
22692
22693 0x11/imm32/alloc-id:fake
22694 _string-address/imm32/name
22695 0x11/imm32/alloc-id:fake
22696 Single-int-var-in-mem/imm32/inouts
22697 0x11/imm32/alloc-id:fake
22698 Single-addr-var-in-some-register/imm32/outputs
22699 0x11/imm32/alloc-id:fake
22700 _string_8d_copy_address/imm32/subx-name
22701 1/imm32/rm32-is-first-inout
22702 3/imm32/r32-is-first-output
22703 0/imm32/no-imm32
22704 0/imm32/no-imm8
22705 0/imm32/no-disp32
22706 0/imm32/no-xm32
22707 0/imm32/no-x32
22708 0x11/imm32/alloc-id:fake
22709 _Primitive-compare-reg-with-reg/imm32/next
22710
22711 _Primitive-compare-reg-with-reg:
22712 0x11/imm32/alloc-id:fake:payload
22713
22714 0x11/imm32/alloc-id:fake
22715 _string-compare/imm32/name
22716 0x11/imm32/alloc-id:fake
22717 Two-int-args-in-regs/imm32/inouts
22718 0/imm32/no-outputs
22719 0/imm32/no-outputs
22720 0x11/imm32/alloc-id:fake
22721 _string_39_compare->/imm32/subx-name
22722 1/imm32/rm32-is-first-inout
22723 2/imm32/r32-is-second-inout
22724 0/imm32/no-imm32
22725 0/imm32/no-imm8
22726 0/imm32/no-disp32
22727 0/imm32/no-xm32
22728 0/imm32/no-x32
22729 0x11/imm32/alloc-id:fake
22730 _Primitive-compare-mem-with-reg/imm32/next
22731 _Primitive-compare-mem-with-reg:
22732 0x11/imm32/alloc-id:fake:payload
22733
22734 0x11/imm32/alloc-id:fake
22735 _string-compare/imm32/name
22736 0x11/imm32/alloc-id:fake
22737 Two-args-int-stack-int-reg/imm32/inouts
22738 0/imm32/no-outputs
22739 0/imm32/no-outputs
22740 0x11/imm32/alloc-id:fake
22741 _string_39_compare->/imm32/subx-name
22742 1/imm32/rm32-is-first-inout
22743 2/imm32/r32-is-second-inout
22744 0/imm32/no-imm32
22745 0/imm32/no-imm8
22746 0/imm32/no-disp32
22747 0/imm32/no-xm32
22748 0/imm32/no-x32
22749 0x11/imm32/alloc-id:fake
22750 _Primitive-compare-reg-with-mem/imm32/next
22751 _Primitive-compare-reg-with-mem:
22752 0x11/imm32/alloc-id:fake:payload
22753
22754 0x11/imm32/alloc-id:fake
22755 _string-compare/imm32/name
22756 0x11/imm32/alloc-id:fake
22757 Two-args-int-reg-int-stack/imm32/inouts
22758 0/imm32/no-outputs
22759 0/imm32/no-outputs
22760 0x11/imm32/alloc-id:fake
22761 _string_3b_compare<-/imm32/subx-name
22762 2/imm32/rm32-is-second-inout
22763 1/imm32/r32-is-first-inout
22764 0/imm32/no-imm32
22765 0/imm32/no-imm8
22766 0/imm32/no-disp32
22767 0/imm32/no-xm32
22768 0/imm32/no-x32
22769 0x11/imm32/alloc-id:fake
22770 _Primitive-compare-eax-with-literal/imm32/next
22771 _Primitive-compare-eax-with-literal:
22772 0x11/imm32/alloc-id:fake:payload
22773
22774 0x11/imm32/alloc-id:fake
22775 _string-compare/imm32/name
22776 0x11/imm32/alloc-id:fake
22777 Two-args-int-eax-int-literal/imm32/inouts
22778 0/imm32/no-outputs
22779 0/imm32/no-outputs
22780 0x11/imm32/alloc-id:fake
22781 _string_3d_compare_eax_with/imm32/subx-name
22782 0/imm32/no-rm32
22783 0/imm32/no-r32
22784 2/imm32/imm32-is-second-inout
22785 0/imm32/no-imm8
22786 0/imm32/no-disp32
22787 0/imm32/no-xm32
22788 0/imm32/no-x32
22789 0x11/imm32/alloc-id:fake
22790 _Primitive-compare-reg-with-literal/imm32/next
22791 _Primitive-compare-reg-with-literal:
22792 0x11/imm32/alloc-id:fake:payload
22793
22794 0x11/imm32/alloc-id:fake
22795 _string-compare/imm32/name
22796 0x11/imm32/alloc-id:fake
22797 Int-var-in-register-and-literal/imm32/inouts
22798 0/imm32/no-outputs
22799 0/imm32/no-outputs
22800 0x11/imm32/alloc-id:fake
22801 _string_81_subop_compare/imm32/subx-name
22802 1/imm32/rm32-is-first-inout
22803 0/imm32/no-r32
22804 2/imm32/imm32-is-second-inout
22805 0/imm32/no-imm8
22806 0/imm32/no-disp32
22807 0/imm32/no-xm32
22808 0/imm32/no-x32
22809 0x11/imm32/alloc-id:fake
22810 _Primitive-compare-mem-with-literal/imm32/next
22811 _Primitive-compare-mem-with-literal:
22812 0x11/imm32/alloc-id:fake:payload
22813
22814 0x11/imm32/alloc-id:fake
22815 _string-compare/imm32/name
22816 0x11/imm32/alloc-id:fake
22817 Int-var-and-literal/imm32/inouts
22818 0/imm32/no-outputs
22819 0/imm32/no-outputs
22820 0x11/imm32/alloc-id:fake
22821 _string_81_subop_compare/imm32/subx-name
22822 1/imm32/rm32-is-first-inout
22823 0/imm32/no-r32
22824 2/imm32/imm32-is-second-inout
22825 0/imm32/no-imm8
22826 0/imm32/no-disp32
22827 0/imm32/no-xm32
22828 0/imm32/no-x32
22829 0x11/imm32/alloc-id:fake
22830 _Primitive-negate-reg/imm32/next
22831
22832 _Primitive-negate-reg:
22833 0x11/imm32/alloc-id:fake:payload
22834
22835 0x11/imm32/alloc-id:fake
22836 _string-negate/imm32/name
22837 0/imm32/no-inouts
22838 0/imm32/no-inouts
22839 0x11/imm32/alloc-id:fake
22840 Single-int-var-in-some-register/imm32/outputs
22841 0x11/imm32/alloc-id:fake
22842 _string_f7_subop_negate/imm32/subx-name
22843 3/imm32/rm32-is-first-output
22844 0/imm32/no-r32
22845 0/imm32/no-imm32
22846 0/imm32/no-imm8
22847 0/imm32/no-disp32
22848 0/imm32/no-xm32
22849 0/imm32/no-x32
22850 0x11/imm32/alloc-id:fake
22851 _Primitive-negate-mem/imm32/next
22852 _Primitive-negate-mem:
22853 0x11/imm32/alloc-id:fake:payload
22854
22855 0x11/imm32/alloc-id:fake
22856 _string-negate/imm32/name
22857 0x11/imm32/alloc-id:fake
22858 Single-int-var-in-mem/imm32/inouts
22859 0/imm32/no-outputs
22860 0/imm32/no-outputs
22861 0x11/imm32/alloc-id:fake
22862 _string_f7_subop_negate/imm32/subx-name
22863 1/imm32/rm32-is-first-inout
22864 0/imm32/no-r32
22865 0/imm32/no-imm32
22866 0/imm32/no-imm8
22867 0/imm32/no-disp32
22868 0/imm32/no-xm32
22869 0/imm32/no-x32
22870 0x11/imm32/alloc-id:fake
22871 _Primitive-multiply-reg-by-reg/imm32/next
22872
22873 _Primitive-multiply-reg-by-reg:
22874 0x11/imm32/alloc-id:fake:payload
22875
22876 0x11/imm32/alloc-id:fake
22877 _string-multiply/imm32/name
22878 0x11/imm32/alloc-id:fake
22879 Single-int-var-in-some-register/imm32/inouts
22880 0x11/imm32/alloc-id:fake
22881 Single-int-var-in-some-register/imm32/outputs
22882 0x11/imm32/alloc-id:fake
22883 _string_0f_af_multiply/imm32/subx-name
22884 1/imm32/rm32-is-first-inout
22885 3/imm32/r32-is-first-output
22886 0/imm32/no-imm32
22887 0/imm32/no-imm8
22888 0/imm32/no-disp32
22889 0/imm32/no-xm32
22890 0/imm32/no-x32
22891 0x11/imm32/alloc-id:fake
22892 _Primitive-multiply-reg-by-mem/imm32/next
22893 _Primitive-multiply-reg-by-mem:
22894 0x11/imm32/alloc-id:fake:payload
22895
22896 0x11/imm32/alloc-id:fake
22897 _string-multiply/imm32/name
22898 0x11/imm32/alloc-id:fake
22899 Single-int-var-in-mem/imm32/inouts
22900 0x11/imm32/alloc-id:fake
22901 Single-int-var-in-some-register/imm32/outputs
22902 0x11/imm32/alloc-id:fake
22903 _string_0f_af_multiply/imm32/subx-name
22904 1/imm32/rm32-is-first-inout
22905 3/imm32/r32-is-first-output
22906 0/imm32/no-imm32
22907 0/imm32/no-imm8
22908 0/imm32/no-disp32
22909 0/imm32/no-xm32
22910 0/imm32/no-x32
22911 0x11/imm32/alloc-id:fake
22912 _Primitive-convert-mem-to-xreg/imm32/next
22913
22914 _Primitive-convert-mem-to-xreg:
22915 0x11/imm32/alloc-id:fake:payload
22916
22917 0x11/imm32/alloc-id:fake
22918 _string-convert/imm32/name
22919 0x11/imm32/alloc-id:fake
22920 Single-int-var-in-mem/imm32/inouts
22921 0x11/imm32/alloc-id:fake
22922 Single-float-var-in-some-register/imm32/outputs
22923 0x11/imm32/alloc-id:fake
22924 _string_f3_0f_2a_convert_to_float/imm32/subx-name
22925 1/imm32/rm32-is-first-inout
22926 0/imm32/no-r32
22927 0/imm32/no-imm32
22928 0/imm32/no-imm8
22929 0/imm32/no-disp32
22930 0/imm32/no-xm32
22931 3/imm32/x32-is-first-output
22932 0x11/imm32/alloc-id:fake
22933 _Primitive-convert-reg-to-xreg/imm32/next
22934 _Primitive-convert-reg-to-xreg:
22935 0x11/imm32/alloc-id:fake:payload
22936
22937 0x11/imm32/alloc-id:fake
22938 _string-convert/imm32/name
22939 0x11/imm32/alloc-id:fake
22940 Single-int-var-in-some-register/imm32/inouts
22941 0x11/imm32/alloc-id:fake
22942 Single-float-var-in-some-register/imm32/outputs
22943 0x11/imm32/alloc-id:fake
22944 _string_f3_0f_2a_convert_to_float/imm32/subx-name
22945 1/imm32/rm32-is-first-inout
22946 0/imm32/no-r32
22947 0/imm32/no-imm32
22948 0/imm32/no-imm8
22949 0/imm32/no-disp32
22950 0/imm32/no-xm32
22951 3/imm32/x32-is-first-output
22952 0x11/imm32/alloc-id:fake
22953 _Primitive-convert-xmem-to-reg/imm32/next
22954
22955 _Primitive-convert-xmem-to-reg:
22956 0x11/imm32/alloc-id:fake:payload
22957
22958 0x11/imm32/alloc-id:fake
22959 _string-convert/imm32/name
22960 0x11/imm32/alloc-id:fake
22961 Single-float-var-in-mem/imm32/inouts
22962 0x11/imm32/alloc-id:fake
22963 Single-int-var-in-some-register/imm32/outputs
22964 0x11/imm32/alloc-id:fake
22965 _string_f3_0f_2d_convert_to_int/imm32/subx-name
22966 0/imm32/no-rm32
22967 3/imm32/r32-is-first-output
22968 0/imm32/no-imm32
22969 0/imm32/no-imm8
22970 0/imm32/no-disp32
22971 1/imm32/xm32-is-first-inout
22972 0/imm32/no-x32
22973 0x11/imm32/alloc-id:fake
22974 _Primitive-convert-xreg-to-reg/imm32/next
22975 _Primitive-convert-xreg-to-reg:
22976 0x11/imm32/alloc-id:fake:payload
22977
22978 0x11/imm32/alloc-id:fake
22979 _string-convert/imm32/name
22980 0x11/imm32/alloc-id:fake
22981 Single-float-var-in-some-register/imm32/inouts
22982 0x11/imm32/alloc-id:fake
22983 Single-int-var-in-some-register/imm32/outputs
22984 0x11/imm32/alloc-id:fake
22985 _string_f3_0f_2d_convert_to_int/imm32/subx-name
22986 0/imm32/no-rm32
22987 3/imm32/r32-is-first-output
22988 0/imm32/no-imm32
22989 0/imm32/no-imm8
22990 0/imm32/no-disp32
22991 1/imm32/xm32-is-first-inout
22992 0/imm32/no-x32
22993 0x11/imm32/alloc-id:fake
22994 _Primitive-truncate-xmem-to-reg/imm32/next
22995 _Primitive-truncate-xmem-to-reg:
22996 0x11/imm32/alloc-id:fake:payload
22997
22998 0x11/imm32/alloc-id:fake
22999 _string-truncate/imm32/name
23000 0x11/imm32/alloc-id:fake
23001 Single-float-var-in-mem/imm32/inouts
23002 0x11/imm32/alloc-id:fake
23003 Single-int-var-in-some-register/imm32/outputs
23004 0x11/imm32/alloc-id:fake
23005 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
23006 0/imm32/no-rm32
23007 3/imm32/r32-is-first-output
23008 0/imm32/no-imm32
23009 0/imm32/no-imm8
23010 0/imm32/no-disp32
23011 1/imm32/xm32-is-first-inout
23012 0/imm32/no-x32
23013 0x11/imm32/alloc-id:fake
23014 _Primitive-truncate-xreg-to-reg/imm32/next
23015 _Primitive-truncate-xreg-to-reg:
23016 0x11/imm32/alloc-id:fake:payload
23017
23018 0x11/imm32/alloc-id:fake
23019 _string-truncate/imm32/name
23020 0x11/imm32/alloc-id:fake
23021 Single-float-var-in-some-register/imm32/inouts
23022 0x11/imm32/alloc-id:fake
23023 Single-int-var-in-some-register/imm32/outputs
23024 0x11/imm32/alloc-id:fake
23025 _string_f3_0f_2c_truncate_to_int/imm32/subx-name
23026 0/imm32/no-rm32
23027 3/imm32/r32-is-first-output
23028 0/imm32/no-imm32
23029 0/imm32/no-imm8
23030 0/imm32/no-disp32
23031 1/imm32/xm32-is-first-inout
23032 0/imm32/no-x32
23033 0x11/imm32/alloc-id:fake
23034 _Primitive-reinterpret-xmem-as-reg/imm32/next
23035
23036 _Primitive-reinterpret-xmem-as-reg:
23037 0x11/imm32/alloc-id:fake:payload
23038
23039 0x11/imm32/alloc-id:fake
23040 _string-reinterpret/imm32/name
23041 0x11/imm32/alloc-id:fake
23042 Single-float-var-in-mem/imm32/inouts
23043 0x11/imm32/alloc-id:fake
23044 Single-int-var-in-some-register/imm32/outputs
23045 0x11/imm32/alloc-id:fake
23046 _string_8b_->/imm32/subx-name
23047 0/imm32/no-rm32
23048 3/imm32/r32-is-first-output
23049 0/imm32/no-imm32
23050 0/imm32/no-imm8
23051 0/imm32/no-disp32
23052 1/imm32/xm32-is-first-inout
23053 0/imm32/no-x32
23054 0x11/imm32/alloc-id:fake
23055 _Primitive-reinterpret-mem-as-xreg/imm32/next
23056 _Primitive-reinterpret-mem-as-xreg:
23057 0x11/imm32/alloc-id:fake:payload
23058
23059 0x11/imm32/alloc-id:fake
23060 _string-reinterpret/imm32/name
23061 0x11/imm32/alloc-id:fake
23062 Single-int-var-in-mem/imm32/inouts
23063 0x11/imm32/alloc-id:fake
23064 Single-float-var-in-some-register/imm32/outputs
23065 0x11/imm32/alloc-id:fake
23066 _string_f3_0f_10_copy/imm32/subx-name
23067 1/imm32/rm32-is-first-inout
23068 0/imm32/no-r32
23069 0/imm32/no-imm32
23070 0/imm32/no-imm8
23071 0/imm32/no-disp32
23072 0/imm32/no-xm32
23073 3/imm32/x32-is-first-output
23074 0x11/imm32/alloc-id:fake
23075 _Primitive-copy-xreg-to-xreg/imm32/next
23076
23077 _Primitive-copy-xreg-to-xreg:
23078 0x11/imm32/alloc-id:fake:payload
23079
23080 0x11/imm32/alloc-id:fake
23081 _string-copy/imm32/name
23082 0x11/imm32/alloc-id:fake
23083 Single-float-var-in-some-register/imm32/inouts
23084 0x11/imm32/alloc-id:fake
23085 Single-float-var-in-some-register/imm32/outputs
23086 0x11/imm32/alloc-id:fake
23087 _string_f3_0f_11_copy/imm32/subx-name
23088 0/imm32/no-rm32
23089 0/imm32/no-r32
23090 0/imm32/no-imm32
23091 0/imm32/no-imm8
23092 0/imm32/no-disp32
23093 3/imm32/xm32-is-first-output
23094 1/imm32/x32-is-first-inout
23095 0x11/imm32/alloc-id:fake
23096 _Primitive-copy-xreg-to-mem/imm32/next
23097 _Primitive-copy-xreg-to-mem:
23098 0x11/imm32/alloc-id:fake:payload
23099
23100 0x11/imm32/alloc-id:fake
23101 _string-copy-to/imm32/name
23102 0x11/imm32/alloc-id:fake
23103 Two-args-float-stack-float-reg/imm32/inouts
23104 0/imm32/no-outputs
23105 0/imm32/no-outputs
23106 0x11/imm32/alloc-id:fake
23107 _string_f3_0f_11_copy/imm32/subx-name
23108 0/imm32/no-rm32
23109 0/imm32/no-r32
23110 0/imm32/no-imm32
23111 0/imm32/no-imm8
23112 0/imm32/no-disp32
23113 1/imm32/xm32-is-first-inout
23114 2/imm32/x32-is-second-inout
23115 0x11/imm32/alloc-id:fake
23116 _Primitive-copy-mem-to-xreg/imm32/next
23117 _Primitive-copy-mem-to-xreg:
23118 0x11/imm32/alloc-id:fake:payload
23119
23120 0x11/imm32/alloc-id:fake
23121 _string-copy/imm32/name
23122 0x11/imm32/alloc-id:fake
23123 Single-float-var-in-mem/imm32/inouts
23124 0x11/imm32/alloc-id:fake
23125 Single-float-var-in-some-register/imm32/outputs
23126 0x11/imm32/alloc-id:fake
23127 _string_f3_0f_10_copy/imm32/subx-name
23128 0/imm32/no-rm32
23129 0/imm32/no-r32
23130 0/imm32/no-imm32
23131 0/imm32/no-imm8
23132 0/imm32/no-disp32
23133 1/imm32/xm32-is-first-inout
23134 3/imm32/x32-is-first-output
23135 0x11/imm32/alloc-id:fake
23136 _Primitive-address-of-xmem/imm32/next
23137
23138 _Primitive-address-of-xmem:
23139 0x11/imm32/alloc-id:fake:payload
23140
23141 0x11/imm32/alloc-id:fake
23142 _string-address/imm32/name
23143 0x11/imm32/alloc-id:fake
23144 Single-float-var-in-mem/imm32/inouts
23145 0x11/imm32/alloc-id:fake
23146 Single-addr-var-in-some-register/imm32/outputs
23147 0x11/imm32/alloc-id:fake
23148 _string_8d_copy_address/imm32/subx-name
23149 1/imm32/rm32-is-first-inout
23150 3/imm32/r32-is-first-output
23151 0/imm32/no-imm32
23152 0/imm32/no-imm8
23153 0/imm32/no-disp32
23154 0/imm32/no-xm32
23155 0/imm32/no-x32
23156 0x11/imm32/alloc-id:fake
23157 _Primitive-add-xreg-to-xreg/imm32/next
23158
23159 _Primitive-add-xreg-to-xreg:
23160 0x11/imm32/alloc-id:fake:payload
23161
23162 0x11/imm32/alloc-id:fake
23163 _string-add/imm32/name
23164 0x11/imm32/alloc-id:fake
23165 Single-float-var-in-some-register/imm32/inouts
23166 0x11/imm32/alloc-id:fake
23167 Single-float-var-in-some-register/imm32/outputs
23168 0x11/imm32/alloc-id:fake
23169 _string_f3_0f_58_add/imm32/subx-name
23170 0/imm32/no-rm32
23171 0/imm32/no-r32
23172 0/imm32/no-imm32
23173 0/imm32/no-imm8
23174 0/imm32/no-disp32
23175 1/imm32/xm32-is-first-inout
23176 3/imm32/x32-is-first-output
23177 0x11/imm32/alloc-id:fake
23178 _Primitive-add-mem-to-xreg/imm32/next
23179 _Primitive-add-mem-to-xreg:
23180 0x11/imm32/alloc-id:fake:payload
23181
23182 0x11/imm32/alloc-id:fake
23183 _string-add/imm32/name
23184 0x11/imm32/alloc-id:fake
23185 Single-float-var-in-mem/imm32/inouts
23186 0x11/imm32/alloc-id:fake
23187 Single-float-var-in-some-register/imm32/outputs
23188 0x11/imm32/alloc-id:fake
23189 _string_f3_0f_58_add/imm32/subx-name
23190 0/imm32/no-rm32
23191 0/imm32/no-r32
23192 0/imm32/no-imm32
23193 0/imm32/no-imm8
23194 0/imm32/no-disp32
23195 1/imm32/xm32-is-first-inout
23196 3/imm32/x32-is-first-output
23197 0x11/imm32/alloc-id:fake
23198 _Primitive-subtract-xreg-from-xreg/imm32/next
23199
23200 _Primitive-subtract-xreg-from-xreg:
23201 0x11/imm32/alloc-id:fake:payload
23202
23203 0x11/imm32/alloc-id:fake
23204 _string-subtract/imm32/name
23205 0x11/imm32/alloc-id:fake
23206 Single-float-var-in-some-register/imm32/inouts
23207 0x11/imm32/alloc-id:fake
23208 Single-float-var-in-some-register/imm32/outputs
23209 0x11/imm32/alloc-id:fake
23210 _string_f3_0f_5c_subtract/imm32/subx-name
23211 0/imm32/no-rm32
23212 0/imm32/no-r32
23213 0/imm32/no-imm32
23214 0/imm32/no-imm8
23215 0/imm32/no-disp32
23216 1/imm32/xm32-is-first-inout
23217 3/imm32/x32-is-first-output
23218 0x11/imm32/alloc-id:fake
23219 _Primitive-subtract-mem-from-xreg/imm32/next
23220 _Primitive-subtract-mem-from-xreg:
23221 0x11/imm32/alloc-id:fake:payload
23222
23223 0x11/imm32/alloc-id:fake
23224 _string-subtract/imm32/name
23225 0x11/imm32/alloc-id:fake
23226 Single-float-var-in-mem/imm32/inouts
23227 0x11/imm32/alloc-id:fake
23228 Single-float-var-in-some-register/imm32/outputs
23229 0x11/imm32/alloc-id:fake
23230 _string_f3_0f_5c_subtract/imm32/subx-name
23231 0/imm32/no-rm32
23232 0/imm32/no-r32
23233 0/imm32/no-imm32
23234 0/imm32/no-imm8
23235 0/imm32/no-disp32
23236 1/imm32/xm32-is-first-inout
23237 3/imm32/x32-is-first-output
23238 0x11/imm32/alloc-id:fake
23239 _Primitive-multiply-xreg-by-xreg/imm32/next
23240
23241 _Primitive-multiply-xreg-by-xreg:
23242 0x11/imm32/alloc-id:fake:payload
23243
23244 0x11/imm32/alloc-id:fake
23245 _string-multiply/imm32/name
23246 0x11/imm32/alloc-id:fake
23247 Single-float-var-in-some-register/imm32/inouts
23248 0x11/imm32/alloc-id:fake
23249 Single-float-var-in-some-register/imm32/outputs
23250 0x11/imm32/alloc-id:fake
23251 _string_f3_0f_59_multiply/imm32/subx-name
23252 0/imm32/no-rm32
23253 0/imm32/no-r32
23254 0/imm32/no-imm32
23255 0/imm32/no-imm8
23256 0/imm32/no-disp32
23257 1/imm32/xm32-is-first-inout
23258 3/imm32/x32-is-first-output
23259 0x11/imm32/alloc-id:fake
23260 _Primitive-multiply-xreg-by-mem/imm32/next
23261 _Primitive-multiply-xreg-by-mem:
23262 0x11/imm32/alloc-id:fake:payload
23263
23264 0x11/imm32/alloc-id:fake
23265 _string-multiply/imm32/name
23266 0x11/imm32/alloc-id:fake
23267 Single-float-var-in-mem/imm32/inouts
23268 0x11/imm32/alloc-id:fake
23269 Single-float-var-in-some-register/imm32/outputs
23270 0x11/imm32/alloc-id:fake
23271 _string_f3_0f_59_multiply/imm32/subx-name
23272 0/imm32/no-rm32
23273 0/imm32/no-r32
23274 0/imm32/no-imm32
23275 0/imm32/no-imm8
23276 0/imm32/no-disp32
23277 1/imm32/xm32-is-first-inout
23278 3/imm32/x32-is-first-output
23279 0x11/imm32/alloc-id:fake
23280 _Primitive-divide-xreg-by-xreg/imm32/next
23281
23282 _Primitive-divide-xreg-by-xreg:
23283 0x11/imm32/alloc-id:fake:payload
23284
23285 0x11/imm32/alloc-id:fake
23286 _string-divide/imm32/name
23287 0x11/imm32/alloc-id:fake
23288 Single-float-var-in-some-register/imm32/inouts
23289 0x11/imm32/alloc-id:fake
23290 Single-float-var-in-some-register/imm32/outputs
23291 0x11/imm32/alloc-id:fake
23292 _string_f3_0f_5e_divide/imm32/subx-name
23293 0/imm32/no-rm32
23294 0/imm32/no-r32
23295 0/imm32/no-imm32
23296 0/imm32/no-imm8
23297 0/imm32/no-disp32
23298 1/imm32/xm32-is-first-inout
23299 3/imm32/x32-is-first-output
23300 0x11/imm32/alloc-id:fake
23301 _Primitive-divide-xreg-by-mem/imm32/next
23302 _Primitive-divide-xreg-by-mem:
23303 0x11/imm32/alloc-id:fake:payload
23304
23305 0x11/imm32/alloc-id:fake
23306 _string-divide/imm32/name
23307 0x11/imm32/alloc-id:fake
23308 Single-float-var-in-mem/imm32/inouts
23309 0x11/imm32/alloc-id:fake
23310 Single-float-var-in-some-register/imm32/outputs
23311 0x11/imm32/alloc-id:fake
23312 _string_f3_0f_5e_divide/imm32/subx-name
23313 0/imm32/no-rm32
23314 0/imm32/no-r32
23315 0/imm32/no-imm32
23316 0/imm32/no-imm8
23317 0/imm32/no-disp32
23318 1/imm32/xm32-is-first-inout
23319 3/imm32/x32-is-first-output
23320 0x11/imm32/alloc-id:fake
23321 _Primitive-max-xreg-with-xreg/imm32/next
23322
23323 _Primitive-max-xreg-with-xreg:
23324 0x11/imm32/alloc-id:fake:payload
23325
23326 0x11/imm32/alloc-id:fake
23327 _string-max/imm32/name
23328 0x11/imm32/alloc-id:fake
23329 Single-float-var-in-some-register/imm32/inouts
23330 0x11/imm32/alloc-id:fake
23331 Single-float-var-in-some-register/imm32/outputs
23332 0x11/imm32/alloc-id:fake
23333 _string_f3_0f_5f_max/imm32/subx-name
23334 0/imm32/no-rm32
23335 0/imm32/no-r32
23336 0/imm32/no-imm32
23337 0/imm32/no-imm8
23338 0/imm32/no-disp32
23339 1/imm32/xm32-is-first-inout
23340 3/imm32/x32-is-first-output
23341 0x11/imm32/alloc-id:fake
23342 _Primitive-max-xreg-with-mem/imm32/next
23343 _Primitive-max-xreg-with-mem:
23344 0x11/imm32/alloc-id:fake:payload
23345
23346 0x11/imm32/alloc-id:fake
23347 _string-max/imm32/name
23348 0x11/imm32/alloc-id:fake
23349 Single-float-var-in-mem/imm32/inouts
23350 0x11/imm32/alloc-id:fake
23351 Single-float-var-in-some-register/imm32/outputs
23352 0x11/imm32/alloc-id:fake
23353 _string_f3_0f_5f_max/imm32/subx-name
23354 0/imm32/no-rm32
23355 0/imm32/no-r32
23356 0/imm32/no-imm32
23357 0/imm32/no-imm8
23358 0/imm32/no-disp32
23359 1/imm32/xm32-is-first-inout
23360 3/imm32/x32-is-first-output
23361 0x11/imm32/alloc-id:fake
23362 _Primitive-min-xreg-with-xreg/imm32/next
23363
23364 _Primitive-min-xreg-with-xreg:
23365 0x11/imm32/alloc-id:fake:payload
23366
23367 0x11/imm32/alloc-id:fake
23368 _string-min/imm32/name
23369 0x11/imm32/alloc-id:fake
23370 Single-float-var-in-some-register/imm32/inouts
23371 0x11/imm32/alloc-id:fake
23372 Single-float-var-in-some-register/imm32/outputs
23373 0x11/imm32/alloc-id:fake
23374 _string_f3_0f_5d_min/imm32/subx-name
23375 0/imm32/no-rm32
23376 0/imm32/no-r32
23377 0/imm32/no-imm32
23378 0/imm32/no-imm8
23379 0/imm32/no-disp32
23380 1/imm32/xm32-is-first-inout
23381 3/imm32/x32-is-first-output
23382 0x11/imm32/alloc-id:fake
23383 _Primitive-min-xreg-with-mem/imm32/next
23384 _Primitive-min-xreg-with-mem:
23385 0x11/imm32/alloc-id:fake:payload
23386
23387 0x11/imm32/alloc-id:fake
23388 _string-min/imm32/name
23389 0x11/imm32/alloc-id:fake
23390 Single-float-var-in-mem/imm32/inouts
23391 0x11/imm32/alloc-id:fake
23392 Single-float-var-in-some-register/imm32/outputs
23393 0x11/imm32/alloc-id:fake
23394 _string_f3_0f_5d_min/imm32/subx-name
23395 0/imm32/no-rm32
23396 0/imm32/no-r32
23397 0/imm32/no-imm32
23398 0/imm32/no-imm8
23399 0/imm32/no-disp32
23400 1/imm32/xm32-is-first-inout
23401 3/imm32/x32-is-first-output
23402 0x11/imm32/alloc-id:fake
23403 _Primitive-reciprocal-xreg-to-xreg/imm32/next
23404
23405 _Primitive-reciprocal-xreg-to-xreg:
23406 0x11/imm32/alloc-id:fake:payload
23407
23408 0x11/imm32/alloc-id:fake
23409 _string-reciprocal/imm32/name
23410 0x11/imm32/alloc-id:fake
23411 Single-float-var-in-some-register/imm32/inouts
23412 0x11/imm32/alloc-id:fake
23413 Single-float-var-in-some-register/imm32/outputs
23414 0x11/imm32/alloc-id:fake
23415 _string_f3_0f_53_reciprocal/imm32/subx-name
23416 0/imm32/no-rm32
23417 0/imm32/no-r32
23418 0/imm32/no-imm32
23419 0/imm32/no-imm8
23420 0/imm32/no-disp32
23421 1/imm32/xm32-is-first-inout
23422 3/imm32/x32-is-first-output
23423 0x11/imm32/alloc-id:fake
23424 _Primitive-reciprocal-mem-to-xreg/imm32/next
23425 _Primitive-reciprocal-mem-to-xreg:
23426 0x11/imm32/alloc-id:fake:payload
23427
23428 0x11/imm32/alloc-id:fake
23429 _string-reciprocal/imm32/name
23430 0x11/imm32/alloc-id:fake
23431 Single-float-var-in-mem/imm32/inouts
23432 0x11/imm32/alloc-id:fake
23433 Single-float-var-in-some-register/imm32/outputs
23434 0x11/imm32/alloc-id:fake
23435 _string_f3_0f_53_reciprocal/imm32/subx-name
23436 0/imm32/no-rm32
23437 0/imm32/no-r32
23438 0/imm32/no-imm32
23439 0/imm32/no-imm8
23440 0/imm32/no-disp32
23441 1/imm32/xm32-is-first-inout
23442 3/imm32/x32-is-first-output
23443 0x11/imm32/alloc-id:fake
23444 _Primitive-square-root-xreg-to-xreg/imm32/next
23445
23446 _Primitive-square-root-xreg-to-xreg:
23447 0x11/imm32/alloc-id:fake:payload
23448
23449 0x11/imm32/alloc-id:fake
23450 _string-square-root/imm32/name
23451 0x11/imm32/alloc-id:fake
23452 Single-float-var-in-some-register/imm32/inouts
23453 0x11/imm32/alloc-id:fake
23454 Single-float-var-in-some-register/imm32/outputs
23455 0x11/imm32/alloc-id:fake
23456 _string_f3_0f_51_square_root/imm32/subx-name
23457 0/imm32/no-rm32
23458 0/imm32/no-r32
23459 0/imm32/no-imm32
23460 0/imm32/no-imm8
23461 0/imm32/no-disp32
23462 1/imm32/xm32-is-first-inout
23463 3/imm32/x32-is-first-output
23464 0x11/imm32/alloc-id:fake
23465 _Primitive-square-root-mem-to-xreg/imm32/next
23466 _Primitive-square-root-mem-to-xreg:
23467 0x11/imm32/alloc-id:fake:payload
23468
23469 0x11/imm32/alloc-id:fake
23470 _string-square-root/imm32/name
23471 0x11/imm32/alloc-id:fake
23472 Single-float-var-in-mem/imm32/inouts
23473 0x11/imm32/alloc-id:fake
23474 Single-float-var-in-some-register/imm32/outputs
23475 0x11/imm32/alloc-id:fake
23476 _string_f3_0f_51_square_root/imm32/subx-name
23477 0/imm32/no-rm32
23478 0/imm32/no-r32
23479 0/imm32/no-imm32
23480 0/imm32/no-imm8
23481 0/imm32/no-disp32
23482 1/imm32/xm32-is-first-inout
23483 3/imm32/x32-is-first-output
23484 0x11/imm32/alloc-id:fake
23485 _Primitive-inverse-square-root-xreg-to-xreg/imm32/next
23486
23487 _Primitive-inverse-square-root-xreg-to-xreg:
23488 0x11/imm32/alloc-id:fake:payload
23489
23490 0x11/imm32/alloc-id:fake
23491 _string-inverse-square-root/imm32/name
23492 0x11/imm32/alloc-id:fake
23493 Single-float-var-in-some-register/imm32/inouts
23494 0x11/imm32/alloc-id:fake
23495 Single-float-var-in-some-register/imm32/outputs
23496 0x11/imm32/alloc-id:fake
23497 _string_f3_0f_52_inverse_square_root/imm32/subx-name
23498 0/imm32/no-rm32
23499 0/imm32/no-r32
23500 0/imm32/no-imm32
23501 0/imm32/no-imm8
23502 0/imm32/no-disp32
23503 1/imm32/xm32-is-first-inout
23504 3/imm32/x32-is-first-output
23505 0x11/imm32/alloc-id:fake
23506 _Primitive-inverse-square-root-mem-to-xreg/imm32/next
23507 _Primitive-inverse-square-root-mem-to-xreg:
23508 0x11/imm32/alloc-id:fake:payload
23509
23510 0x11/imm32/alloc-id:fake
23511 _string-inverse-square-root/imm32/name
23512 0x11/imm32/alloc-id:fake
23513 Single-float-var-in-mem/imm32/inouts
23514 0x11/imm32/alloc-id:fake
23515 Single-float-var-in-some-register/imm32/outputs
23516 0x11/imm32/alloc-id:fake
23517 _string_f3_0f_52_inverse_square_root/imm32/subx-name
23518 0/imm32/no-rm32
23519 0/imm32/no-r32
23520 0/imm32/no-imm32
23521 0/imm32/no-imm8
23522 0/imm32/no-disp32
23523 1/imm32/xm32-is-first-inout
23524 3/imm32/x32-is-first-output
23525 0x11/imm32/alloc-id:fake
23526 _Primitive-compare-xreg-with-xreg/imm32/next
23527
23528 _Primitive-compare-xreg-with-xreg:
23529 0x11/imm32/alloc-id:fake:payload
23530
23531 0x11/imm32/alloc-id:fake
23532 _string-compare/imm32/name
23533 0x11/imm32/alloc-id:fake
23534 Two-float-args-in-regs/imm32/inouts
23535 0/imm32/no-outputs
23536 0/imm32/no-outputs
23537 0x11/imm32/alloc-id:fake
23538 _string_0f_2f_compare/imm32/subx-name
23539 0/imm32/no-rm32
23540 0/imm32/no-r32
23541 0/imm32/no-imm32
23542 0/imm32/no-imm8
23543 0/imm32/no-disp32
23544 1/imm32/xm32-is-first-inout
23545 2/imm32/x32-is-second-inout
23546 0x11/imm32/alloc-id:fake
23547 _Primitive-compare-xreg-with-mem/imm32/next
23548 _Primitive-compare-xreg-with-mem:
23549 0x11/imm32/alloc-id:fake:payload
23550
23551 0x11/imm32/alloc-id:fake
23552 _string-compare/imm32/name
23553 0x11/imm32/alloc-id:fake
23554 Two-args-float-reg-float-stack/imm32/inouts
23555 0/imm32/no-outputs
23556 0/imm32/no-outputs
23557 0x11/imm32/alloc-id:fake
23558 _string_0f_2f_compare/imm32/subx-name
23559 0/imm32/no-rm32
23560 0/imm32/no-r32
23561 0/imm32/no-imm32
23562 0/imm32/no-imm8
23563 0/imm32/no-disp32
23564 2/imm32/xm32-is-second-inout
23565 1/imm32/x32-is-first-inout
23566 0x11/imm32/alloc-id:fake
23567 _Primitive-break-if-addr</imm32/next
23568
23569 _Primitive-break-if-addr<:
23570 0x11/imm32/alloc-id:fake:payload
23571 0x11/imm32/alloc-id:fake
23572 _string-break-if-addr</imm32/name
23573 0/imm32/no-inouts
23574 0/imm32/no-inouts
23575 0/imm32/no-outputs
23576 0/imm32/no-outputs
23577 0x11/imm32/alloc-id:fake
23578 _string_0f_82_jump_break/imm32/subx-name
23579 0/imm32/no-rm32
23580 0/imm32/no-r32
23581 0/imm32/no-imm32
23582 0/imm32/no-imm8
23583 0/imm32/no-disp32
23584 0/imm32/no-xm32
23585 0/imm32/no-x32
23586 0x11/imm32/alloc-id:fake
23587 _Primitive-break-if-addr>=/imm32/next
23588 _Primitive-break-if-addr>=:
23589 0x11/imm32/alloc-id:fake:payload
23590 0x11/imm32/alloc-id:fake
23591 _string-break-if-addr>=/imm32/name
23592 0/imm32/no-inouts
23593 0/imm32/no-inouts
23594 0/imm32/no-outputs
23595 0/imm32/no-outputs
23596 0x11/imm32/alloc-id:fake
23597 _string_0f_83_jump_break/imm32/subx-name
23598 0/imm32/no-rm32
23599 0/imm32/no-r32
23600 0/imm32/no-imm32
23601 0/imm32/no-imm8
23602 0/imm32/no-disp32
23603 0/imm32/no-xm32
23604 0/imm32/no-x32
23605 0x11/imm32/alloc-id:fake
23606 _Primitive-break-if-=/imm32/next
23607 _Primitive-break-if-=:
23608 0x11/imm32/alloc-id:fake:payload
23609 0x11/imm32/alloc-id:fake
23610 _string-break-if-=/imm32/name
23611 0/imm32/no-inouts
23612 0/imm32/no-inouts
23613 0/imm32/no-outputs
23614 0/imm32/no-outputs
23615 0x11/imm32/alloc-id:fake
23616 _string_0f_84_jump_break/imm32/subx-name
23617 0/imm32/no-rm32
23618 0/imm32/no-r32
23619 0/imm32/no-imm32
23620 0/imm32/no-imm8
23621 0/imm32/no-disp32
23622 0/imm32/no-xm32
23623 0/imm32/no-x32
23624 0x11/imm32/alloc-id:fake
23625 _Primitive-break-if-!=/imm32/next
23626 _Primitive-break-if-!=:
23627 0x11/imm32/alloc-id:fake:payload
23628 0x11/imm32/alloc-id:fake
23629 _string-break-if-!=/imm32/name
23630 0/imm32/no-inouts
23631 0/imm32/no-inouts
23632 0/imm32/no-outputs
23633 0/imm32/no-outputs
23634 0x11/imm32/alloc-id:fake
23635 _string_0f_85_jump_break/imm32/subx-name
23636 0/imm32/no-rm32
23637 0/imm32/no-r32
23638 0/imm32/no-imm32
23639 0/imm32/no-imm8
23640 0/imm32/no-disp32
23641 0/imm32/no-xm32
23642 0/imm32/no-x32
23643 0x11/imm32/alloc-id:fake
23644 _Primitive-break-if-addr<=/imm32/next
23645 _Primitive-break-if-addr<=:
23646 0x11/imm32/alloc-id:fake:payload
23647 0x11/imm32/alloc-id:fake
23648 _string-break-if-addr<=/imm32/name
23649 0/imm32/no-inouts
23650 0/imm32/no-inouts
23651 0/imm32/no-outputs
23652 0/imm32/no-outputs
23653 0x11/imm32/alloc-id:fake
23654 _string_0f_86_jump_break/imm32/subx-name
23655 0/imm32/no-rm32
23656 0/imm32/no-r32
23657 0/imm32/no-imm32
23658 0/imm32/no-imm8
23659 0/imm32/no-disp32
23660 0/imm32/no-xm32
23661 0/imm32/no-x32
23662 0x11/imm32/alloc-id:fake
23663 _Primitive-break-if-addr>/imm32/next
23664 _Primitive-break-if-addr>:
23665 0x11/imm32/alloc-id:fake:payload
23666 0x11/imm32/alloc-id:fake
23667 _string-break-if-addr>/imm32/name
23668 0/imm32/no-inouts
23669 0/imm32/no-inouts
23670 0/imm32/no-outputs
23671 0/imm32/no-outputs
23672 0x11/imm32/alloc-id:fake
23673 _string_0f_87_jump_break/imm32/subx-name
23674 0/imm32/no-rm32
23675 0/imm32/no-r32
23676 0/imm32/no-imm32
23677 0/imm32/no-imm8
23678 0/imm32/no-disp32
23679 0/imm32/no-xm32
23680 0/imm32/no-x32
23681 0x11/imm32/alloc-id:fake
23682 _Primitive-break-if-</imm32/next
23683 _Primitive-break-if-<:
23684 0x11/imm32/alloc-id:fake:payload
23685 0x11/imm32/alloc-id:fake
23686 _string-break-if-</imm32/name
23687 0/imm32/no-inouts
23688 0/imm32/no-inouts
23689 0/imm32/no-outputs
23690 0/imm32/no-outputs
23691 0x11/imm32/alloc-id:fake
23692 _string_0f_8c_jump_break/imm32/subx-name
23693 0/imm32/no-rm32
23694 0/imm32/no-r32
23695 0/imm32/no-imm32
23696 0/imm32/no-imm8
23697 0/imm32/no-disp32
23698 0/imm32/no-xm32
23699 0/imm32/no-x32
23700 0x11/imm32/alloc-id:fake
23701 _Primitive-break-if->=/imm32/next
23702 _Primitive-break-if->=:
23703 0x11/imm32/alloc-id:fake:payload
23704 0x11/imm32/alloc-id:fake
23705 _string-break-if->=/imm32/name
23706 0/imm32/no-inouts
23707 0/imm32/no-inouts
23708 0/imm32/no-outputs
23709 0/imm32/no-outputs
23710 0x11/imm32/alloc-id:fake
23711 _string_0f_8d_jump_break/imm32/subx-name
23712 0/imm32/no-rm32
23713 0/imm32/no-r32
23714 0/imm32/no-imm32
23715 0/imm32/no-imm8
23716 0/imm32/no-disp32
23717 0/imm32/no-xm32
23718 0/imm32/no-x32
23719 0x11/imm32/alloc-id:fake
23720 _Primitive-break-if-<=/imm32/next
23721 _Primitive-break-if-<=:
23722 0x11/imm32/alloc-id:fake:payload
23723 0x11/imm32/alloc-id:fake
23724 _string-break-if-<=/imm32/name
23725 0/imm32/no-inouts
23726 0/imm32/no-inouts
23727 0/imm32/no-outputs
23728 0/imm32/no-outputs
23729 0x11/imm32/alloc-id:fake
23730 _string_0f_8e_jump_break/imm32/subx-name
23731 0/imm32/no-rm32
23732 0/imm32/no-r32
23733 0/imm32/no-imm32
23734 0/imm32/no-imm8
23735 0/imm32/no-disp32
23736 0/imm32/no-xm32
23737 0/imm32/no-x32
23738 0x11/imm32/alloc-id:fake
23739 _Primitive-break-if->/imm32/next
23740 _Primitive-break-if->:
23741 0x11/imm32/alloc-id:fake:payload
23742 0x11/imm32/alloc-id:fake
23743 _string-break-if->/imm32/name
23744 0/imm32/no-inouts
23745 0/imm32/no-inouts
23746 0/imm32/no-outputs
23747 0/imm32/no-outputs
23748 0x11/imm32/alloc-id:fake
23749 _string_0f_8f_jump_break/imm32/subx-name
23750 0/imm32/no-rm32
23751 0/imm32/no-r32
23752 0/imm32/no-imm32
23753 0/imm32/no-imm8
23754 0/imm32/no-disp32
23755 0/imm32/no-xm32
23756 0/imm32/no-x32
23757 0x11/imm32/alloc-id:fake
23758 _Primitive-break/imm32/next
23759 _Primitive-break:
23760 0x11/imm32/alloc-id:fake:payload
23761 0x11/imm32/alloc-id:fake
23762 _string-break/imm32/name
23763 0/imm32/no-inouts
23764 0/imm32/no-inouts
23765 0/imm32/no-outputs
23766 0/imm32/no-outputs
23767 0x11/imm32/alloc-id:fake
23768 _string_e9_jump_break/imm32/subx-name
23769 0/imm32/no-rm32
23770 0/imm32/no-r32
23771 0/imm32/no-imm32
23772 0/imm32/no-imm8
23773 0/imm32/no-disp32
23774 0/imm32/no-xm32
23775 0/imm32/no-x32
23776 0x11/imm32/alloc-id:fake
23777 _Primitive-loop-if-addr</imm32/next
23778 _Primitive-loop-if-addr<:
23779 0x11/imm32/alloc-id:fake:payload
23780 0x11/imm32/alloc-id:fake
23781 _string-loop-if-addr</imm32/name
23782 0/imm32/no-inouts
23783 0/imm32/no-inouts
23784 0/imm32/no-outputs
23785 0/imm32/no-outputs
23786 0x11/imm32/alloc-id:fake
23787 _string_0f_82_jump_loop/imm32/subx-name
23788 0/imm32/no-rm32
23789 0/imm32/no-r32
23790 0/imm32/no-imm32
23791 0/imm32/no-imm8
23792 0/imm32/no-disp32
23793 0/imm32/no-xm32
23794 0/imm32/no-x32
23795 0x11/imm32/alloc-id:fake
23796 _Primitive-loop-if-addr>=/imm32/next
23797 _Primitive-loop-if-addr>=:
23798 0x11/imm32/alloc-id:fake:payload
23799 0x11/imm32/alloc-id:fake
23800 _string-loop-if-addr>=/imm32/name
23801 0/imm32/no-inouts
23802 0/imm32/no-inouts
23803 0/imm32/no-outputs
23804 0/imm32/no-outputs
23805 0x11/imm32/alloc-id:fake
23806 _string_0f_83_jump_loop/imm32/subx-name
23807 0/imm32/no-rm32
23808 0/imm32/no-r32
23809 0/imm32/no-imm32
23810 0/imm32/no-imm8
23811 0/imm32/no-disp32
23812 0/imm32/no-xm32
23813 0/imm32/no-x32
23814 0x11/imm32/alloc-id:fake
23815 _Primitive-loop-if-=/imm32/next
23816 _Primitive-loop-if-=:
23817 0x11/imm32/alloc-id:fake:payload
23818 0x11/imm32/alloc-id:fake
23819 _string-loop-if-=/imm32/name
23820 0/imm32/no-inouts
23821 0/imm32/no-inouts
23822 0/imm32/no-outputs
23823 0/imm32/no-outputs
23824 0x11/imm32/alloc-id:fake
23825 _string_0f_84_jump_loop/imm32/subx-name
23826 0/imm32/no-rm32
23827 0/imm32/no-r32
23828 0/imm32/no-imm32
23829 0/imm32/no-imm8
23830 0/imm32/no-disp32
23831 0/imm32/no-xm32
23832 0/imm32/no-x32
23833 0x11/imm32/alloc-id:fake
23834 _Primitive-loop-if-!=/imm32/next
23835 _Primitive-loop-if-!=:
23836 0x11/imm32/alloc-id:fake:payload
23837 0x11/imm32/alloc-id:fake
23838 _string-loop-if-!=/imm32/name
23839 0/imm32/no-inouts
23840 0/imm32/no-inouts
23841 0/imm32/no-outputs
23842 0/imm32/no-outputs
23843 0x11/imm32/alloc-id:fake
23844 _string_0f_85_jump_loop/imm32/subx-name
23845 0/imm32/no-rm32
23846 0/imm32/no-r32
23847 0/imm32/no-imm32
23848 0/imm32/no-imm8
23849 0/imm32/no-disp32
23850 0/imm32/no-xm32
23851 0/imm32/no-x32
23852 0x11/imm32/alloc-id:fake
23853 _Primitive-loop-if-addr<=/imm32/next
23854 _Primitive-loop-if-addr<=:
23855 0x11/imm32/alloc-id:fake:payload
23856 0x11/imm32/alloc-id:fake
23857 _string-loop-if-addr<=/imm32/name
23858 0/imm32/no-inouts
23859 0/imm32/no-inouts
23860 0/imm32/no-outputs
23861 0/imm32/no-outputs
23862 0x11/imm32/alloc-id:fake
23863 _string_0f_86_jump_loop/imm32/subx-name
23864 0/imm32/no-rm32
23865 0/imm32/no-r32
23866 0/imm32/no-imm32
23867 0/imm32/no-imm8
23868 0/imm32/no-disp32
23869 0/imm32/no-xm32
23870 0/imm32/no-x32
23871 0x11/imm32/alloc-id:fake
23872 _Primitive-loop-if-addr>/imm32/next
23873 _Primitive-loop-if-addr>:
23874 0x11/imm32/alloc-id:fake:payload
23875 0x11/imm32/alloc-id:fake
23876 _string-loop-if-addr>/imm32/name
23877 0/imm32/no-inouts
23878 0/imm32/no-inouts
23879 0/imm32/no-outputs
23880 0/imm32/no-outputs
23881 0x11/imm32/alloc-id:fake
23882 _string_0f_87_jump_loop/imm32/subx-name
23883 0/imm32/no-rm32
23884 0/imm32/no-r32
23885 0/imm32/no-imm32
23886 0/imm32/no-imm8
23887 0/imm32/no-disp32
23888 0/imm32/no-xm32
23889 0/imm32/no-x32
23890 0x11/imm32/alloc-id:fake
23891 _Primitive-loop-if-</imm32/next
23892 _Primitive-loop-if-<:
23893 0x11/imm32/alloc-id:fake:payload
23894 0x11/imm32/alloc-id:fake
23895 _string-loop-if-</imm32/name
23896 0/imm32/no-inouts
23897 0/imm32/no-inouts
23898 0/imm32/no-outputs
23899 0/imm32/no-outputs
23900 0x11/imm32/alloc-id:fake
23901 _string_0f_8c_jump_loop/imm32/subx-name
23902 0/imm32/no-rm32
23903 0/imm32/no-r32
23904 0/imm32/no-imm32
23905 0/imm32/no-imm8
23906 0/imm32/no-disp32
23907 0/imm32/no-xm32
23908 0/imm32/no-x32
23909 0x11/imm32/alloc-id:fake
23910 _Primitive-loop-if->=/imm32/next
23911 _Primitive-loop-if->=:
23912 0x11/imm32/alloc-id:fake:payload
23913 0x11/imm32/alloc-id:fake
23914 _string-loop-if->=/imm32/name
23915 0/imm32/no-inouts
23916 0/imm32/no-inouts
23917 0/imm32/no-outputs
23918 0/imm32/no-outputs
23919 0x11/imm32/alloc-id:fake
23920 _string_0f_8d_jump_loop/imm32/subx-name
23921 0/imm32/no-rm32
23922 0/imm32/no-r32
23923 0/imm32/no-imm32
23924 0/imm32/no-imm8
23925 0/imm32/no-disp32
23926 0/imm32/no-xm32
23927 0/imm32/no-x32
23928 0x11/imm32/alloc-id:fake
23929 _Primitive-loop-if-<=/imm32/next
23930 _Primitive-loop-if-<=:
23931 0x11/imm32/alloc-id:fake:payload
23932 0x11/imm32/alloc-id:fake
23933 _string-loop-if-<=/imm32/name
23934 0/imm32/no-inouts
23935 0/imm32/no-inouts
23936 0/imm32/no-outputs
23937 0/imm32/no-outputs
23938 0x11/imm32/alloc-id:fake
23939 _string_0f_8e_jump_loop/imm32/subx-name
23940 0/imm32/no-rm32
23941 0/imm32/no-r32
23942 0/imm32/no-imm32
23943 0/imm32/no-imm8
23944 0/imm32/no-disp32
23945 0/imm32/no-xm32
23946 0/imm32/no-x32
23947 0x11/imm32/alloc-id:fake
23948 _Primitive-loop-if->/imm32/next
23949 _Primitive-loop-if->:
23950 0x11/imm32/alloc-id:fake:payload
23951 0x11/imm32/alloc-id:fake
23952 _string-loop-if->/imm32/name
23953 0/imm32/no-inouts
23954 0/imm32/no-inouts
23955 0/imm32/no-outputs
23956 0/imm32/no-outputs
23957 0x11/imm32/alloc-id:fake
23958 _string_0f_8f_jump_loop/imm32/subx-name
23959 0/imm32/no-rm32
23960 0/imm32/no-r32
23961 0/imm32/no-imm32
23962 0/imm32/no-imm8
23963 0/imm32/no-disp32
23964 0/imm32/no-xm32
23965 0/imm32/no-x32
23966 0x11/imm32/alloc-id:fake
23967 _Primitive-loop/imm32/next
23968 _Primitive-loop:
23969 0x11/imm32/alloc-id:fake:payload
23970 0x11/imm32/alloc-id:fake
23971 _string-loop/imm32/name
23972 0/imm32/no-inouts
23973 0/imm32/no-inouts
23974 0/imm32/no-outputs
23975 0/imm32/no-outputs
23976 0x11/imm32/alloc-id:fake
23977 _string_e9_jump_loop/imm32/subx-name
23978 0/imm32/no-rm32
23979 0/imm32/no-r32
23980 0/imm32/no-imm32
23981 0/imm32/no-imm8
23982 0/imm32/no-disp32
23983 0/imm32/no-xm32
23984 0/imm32/no-x32
23985 0x11/imm32/alloc-id:fake
23986 _Primitive-break-if-addr<-named/imm32/next
23987
23988 _Primitive-break-if-addr<-named:
23989 0x11/imm32/alloc-id:fake:payload
23990 0x11/imm32/alloc-id:fake
23991 _string-break-if-addr</imm32/name
23992 0x11/imm32/alloc-id:fake
23993 Single-lit-var/imm32/inouts
23994 0/imm32/no-outputs
23995 0/imm32/no-outputs
23996 0x11/imm32/alloc-id:fake
23997 _string_0f_82_jump_label/imm32/subx-name
23998 0/imm32/no-rm32
23999 0/imm32/no-r32
24000 0/imm32/no-imm32
24001 0/imm32/no-imm8
24002 1/imm32/disp32-is-first-inout
24003 0/imm32/no-xm32
24004 0/imm32/no-x32
24005 0x11/imm32/alloc-id:fake
24006 _Primitive-break-if-addr>=-named/imm32/next
24007 _Primitive-break-if-addr>=-named:
24008 0x11/imm32/alloc-id:fake:payload
24009 0x11/imm32/alloc-id:fake
24010 _string-break-if-addr>=/imm32/name
24011 0x11/imm32/alloc-id:fake
24012 Single-lit-var/imm32/inouts
24013 0/imm32/no-outputs
24014 0/imm32/no-outputs
24015 0x11/imm32/alloc-id:fake
24016 _string_0f_83_jump_label/imm32/subx-name
24017 0/imm32/no-rm32
24018 0/imm32/no-r32
24019 0/imm32/no-imm32
24020 0/imm32/no-imm8
24021 1/imm32/disp32-is-first-inout
24022 0/imm32/no-xm32
24023 0/imm32/no-x32
24024 0x11/imm32/alloc-id:fake
24025 _Primitive-break-if-=-named/imm32/next
24026 _Primitive-break-if-=-named:
24027 0x11/imm32/alloc-id:fake:payload
24028 0x11/imm32/alloc-id:fake
24029 _string-break-if-=/imm32/name
24030 0x11/imm32/alloc-id:fake
24031 Single-lit-var/imm32/inouts
24032 0/imm32/no-outputs
24033 0/imm32/no-outputs
24034 0x11/imm32/alloc-id:fake
24035 _string_0f_84_jump_label/imm32/subx-name
24036 0/imm32/no-rm32
24037 0/imm32/no-r32
24038 0/imm32/no-imm32
24039 0/imm32/no-imm8
24040 1/imm32/disp32-is-first-inout
24041 0/imm32/no-xm32
24042 0/imm32/no-x32
24043 0x11/imm32/alloc-id:fake
24044 _Primitive-break-if-!=-named/imm32/next
24045 _Primitive-break-if-!=-named:
24046 0x11/imm32/alloc-id:fake:payload
24047 0x11/imm32/alloc-id:fake
24048 _string-break-if-!=/imm32/name
24049 0x11/imm32/alloc-id:fake
24050 Single-lit-var/imm32/inouts
24051 0/imm32/no-outputs
24052 0/imm32/no-outputs
24053 0x11/imm32/alloc-id:fake
24054 _string_0f_85_jump_label/imm32/subx-name
24055 0/imm32/no-rm32
24056 0/imm32/no-r32
24057 0/imm32/no-imm32
24058 0/imm32/no-imm8
24059 1/imm32/disp32-is-first-inout
24060 0/imm32/no-xm32
24061 0/imm32/no-x32
24062 0x11/imm32/alloc-id:fake
24063 _Primitive-break-if-addr<=-named/imm32/next
24064 _Primitive-break-if-addr<=-named:
24065 0x11/imm32/alloc-id:fake:payload
24066 0x11/imm32/alloc-id:fake
24067 _string-break-if-addr<=/imm32/name
24068 0x11/imm32/alloc-id:fake
24069 Single-lit-var/imm32/inouts
24070 0/imm32/no-outputs
24071 0/imm32/no-outputs
24072 0x11/imm32/alloc-id:fake
24073 _string_0f_86_jump_label/imm32/subx-name
24074 0/imm32/no-rm32
24075 0/imm32/no-r32
24076 0/imm32/no-imm32
24077 0/imm32/no-imm8
24078 1/imm32/disp32-is-first-inout
24079 0/imm32/no-xm32
24080 0/imm32/no-x32
24081 0x11/imm32/alloc-id:fake
24082 _Primitive-break-if-addr>-named/imm32/next
24083 _Primitive-break-if-addr>-named:
24084 0x11/imm32/alloc-id:fake:payload
24085 0x11/imm32/alloc-id:fake
24086 _string-break-if-addr>/imm32/name
24087 0x11/imm32/alloc-id:fake
24088 Single-lit-var/imm32/inouts
24089 0/imm32/no-outputs
24090 0/imm32/no-outputs
24091 0x11/imm32/alloc-id:fake
24092 _string_0f_87_jump_label/imm32/subx-name
24093 0/imm32/no-rm32
24094 0/imm32/no-r32
24095 0/imm32/no-imm32
24096 0/imm32/no-imm8
24097 1/imm32/disp32-is-first-inout
24098 0/imm32/no-xm32
24099 0/imm32/no-x32
24100 0x11/imm32/alloc-id:fake
24101 _Primitive-break-if-<-named/imm32/next
24102 _Primitive-break-if-<-named:
24103 0x11/imm32/alloc-id:fake:payload
24104 0x11/imm32/alloc-id:fake
24105 _string-break-if-</imm32/name
24106 0x11/imm32/alloc-id:fake
24107 Single-lit-var/imm32/inouts
24108 0/imm32/no-outputs
24109 0/imm32/no-outputs
24110 0x11/imm32/alloc-id:fake
24111 _string_0f_8c_jump_label/imm32/subx-name
24112 0/imm32/no-rm32
24113 0/imm32/no-r32
24114 0/imm32/no-imm32
24115 0/imm32/no-imm8
24116 1/imm32/disp32-is-first-inout
24117 0/imm32/no-xm32
24118 0/imm32/no-x32
24119 0x11/imm32/alloc-id:fake
24120 _Primitive-break-if->=-named/imm32/next
24121 _Primitive-break-if->=-named:
24122 0x11/imm32/alloc-id:fake:payload
24123 0x11/imm32/alloc-id:fake
24124 _string-break-if->=/imm32/name
24125 0x11/imm32/alloc-id:fake
24126 Single-lit-var/imm32/inouts
24127 0/imm32/no-outputs
24128 0/imm32/no-outputs
24129 0x11/imm32/alloc-id:fake
24130 _string_0f_8d_jump_label/imm32/subx-name
24131 0/imm32/no-rm32
24132 0/imm32/no-r32
24133 0/imm32/no-imm32
24134 0/imm32/no-imm8
24135 1/imm32/disp32-is-first-inout
24136 0/imm32/no-xm32
24137 0/imm32/no-x32
24138 0x11/imm32/alloc-id:fake
24139 _Primitive-break-if-<=-named/imm32/next
24140 _Primitive-break-if-<=-named:
24141 0x11/imm32/alloc-id:fake:payload
24142 0x11/imm32/alloc-id:fake
24143 _string-break-if-<=/imm32/name
24144 0x11/imm32/alloc-id:fake
24145 Single-lit-var/imm32/inouts
24146 0/imm32/no-outputs
24147 0/imm32/no-outputs
24148 0x11/imm32/alloc-id:fake
24149 _string_0f_8e_jump_label/imm32/subx-name
24150 0/imm32/no-rm32
24151 0/imm32/no-r32
24152 0/imm32/no-imm32
24153 0/imm32/no-imm8
24154 1/imm32/disp32-is-first-inout
24155 0/imm32/no-xm32
24156 0/imm32/no-x32
24157 0x11/imm32/alloc-id:fake
24158 _Primitive-break-if->-named/imm32/next
24159 _Primitive-break-if->-named:
24160 0x11/imm32/alloc-id:fake:payload
24161 0x11/imm32/alloc-id:fake
24162 _string-break-if->/imm32/name
24163 0x11/imm32/alloc-id:fake
24164 Single-lit-var/imm32/inouts
24165 0/imm32/no-outputs
24166 0/imm32/no-outputs
24167 0x11/imm32/alloc-id:fake
24168 _string_0f_8f_jump_label/imm32/subx-name
24169 0/imm32/no-rm32
24170 0/imm32/no-r32
24171 0/imm32/no-imm32
24172 0/imm32/no-imm8
24173 1/imm32/disp32-is-first-inout
24174 0/imm32/no-xm32
24175 0/imm32/no-x32
24176 0x11/imm32/alloc-id:fake
24177 _Primitive-break-named/imm32/next
24178 _Primitive-break-named:
24179 0x11/imm32/alloc-id:fake:payload
24180 0x11/imm32/alloc-id:fake
24181 _string-break/imm32/name
24182 0x11/imm32/alloc-id:fake
24183 Single-lit-var/imm32/inouts
24184 0/imm32/no-outputs
24185 0/imm32/no-outputs
24186 0x11/imm32/alloc-id:fake
24187 _string_e9_jump_label/imm32/subx-name
24188 0/imm32/no-rm32
24189 0/imm32/no-r32
24190 0/imm32/no-imm32
24191 0/imm32/no-imm8
24192 1/imm32/disp32-is-first-inout
24193 0/imm32/no-xm32
24194 0/imm32/no-x32
24195 0x11/imm32/alloc-id:fake
24196 _Primitive-loop-if-addr<-named/imm32/next
24197 _Primitive-loop-if-addr<-named:
24198 0x11/imm32/alloc-id:fake:payload
24199 0x11/imm32/alloc-id:fake
24200 _string-loop-if-addr</imm32/name
24201 0x11/imm32/alloc-id:fake
24202 Single-lit-var/imm32/inouts
24203 0/imm32/no-outputs
24204 0/imm32/no-outputs
24205 0x11/imm32/alloc-id:fake
24206 _string_0f_82_jump_label/imm32/subx-name
24207 0/imm32/no-rm32
24208 0/imm32/no-r32
24209 0/imm32/no-imm32
24210 0/imm32/no-imm8
24211 1/imm32/disp32-is-first-inout
24212 0/imm32/no-xm32
24213 0/imm32/no-x32
24214 0x11/imm32/alloc-id:fake
24215 _Primitive-loop-if-addr>=-named/imm32/next
24216 _Primitive-loop-if-addr>=-named:
24217 0x11/imm32/alloc-id:fake:payload
24218 0x11/imm32/alloc-id:fake
24219 _string-loop-if-addr>=/imm32/name
24220 0x11/imm32/alloc-id:fake
24221 Single-lit-var/imm32/inouts
24222 0/imm32/no-outputs
24223 0/imm32/no-outputs
24224 0x11/imm32/alloc-id:fake
24225 _string_0f_83_jump_label/imm32/subx-name
24226 0/imm32/no-rm32
24227 0/imm32/no-r32
24228 0/imm32/no-imm32
24229 0/imm32/no-imm8
24230 1/imm32/disp32-is-first-inout
24231 0/imm32/no-xm32
24232 0/imm32/no-x32
24233 0x11/imm32/alloc-id:fake
24234 _Primitive-loop-if-=-named/imm32/next
24235 _Primitive-loop-if-=-named:
24236 0x11/imm32/alloc-id:fake:payload
24237 0x11/imm32/alloc-id:fake
24238 _string-loop-if-=/imm32/name
24239 0x11/imm32/alloc-id:fake
24240 Single-lit-var/imm32/inouts
24241 0/imm32/no-outputs
24242 0/imm32/no-outputs
24243 0x11/imm32/alloc-id:fake
24244 _string_0f_84_jump_label/imm32/subx-name
24245 0/imm32/no-rm32
24246 0/imm32/no-r32
24247 0/imm32/no-imm32
24248 0/imm32/no-imm8
24249 1/imm32/disp32-is-first-inout
24250 0/imm32/no-xm32
24251 0/imm32/no-x32
24252 0x11/imm32/alloc-id:fake
24253 _Primitive-loop-if-!=-named/imm32/next
24254 _Primitive-loop-if-!=-named:
24255 0x11/imm32/alloc-id:fake:payload
24256 0x11/imm32/alloc-id:fake
24257 _string-loop-if-!=/imm32/name
24258 0x11/imm32/alloc-id:fake
24259 Single-lit-var/imm32/inouts
24260 0/imm32/no-outputs
24261 0/imm32/no-outputs
24262 0x11/imm32/alloc-id:fake
24263 _string_0f_85_jump_label/imm32/subx-name
24264 0/imm32/no-rm32
24265 0/imm32/no-r32
24266 0/imm32/no-imm32
24267 0/imm32/no-imm8
24268 1/imm32/disp32-is-first-inout
24269 0/imm32/no-xm32
24270 0/imm32/no-x32
24271 0x11/imm32/alloc-id:fake
24272 _Primitive-loop-if-addr<=-named/imm32/next
24273 _Primitive-loop-if-addr<=-named:
24274 0x11/imm32/alloc-id:fake:payload
24275 0x11/imm32/alloc-id:fake
24276 _string-loop-if-addr<=/imm32/name
24277 0x11/imm32/alloc-id:fake
24278 Single-lit-var/imm32/inouts
24279 0/imm32/no-outputs
24280 0/imm32/no-outputs
24281 0x11/imm32/alloc-id:fake
24282 _string_0f_86_jump_label/imm32/subx-name
24283 0/imm32/no-rm32
24284 0/imm32/no-r32
24285 0/imm32/no-imm32
24286 0/imm32/no-imm8
24287 1/imm32/disp32-is-first-inout
24288 0/imm32/no-xm32
24289 0/imm32/no-x32
24290 0x11/imm32/alloc-id:fake
24291 _Primitive-loop-if-addr>-named/imm32/next
24292 _Primitive-loop-if-addr>-named:
24293 0x11/imm32/alloc-id:fake:payload
24294 0x11/imm32/alloc-id:fake
24295 _string-loop-if-addr>/imm32/name
24296 0x11/imm32/alloc-id:fake
24297 Single-lit-var/imm32/inouts
24298 0/imm32/no-outputs
24299 0/imm32/no-outputs
24300 0x11/imm32/alloc-id:fake
24301 _string_0f_87_jump_label/imm32/subx-name
24302 0/imm32/no-rm32
24303 0/imm32/no-r32
24304 0/imm32/no-imm32
24305 0/imm32/no-imm8
24306 1/imm32/disp32-is-first-inout
24307 0/imm32/no-xm32
24308 0/imm32/no-x32
24309 0x11/imm32/alloc-id:fake
24310 _Primitive-loop-if-<-named/imm32/next
24311 _Primitive-loop-if-<-named:
24312 0x11/imm32/alloc-id:fake:payload
24313 0x11/imm32/alloc-id:fake
24314 _string-loop-if-</imm32/name
24315 0x11/imm32/alloc-id:fake
24316 Single-lit-var/imm32/inouts
24317 0/imm32/no-outputs
24318 0/imm32/no-outputs
24319 0x11/imm32/alloc-id:fake
24320 _string_0f_8c_jump_label/imm32/subx-name
24321 0/imm32/no-rm32
24322 0/imm32/no-r32
24323 0/imm32/no-imm32
24324 0/imm32/no-imm8
24325 1/imm32/disp32-is-first-inout
24326 0/imm32/no-xm32
24327 0/imm32/no-x32
24328 0x11/imm32/alloc-id:fake
24329 _Primitive-loop-if->=-named/imm32/next
24330 _Primitive-loop-if->=-named:
24331 0x11/imm32/alloc-id:fake:payload
24332 0x11/imm32/alloc-id:fake
24333 _string-loop-if->=/imm32/name
24334 0x11/imm32/alloc-id:fake
24335 Single-lit-var/imm32/inouts
24336 0/imm32/no-outputs
24337 0/imm32/no-outputs
24338 0x11/imm32/alloc-id:fake
24339 _string_0f_8d_jump_label/imm32/subx-name
24340 0/imm32/no-rm32
24341 0/imm32/no-r32
24342 0/imm32/no-imm32
24343 0/imm32/no-imm8
24344 1/imm32/disp32-is-first-inout
24345 0/imm32/no-xm32
24346 0/imm32/no-x32
24347 0x11/imm32/alloc-id:fake
24348 _Primitive-loop-if-<=-named/imm32/next
24349 _Primitive-loop-if-<=-named:
24350 0x11/imm32/alloc-id:fake:payload
24351 0x11/imm32/alloc-id:fake
24352 _string-loop-if-<=/imm32/name
24353 0x11/imm32/alloc-id:fake
24354 Single-lit-var/imm32/inouts
24355 0/imm32/no-outputs
24356 0/imm32/no-outputs
24357 0x11/imm32/alloc-id:fake
24358 _string_0f_8e_jump_label/imm32/subx-name
24359 0/imm32/no-rm32
24360 0/imm32/no-r32
24361 0/imm32/no-imm32
24362 0/imm32/no-imm8
24363 1/imm32/disp32-is-first-inout
24364 0/imm32/no-xm32
24365 0/imm32/no-x32
24366 0x11/imm32/alloc-id:fake
24367 _Primitive-loop-if->-named/imm32/next
24368 _Primitive-loop-if->-named:
24369 0x11/imm32/alloc-id:fake:payload
24370 0x11/imm32/alloc-id:fake
24371 _string-loop-if->/imm32/name
24372 0x11/imm32/alloc-id:fake
24373 Single-lit-var/imm32/inouts
24374 0/imm32/no-outputs
24375 0/imm32/no-outputs
24376 0x11/imm32/alloc-id:fake
24377 _string_0f_8f_jump_label/imm32/subx-name
24378 0/imm32/no-rm32
24379 0/imm32/no-r32
24380 0/imm32/no-imm32
24381 0/imm32/no-imm8
24382 1/imm32/disp32-is-first-inout
24383 0/imm32/no-xm32
24384 0/imm32/no-x32
24385 0x11/imm32/alloc-id:fake
24386 _Primitive-loop-named/imm32/next
24387 _Primitive-loop-named:
24388 0x11/imm32/alloc-id:fake:payload
24389 0x11/imm32/alloc-id:fake
24390 _string-loop/imm32/name
24391 0x11/imm32/alloc-id:fake
24392 Single-lit-var/imm32/inouts
24393 0/imm32/no-outputs
24394 0/imm32/no-outputs
24395 0x11/imm32/alloc-id:fake
24396 _string_e9_jump_label/imm32/subx-name
24397 0/imm32/no-rm32
24398 0/imm32/no-r32
24399 0/imm32/no-imm32
24400 0/imm32/no-imm8
24401 1/imm32/disp32-is-first-inout
24402 0/imm32/no-xm32
24403 0/imm32/no-x32
24404 0x11/imm32/alloc-id:fake
24405 _Primitive-break-if-float</imm32/next
24406
24407 _Primitive-break-if-float<:
24408 0x11/imm32/alloc-id:fake:payload
24409 0x11/imm32/alloc-id:fake
24410 _string-break-if-float</imm32/name
24411 0/imm32/no-inouts
24412 0/imm32/no-inouts
24413 0/imm32/no-outputs
24414 0/imm32/no-outputs
24415 0x11/imm32/alloc-id:fake
24416 _string_0f_82_jump_break/imm32/subx-name
24417 0/imm32/no-rm32
24418 0/imm32/no-r32
24419 0/imm32/no-imm32
24420 0/imm32/no-imm8
24421 0/imm32/no-disp32
24422 0/imm32/no-xm32
24423 0/imm32/no-x32
24424 0x11/imm32/alloc-id:fake
24425 _Primitive-break-if-float>=/imm32/next
24426 _Primitive-break-if-float>=:
24427 0x11/imm32/alloc-id:fake:payload
24428 0x11/imm32/alloc-id:fake
24429 _string-break-if-float>=/imm32/name
24430 0/imm32/no-inouts
24431 0/imm32/no-inouts
24432 0/imm32/no-outputs
24433 0/imm32/no-outputs
24434 0x11/imm32/alloc-id:fake
24435 _string_0f_83_jump_break/imm32/subx-name
24436 0/imm32/no-rm32
24437 0/imm32/no-r32
24438 0/imm32/no-imm32
24439 0/imm32/no-imm8
24440 0/imm32/no-disp32
24441 0/imm32/no-xm32
24442 0/imm32/no-x32
24443 0x11/imm32/alloc-id:fake
24444 _Primitive-break-if-float<=/imm32/next
24445 _Primitive-break-if-float<=:
24446 0x11/imm32/alloc-id:fake:payload
24447 0x11/imm32/alloc-id:fake
24448 _string-break-if-float<=/imm32/name
24449 0/imm32/no-inouts
24450 0/imm32/no-inouts
24451 0/imm32/no-outputs
24452 0/imm32/no-outputs
24453 0x11/imm32/alloc-id:fake
24454 _string_0f_86_jump_break/imm32/subx-name
24455 0/imm32/no-rm32
24456 0/imm32/no-r32
24457 0/imm32/no-imm32
24458 0/imm32/no-imm8
24459 0/imm32/no-disp32
24460 0/imm32/no-xm32
24461 0/imm32/no-x32
24462 0x11/imm32/alloc-id:fake
24463 _Primitive-break-if-float>/imm32/next
24464 _Primitive-break-if-float>:
24465 0x11/imm32/alloc-id:fake:payload
24466 0x11/imm32/alloc-id:fake
24467 _string-break-if-float>/imm32/name
24468 0/imm32/no-inouts
24469 0/imm32/no-inouts
24470 0/imm32/no-outputs
24471 0/imm32/no-outputs
24472 0x11/imm32/alloc-id:fake
24473 _string_0f_87_jump_break/imm32/subx-name
24474 0/imm32/no-rm32
24475 0/imm32/no-r32
24476 0/imm32/no-imm32
24477 0/imm32/no-imm8
24478 0/imm32/no-disp32
24479 0/imm32/no-xm32
24480 0/imm32/no-x32
24481 0x11/imm32/alloc-id:fake
24482 _Primitive-loop-if-float</imm32/next
24483 _Primitive-loop-if-float<:
24484 0x11/imm32/alloc-id:fake:payload
24485 0x11/imm32/alloc-id:fake
24486 _string-loop-if-float</imm32/name
24487 0/imm32/no-inouts
24488 0/imm32/no-inouts
24489 0/imm32/no-outputs
24490 0/imm32/no-outputs
24491 0x11/imm32/alloc-id:fake
24492 _string_0f_82_jump_loop/imm32/subx-name
24493 0/imm32/no-rm32
24494 0/imm32/no-r32
24495 0/imm32/no-imm32
24496 0/imm32/no-imm8
24497 0/imm32/no-disp32
24498 0/imm32/no-xm32
24499 0/imm32/no-x32
24500 0x11/imm32/alloc-id:fake
24501 _Primitive-loop-if-float>=/imm32/next
24502 _Primitive-loop-if-float>=:
24503 0x11/imm32/alloc-id:fake:payload
24504 0x11/imm32/alloc-id:fake
24505 _string-loop-if-float>=/imm32/name
24506 0/imm32/no-inouts
24507 0/imm32/no-inouts
24508 0/imm32/no-outputs
24509 0/imm32/no-outputs
24510 0x11/imm32/alloc-id:fake
24511 _string_0f_83_jump_loop/imm32/subx-name
24512 0/imm32/no-rm32
24513 0/imm32/no-r32
24514 0/imm32/no-imm32
24515 0/imm32/no-imm8
24516 0/imm32/no-disp32
24517 0/imm32/no-xm32
24518 0/imm32/no-x32
24519 0x11/imm32/alloc-id:fake
24520 _Primitive-loop-if-float<=/imm32/next
24521 _Primitive-loop-if-float<=:
24522 0x11/imm32/alloc-id:fake:payload
24523 0x11/imm32/alloc-id:fake
24524 _string-loop-if-float<=/imm32/name
24525 0/imm32/no-inouts
24526 0/imm32/no-inouts
24527 0/imm32/no-outputs
24528 0/imm32/no-outputs
24529 0x11/imm32/alloc-id:fake
24530 _string_0f_86_jump_loop/imm32/subx-name
24531 0/imm32/no-rm32
24532 0/imm32/no-r32
24533 0/imm32/no-imm32
24534 0/imm32/no-imm8
24535 0/imm32/no-disp32
24536 0/imm32/no-xm32
24537 0/imm32/no-x32
24538 0x11/imm32/alloc-id:fake
24539 _Primitive-loop-if-float>/imm32/next
24540 _Primitive-loop-if-float>:
24541 0x11/imm32/alloc-id:fake:payload
24542 0x11/imm32/alloc-id:fake
24543 _string-loop-if-float>/imm32/name
24544 0/imm32/no-inouts
24545 0/imm32/no-inouts
24546 0/imm32/no-outputs
24547 0/imm32/no-outputs
24548 0x11/imm32/alloc-id:fake
24549 _string_0f_87_jump_loop/imm32/subx-name
24550 0/imm32/no-rm32
24551 0/imm32/no-r32
24552 0/imm32/no-imm32
24553 0/imm32/no-imm8
24554 0/imm32/no-disp32
24555 0/imm32/no-xm32
24556 0/imm32/no-x32
24557 0x11/imm32/alloc-id:fake
24558 _Primitive-break-if-float<-named/imm32/next
24559 _Primitive-break-if-float<-named:
24560 0x11/imm32/alloc-id:fake:payload
24561 0x11/imm32/alloc-id:fake
24562 _string-break-if-float</imm32/name
24563 0x11/imm32/alloc-id:fake
24564 Single-lit-var/imm32/inouts
24565 0/imm32/no-outputs
24566 0/imm32/no-outputs
24567 0x11/imm32/alloc-id:fake
24568 _string_0f_82_jump_label/imm32/subx-name
24569 0/imm32/no-rm32
24570 0/imm32/no-r32
24571 0/imm32/no-imm32
24572 0/imm32/no-imm8
24573 1/imm32/disp32-is-first-inout
24574 0/imm32/no-xm32
24575 0/imm32/no-x32
24576 0x11/imm32/alloc-id:fake
24577 _Primitive-break-if-float>=-named/imm32/next
24578 _Primitive-break-if-float>=-named:
24579 0x11/imm32/alloc-id:fake:payload
24580 0x11/imm32/alloc-id:fake
24581 _string-break-if-float>=/imm32/name
24582 0x11/imm32/alloc-id:fake
24583 Single-lit-var/imm32/inouts
24584 0/imm32/no-outputs
24585 0/imm32/no-outputs
24586 0x11/imm32/alloc-id:fake
24587 _string_0f_83_jump_label/imm32/subx-name
24588 0/imm32/no-rm32
24589 0/imm32/no-r32
24590 0/imm32/no-imm32
24591 0/imm32/no-imm8
24592 1/imm32/disp32-is-first-inout
24593 0/imm32/no-xm32
24594 0/imm32/no-x32
24595 0x11/imm32/alloc-id:fake
24596 _Primitive-break-if-float<=-named/imm32/next
24597 _Primitive-break-if-float<=-named:
24598 0x11/imm32/alloc-id:fake:payload
24599 0x11/imm32/alloc-id:fake
24600 _string-break-if-float<=/imm32/name
24601 0x11/imm32/alloc-id:fake
24602 Single-lit-var/imm32/inouts
24603 0/imm32/no-outputs
24604 0/imm32/no-outputs
24605 0x11/imm32/alloc-id:fake
24606 _string_0f_86_jump_label/imm32/subx-name
24607 0/imm32/no-rm32
24608 0/imm32/no-r32
24609 0/imm32/no-imm32
24610 0/imm32/no-imm8
24611 1/imm32/disp32-is-first-inout
24612 0/imm32/no-xm32
24613 0/imm32/no-x32
24614 0x11/imm32/alloc-id:fake
24615 _Primitive-break-if-float>-named/imm32/next
24616 _Primitive-break-if-float>-named:
24617 0x11/imm32/alloc-id:fake:payload
24618 0x11/imm32/alloc-id:fake
24619 _string-break-if-float>/imm32/name
24620 0x11/imm32/alloc-id:fake
24621 Single-lit-var/imm32/inouts
24622 0/imm32/no-outputs
24623 0/imm32/no-outputs
24624 0x11/imm32/alloc-id:fake
24625 _string_0f_87_jump_label/imm32/subx-name
24626 0/imm32/no-rm32
24627 0/imm32/no-r32
24628 0/imm32/no-imm32
24629 0/imm32/no-imm8
24630 1/imm32/disp32-is-first-inout
24631 0/imm32/no-xm32
24632 0/imm32/no-x32
24633 0x11/imm32/alloc-id:fake
24634 _Primitive-loop-if-float<-named/imm32/next
24635 _Primitive-loop-if-float<-named:
24636 0x11/imm32/alloc-id:fake:payload
24637 0x11/imm32/alloc-id:fake
24638 _string-loop-if-float</imm32/name
24639 0x11/imm32/alloc-id:fake
24640 Single-lit-var/imm32/inouts
24641 0/imm32/no-outputs
24642 0/imm32/no-outputs
24643 0x11/imm32/alloc-id:fake
24644 _string_0f_82_jump_label/imm32/subx-name
24645 0/imm32/no-rm32
24646 0/imm32/no-r32
24647 0/imm32/no-imm32
24648 0/imm32/no-imm8
24649 1/imm32/disp32-is-first-inout
24650 0/imm32/no-xm32
24651 0/imm32/no-x32
24652 0x11/imm32/alloc-id:fake
24653 _Primitive-loop-if-float>=-named/imm32/next
24654 _Primitive-loop-if-float>=-named:
24655 0x11/imm32/alloc-id:fake:payload
24656 0x11/imm32/alloc-id:fake
24657 _string-loop-if-float>=/imm32/name
24658 0x11/imm32/alloc-id:fake
24659 Single-lit-var/imm32/inouts
24660 0/imm32/no-outputs
24661 0/imm32/no-outputs
24662 0x11/imm32/alloc-id:fake
24663 _string_0f_83_jump_label/imm32/subx-name
24664 0/imm32/no-rm32
24665 0/imm32/no-r32
24666 0/imm32/no-imm32
24667 0/imm32/no-imm8
24668 1/imm32/disp32-is-first-inout
24669 0/imm32/no-xm32
24670 0/imm32/no-x32
24671 0x11/imm32/alloc-id:fake
24672 _Primitive-loop-if-float<=-named/imm32/next
24673 _Primitive-loop-if-float<=-named:
24674 0x11/imm32/alloc-id:fake:payload
24675 0x11/imm32/alloc-id:fake
24676 _string-loop-if-float<=/imm32/name
24677 0x11/imm32/alloc-id:fake
24678 Single-lit-var/imm32/inouts
24679 0/imm32/no-outputs
24680 0/imm32/no-outputs
24681 0x11/imm32/alloc-id:fake
24682 _string_0f_86_jump_label/imm32/subx-name
24683 0/imm32/no-rm32
24684 0/imm32/no-r32
24685 0/imm32/no-imm32
24686 0/imm32/no-imm8
24687 1/imm32/disp32-is-first-inout
24688 0/imm32/no-xm32
24689 0/imm32/no-x32
24690 0x11/imm32/alloc-id:fake
24691 _Primitive-loop-if-float>-named/imm32/next
24692 _Primitive-loop-if-float>-named:
24693 0x11/imm32/alloc-id:fake:payload
24694 0x11/imm32/alloc-id:fake
24695 _string-loop-if-float>/imm32/name
24696 0x11/imm32/alloc-id:fake
24697 Single-lit-var/imm32/inouts
24698 0/imm32/no-outputs
24699 0/imm32/no-outputs
24700 0x11/imm32/alloc-id:fake
24701 _string_0f_87_jump_label/imm32/subx-name
24702 0/imm32/no-rm32
24703 0/imm32/no-r32
24704 0/imm32/no-imm32
24705 0/imm32/no-imm8
24706 1/imm32/disp32-is-first-inout
24707 0/imm32/no-xm32
24708 0/imm32/no-x32
24709 0/imm32/next
24710 0/imm32/next
24711
24712
24713 _string-add:
24714 0x11/imm32/alloc-id:fake:payload
24715
24716 0x3/imm32/size
24717 0x61/a 0x64/d 0x64/d
24718 _string-address:
24719 0x11/imm32/alloc-id:fake:payload
24720
24721 0x7/imm32/size
24722 0x61/a 0x64/d 0x64/d 0x72/r 0x65/e 0x73/s 0x73/s
24723 _string-add-to:
24724 0x11/imm32/alloc-id:fake:payload
24725
24726 0x6/imm32/size
24727 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
24728 _string-and:
24729 0x11/imm32/alloc-id:fake:payload
24730
24731 0x3/imm32/size
24732 0x61/a 0x6e/n 0x64/d
24733 _string-and-with:
24734 0x11/imm32/alloc-id:fake:payload
24735
24736 0x8/imm32/size
24737 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
24738 _string-break:
24739 0x11/imm32/alloc-id:fake:payload
24740
24741 0x5/imm32/size
24742 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k
24743 _string-break-if-<:
24744 0x11/imm32/alloc-id:fake:payload
24745
24746 0xa/imm32/size
24747 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
24748 _string-break-if-<=:
24749 0x11/imm32/alloc-id:fake:payload
24750
24751 0xb/imm32/size
24752 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
24753 _string-break-if-=:
24754 0x11/imm32/alloc-id:fake:payload
24755
24756 0xa/imm32/size
24757 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
24758 _string-break-if->:
24759 0x11/imm32/alloc-id:fake:payload
24760
24761 0xa/imm32/size
24762 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
24763 _string-break-if->=:
24764 0x11/imm32/alloc-id:fake:payload
24765
24766 0xb/imm32/size
24767 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
24768 _string-break-if-!=:
24769 0x11/imm32/alloc-id:fake:payload
24770
24771 0xb/imm32/size
24772 0x62/b 0x72/r 0x65/e 0x61/a 0x6b/k 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
24773 _string-break-if-addr<:
24774 0x11/imm32/alloc-id:fake:payload
24775
24776 0xe/imm32/size
24777 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/<
24778 _string-break-if-addr<=:
24779 0x11/imm32/alloc-id:fake:payload
24780
24781 0xf/imm32/size
24782 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/=
24783 _string-break-if-addr>:
24784 0x11/imm32/alloc-id:fake:payload
24785
24786 0xe/imm32/size
24787 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/>
24788 _string-break-if-addr>=:
24789 0x11/imm32/alloc-id:fake:payload
24790
24791 0xf/imm32/size
24792 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/=
24793 _string-break-if-float<:
24794 0x11/imm32/alloc-id:fake:payload
24795
24796 0xf/imm32/size
24797 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/<
24798 _string-break-if-float<=:
24799 0x11/imm32/alloc-id:fake:payload
24800
24801 0x10/imm32/size
24802 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/=
24803 _string-break-if-float>:
24804 0x11/imm32/alloc-id:fake:payload
24805
24806 0xf/imm32/size
24807 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/>
24808 _string-break-if-float>=:
24809 0x11/imm32/alloc-id:fake:payload
24810
24811 0x10/imm32/size
24812 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/=
24813 _string-compare:
24814 0x11/imm32/alloc-id:fake:payload
24815
24816 0x7/imm32/size
24817 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e
24818 _string-copy:
24819 0x11/imm32/alloc-id:fake:payload
24820
24821 0x4/imm32/size
24822 0x63/c 0x6f/o 0x70/p 0x79/y
24823 _string-copy-to:
24824 0x11/imm32/alloc-id:fake:payload
24825
24826 0x7/imm32/size
24827 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/dash 0x74/t 0x6f/o
24828 _string-copy-byte:
24829 0x11/imm32/alloc-id:fake:payload
24830
24831 0x9/imm32/size
24832 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e
24833 _string-copy-byte-to:
24834 0x11/imm32/alloc-id:fake:payload
24835
24836 0xc/imm32/size
24837 0x63/c 0x6f/o 0x70/p 0x79/y 0x2d/- 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x74/t 0x6f/o
24838 _string-decrement:
24839 0x11/imm32/alloc-id:fake:payload
24840
24841 0x9/imm32/size
24842 0x64/d 0x65/e 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
24843 _string-increment:
24844 0x11/imm32/alloc-id:fake:payload
24845
24846 0x9/imm32/size
24847 0x69/i 0x6e/n 0x63/c 0x72/r 0x65/e 0x6d/m 0x65/e 0x6e/n 0x74/t
24848 _string-loop:
24849 0x11/imm32/alloc-id:fake:payload
24850
24851 0x4/imm32/size
24852 0x6c/l 0x6f/o 0x6f/o 0x70/p
24853 _string-loop-if-<:
24854 0x11/imm32/alloc-id:fake:payload
24855
24856 0x9/imm32/size
24857 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/<
24858 _string-loop-if-<=:
24859 0x11/imm32/alloc-id:fake:payload
24860
24861 0xa/imm32/size
24862 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3c/< 0x3d/=
24863 _string-loop-if-=:
24864 0x11/imm32/alloc-id:fake:payload
24865
24866 0x9/imm32/size
24867 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3d/=
24868 _string-loop-if->:
24869 0x11/imm32/alloc-id:fake:payload
24870
24871 0x9/imm32/size
24872 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/>
24873 _string-loop-if->=:
24874 0x11/imm32/alloc-id:fake:payload
24875
24876 0xa/imm32/size
24877 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x3e/> 0x3d/=
24878 _string-loop-if-!=:
24879 0x11/imm32/alloc-id:fake:payload
24880
24881 0xa/imm32/size
24882 0x6c/l 0x6f/o 0x6f/o 0x70/p 0x2d/dash 0x69/i 0x66/f 0x2d/dash 0x21/! 0x3d/=
24883 _string-loop-if-addr<:
24884 0x11/imm32/alloc-id:fake:payload
24885
24886 0xd/imm32/size
24887 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/<
24888 _string-loop-if-addr<=:
24889 0x11/imm32/alloc-id:fake:payload
24890
24891 0xe/imm32/size
24892 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/=
24893 _string-loop-if-addr>:
24894 0x11/imm32/alloc-id:fake:payload
24895
24896 0xd/imm32/size
24897 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/>
24898 _string-loop-if-addr>=:
24899 0x11/imm32/alloc-id:fake:payload
24900
24901 0xe/imm32/size
24902 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/=
24903 _string-loop-if-float<:
24904 0x11/imm32/alloc-id:fake:payload
24905
24906 0xe/imm32/size
24907 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/<
24908 _string-loop-if-float<=:
24909 0x11/imm32/alloc-id:fake:payload
24910
24911 0xf/imm32/size
24912 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/=
24913 _string-loop-if-float>:
24914 0x11/imm32/alloc-id:fake:payload
24915
24916 0xe/imm32/size
24917 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/>
24918 _string-loop-if-float>=:
24919 0x11/imm32/alloc-id:fake:payload
24920
24921 0xf/imm32/size
24922 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/=
24923 _string-multiply:
24924 0x11/imm32/alloc-id:fake:payload
24925
24926 0x8/imm32/size
24927 0x6d/m 0x75/u 0x6c/l 0x74/t 0x69/i 0x70/p 0x6c/l 0x79/y
24928 _string-convert:
24929 0x11/imm32/alloc-id:fake:payload
24930
24931 0x7/imm32/size
24932 0x63/c 0x6f/o 0x6e/n 0x76/v 0x65/e 0x72/r 0x74/t
24933 _string-truncate:
24934 0x11/imm32/alloc-id:fake:payload
24935
24936 0x8/imm32/size
24937 0x74/t 0x72/r 0x75/u 0x6e/n 0x63/c 0x61/a 0x74/t 0x65/e
24938 _string-reinterpret:
24939 0x11/imm32/alloc-id:fake:payload
24940
24941 0xb/imm32/size
24942 0x72/r 0x65/e 0x69/i 0x6e/n 0x74/t 0x65/e 0x72/r 0x70/p 0x72/r 0x65/e 0x74/t
24943 _string-divide:
24944 0x11/imm32/alloc-id:fake:payload
24945
24946 0x6/imm32/size
24947 0x64/d 0x69/i 0x76/v 0x69/i 0x64/d 0x65/e
24948 _string-max:
24949 0x11/imm32/alloc-id:fake:payload
24950
24951 0x3/imm32/size
24952 0x6d/m 0x61/a 0x78/x
24953 _string-min:
24954 0x11/imm32/alloc-id:fake:payload
24955
24956 0x3/imm32/size
24957 0x6d/m 0x69/i 0x6e/n
24958 _string-reciprocal:
24959 0x11/imm32/alloc-id:fake:payload
24960
24961 0xa/imm32/size
24962 0x72/r 0x65/e 0x63/c 0x69/i 0x70/p 0x72/r 0x6f/o 0x63/c 0x61/a 0x6c/l
24963 _string-square-root:
24964 0x11/imm32/alloc-id:fake:payload
24965
24966 0xb/imm32/size
24967 0x73/s 0x71/q 0x75/u 0x61/a 0x72/r 0x65/e 0x2d/- 0x72/r 0x6f/o 0x6f/o 0x74/t
24968 _string-inverse-square-root:
24969 0x11/imm32/alloc-id:fake:payload
24970
24971 0x13/imm32/size
24972 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
24973 _string-negate:
24974 0x11/imm32/alloc-id:fake:payload
24975
24976 0x6/imm32/size
24977 0x6e/n 0x65/e 0x67/g 0x61/a 0x74/t 0x65/e
24978 _string-or:
24979 0x11/imm32/alloc-id:fake:payload
24980
24981 0x2/imm32/size
24982 0x6f/o 0x72/r
24983 _string-or-with:
24984 0x11/imm32/alloc-id:fake:payload
24985
24986 0x7/imm32/size
24987 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
24988 _string-subtract:
24989 0x11/imm32/alloc-id:fake:payload
24990
24991 0x8/imm32/size
24992 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
24993 _string-subtract-from:
24994 0x11/imm32/alloc-id:fake:payload
24995
24996 0xd/imm32/size
24997 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
24998 _string-xor:
24999 0x11/imm32/alloc-id:fake:payload
25000
25001 0x3/imm32/size
25002 0x78/x 0x6f/o 0x72/r
25003 _string-xor-with:
25004 0x11/imm32/alloc-id:fake:payload
25005
25006 0x8/imm32/size
25007 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
25008 _string-shift-left:
25009 0x11/imm32/alloc-id:fake:payload
25010
25011 0xa/imm32/size
25012 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x6c/l 0x65/e 0x66/f 0x74/t
25013 _string-shift-right:
25014 0x11/imm32/alloc-id:fake:payload
25015
25016 0xb/imm32/size
25017 0x73/s 0x68/h 0x69/i 0x66/f 0x74/t 0x2d/dash 0x72/r 0x69/i 0x67/g 0x68/h 0x74/t
25018 _string-shift-right-signed:
25019 0x11/imm32/alloc-id:fake:payload
25020
25021 0x12/imm32/size
25022 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
25023
25024
25025 _string_01_add_to:
25026 0x11/imm32/alloc-id:fake:payload
25027
25028 0x9/imm32/size
25029 0x30/0 0x31/1 0x2f/slash 0x61/a 0x64/d 0x64/d 0x2d/dash 0x74/t 0x6f/o
25030 _string_03_add:
25031 0x11/imm32/alloc-id:fake:payload
25032
25033 0x6/imm32/size
25034 0x30/0 0x33/3 0x2f/slash 0x61/a 0x64/d 0x64/d
25035 _string_05_add_to_eax:
25036 0x11/imm32/alloc-id:fake:payload
25037
25038 0xd/imm32/size
25039 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
25040 _string_09_or_with:
25041 0x11/imm32/alloc-id:fake:payload
25042
25043 0xa/imm32/size
25044 0x30/0 0x39/9 0x2f/slash 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
25045 _string_0b_or:
25046 0x11/imm32/alloc-id:fake:payload
25047
25048 0x5/imm32/size
25049 0x30/0 0x62/b 0x2f/slash 0x6f/o 0x72/r
25050 _string_0d_or_with_eax:
25051 0x11/imm32/alloc-id:fake:payload
25052
25053 0xe/imm32/size
25054 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
25055 _string_0f_82_jump_label:
25056 0x11/imm32/alloc-id:fake:payload
25057
25058 0x13/imm32/size
25059 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/<
25060 _string_0f_82_jump_break:
25061 0x11/imm32/alloc-id:fake:payload
25062
25063 0x20/imm32/size
25064 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
25065 _string_0f_82_jump_loop:
25066 0x11/imm32/alloc-id:fake:payload
25067
25068 0x1f/imm32/size
25069 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
25070 _string_0f_83_jump_label:
25071 0x11/imm32/alloc-id:fake:payload
25072
25073 0x14/imm32/size
25074 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/=
25075 _string_0f_83_jump_break:
25076 0x11/imm32/alloc-id:fake:payload
25077
25078 0x21/imm32/size
25079 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
25080 _string_0f_83_jump_loop:
25081 0x11/imm32/alloc-id:fake:payload
25082
25083 0x20/imm32/size
25084 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
25085 _string_0f_84_jump_label:
25086 0x11/imm32/alloc-id:fake:payload
25087
25088 0xf/imm32/size
25089 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/=
25090 _string_0f_84_jump_break:
25091 0x11/imm32/alloc-id:fake:payload
25092
25093 0x1c/imm32/size
25094 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
25095 _string_0f_84_jump_loop:
25096 0x11/imm32/alloc-id:fake:payload
25097
25098 0x1b/imm32/size
25099 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
25100 _string_0f_85_jump_label:
25101 0x11/imm32/alloc-id:fake:payload
25102
25103 0x10/imm32/size
25104 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/=
25105 _string_0f_85_jump_break:
25106 0x11/imm32/alloc-id:fake:payload
25107
25108 0x1d/imm32/size
25109 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
25110 _string_0f_85_jump_loop:
25111 0x11/imm32/alloc-id:fake:payload
25112
25113 0x1c/imm32/size
25114 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
25115 _string_0f_86_jump_label:
25116 0x11/imm32/alloc-id:fake:payload
25117
25118 0x14/imm32/size
25119 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/=
25120 _string_0f_86_jump_break:
25121 0x11/imm32/alloc-id:fake:payload
25122
25123 0x21/imm32/size
25124 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
25125 _string_0f_86_jump_loop:
25126 0x11/imm32/alloc-id:fake:payload
25127
25128 0x20/imm32/size
25129 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
25130 _string_0f_87_jump_label:
25131 0x11/imm32/alloc-id:fake:payload
25132
25133 0x13/imm32/size
25134 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/>
25135 _string_0f_87_jump_break:
25136 0x11/imm32/alloc-id:fake:payload
25137
25138 0x20/imm32/size
25139 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
25140 _string_0f_87_jump_loop:
25141 0x11/imm32/alloc-id:fake:payload
25142
25143 0x1f/imm32/size
25144 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
25145 _string_0f_8c_jump_label:
25146 0x11/imm32/alloc-id:fake:payload
25147
25148 0xf/imm32/size
25149 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/<
25150 _string_0f_8c_jump_break:
25151 0x11/imm32/alloc-id:fake:payload
25152
25153 0x1c/imm32/size
25154 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
25155 _string_0f_8c_jump_loop:
25156 0x11/imm32/alloc-id:fake:payload
25157
25158 0x1b/imm32/size
25159 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
25160 _string_0f_8d_jump_label:
25161 0x11/imm32/alloc-id:fake:payload
25162
25163 0x10/imm32/size
25164 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/=
25165 _string_0f_8d_jump_break:
25166 0x11/imm32/alloc-id:fake:payload
25167
25168 0x1d/imm32/size
25169 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
25170 _string_0f_8d_jump_loop:
25171 0x11/imm32/alloc-id:fake:payload
25172
25173 0x1c/imm32/size
25174 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
25175 _string_0f_8e_jump_label:
25176 0x11/imm32/alloc-id:fake:payload
25177
25178 0x10/imm32/size
25179 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/=
25180 _string_0f_8e_jump_break:
25181 0x11/imm32/alloc-id:fake:payload
25182
25183 0x1d/imm32/size
25184 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
25185 _string_0f_8e_jump_loop:
25186 0x11/imm32/alloc-id:fake:payload
25187
25188 0x1c/imm32/size
25189 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
25190 _string_0f_8f_jump_label:
25191 0x11/imm32/alloc-id:fake:payload
25192
25193 0xf/imm32/size
25194 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/>
25195 _string_0f_8f_jump_break:
25196 0x11/imm32/alloc-id:fake:payload
25197
25198 0x1c/imm32/size
25199 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
25200 _string_0f_8f_jump_loop:
25201 0x11/imm32/alloc-id:fake:payload
25202
25203 0x1b/imm32/size
25204 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
25205 _string_0f_af_multiply:
25206 0x11/imm32/alloc-id:fake:payload
25207
25208 0xe/imm32/size
25209 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
25210 _string_f3_0f_2a_convert_to_float:
25211 0x11/imm32/alloc-id:fake:payload
25212
25213 0x19/imm32/size
25214 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
25215 _string_f3_0f_2d_convert_to_int:
25216 0x11/imm32/alloc-id:fake:payload
25217
25218 0x17/imm32/size
25219 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
25220 _string_f3_0f_2c_truncate_to_int:
25221 0x11/imm32/alloc-id:fake:payload
25222
25223 0x18/imm32/size
25224 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
25225 _string_f3_0f_58_add:
25226 0x11/imm32/alloc-id:fake:payload
25227
25228 0xc/imm32/size
25229 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x38/8 0x2f/slash 0x61/a 0x64/d 0x64/d
25230 _string_f3_0f_5c_subtract:
25231 0x11/imm32/alloc-id:fake:payload
25232
25233 0x11/imm32/size
25234 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
25235 _string_f3_0f_59_multiply:
25236 0x11/imm32/alloc-id:fake:payload
25237
25238 0x11/imm32/size
25239 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
25240 _string_f3_0f_5e_divide:
25241 0x11/imm32/alloc-id:fake:payload
25242
25243 0xf/imm32/size
25244 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
25245 _string_f3_0f_53_reciprocal:
25246 0x11/imm32/alloc-id:fake:payload
25247
25248 0x13/imm32/size
25249 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
25250 _string_f3_0f_51_square_root:
25251 0x11/imm32/alloc-id:fake:payload
25252
25253 0x14/imm32/size
25254 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
25255 _string_f3_0f_52_inverse_square_root:
25256 0x11/imm32/alloc-id:fake:payload
25257
25258 0x1c/imm32/size
25259 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
25260 _string_f3_0f_5d_min:
25261 0x11/imm32/alloc-id:fake:payload
25262
25263 0xc/imm32/size
25264 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x64/d 0x2f/slash 0x6d/m 0x69/i 0x6e/n
25265 _string_f3_0f_5f_max:
25266 0x11/imm32/alloc-id:fake:payload
25267
25268 0xc/imm32/size
25269 0x66/f 0x33/3 0x20/space 0x30/0 0x66/f 0x20/space 0x35/5 0x66/f 0x2f/slash 0x6d/m 0x61/a 0x78/x
25270 _string_f3_0f_10_copy:
25271 0x11/imm32/alloc-id:fake:payload
25272
25273 0xd/imm32/size
25274 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
25275 _string_f3_0f_11_copy:
25276 0x11/imm32/alloc-id:fake:payload
25277
25278 0xd/imm32/size
25279 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
25280 _string_0f_2f_compare:
25281 0x11/imm32/alloc-id:fake:payload
25282
25283 0xd/imm32/size
25284 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
25285 _string_21_and_with:
25286 0x11/imm32/alloc-id:fake:payload
25287
25288 0xb/imm32/size
25289 0x32/2 0x31/1 0x2f/slash 0x61/a 0x6e/n 0x64/d 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
25290 _string_23_and:
25291 0x11/imm32/alloc-id:fake:payload
25292
25293 0x6/imm32/size
25294 0x32/2 0x33/3 0x2f/slash 0x61/a 0x6e/n 0x64/d
25295 _string_25_and_with_eax:
25296 0x11/imm32/alloc-id:fake:payload
25297
25298 0xf/imm32/size
25299 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
25300 _string_29_subtract_from:
25301 0x11/imm32/alloc-id:fake:payload
25302
25303 0x10/imm32/size
25304 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
25305 _string_2b_subtract:
25306 0x11/imm32/alloc-id:fake:payload
25307
25308 0xb/imm32/size
25309 0x32/2 0x62/b 0x2f/slash 0x73/s 0x75/u 0x62/b 0x74/t 0x72/r 0x61/a 0x63/c 0x74/t
25310 _string_2d_subtract_from_eax:
25311 0x11/imm32/alloc-id:fake:payload
25312
25313 0x14/imm32/size
25314 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
25315 _string_31_xor_with:
25316 0x11/imm32/alloc-id:fake:payload
25317
25318 0xb/imm32/size
25319 0x33/3 0x31/1 0x2f/slash 0x78/x 0x6f/o 0x72/r 0x2d/dash 0x77/w 0x69/i 0x74/t 0x68/h
25320 _string_33_xor:
25321 0x11/imm32/alloc-id:fake:payload
25322
25323 0x6/imm32/size
25324 0x33/3 0x33/3 0x2f/slash 0x78/x 0x6f/o 0x72/r
25325 _string_35_xor_with_eax:
25326 0x11/imm32/alloc-id:fake:payload
25327
25328 0xf/imm32/size
25329 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
25330 _string_39_compare->:
25331 0x11/imm32/alloc-id:fake:payload
25332
25333 0xc/imm32/size
25334 0x33/3 0x39/9 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x2d/dash 0x3e/>
25335 _string_3b_compare<-:
25336 0x11/imm32/alloc-id:fake:payload
25337
25338 0xc/imm32/size
25339 0x33/3 0x62/b 0x2f/slash 0x63/c 0x6f/o 0x6d/m 0x70/p 0x61/a 0x72/r 0x65/e 0x3c/< 0x2d/dash
25340 _string_3d_compare_eax_with:
25341 0x11/imm32/alloc-id:fake:payload
25342
25343 0x13/imm32/size
25344 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
25345 _string_40_increment_eax:
25346 0x11/imm32/alloc-id:fake:payload
25347
25348 0x10/imm32/size
25349 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
25350 _string_41_increment_ecx:
25351 0x11/imm32/alloc-id:fake:payload
25352
25353 0x10/imm32/size
25354 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
25355 _string_42_increment_edx:
25356 0x11/imm32/alloc-id:fake:payload
25357
25358 0x10/imm32/size
25359 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
25360 _string_43_increment_ebx:
25361 0x11/imm32/alloc-id:fake:payload
25362
25363 0x10/imm32/size
25364 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
25365 _string_46_increment_esi:
25366 0x11/imm32/alloc-id:fake:payload
25367
25368 0x10/imm32/size
25369 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
25370 _string_47_increment_edi:
25371 0x11/imm32/alloc-id:fake:payload
25372
25373 0x10/imm32/size
25374 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
25375 _string_48_decrement_eax:
25376 0x11/imm32/alloc-id:fake:payload
25377
25378 0x10/imm32/size
25379 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
25380 _string_49_decrement_ecx:
25381 0x11/imm32/alloc-id:fake:payload
25382
25383 0x10/imm32/size
25384 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
25385 _string_4a_decrement_edx:
25386 0x11/imm32/alloc-id:fake:payload
25387
25388 0x10/imm32/size
25389 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
25390 _string_4b_decrement_ebx:
25391 0x11/imm32/alloc-id:fake:payload
25392
25393 0x10/imm32/size
25394 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
25395 _string_4e_decrement_esi:
25396 0x11/imm32/alloc-id:fake:payload
25397
25398 0x10/imm32/size
25399 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
25400 _string_4f_decrement_edi:
25401 0x11/imm32/alloc-id:fake:payload
25402
25403 0x10/imm32/size
25404 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
25405 _string_81_subop_add:
25406 0x11/imm32/alloc-id:fake:payload
25407
25408 0xe/imm32/size
25409 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
25410 _string_81_subop_or:
25411 0x11/imm32/alloc-id:fake:payload
25412
25413 0xd/imm32/size
25414 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
25415 _string_81_subop_and:
25416 0x11/imm32/alloc-id:fake:payload
25417
25418 0xe/imm32/size
25419 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
25420 _string_81_subop_subtract:
25421 0x11/imm32/alloc-id:fake:payload
25422
25423 0x13/imm32/size
25424 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
25425 _string_81_subop_xor:
25426 0x11/imm32/alloc-id:fake:payload
25427
25428 0xe/imm32/size
25429 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
25430 _string_81_subop_compare:
25431 0x11/imm32/alloc-id:fake:payload
25432
25433 0x12/imm32/size
25434 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
25435 _string_89_<-:
25436 0x11/imm32/alloc-id:fake:payload
25437
25438 0x5/imm32/size
25439 0x38/8 0x39/9 0x2f/slash 0x3c/< 0x2d/dash
25440 _string_8b_->:
25441 0x11/imm32/alloc-id:fake:payload
25442
25443 0x5/imm32/size
25444 0x38/8 0x62/b 0x2f/slash 0x2d/dash 0x3e/>
25445 _string_8a_copy_byte:
25446 0x11/imm32/alloc-id:fake:payload
25447
25448 0x9/imm32/size
25449 0x38/8 0x61/a 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x2d/- 0x3e/>
25450 _string_88_copy_byte:
25451 0x11/imm32/alloc-id:fake:payload
25452
25453 0x9/imm32/size
25454 0x38/8 0x38/8 0x2f// 0x62/b 0x79/y 0x74/t 0x65/e 0x3c/< 0x2d/-
25455 _string_8d_copy_address:
25456 0x11/imm32/alloc-id:fake:payload
25457
25458 0xf/imm32/size
25459 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
25460 _string_b8_copy_to_eax:
25461 0x11/imm32/alloc-id:fake:payload
25462
25463 0xe/imm32/size
25464 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
25465 _string_b9_copy_to_ecx:
25466 0x11/imm32/alloc-id:fake:payload
25467
25468 0xe/imm32/size
25469 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
25470 _string_ba_copy_to_edx:
25471 0x11/imm32/alloc-id:fake:payload
25472
25473 0xe/imm32/size
25474 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
25475 _string_bb_copy_to_ebx:
25476 0x11/imm32/alloc-id:fake:payload
25477
25478 0xe/imm32/size
25479 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
25480 _string_be_copy_to_esi:
25481 0x11/imm32/alloc-id:fake:payload
25482
25483 0xe/imm32/size
25484 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
25485 _string_bf_copy_to_edi:
25486 0x11/imm32/alloc-id:fake:payload
25487
25488 0xe/imm32/size
25489 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
25490 _string_c7_subop_copy:
25491 0x11/imm32/alloc-id:fake:payload
25492
25493 0xf/imm32/size
25494 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
25495 _string_e9_jump_label:
25496 0x11/imm32/alloc-id:fake:payload
25497
25498 0x7/imm32/size
25499 0x65/e 0x39/9 0x2f/slash 0x6a/j 0x75/u 0x6d/m 0x70/p
25500 _string_e9_jump_break:
25501 0x11/imm32/alloc-id:fake:payload
25502
25503 0x14/imm32/size
25504 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
25505 _string_e9_jump_loop:
25506 0x11/imm32/alloc-id:fake:payload
25507
25508 0x13/imm32/size
25509 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
25510 _string_f7_subop_negate:
25511 0x11/imm32/alloc-id:fake:payload
25512
25513 0x11/imm32/size
25514 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
25515 _string_ff_subop_increment:
25516 0x11/imm32/alloc-id:fake:payload
25517
25518 0x14/imm32/size
25519 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
25520 _string_ff_subop_decrement:
25521 0x11/imm32/alloc-id:fake:payload
25522
25523 0x14/imm32/size
25524 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
25525 _string_c1_subop_shift_left:
25526 0x11/imm32/alloc-id:fake:payload
25527
25528 0x15/imm32/size
25529 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
25530 _string_c1_subop_shift_right_padding_zeroes:
25531 0x11/imm32/alloc-id:fake:payload
25532
25533 0x25/imm32/size
25534 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
25535 _string_c1_subop_shift_right_preserving_sign:
25536 0x11/imm32/alloc-id:fake:payload
25537
25538 0x26/imm32/size
25539 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
25540
25541 Single-int-var-in-mem:
25542 0x11/imm32/alloc-id:fake:payload
25543 0x11/imm32/alloc-id:fake
25544 Int-var-in-mem/imm32
25545 0/imm32/next
25546 0/imm32/next
25547
25548 Int-var-in-mem:
25549 0x11/imm32/alloc-id:fake:payload
25550 0/imm32/name
25551 0/imm32/name
25552 0x11/imm32/alloc-id:fake
25553 Type-int/imm32
25554 1/imm32/some-block-depth
25555 1/imm32/some-stack-offset
25556 0/imm32/no-register
25557 0/imm32/no-register
25558
25559
25560 Single-byte-var-in-mem:
25561 0x11/imm32/alloc-id:fake:payload
25562 0x11/imm32/alloc-id:fake
25563 Byte-var-in-mem/imm32
25564 0/imm32/next
25565 0/imm32/next
25566
25567
25568 Byte-var-in-mem:
25569 0x11/imm32/alloc-id:fake:payload
25570 0/imm32/name
25571 0/imm32/name
25572 0x11/imm32/alloc-id:fake
25573 Type-byte/imm32
25574 1/imm32/some-block-depth
25575 1/imm32/some-stack-offset
25576 0/imm32/no-register
25577 0/imm32/no-register
25578
25579 Two-args-int-stack-int-reg:
25580 0x11/imm32/alloc-id:fake:payload
25581 0x11/imm32/alloc-id:fake
25582 Int-var-in-mem/imm32
25583 0x11/imm32/alloc-id:fake
25584 Single-int-var-in-some-register/imm32/next
25585
25586 Two-int-args-in-regs:
25587 0x11/imm32/alloc-id:fake:payload
25588 0x11/imm32/alloc-id:fake
25589 Int-var-in-some-register/imm32
25590 0x11/imm32/alloc-id:fake
25591 Single-int-var-in-some-register/imm32/next
25592
25593
25594 Two-args-byte-stack-byte-reg:
25595 0x11/imm32/alloc-id:fake:payload
25596 0x11/imm32/alloc-id:fake
25597 Byte-var-in-mem/imm32
25598 0x11/imm32/alloc-id:fake
25599 Single-byte-var-in-some-register/imm32/next
25600
25601 Two-args-int-reg-int-stack:
25602 0x11/imm32/alloc-id:fake:payload
25603 0x11/imm32/alloc-id:fake
25604 Int-var-in-some-register/imm32
25605 0x11/imm32/alloc-id:fake
25606 Single-int-var-in-mem/imm32/next
25607
25608 Two-args-int-eax-int-literal:
25609 0x11/imm32/alloc-id:fake:payload
25610 0x11/imm32/alloc-id:fake
25611 Int-var-in-eax/imm32
25612 0x11/imm32/alloc-id:fake
25613 Single-lit-var/imm32/next
25614
25615 Int-var-and-literal:
25616 0x11/imm32/alloc-id:fake:payload
25617 0x11/imm32/alloc-id:fake
25618 Int-var-in-mem/imm32
25619 0x11/imm32/alloc-id:fake
25620 Single-lit-var/imm32/next
25621
25622 Int-var-in-register-and-literal:
25623 0x11/imm32/alloc-id:fake:payload
25624 0x11/imm32/alloc-id:fake
25625 Int-var-in-some-register/imm32
25626 0x11/imm32/alloc-id:fake
25627 Single-lit-var/imm32/next
25628
25629 Two-float-args-in-regs:
25630 0x11/imm32/alloc-id:fake:payload
25631 0x11/imm32/alloc-id:fake
25632 Float-var-in-some-register/imm32
25633 0x11/imm32/alloc-id:fake
25634 Single-float-var-in-some-register/imm32/next
25635
25636 Two-args-float-reg-float-stack:
25637 0x11/imm32/alloc-id:fake:payload
25638 0x11/imm32/alloc-id:fake
25639 Float-var-in-some-register/imm32
25640 0x11/imm32/alloc-id:fake
25641 Single-float-var-in-mem/imm32/next
25642
25643 Two-args-float-stack-float-reg:
25644 0x11/imm32/alloc-id:fake:payload
25645 0x11/imm32/alloc-id:fake
25646 Float-var-in-mem/imm32
25647 0x11/imm32/alloc-id:fake
25648 Single-float-var-in-some-register/imm32/next
25649
25650 Single-int-var-in-some-register:
25651 0x11/imm32/alloc-id:fake:payload
25652 0x11/imm32/alloc-id:fake
25653 Int-var-in-some-register/imm32
25654 0/imm32/next
25655 0/imm32/next
25656
25657 Single-addr-var-in-some-register:
25658 0x11/imm32/alloc-id:fake:payload
25659 0x11/imm32/alloc-id:fake
25660 Addr-var-in-some-register/imm32
25661 0/imm32/next
25662 0/imm32/next
25663
25664 Single-byte-var-in-some-register:
25665 0x11/imm32/alloc-id:fake:payload
25666 0x11/imm32/alloc-id:fake
25667 Byte-var-in-some-register/imm32
25668 0/imm32/next
25669 0/imm32/next
25670
25671 Int-var-in-some-register:
25672 0x11/imm32/alloc-id:fake:payload
25673 0/imm32/name
25674 0/imm32/name
25675 0x11/imm32/alloc-id:fake
25676 Type-int/imm32
25677 1/imm32/some-block-depth
25678 0/imm32/no-stack-offset
25679 0x11/imm32/alloc-id:fake
25680 Any-register/imm32
25681
25682 Any-register:
25683 0x11/imm32/alloc-id:fake:payload
25684 1/imm32/size
25685
25686 2a/asterisk
25687
25688 Addr-var-in-some-register:
25689 0x11/imm32/alloc-id:fake:payload
25690 0/imm32/name
25691 0/imm32/name
25692 0x11/imm32/alloc-id:fake
25693 Type-addr/imm32
25694 1/imm32/some-block-depth
25695 0/imm32/no-stack-offset
25696 0x11/imm32/alloc-id:fake
25697 Any-register/imm32
25698
25699 Byte-var-in-some-register:
25700 0x11/imm32/alloc-id:fake:payload
25701 0/imm32/name
25702 0/imm32/name
25703 0x11/imm32/alloc-id:fake
25704 Type-byte/imm32
25705 1/imm32/some-block-depth
25706 0/imm32/no-stack-offset
25707 0x11/imm32/alloc-id:fake
25708 Any-register/imm32
25709
25710 Single-int-var-in-eax:
25711 0x11/imm32/alloc-id:fake:payload
25712 0x11/imm32/alloc-id:fake
25713 Int-var-in-eax/imm32
25714 0/imm32/next
25715 0/imm32/next
25716
25717 Int-var-in-eax:
25718 0x11/imm32/alloc-id:fake:payload
25719 0/imm32/name
25720 0/imm32/name
25721 0x11/imm32/alloc-id:fake
25722 Type-int/imm32
25723 1/imm32/some-block-depth
25724 0/imm32/no-stack-offset
25725 0x11/imm32/alloc-id:fake
25726 $Mu-register-eax/imm32
25727
25728 Single-int-var-in-ecx:
25729 0x11/imm32/alloc-id:fake:payload
25730 0x11/imm32/alloc-id:fake
25731 Int-var-in-ecx/imm32
25732 0/imm32/next
25733 0/imm32/next
25734
25735 Int-var-in-ecx:
25736 0x11/imm32/alloc-id:fake:payload
25737 0/imm32/name
25738 0/imm32/name
25739 0x11/imm32/alloc-id:fake
25740 Type-int/imm32
25741 1/imm32/some-block-depth
25742 0/imm32/no-stack-offset
25743 0x11/imm32/alloc-id:fake
25744 $Register-ecx/imm32/register
25745
25746 Single-int-var-in-edx:
25747 0x11/imm32/alloc-id:fake:payload
25748 0x11/imm32/alloc-id:fake
25749 Int-var-in-edx/imm32
25750 0/imm32/next
25751 0/imm32/next
25752
25753 Int-var-in-edx:
25754 0x11/imm32/alloc-id:fake:payload
25755 0/imm32/name
25756 0/imm32/name
25757 0x11/imm32/alloc-id:fake
25758 Type-int/imm32
25759 1/imm32/some-block-depth
25760 0/imm32/no-stack-offset
25761 0x11/imm32/alloc-id:fake
25762 $Register-edx/imm32/register
25763
25764 Single-int-var-in-ebx:
25765 0x11/imm32/alloc-id:fake:payload
25766 0x11/imm32/alloc-id:fake
25767 Int-var-in-ebx/imm32
25768 0/imm32/next
25769 0/imm32/next
25770
25771 Int-var-in-ebx:
25772 0x11/imm32/alloc-id:fake:payload
25773 0/imm32/name
25774 0/imm32/name
25775 0x11/imm32/alloc-id:fake
25776 Type-int/imm32
25777 1/imm32/some-block-depth
25778 0/imm32/no-stack-offset
25779 0x11/imm32/alloc-id:fake
25780 $Register-ebx/imm32/register
25781
25782 Single-int-var-in-esi:
25783 0x11/imm32/alloc-id:fake:payload
25784 0x11/imm32/alloc-id:fake
25785 Int-var-in-esi/imm32
25786 0/imm32/next
25787 0/imm32/next
25788
25789 Int-var-in-esi:
25790 0x11/imm32/alloc-id:fake:payload
25791 0/imm32/name
25792 0/imm32/name
25793 0x11/imm32/alloc-id:fake
25794 Type-int/imm32
25795 1/imm32/some-block-depth
25796 0/imm32/no-stack-offset
25797 0x11/imm32/alloc-id:fake
25798 $Register-esi/imm32/register
25799
25800 Single-int-var-in-edi:
25801 0x11/imm32/alloc-id:fake:payload
25802 0x11/imm32/alloc-id:fake
25803 Int-var-in-edi/imm32
25804 0/imm32/next
25805 0/imm32/next
25806
25807 Int-var-in-edi:
25808 0x11/imm32/alloc-id:fake:payload
25809 0/imm32/name
25810 0/imm32/name
25811 0x11/imm32/alloc-id:fake
25812 Type-int/imm32
25813 1/imm32/some-block-depth
25814 0/imm32/no-stack-offset
25815 0x11/imm32/alloc-id:fake
25816 $Register-edi/imm32/register
25817
25818 Single-lit-var:
25819 0x11/imm32/alloc-id:fake:payload
25820 0x11/imm32/alloc-id:fake
25821 Lit-var/imm32
25822 0/imm32/next
25823 0/imm32/next
25824
25825 Lit-var:
25826 0x11/imm32/alloc-id:fake:payload
25827 0/imm32/name
25828 0/imm32/name
25829 0x11/imm32/alloc-id:fake
25830 Type-literal/imm32
25831 1/imm32/some-block-depth
25832 0/imm32/no-stack-offset
25833 0/imm32/no-register
25834 0/imm32/no-register
25835
25836 Single-float-var-in-mem:
25837 0x11/imm32/alloc-id:fake:payload
25838 0x11/imm32/alloc-id:fake
25839 Float-var-in-mem/imm32
25840 0/imm32/next
25841 0/imm32/next
25842
25843 Float-var-in-mem:
25844 0x11/imm32/alloc-id:fake:payload
25845 0/imm32/name
25846 0/imm32/name
25847 0x11/imm32/alloc-id:fake
25848 Type-float/imm32
25849 1/imm32/some-block-depth
25850 1/imm32/some-stack-offset
25851 0/imm32/no-register
25852 0/imm32/no-register
25853
25854 Single-float-var-in-some-register:
25855 0x11/imm32/alloc-id:fake:payload
25856 0x11/imm32/alloc-id:fake
25857 Float-var-in-some-register/imm32
25858 0/imm32/next
25859 0/imm32/next
25860
25861 Float-var-in-some-register:
25862 0x11/imm32/alloc-id:fake:payload
25863 0/imm32/name
25864 0/imm32/name
25865 0x11/imm32/alloc-id:fake
25866 Type-float/imm32
25867 1/imm32/some-block-depth
25868 0/imm32/no-stack-offset
25869 0x11/imm32/alloc-id:fake
25870 Any-register/imm32
25871
25872 Type-int:
25873 0x11/imm32/alloc-id:fake:payload
25874 1/imm32/is-atom
25875 1/imm32/value:int
25876 0/imm32/left:unused
25877 0/imm32/right:null
25878 0/imm32/right:null
25879
25880 Type-literal:
25881 0x11/imm32/alloc-id:fake:payload
25882 1/imm32/is-atom
25883 0/imm32/value:literal
25884 0/imm32/left:unused
25885 0/imm32/right:null
25886 0/imm32/right:null
25887
25888 Type-addr:
25889 0x11/imm32/alloc-id:fake:payload
25890 1/imm32/is-atom
25891 2/imm32/value:addr
25892 0/imm32/left:unused
25893 0/imm32/right:null
25894 0/imm32/right:null
25895
25896 Type-byte:
25897 0x11/imm32/alloc-id:fake:payload
25898 1/imm32/is-atom
25899 8/imm32/value:byte
25900 0/imm32/left:unused
25901 0/imm32/right:null
25902 0/imm32/right:null
25903
25904 Type-float:
25905 0x11/imm32/alloc-id:fake:payload
25906 1/imm32/is-atom
25907 0xf/imm32/value:float
25908 0/imm32/left:unused
25909 0/imm32/right:null
25910 0/imm32/right:null
25911
25912 == code
25913 emit-subx-primitive:
25914
25915 55/push-ebp
25916 89/<- %ebp 4/r32/esp
25917
25918 50/push-eax
25919 51/push-ecx
25920
25921 8b/-> *(ebp+0x10) 1/r32/ecx
25922
25923 (emit-indent *(ebp+8) *Curr-block-depth)
25924 (lookup *(ecx+0x18) *(ecx+0x1c))
25925 (write-buffered *(ebp+8) %eax)
25926
25927 (emit-subx-rm32 *(ebp+8) *(ecx+0x20) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25928
25929 (emit-subx-rm32 *(ebp+8) *(ecx+0x34) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25930
25931 (emit-subx-r32 *(ebp+8) *(ecx+0x24) *(ebp+0xc))
25932
25933 (emit-subx-x32 *(ebp+8) *(ecx+0x38) *(ebp+0xc))
25934
25935 (emit-subx-imm32 *(ebp+8) *(ecx+0x28) *(ebp+0xc))
25936
25937 (emit-subx-imm8 *(ebp+8) *(ecx+0x2c) *(ebp+0xc))
25938
25939 (emit-subx-disp32 *(ebp+8) *(ecx+0x30) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25940 (write-buffered *(ebp+8) Newline)
25941 $emit-subx-primitive:end:
25942
25943 59/pop-to-ecx
25944 58/pop-to-eax
25945
25946 89/<- %esp 5/r32/ebp
25947 5d/pop-to-ebp
25948 c3/return
25949
25950 emit-subx-rm32:
25951
25952 55/push-ebp
25953 89/<- %ebp 4/r32/esp
25954
25955 50/push-eax
25956
25957 81 7/subop/compare *(ebp+0xc) 0/imm32
25958 74/jump-if-= $emit-subx-rm32:end/disp8
25959
25960 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
25961 (emit-subx-var-as-rm32 *(ebp+8) %eax)
25962 $emit-subx-rm32:end:
25963
25964 58/pop-to-eax
25965
25966 89/<- %esp 5/r32/ebp
25967 5d/pop-to-ebp
25968 c3/return
25969
25970 get-stmt-operand-from-arg-location:
25971
25972 55/push-ebp
25973 89/<- %ebp 4/r32/esp
25974
25975 51/push-ecx
25976
25977 8b/-> *(ebp+0xc) 0/r32/eax
25978
25979 8b/-> *(ebp+8) 1/r32/ecx
25980
25981 {
25982 3d/compare-eax-and 1/imm32
25983 75/jump-if-!= break/disp8
25984 $get-stmt-operand-from-arg-location:1:
25985 (lookup *(ecx+0xc) *(ecx+0x10))
25986 eb/jump $get-stmt-operand-from-arg-location:end/disp8
25987 }
25988
25989 {
25990 3d/compare-eax-and 2/imm32
25991 75/jump-if-!= break/disp8
25992 $get-stmt-operand-from-arg-location:2:
25993 (lookup *(ecx+0xc) *(ecx+0x10))
25994 (lookup *(eax+8) *(eax+0xc))
25995 eb/jump $get-stmt-operand-from-arg-location:end/disp8
25996 }
25997
25998 {
25999 3d/compare-eax-and 3/imm32
26000 75/jump-if-!= break/disp8
26001 $get-stmt-operand-from-arg-location:3:
26002 (lookup *(ecx+0x14) *(ecx+0x18))
26003 eb/jump $get-stmt-operand-from-arg-location:end/disp8
26004 }
26005
26006 e9/jump $get-stmt-operand-from-arg-location:abort/disp32
26007 $get-stmt-operand-from-arg-location:end:
26008
26009 59/pop-to-ecx
26010
26011 89/<- %esp 5/r32/ebp
26012 5d/pop-to-ebp
26013 c3/return
26014
26015 $get-stmt-operand-from-arg-location:abort:
26016
26017 (write-buffered *(ebp+0x10) "invalid arg-location ")
26018 (write-int32-hex-buffered *(ebp+0x10) %eax)
26019 (write-buffered *(ebp+0x10) Newline)
26020 (flush *(ebp+0x10))
26021 (stop *(ebp+0x14) 1)
26022
26023
26024 emit-subx-r32:
26025
26026 55/push-ebp
26027 89/<- %ebp 4/r32/esp
26028
26029 50/push-eax
26030 51/push-ecx
26031
26032 81 7/subop/compare *(ebp+0xc) 0/imm32
26033 0f 84/jump-if-= $emit-subx-r32:end/disp32
26034
26035 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
26036 (lookup *eax *(eax+4))
26037 (lookup *(eax+0x18) *(eax+0x1c))
26038
26039
26040
26041
26042 (maybe-get Mu-registers %eax 0xc)
26043 (write-buffered *(ebp+8) Space)
26044 (write-int32-hex-buffered *(ebp+8) *eax)
26045 (write-buffered *(ebp+8) "/r32")
26046 $emit-subx-r32:end:
26047
26048 59/pop-to-ecx
26049 58/pop-to-eax
26050
26051 89/<- %esp 5/r32/ebp
26052 5d/pop-to-ebp
26053 c3/return
26054
26055 emit-subx-x32:
26056
26057 55/push-ebp
26058 89/<- %ebp 4/r32/esp
26059
26060 50/push-eax
26061 51/push-ecx
26062
26063 81 7/subop/compare *(ebp+0xc) 0/imm32
26064 0f 84/jump-if-= $emit-subx-x32:end/disp32
26065
26066 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
26067 (lookup *eax *(eax+4))
26068 (lookup *(eax+0x18) *(eax+0x1c))
26069
26070
26071
26072
26073 (maybe-get Mu-registers %eax 0xc)
26074 (write-buffered *(ebp+8) Space)
26075 (write-int32-hex-buffered *(ebp+8) *eax)
26076 (write-buffered *(ebp+8) "/x32")
26077 $emit-subx-x32:end:
26078
26079 59/pop-to-ecx
26080 58/pop-to-eax
26081
26082 89/<- %esp 5/r32/ebp
26083 5d/pop-to-ebp
26084 c3/return
26085
26086 emit-subx-imm32:
26087
26088 55/push-ebp
26089 89/<- %ebp 4/r32/esp
26090
26091 50/push-eax
26092 51/push-ecx
26093
26094 81 7/subop/compare *(ebp+0xc) 0/imm32
26095 0f 84/jump-if-= $emit-subx-imm32:end/disp32
26096
26097 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
26098 (lookup *eax *(eax+4))
26099 (lookup *eax *(eax+4))
26100 (write-buffered *(ebp+8) Space)
26101 (write-buffered *(ebp+8) %eax)
26102 (write-buffered *(ebp+8) "/imm32")
26103 $emit-subx-imm32:end:
26104
26105 59/pop-to-ecx
26106 58/pop-to-eax
26107
26108 89/<- %esp 5/r32/ebp
26109 5d/pop-to-ebp
26110 c3/return
26111
26112 emit-subx-imm8:
26113
26114 55/push-ebp
26115 89/<- %ebp 4/r32/esp
26116
26117 50/push-eax
26118 51/push-ecx
26119
26120 81 7/subop/compare *(ebp+0xc) 0/imm32
26121 0f 84/jump-if-= $emit-subx-imm32:end/disp32
26122
26123 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc))
26124 (lookup *eax *(eax+4))
26125 (lookup *eax *(eax+4))
26126 (write-buffered *(ebp+8) Space)
26127 (write-buffered *(ebp+8) %eax)
26128 (write-buffered *(ebp+8) "/imm8")
26129 $emit-subx-imm8:end:
26130
26131 59/pop-to-ecx
26132 58/pop-to-eax
26133
26134 89/<- %esp 5/r32/ebp
26135 5d/pop-to-ebp
26136 c3/return
26137
26138 emit-subx-disp32:
26139
26140 55/push-ebp
26141 89/<- %ebp 4/r32/esp
26142
26143 50/push-eax
26144 51/push-ecx
26145
26146 81 7/subop/compare *(ebp+0xc) 0/imm32
26147 0f 84/jump-if-= $emit-subx-disp32:end/disp32
26148
26149 (get-stmt-operand-from-arg-location *(ebp+0x10) *(ebp+0xc) *(ebp+0x14) *(ebp+0x18))
26150 (lookup *eax *(eax+4))
26151 (lookup *eax *(eax+4))
26152 (write-buffered *(ebp+8) Space)
26153 (write-buffered *(ebp+8) %eax)
26154
26155
26156 8b/-> *(ebp+0x10) 0/r32/eax
26157 (lookup *(eax+4) *(eax+8))
26158 89/<- %ecx 0/r32/eax
26159 {
26160 (string-starts-with? %ecx "break")
26161 3d/compare-eax-and 0/imm32/false
26162 74/jump-if-= break/disp8
26163 (write-buffered *(ebp+8) ":break")
26164 }
26165
26166 {
26167 (string-starts-with? %ecx "loop")
26168 3d/compare-eax-and 0/imm32/false
26169 74/jump-if-= break/disp8
26170 (write-buffered *(ebp+8) ":loop")
26171 }
26172 (write-buffered *(ebp+8) "/disp32")
26173 $emit-subx-disp32:end:
26174
26175 59/pop-to-ecx
26176 58/pop-to-eax
26177
26178 89/<- %esp 5/r32/ebp
26179 5d/pop-to-ebp
26180 c3/return
26181
26182 emit-call:
26183
26184 55/push-ebp
26185 89/<- %ebp 4/r32/esp
26186
26187 50/push-eax
26188 51/push-ecx
26189
26190 (emit-indent *(ebp+8) *Curr-block-depth)
26191 (write-buffered *(ebp+8) "(")
26192
26193 8b/-> *(ebp+0xc) 1/r32/ecx
26194
26195 (lookup *(ecx+4) *(ecx+8))
26196 (write-buffered *(ebp+8) %eax)
26197
26198
26199 (lookup *(ecx+0xc) *(ecx+0x10))
26200 {
26201
26202 3d/compare-eax-and 0/imm32
26203 74/jump-if-= break/disp8
26204
26205 (emit-subx-call-operand *(ebp+8) %eax)
26206
26207 (lookup *(eax+8) *(eax+0xc))
26208 eb/jump loop/disp8
26209 }
26210
26211 (write-buffered *(ebp+8) ")\n")
26212 $emit-call:end:
26213
26214 59/pop-to-ecx
26215 58/pop-to-eax
26216
26217 89/<- %esp 5/r32/ebp
26218 5d/pop-to-ebp
26219 c3/return
26220
26221 emit-subx-call-operand:
26222
26223
26224 55/push-ebp
26225 89/<- %ebp 4/r32/esp
26226
26227 50/push-eax
26228 51/push-ecx
26229 56/push-esi
26230
26231 8b/-> *(ebp+0xc) 1/r32/ecx
26232
26233 (lookup *ecx *(ecx+4))
26234 89/<- %esi 0/r32/eax
26235
26236 {
26237 $emit-subx-call-operand:check-for-register-direct:
26238 81 7/subop/compare *(esi+0x18) 0/imm32
26239 74/jump-if-= break/disp8
26240 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26241 75/jump-if-!= break/disp8
26242 $emit-subx-call-operand:register-direct:
26243 (write-buffered *(ebp+8) " %")
26244 (lookup *(esi+0x18) *(esi+0x1c))
26245 (write-buffered *(ebp+8) %eax)
26246 e9/jump $emit-subx-call-operand:end/disp32
26247 }
26248
26249 {
26250 $emit-subx-call-operand:check-for-register-indirect:
26251 81 7/subop/compare *(esi+0x18) 0/imm32
26252 74/jump-if-= break/disp8
26253 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26254 74/jump-if-= break/disp8
26255 $emit-subx-call-operand:register-indirect:
26256 (emit-subx-call-operand-register-indirect *(ebp+8) %esi)
26257 e9/jump $emit-subx-call-operand:end/disp32
26258 }
26259
26260 {
26261 81 7/subop/compare *(esi+0x14) 0/imm32
26262 74/jump-if-= break/disp8
26263 $emit-subx-call-operand:stack:
26264 (emit-subx-call-operand-stack *(ebp+8) %esi)
26265 e9/jump $emit-subx-call-operand:end/disp32
26266 }
26267
26268 {
26269 (lookup *(esi+8) *(esi+0xc))
26270 81 7/subop/compare *(eax+4) 0/imm32
26271 75/jump-if-!= break/disp8
26272 $emit-subx-call-operand:literal:
26273 (write-buffered *(ebp+8) Space)
26274 (lookup *esi *(esi+4))
26275 (write-buffered *(ebp+8) %eax)
26276 }
26277 $emit-subx-call-operand:end:
26278
26279 5e/pop-to-esi
26280 59/pop-to-ecx
26281 58/pop-to-eax
26282
26283 89/<- %esp 5/r32/ebp
26284 5d/pop-to-ebp
26285 c3/return
26286
26287 emit-subx-call-operand-register-indirect:
26288
26289 55/push-ebp
26290 89/<- %ebp 4/r32/esp
26291
26292 50/push-eax
26293 51/push-ecx
26294 56/push-esi
26295
26296 8b/-> *(ebp+0xc) 6/r32/esi
26297
26298 (size-of-deref %esi)
26299 89/<- %ecx 0/r32/eax
26300
26301 (lookup *(esi+0x18) *(esi+0x1c))
26302 89/<- %esi 0/r32/eax
26303
26304
26305 b8/copy-to-eax 0/imm32
26306 {
26307 $emit-subx-call-operand-register-indirect:loop:
26308
26309 39/compare %eax 1/r32/ecx
26310 7d/jump-if->= break/disp8
26311
26312 (write-buffered *(ebp+8) " *(")
26313 (write-buffered *(ebp+8) %esi)
26314 (write-buffered *(ebp+8) "+")
26315 (write-int32-hex-buffered *(ebp+8) %eax)
26316 (write-buffered *(ebp+8) ")")
26317
26318 05/add-to-eax 4/imm32
26319
26320 eb/jump loop/disp8
26321 }
26322 $emit-subx-call-operand-register-indirect:end:
26323
26324 5e/pop-to-esi
26325 59/pop-to-ecx
26326 58/pop-to-eax
26327
26328 89/<- %esp 5/r32/ebp
26329 5d/pop-to-ebp
26330 c3/return
26331
26332 emit-subx-call-operand-stack:
26333
26334 55/push-ebp
26335 89/<- %ebp 4/r32/esp
26336
26337 50/push-eax
26338 51/push-ecx
26339 56/push-esi
26340
26341 8b/-> *(ebp+0xc) 6/r32/esi
26342
26343 8b/-> *(esi+0x14) 1/r32/ecx
26344
26345 (size-of %esi)
26346
26347 01/add-to %eax 1/r32/ecx
26348 {
26349 $emit-subx-call-operand-stack:loop:
26350
26351 39/compare %ecx 0/r32/eax
26352 7d/jump-if->= break/disp8
26353
26354 (write-buffered *(ebp+8) " *(ebp+")
26355 (write-int32-hex-buffered *(ebp+8) %ecx)
26356 (write-buffered *(ebp+8) ")")
26357
26358 81 0/subop/add %ecx 4/imm32
26359
26360 eb/jump loop/disp8
26361 }
26362 $emit-subx-call-operand-stack:end:
26363
26364 5e/pop-to-esi
26365 59/pop-to-ecx
26366 58/pop-to-eax
26367
26368 89/<- %esp 5/r32/ebp
26369 5d/pop-to-ebp
26370 c3/return
26371
26372 emit-subx-var-as-rm32:
26373
26374 55/push-ebp
26375 89/<- %ebp 4/r32/esp
26376
26377 50/push-eax
26378 51/push-ecx
26379 56/push-esi
26380
26381 8b/-> *(ebp+0xc) 1/r32/ecx
26382
26383 (lookup *ecx *(ecx+4))
26384 89/<- %esi 0/r32/eax
26385
26386 {
26387 $emit-subx-var-as-rm32:check-for-register-indirect:
26388 81 7/subop/compare *(esi+0x18) 0/imm32
26389 74/jump-if-= break/disp8
26390 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26391 74/jump-if-= break/disp8
26392 $emit-subx-var-as-rm32:register-indirect:
26393 (write-buffered *(ebp+8) " *")
26394 (lookup *(esi+0x18) *(esi+0x1c))
26395 (write-buffered *(ebp+8) %eax)
26396 e9/jump $emit-subx-var-as-rm32:end/disp32
26397 }
26398
26399 {
26400 $emit-subx-var-as-rm32:check-for-register-direct:
26401 81 7/subop/compare *(esi+0x18) 0/imm32
26402 74/jump-if-= break/disp8
26403 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26404 75/jump-if-!= break/disp8
26405 $emit-subx-var-as-rm32:register-direct:
26406 (write-buffered *(ebp+8) " %")
26407 (lookup *(esi+0x18) *(esi+0x1c))
26408 (write-buffered *(ebp+8) %eax)
26409 e9/jump $emit-subx-var-as-rm32:end/disp32
26410 }
26411
26412 {
26413 81 7/subop/compare *(esi+0x14) 0/imm32
26414 74/jump-if-= break/disp8
26415 $emit-subx-var-as-rm32:stack:
26416 (write-buffered *(ebp+8) Space)
26417 (write-buffered *(ebp+8) "*(ebp+")
26418 (write-int32-hex-buffered *(ebp+8) *(esi+0x14))
26419 (write-buffered *(ebp+8) ")")
26420 }
26421 $emit-subx-var-as-rm32:end:
26422
26423 5e/pop-to-esi
26424 59/pop-to-ecx
26425 58/pop-to-eax
26426
26427 89/<- %esp 5/r32/ebp
26428 5d/pop-to-ebp
26429 c3/return
26430
26431 find-matching-primitive:
26432
26433 55/push-ebp
26434 89/<- %ebp 4/r32/esp
26435
26436 51/push-ecx
26437
26438 8b/-> *(ebp+8) 1/r32/ecx
26439 {
26440 $find-matching-primitive:loop:
26441
26442 81 7/subop/compare %ecx 0/imm32
26443 74/jump-if-= break/disp8
26444
26445 {
26446 (mu-stmt-matches-primitive? *(ebp+0xc) %ecx)
26447 3d/compare-eax-and 0/imm32/false
26448 74/jump-if-= break/disp8
26449 89/<- %eax 1/r32/ecx
26450 eb/jump $find-matching-primitive:end/disp8
26451 }
26452 $find-matching-primitive:next-primitive:
26453
26454 (lookup *(ecx+0x3c) *(ecx+0x40))
26455 89/<- %ecx 0/r32/eax
26456
26457 e9/jump loop/disp32
26458 }
26459
26460 b8/copy-to-eax 0/imm32
26461 $find-matching-primitive:end:
26462
26463 59/pop-to-ecx
26464
26465 89/<- %esp 5/r32/ebp
26466 5d/pop-to-ebp
26467 c3/return
26468
26469 mu-stmt-matches-primitive?:
26470
26471
26472
26473
26474
26475
26476 55/push-ebp
26477 89/<- %ebp 4/r32/esp
26478
26479 51/push-ecx
26480 52/push-edx
26481 53/push-ebx
26482 56/push-esi
26483 57/push-edi
26484
26485 8b/-> *(ebp+8) 1/r32/ecx
26486
26487 8b/-> *(ebp+0xc) 2/r32/edx
26488 {
26489 $mu-stmt-matches-primitive?:check-name:
26490
26491
26492 (lookup *(ecx+4) *(ecx+8))
26493 89/<- %esi 0/r32/eax
26494
26495 (lookup *edx *(edx+4))
26496
26497
26498
26499 89/<- %edi 0/r32/eax
26500 (string-equal? %esi %edi)
26501 3d/compare-eax-and 0/imm32/false
26502 75/jump-if-!= break/disp8
26503 b8/copy-to-eax 0/imm32
26504 e9/jump $mu-stmt-matches-primitive?:end/disp32
26505 }
26506
26507 (lookup *(ecx+0xc) *(ecx+0x10))
26508 89/<- %esi 0/r32/eax
26509
26510 (lookup *(edx+8) *(edx+0xc))
26511 89/<- %edi 0/r32/eax
26512 {
26513 $mu-stmt-matches-primitive?:inouts-loop:
26514
26515 {
26516 $mu-stmt-matches-primitive?:check-both-inouts-null:
26517 81 7/subop/compare %esi 0/imm32
26518 75/jump-if-!= break/disp8
26519 $mu-stmt-matches-primitive?:stmt-inout-null:
26520 81 7/subop/compare %edi 0/imm32
26521 0f 84/jump-if-= $mu-stmt-matches-primitive?:check-outputs/disp32
26522 $mu-stmt-matches-primitive?:stmt-inout-null-and-prim-inout-not-null:
26523
26524 b8/copy-to-eax 0/imm32/false
26525 e9/jump $mu-stmt-matches-primitive?:end/disp32
26526 }
26527
26528 {
26529 $mu-stmt-matches-primitive?:check-prim-inout-null:
26530 81 7/subop/compare %edi 0/imm32
26531 75/jump-if-!= break/disp8
26532 $mu-stmt-matches-primitive?:prim-inout-null:
26533 b8/copy-to-eax 0/imm32/false
26534 e9/jump $mu-stmt-matches-primitive?:end/disp32
26535 }
26536
26537 {
26538 $mu-stmt-matches-primitive?:check-inouts-match:
26539 (lookup *edi *(edi+4))
26540 (operand-matches-primitive? %esi %eax)
26541 3d/compare-eax-and 0/imm32/false
26542 75/jump-if-!= break/disp8
26543 $mu-stmt-matches-primitive?:inouts-match:
26544 b8/copy-to-eax 0/imm32/false
26545 e9/jump $mu-stmt-matches-primitive?:end/disp32
26546 }
26547 $mu-stmt-matches-primitive?:next-inout:
26548
26549 (lookup *(esi+8) *(esi+0xc))
26550 89/<- %esi 0/r32/eax
26551
26552 (lookup *(edi+8) *(edi+0xc))
26553 89/<- %edi 0/r32/eax
26554
26555 e9/jump loop/disp32
26556 }
26557 $mu-stmt-matches-primitive?:check-outputs:
26558
26559 (lookup *(ecx+0x14) *(ecx+0x18))
26560 89/<- %esi 0/r32/eax
26561
26562 (lookup *(edx+0x10) *(edx+0x14))
26563 89/<- %edi 0/r32/eax
26564 {
26565 $mu-stmt-matches-primitive?:outputs-loop:
26566
26567 {
26568 $mu-stmt-matches-primitive?:check-both-outputs-null:
26569 81 7/subop/compare %esi 0/imm32
26570 75/jump-if-!= break/disp8
26571 {
26572 $mu-stmt-matches-primitive?:stmt-output-null:
26573 81 7/subop/compare %edi 0/imm32
26574 75/jump-if-!= break/disp8
26575 $mu-stmt-matches-primitive?:both-outputs-null:
26576
26577 b8/copy-to-eax 1/imm32
26578 e9/jump $mu-stmt-matches-primitive?:end/disp32
26579 }
26580 $mu-stmt-matches-primitive?:stmt-output-null-and-prim-output-not-null:
26581
26582 b8/copy-to-eax 0/imm32
26583 e9/jump $mu-stmt-matches-primitive?:end/disp32
26584 }
26585
26586 {
26587 $mu-stmt-matches-primitive?:check-prim-output-null:
26588 81 7/subop/compare %edi 0/imm32
26589 75/jump-if-!= break/disp8
26590 $mu-stmt-matches-primitive?:prim-output-is-null:
26591 b8/copy-to-eax 0/imm32
26592 e9/jump $mu-stmt-matches-primitive?:end/disp32
26593 }
26594
26595 {
26596 $mu-stmt-matches-primitive?:check-outputs-match:
26597 (lookup *edi *(edi+4))
26598 (operand-matches-primitive? %esi %eax)
26599 3d/compare-eax-and 0/imm32/false
26600 75/jump-if-!= break/disp8
26601 $mu-stmt-matches-primitive?:outputs-match:
26602 b8/copy-to-eax 0/imm32
26603 e9/jump $mu-stmt-matches-primitive?:end/disp32
26604 }
26605 $mu-stmt-matches-primitive?:next-output:
26606
26607 (lookup *(esi+8) *(esi+0xc))
26608 89/<- %esi 0/r32/eax
26609
26610 (lookup *(edi+8) *(edi+0xc))
26611 89/<- %edi 0/r32/eax
26612
26613 e9/jump loop/disp32
26614 }
26615 $mu-stmt-matches-primitive?:return-true:
26616 b8/copy-to-eax 1/imm32
26617 $mu-stmt-matches-primitive?:end:
26618
26619 5f/pop-to-edi
26620 5e/pop-to-esi
26621 5b/pop-to-ebx
26622 5a/pop-to-edx
26623 59/pop-to-ecx
26624
26625 89/<- %esp 5/r32/ebp
26626 5d/pop-to-ebp
26627 c3/return
26628
26629 operand-matches-primitive?:
26630
26631 55/push-ebp
26632 89/<- %ebp 4/r32/esp
26633
26634 51/push-ecx
26635 52/push-edx
26636 53/push-ebx
26637 56/push-esi
26638 57/push-edi
26639
26640 8b/-> *(ebp+8) 1/r32/ecx
26641
26642 (lookup *ecx *(ecx+4))
26643 89/<- %esi 0/r32/eax
26644
26645 8b/-> *(ebp+0xc) 7/r32/edi
26646 $operand-matches-primitive?:check-type:
26647
26648
26649 (lookup *(esi+8) *(esi+0xc))
26650 89/<- %ebx 0/r32/eax
26651
26652 {
26653 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26654 74/jump-if-= break/disp8
26655 $operand-matches-primitive?:is-deref:
26656
26657 (lookup *(ebx+0xc) *(ebx+0x10))
26658
26659 81 7/subop/compare *eax 0/imm32/false
26660 {
26661 75/jump-if-!= break/disp8
26662 (lookup *(eax+4) *(eax+8))
26663 }
26664
26665 89/<- %ebx 0/r32/eax
26666 }
26667
26668 (lookup *(edi+8) *(edi+0xc))
26669 (subx-type-category-match? %ebx %eax)
26670 3d/compare-eax-and 0/imm32/false
26671 0f 84/jump-if-= $operand-matches-primitive?:return-false/disp32
26672 {
26673 $operand-matches-primitive?:check-register:
26674
26675 {
26676 81 7/subop/compare *(edi+0x18) 0/imm32
26677 0f 85/jump-if-!= break/disp32
26678 81 7/subop/compare *(esi+0x18) 0/imm32
26679 74/jump-if-= break/disp8
26680 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26681 74/jump-if-= break/disp8
26682 $operand-matches-primitive?:var-deref-match:
26683 e9/jump $operand-matches-primitive?:return-true/disp32
26684 }
26685
26686 {
26687 81 7/subop/compare *(edi+0x18) 0/imm32
26688 0f 84/jump-if-= break/disp32
26689 81 7/subop/compare *(esi+0x18) 0/imm32
26690 0f 84/jump-if-= break/disp32
26691 81 7/subop/compare *(ecx+0x10) 0/imm32/false
26692 74/jump-if-= break/disp8
26693 $operand-matches-primitive?:var-deref-no-match:
26694 e9/jump $operand-matches-primitive?:return-false/disp32
26695 }
26696
26697 {
26698
26699
26700 (lookup *(esi+0x18) *(esi+0x1c))
26701 89/<- %ebx 0/r32/eax
26702
26703 (lookup *(edi+0x18) *(edi+0x1c))
26704 89/<- %ecx 0/r32/eax
26705
26706 39/compare %ecx 3/r32/ebx
26707 74/jump-if-= break/disp8
26708 $operand-matches-primitive?:var-register-no-match:
26709
26710 81 7/subop/compare %ebx 0/imm32
26711 74/jump-if-= $operand-matches-primitive?:return-false/disp8
26712 81 7/subop/compare %ecx 0/imm32
26713 74/jump-if-= $operand-matches-primitive?:return-false/disp8
26714
26715 (string-equal? %ecx "*")
26716 3d/compare-eax-and 0/imm32/false
26717 75/jump-if-!= break/disp8
26718 $operand-matches-primitive?:wildcard-no-match:
26719
26720 (string-equal? %ecx %ebx)
26721 3d/compare-eax-and 0/imm32/false
26722 74/jump-if-= $operand-matches-primitive?:return-false/disp8
26723 }
26724 }
26725 $operand-matches-primitive?:return-true:
26726 b8/copy-to-eax 1/imm32/true
26727 eb/jump $operand-matches-primitive?:end/disp8
26728 $operand-matches-primitive?:return-false:
26729 b8/copy-to-eax 0/imm32/false
26730 $operand-matches-primitive?:end:
26731
26732 5f/pop-to-edi
26733 5e/pop-to-esi
26734 5b/pop-to-ebx
26735 5a/pop-to-edx
26736 59/pop-to-ecx
26737
26738 89/<- %esp 5/r32/ebp
26739 5d/pop-to-ebp
26740 c3/return
26741
26742 find-matching-function:
26743
26744 55/push-ebp
26745 89/<- %ebp 4/r32/esp
26746
26747 51/push-ecx
26748
26749 8b/-> *(ebp+8) 1/r32/ecx
26750 {
26751
26752 81 7/subop/compare %ecx 0/imm32
26753 74/jump-if-= break/disp8
26754
26755
26756
26757 {
26758 (mu-stmt-matches-function? *(ebp+0xc) %ecx)
26759 3d/compare-eax-and 0/imm32/false
26760 74/jump-if-= break/disp8
26761 89/<- %eax 1/r32/ecx
26762 eb/jump $find-matching-function:end/disp8
26763 }
26764
26765 (lookup *(ecx+0x20) *(ecx+0x24))
26766 89/<- %ecx 0/r32/eax
26767
26768 eb/jump loop/disp8
26769 }
26770
26771 b8/copy-to-eax 0/imm32
26772 $find-matching-function:end:
26773
26774 59/pop-to-ecx
26775
26776 89/<- %esp 5/r32/ebp
26777 5d/pop-to-ebp
26778 c3/return
26779
26780
26781 mu-stmt-matches-function?:
26782
26783 55/push-ebp
26784 89/<- %ebp 4/r32/esp
26785
26786 51/push-ecx
26787
26788
26789 8b/-> *(ebp+8) 0/r32/eax
26790 (lookup *(eax+4) *(eax+8))
26791 89/<- %ecx 0/r32/eax
26792
26793 8b/-> *(ebp+0xc) 0/r32/eax
26794 (lookup *eax *(eax+4))
26795 (string-equal? %eax %ecx)
26796 $mu-stmt-matches-function?:end:
26797
26798 59/pop-to-ecx
26799
26800 89/<- %esp 5/r32/ebp
26801 5d/pop-to-ebp
26802 c3/return
26803
26804
26805
26806 subx-type-category-match?:
26807
26808 55/push-ebp
26809 89/<- %ebp 4/r32/esp
26810
26811 51/push-ecx
26812
26813 (type-category *(ebp+8))
26814 89/<- %ecx 0/r32/eax
26815
26816 (type-category *(ebp+0xc))
26817
26818 39/compare %eax 1/r32/ecx
26819 0f 94/set-byte-if-= %al
26820 81 4/subop/and %eax 0xff/imm32
26821 $subx-type-category-match?:end:
26822
26823 59/pop-to-ecx
26824
26825 89/<- %esp 5/r32/ebp
26826 5d/pop-to-ebp
26827 c3/return
26828
26829 type-category:
26830
26831 55/push-ebp
26832 89/<- %ebp 4/r32/esp
26833
26834 51/push-ecx
26835
26836 (is-simple-mu-type? *(ebp+8) 0)
26837 89/<- %ecx 0/r32/eax
26838
26839 (is-simple-mu-type? *(ebp+8) 0xf)
26840
26841 c1/shift 4/subop/left %ecx 1/imm8
26842 09/or %eax 1/r32/ecx
26843 $type-category:end:
26844
26845 59/pop-to-ecx
26846
26847 89/<- %esp 5/r32/ebp
26848 5d/pop-to-ebp
26849 c3/return
26850
26851 is-simple-mu-type?:
26852
26853 55/push-ebp
26854 89/<- %ebp 4/r32/esp
26855
26856 51/push-ecx
26857
26858 8b/-> *(ebp+0xc) 1/r32/ecx
26859
26860 8b/-> *(ebp+8) 0/r32/eax
26861 39/compare *(eax+4) 1/r32/ecx
26862 0f 94/set-byte-if-= %al
26863 81 4/subop/and %eax 0xff/imm32
26864 $is-simple-mu-type?:end:
26865
26866 59/pop-to-ecx
26867
26868 89/<- %esp 5/r32/ebp
26869 5d/pop-to-ebp
26870 c3/return
26871
26872 is-mu-addr-type?:
26873
26874 55/push-ebp
26875 89/<- %ebp 4/r32/esp
26876
26877 8b/-> *(ebp+8) 0/r32/eax
26878
26879 81 7/subop/compare *eax 0/imm32/false
26880 {
26881 75/jump-if-!= break/disp8
26882 (lookup *(eax+4) *(eax+8))
26883 }
26884
26885 81 7/subop/compare *(eax+4) 2/imm32/addr
26886 0f 94/set-byte-if-= %al
26887 81 4/subop/and %eax 0xff/imm32
26888 $is-mu-addr-type?:end:
26889
26890 89/<- %esp 5/r32/ebp
26891 5d/pop-to-ebp
26892 c3/return
26893
26894 is-mu-array-type?:
26895
26896 55/push-ebp
26897 89/<- %ebp 4/r32/esp
26898
26899 8b/-> *(ebp+8) 0/r32/eax
26900
26901 81 7/subop/compare *eax 0/imm32/false
26902 {
26903 75/jump-if-!= break/disp8
26904 (lookup *(eax+4) *(eax+8))
26905 }
26906
26907 81 7/subop/compare *(eax+4) 3/imm32/array
26908 0f 94/set-byte-if-= %al
26909 81 4/subop/and %eax 0xff/imm32
26910 $is-mu-array-type?:end:
26911
26912 89/<- %esp 5/r32/ebp
26913 5d/pop-to-ebp
26914 c3/return
26915
26916 is-mu-stream-type?:
26917
26918 55/push-ebp
26919 89/<- %ebp 4/r32/esp
26920
26921 8b/-> *(ebp+8) 0/r32/eax
26922
26923 81 7/subop/compare *eax 0/imm32/false
26924 {
26925 75/jump-if-!= break/disp8
26926 (lookup *(eax+4) *(eax+8))
26927 }
26928
26929 81 7/subop/compare *(eax+4) 0xb/imm32/stream
26930 0f 94/set-byte-if-= %al
26931 81 4/subop/and %eax 0xff/imm32
26932 $is-mu-stream-type?:end:
26933
26934 89/<- %esp 5/r32/ebp
26935 5d/pop-to-ebp
26936 c3/return
26937
26938 test-emit-subx-stmt-primitive:
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955 55/push-ebp
26956 89/<- %ebp 4/r32/esp
26957
26958 (clear-stream _test-output-stream)
26959 (clear-stream $_test-output-buffered-file->buffer)
26960
26961 $test-emit-subx-stmt-primitive:initialize-type:
26962
26963 68/push 0/imm32/right:null
26964 68/push 0/imm32/right:null
26965 68/push 0/imm32/left:unused
26966 68/push 1/imm32/value:int
26967 68/push 1/imm32/is-atom?:true
26968 68/push 0x11/imm32/alloc-id:fake:payload
26969 89/<- %ecx 4/r32/esp
26970 $test-emit-subx-stmt-primitive:initialize-var:
26971
26972 68/push 0/imm32/no-register
26973 68/push 0/imm32/no-register
26974 68/push -8/imm32/stack-offset
26975 68/push 1/imm32/block-depth
26976 51/push-ecx/type
26977 68/push 0x11/imm32/alloc-id:fake
26978 68/push 0/imm32/name
26979 68/push 0/imm32/name
26980 68/push 0x11/imm32/alloc-id:fake:payload
26981 89/<- %ecx 4/r32/esp
26982 $test-emit-subx-stmt-primitive:initialize-var-name:
26983
26984 8d/copy-address *(ecx+4) 0/r32/eax
26985 (copy-array Heap "foo" %eax)
26986 $test-emit-subx-stmt-primitive:initialize-stmt-var:
26987
26988 68/push 0/imm32/is-deref:false
26989 68/push 0/imm32/next
26990 68/push 0/imm32/next
26991 51/push-ecx/var-foo
26992 68/push 0x11/imm32/alloc-id:fake
26993 68/push 0x11/imm32/alloc-id:fake:payload
26994 89/<- %ebx 4/r32/esp
26995 $test-emit-subx-stmt-primitive:initialize-stmt:
26996
26997 68/push 0/imm32/no-outputs
26998 68/push 0/imm32/no-outputs
26999 53/push-ebx/inouts
27000 68/push 0x11/imm32/alloc-id:fake
27001 68/push 0/imm32/operation
27002 68/push 0/imm32/operation
27003 68/push 1/imm32/tag
27004 89/<- %esi 4/r32/esp
27005 $test-emit-subx-stmt-primitive:initialize-stmt-operation:
27006
27007 8d/copy-address *(esi+4) 0/r32/eax
27008 (copy-array Heap "increment" %eax)
27009 $test-emit-subx-stmt-primitive:initialize-primitive:
27010
27011 68/push 0/imm32/next
27012 68/push 0/imm32/next
27013 68/push 0/imm32/no-x32
27014 68/push 0/imm32/no-xm32
27015 68/push 0/imm32/no-disp32
27016 68/push 0/imm32/no-imm8
27017 68/push 0/imm32/no-imm32
27018 68/push 0/imm32/no-r32
27019 68/push 1/imm32/rm32-is-first-inout
27020 68/push 0/imm32/subx-name
27021 68/push 0/imm32/subx-name
27022 68/push 0/imm32/no-outputs
27023 68/push 0/imm32/no-outputs
27024 53/push-ebx/inouts
27025 68/push 0x11/imm32/alloc-id:fake
27026 68/push 0/imm32/name
27027 68/push 0/imm32/name
27028 89/<- %ebx 4/r32/esp
27029 $test-emit-subx-stmt-primitive:initialize-primitive-name:
27030
27031 (copy-array Heap "increment" %ebx)
27032 $test-emit-subx-stmt-primitive:initialize-primitive-subx-name:
27033
27034 8d/copy-address *(ebx+0x18) 0/r32/eax
27035 (copy-array Heap "ff 0/subop/increment" %eax)
27036
27037 c7 0/subop/copy *Curr-block-depth 0/imm32
27038 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
27039 (flush _test-output-buffered-file)
27040 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27046
27047 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-stmt-primitive")
27048
27049 89/<- %esp 5/r32/ebp
27050 5d/pop-to-ebp
27051 c3/return
27052
27053 test-emit-subx-stmt-primitive-register:
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070 55/push-ebp
27071 89/<- %ebp 4/r32/esp
27072
27073 (clear-stream _test-output-stream)
27074 (clear-stream $_test-output-buffered-file->buffer)
27075 $test-emit-subx-stmt-primitive-register:initialize-type:
27076
27077 68/push 0/imm32/right:null
27078 68/push 0/imm32/right:null
27079 68/push 0/imm32/left:unused
27080 68/push 1/imm32/value:int
27081 68/push 1/imm32/is-atom?:true
27082 68/push 0x11/imm32/alloc-id:fake:payload
27083 89/<- %ecx 4/r32/esp
27084 $test-emit-subx-stmt-primitive-register:initialize-var:
27085
27086 68/push 0/imm32/register
27087 68/push 0/imm32/register
27088 68/push 0/imm32/no-stack-offset
27089 68/push 1/imm32/block-depth
27090 51/push-ecx
27091 68/push 0x11/imm32/alloc-id:fake
27092 68/push 0/imm32/name
27093 68/push 0/imm32/name
27094 68/push 0x11/imm32/alloc-id:fake:payload
27095 89/<- %ecx 4/r32/esp
27096 $test-emit-subx-stmt-primitive-register:initialize-var-name:
27097
27098 8d/copy-address *(ecx+4) 0/r32/eax
27099 (copy-array Heap "foo" %eax)
27100 $test-emit-subx-stmt-primitive-register:initialize-var-register:
27101
27102 8d/copy-address *(ecx+0x1c) 0/r32/eax
27103 (copy-array Heap "eax" %eax)
27104 $test-emit-subx-stmt-primitive-register:initialize-stmt-var:
27105
27106 68/push 0/imm32/is-deref:false
27107 68/push 0/imm32/next
27108 68/push 0/imm32/next
27109 51/push-ecx/var-foo
27110 68/push 0x11/imm32/alloc-id:fake
27111 68/push 0x11/imm32/alloc-id:fake:payload
27112 89/<- %ebx 4/r32/esp
27113 $test-emit-subx-stmt-primitive-register:initialize-stmt:
27114
27115 53/push-ebx/outputs
27116 68/push 0x11/imm32/alloc-id:fake
27117 68/push 0/imm32/no-inouts
27118 68/push 0/imm32/no-inouts
27119 68/push 0/imm32/operation
27120 68/push 0/imm32/operation
27121 68/push 1/imm32
27122 89/<- %esi 4/r32/esp
27123 $test-emit-subx-stmt-primitive-register:initialize-stmt-operation:
27124
27125 8d/copy-address *(esi+4) 0/r32/eax
27126 (copy-array Heap "increment" %eax)
27127 $test-emit-subx-stmt-primitive-register:initialize-formal-var:
27128
27129 68/push 0/imm32/register
27130 68/push 0/imm32/register
27131 68/push 0/imm32/no-stack-offset
27132 68/push 1/imm32/block-depth
27133 ff 6/subop/push *(ecx+0x10)
27134 68/push 0x11/imm32/alloc-id:fake
27135 68/push 0/imm32/name
27136 68/push 0/imm32/name
27137 68/push 0x11/imm32/alloc-id:fake:payload
27138 89/<- %ebx 4/r32/esp
27139 $test-emit-subx-stmt-primitive-register:initialize-formal-var-name:
27140
27141 8d/copy-address *(ebx+4) 0/r32/eax
27142 (copy-array Heap "dummy" %eax)
27143 $test-emit-subx-stmt-primitive-register:initialize-formal-register:
27144
27145 8d/copy-address *(ebx+0x1c) 0/r32/eax
27146 (copy-array Heap "*" %eax)
27147 $test-emit-subx-stmt-primitive-register:initialize-var-list:
27148
27149 68/push 0/imm32/next
27150 68/push 0/imm32/next
27151 53/push-ebx/formal-var
27152 68/push 0x11/imm32/alloc-id:fake
27153 68/push 0x11/imm32/alloc-id:fake:payload
27154 89/<- %ebx 4/r32/esp
27155 $test-emit-subx-stmt-primitive-register:initialize-primitive:
27156
27157 68/push 0/imm32/next
27158 68/push 0/imm32/next
27159 68/push 0/imm32/no-x32
27160 68/push 0/imm32/no-xm32
27161 68/push 0/imm32/no-disp32
27162 68/push 0/imm32/no-imm8
27163 68/push 0/imm32/no-imm32
27164 68/push 0/imm32/no-r32
27165 68/push 3/imm32/rm32-is-first-output
27166 68/push 0/imm32/subx-name
27167 68/push 0/imm32/subx-name
27168 53/push-ebx/outputs
27169 68/push 0x11/imm32/alloc-id:fake
27170 68/push 0/imm32/no-inouts
27171 68/push 0/imm32/no-inouts
27172 68/push 0/imm32/name
27173 68/push 0/imm32/name
27174 89/<- %ebx 4/r32/esp
27175 $test-emit-subx-stmt-primitive-register:initialize-primitive-name:
27176
27177 (copy-array Heap "increment" %ebx)
27178 $test-emit-subx-stmt-primitive-register:initialize-primitive-subx-name:
27179
27180 8d/copy-address *(ebx+0x18) 0/r32/eax
27181 (copy-array Heap "ff 0/subop/increment" %eax)
27182
27183 c7 0/subop/copy *Curr-block-depth 0/imm32
27184 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
27185 (flush _test-output-buffered-file)
27186 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27192
27193 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-primitive-register")
27194
27195 89/<- %esp 5/r32/ebp
27196 5d/pop-to-ebp
27197 c3/return
27198
27199 test-emit-subx-stmt-select-primitive:
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219 55/push-ebp
27220 89/<- %ebp 4/r32/esp
27221
27222 (clear-stream _test-output-stream)
27223 (clear-stream $_test-output-buffered-file->buffer)
27224 $test-emit-subx-stmt-select-primitive:initialize-type:
27225
27226 68/push 0/imm32/right:null
27227 68/push 0/imm32/right:null
27228 68/push 0/imm32/left:unused
27229 68/push 1/imm32/value:int
27230 68/push 1/imm32/is-atom?:true
27231 68/push 0x11/imm32/alloc-id:fake:payload
27232 89/<- %ecx 4/r32/esp
27233 $test-emit-subx-stmt-select-primitive:initialize-var:
27234
27235 68/push 0/imm32/register
27236 68/push 0/imm32/register
27237 68/push 0/imm32/no-stack-offset
27238 68/push 1/imm32/block-depth
27239 51/push-ecx
27240 68/push 0x11/imm32/alloc-id:fake
27241 68/push 0/imm32/name
27242 68/push 0/imm32/name
27243 68/push 0x11/imm32/alloc-id:fake:payload
27244 89/<- %ecx 4/r32/esp
27245 $test-emit-subx-stmt-select-primitive:initialize-var-name:
27246
27247 8d/copy-address *(ecx+4) 0/r32/eax
27248 (copy-array Heap "foo" %eax)
27249 $test-emit-subx-stmt-select-primitive:initialize-var-register:
27250
27251 8d/copy-address *(ecx+0x1c) 0/r32/eax
27252 (copy-array Heap "eax" %eax)
27253 $test-emit-subx-stmt-select-primitive:initialize-stmt-var:
27254
27255 68/push 0/imm32/is-deref:false
27256 68/push 0/imm32/next
27257 68/push 0/imm32/next
27258 51/push-ecx/var-foo
27259 68/push 0x11/imm32/alloc-id:fake
27260 68/push 0x11/imm32/alloc-id:fake:payload
27261 89/<- %ebx 4/r32/esp
27262 $test-emit-subx-stmt-select-primitive:initialize-stmt:
27263
27264 53/push-ebx/outputs
27265 68/push 0x11/imm32/alloc-id:fake
27266 68/push 0/imm32/no-inouts
27267 68/push 0/imm32/no-inouts
27268 68/push 0/imm32/operation
27269 68/push 0/imm32/operation
27270 68/push 1/imm32
27271 89/<- %esi 4/r32/esp
27272 $test-emit-subx-stmt-select-primitive:initialize-stmt-operation:
27273
27274 8d/copy-address *(esi+4) 0/r32/eax
27275 (copy-array Heap "increment" %eax)
27276 $test-emit-subx-stmt-select-primitive:initialize-formal-var:
27277
27278 68/push 0/imm32/register
27279 68/push 0/imm32/register
27280 68/push 0/imm32/no-stack-offset
27281 68/push 1/imm32/block-depth
27282 ff 6/subop/push *(ecx+0x10)
27283 68/push 0x11/imm32/alloc-id:fake
27284 68/push 0/imm32/name
27285 68/push 0/imm32/name
27286 68/push 0x11/imm32/alloc-id:fake:payload
27287 89/<- %ebx 4/r32/esp
27288 $test-emit-subx-stmt-select-primitive:initialize-formal-var-name:
27289
27290 8d/copy-address *(ebx+4) 0/r32/eax
27291 (copy-array Heap "dummy" %eax)
27292 $test-emit-subx-stmt-select-primitive:initialize-formal-register:
27293
27294 8d/copy-address *(ebx+0x1c) 0/r32/eax
27295 (copy-array Heap "*" %eax)
27296 $test-emit-subx-stmt-select-primitive:initialize-var-list:
27297
27298 68/push 0/imm32/next
27299 68/push 0/imm32/next
27300 53/push-ebx/formal-var
27301 68/push 0x11/imm32/alloc-id:fake
27302 68/push 0x11/imm32/alloc-id:fake:payload
27303 89/<- %ebx 4/r32/esp
27304 $test-emit-subx-stmt-select-primitive:initialize-primitive2:
27305
27306 68/push 0/imm32/next
27307 68/push 0/imm32/next
27308 68/push 0/imm32/no-x32
27309 68/push 0/imm32/no-xm32
27310 68/push 0/imm32/no-disp32
27311 68/push 0/imm32/no-imm8
27312 68/push 0/imm32/no-imm32
27313 68/push 0/imm32/no-r32
27314 68/push 3/imm32/rm32-is-first-output
27315 68/push 0/imm32/subx-name
27316 68/push 0/imm32/subx-name
27317 53/push-ebx/outputs
27318 68/push 0x11/imm32/alloc-id:fake
27319 68/push 0/imm32/no-inouts
27320 68/push 0/imm32/no-inouts
27321 68/push 0/imm32/name
27322 68/push 0/imm32/name
27323 68/push 0x11/imm32/alloc-id:fake:payload
27324 89/<- %edi 4/r32/esp
27325 $test-emit-subx-stmt-select-primitive:initialize-primitive2-name:
27326
27327 8d/copy-address *(edi+4) 0/r32/eax
27328 (copy-array Heap "increment" %eax)
27329 $test-emit-subx-stmt-select-primitive:initialize-primitive2-subx-name:
27330
27331 8d/copy-address *(edi+0x1c) 0/r32/eax
27332 (copy-array Heap "ff 0/subop/increment" %eax)
27333 $test-emit-subx-stmt-select-primitive:initialize-primitive:
27334
27335 57/push-edi
27336 68/push 0x11/imm32/alloc-id:fake
27337 68/push 0/imm32/no-x32
27338 68/push 0/imm32/no-xm32
27339 68/push 0/imm32/no-disp32
27340 68/push 0/imm32/no-imm8
27341 68/push 0/imm32/no-imm32
27342 68/push 0/imm32/no-r32
27343 68/push 1/imm32/rm32-is-first-inout
27344 68/push 0/imm32/subx-name
27345 68/push 0/imm32/subx-name
27346 68/push 0/imm32/no-outputs
27347 68/push 0/imm32/no-outputs
27348 53/push-ebx/inouts
27349 68/push 0x11/imm32/alloc-id:fake
27350 68/push 0/imm32/name
27351 68/push 0/imm32/name
27352 89/<- %ebx 4/r32/esp
27353 $test-emit-subx-stmt-select-primitive:initialize-primitive-name:
27354
27355 (copy-array Heap "increment" %ebx)
27356 $test-emit-subx-stmt-select-primitive:initialize-primitive-subx-name:
27357
27358 8d/copy-address *(ebx+0x18) 0/r32/eax
27359 (copy-array Heap "ff 0/subop/increment" %eax)
27360
27361 c7 0/subop/copy *Curr-block-depth 0/imm32
27362 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
27363 (flush _test-output-buffered-file)
27364 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27370
27371 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive")
27372
27373 89/<- %esp 5/r32/ebp
27374 5d/pop-to-ebp
27375 c3/return
27376
27377 test-emit-subx-stmt-select-primitive-2:
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397 55/push-ebp
27398 89/<- %ebp 4/r32/esp
27399
27400 (clear-stream _test-output-stream)
27401 (clear-stream $_test-output-buffered-file->buffer)
27402 $test-emit-subx-stmt-select-primitive-2:initialize-type:
27403
27404 68/push 0/imm32/right:null
27405 68/push 0/imm32/right:null
27406 68/push 0/imm32/left:unused
27407 68/push 1/imm32/value:int
27408 68/push 1/imm32/is-atom?:true
27409 68/push 0x11/imm32/alloc-id:fake:payload
27410 89/<- %ecx 4/r32/esp
27411 $test-emit-subx-stmt-select-primitive-2:initialize-var:
27412
27413 68/push 0/imm32/register
27414 68/push 0/imm32/register
27415 68/push 0/imm32/no-stack-offset
27416 68/push 1/imm32/block-depth
27417 51/push-ecx
27418 68/push 0x11/imm32/alloc-id:fake
27419 68/push 0/imm32/name
27420 68/push 0/imm32/name
27421 68/push 0x11/imm32/alloc-id:fake:payload
27422 89/<- %ecx 4/r32/esp
27423 $test-emit-subx-stmt-select-primitive-2:initialize-var-name:
27424
27425 8d/copy-address *(ecx+4) 0/r32/eax
27426 (copy-array Heap "foo" %eax)
27427 $test-emit-subx-stmt-select-primitive-2:initialize-var-register:
27428
27429 8d/copy-address *(ecx+0x1c) 0/r32/eax
27430 (copy-array Heap "eax" %eax)
27431 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-var:
27432
27433 68/push 0/imm32/is-deref:false
27434 68/push 0/imm32/next
27435 68/push 0/imm32/next
27436 51/push-ecx/var-foo
27437 68/push 0x11/imm32/alloc-id:fake
27438 68/push 0x11/imm32/alloc-id:fake:payload
27439 89/<- %ebx 4/r32/esp
27440 $test-emit-subx-stmt-select-primitive-2:initialize-stmt:
27441
27442 68/push 0/imm32/no-outputs
27443 68/push 0/imm32/no-outputs
27444 53/push-ebx/inouts
27445 68/push 0x11/imm32/alloc-id:fake
27446 68/push 0/imm32/operation
27447 68/push 0/imm32/operation
27448 68/push 1/imm32
27449 89/<- %esi 4/r32/esp
27450 $test-emit-subx-stmt-select-primitive-2:initialize-stmt-operation:
27451
27452 8d/copy-address *(esi+4) 0/r32/eax
27453 (copy-array Heap "increment" %eax)
27454 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var:
27455
27456 68/push 0/imm32/register
27457 68/push 0/imm32/register
27458 68/push 0/imm32/no-stack-offset
27459 68/push 1/imm32/block-depth
27460 ff 6/subop/push *(ecx+0x10)
27461 68/push 0x11/imm32/alloc-id:fake
27462 68/push 0/imm32/name
27463 68/push 0/imm32/name
27464 68/push 0x11/imm32/alloc-id:fake:payload
27465 89/<- %ebx 4/r32/esp
27466 $test-emit-subx-stmt-select-primitive-2:initialize-formal-var-name:
27467
27468 8d/copy-address *(ebx+4) 0/r32/eax
27469 (copy-array Heap "dummy" %eax)
27470 $test-emit-subx-stmt-select-primitive-2:initialize-formal-register:
27471
27472 8d/copy-address *(ebx+0x1c) 0/r32/eax
27473 (copy-array Heap "*" %eax)
27474 $test-emit-subx-stmt-select-primitive-2:initialize-var-list:
27475
27476 68/push 0/imm32/next
27477 68/push 0/imm32/next
27478 53/push-ebx/formal-var
27479 68/push 0x11/imm32/alloc-id:fake
27480 68/push 0x11/imm32/alloc-id:fake:payload
27481 89/<- %ebx 4/r32/esp
27482 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2:
27483
27484 68/push 0/imm32/next
27485 68/push 0/imm32/next
27486 68/push 0/imm32/no-x32
27487 68/push 0/imm32/no-xm32
27488 68/push 0/imm32/no-disp32
27489 68/push 0/imm32/no-imm8
27490 68/push 0/imm32/no-imm32
27491 68/push 0/imm32/no-r32
27492 68/push 3/imm32/rm32-is-first-output
27493 68/push 0/imm32/subx-name
27494 68/push 0/imm32/subx-name
27495 53/push-ebx/outputs
27496 68/push 0x11/imm32/alloc-id:fake
27497 68/push 0/imm32/no-inouts
27498 68/push 0/imm32/no-inouts
27499 68/push 0/imm32/name
27500 68/push 0/imm32/name
27501 68/push 0x11/imm32/alloc-id:fake:payload
27502 89/<- %edi 4/r32/esp
27503 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-name:
27504
27505 8d/copy-address *(edi+4) 0/r32/eax
27506 (copy-array Heap "increment" %eax)
27507 $test-emit-subx-stmt-select-primitive-2:initialize-primitive2-subx-name:
27508
27509 8d/copy-address *(edi+0x1c) 0/r32/eax
27510 (copy-array Heap "ff 0/subop/increment" %eax)
27511 $test-emit-subx-stmt-select-primitive-2:initialize-primitive:
27512
27513 57/push-edi
27514 68/push 0x11/imm32/alloc-id:fake
27515 68/push 0/imm32/no-x32
27516 68/push 0/imm32/no-xm32
27517 68/push 0/imm32/no-disp32
27518 68/push 0/imm32/no-imm8
27519 68/push 0/imm32/no-imm32
27520 68/push 0/imm32/no-r32
27521 68/push 1/imm32/rm32-is-first-inout
27522 68/push 0/imm32/subx-name
27523 68/push 0/imm32/subx-name
27524 68/push 0/imm32/no-outputs
27525 68/push 0/imm32/no-outputs
27526 53/push-ebx/inouts
27527 68/push 0x11/imm32/alloc-id:fake
27528 68/push 0/imm32/name
27529 68/push 0/imm32/name
27530 89/<- %ebx 4/r32/esp
27531 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-name:
27532
27533 (copy-array Heap "increment" %ebx)
27534 $test-emit-subx-stmt-select-primitive-2:initialize-primitive-subx-name:
27535
27536 8d/copy-address *(ebx+0x18) 0/r32/eax
27537 (copy-array Heap "ff 0/subop/increment" %eax)
27538
27539 c7 0/subop/copy *Curr-block-depth 0/imm32
27540 (emit-subx-stmt _test-output-buffered-file %esi %ebx Stderr 0)
27541 (flush _test-output-buffered-file)
27542 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27548
27549 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-stmt-select-primitive-2")
27550
27551 89/<- %esp 5/r32/ebp
27552 5d/pop-to-ebp
27553 c3/return
27554
27555 test-increment-register:
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569 55/push-ebp
27570 89/<- %ebp 4/r32/esp
27571
27572 (clear-stream _test-output-stream)
27573 (clear-stream $_test-output-buffered-file->buffer)
27574 $test-increment-register:initialize-type:
27575
27576 68/push 0/imm32/right:null
27577 68/push 0/imm32/right:null
27578 68/push 0/imm32/left:unused
27579 68/push 1/imm32/value:int
27580 68/push 1/imm32/is-atom?:true
27581 68/push 0x11/imm32/alloc-id:fake:payload
27582 89/<- %ecx 4/r32/esp
27583 $test-increment-register:initialize-var:
27584
27585 68/push 0/imm32/register
27586 68/push 0/imm32/register
27587 68/push 0/imm32/no-stack-offset
27588 68/push 1/imm32/block-depth
27589 51/push-ecx
27590 68/push 0x11/imm32/alloc-id:fake
27591 68/push 0/imm32/name
27592 68/push 0/imm32/name
27593 68/push 0x11/imm32/alloc-id:fake:payload
27594 89/<- %ecx 4/r32/esp
27595 $test-increment-register:initialize-var-name:
27596
27597 8d/copy-address *(ecx+4) 0/r32/eax
27598 (copy-array Heap "foo" %eax)
27599 $test-increment-register:initialize-var-register:
27600
27601 8d/copy-address *(ecx+0x1c) 0/r32/eax
27602 (copy-array Heap "eax" %eax)
27603 $test-increment-register:initialize-stmt-var:
27604
27605 68/push 0/imm32/is-deref:false
27606 68/push 0/imm32/next
27607 68/push 0/imm32/next
27608 51/push-ecx/var-foo
27609 68/push 0x11/imm32/alloc-id:fake
27610 68/push 0x11/imm32/alloc-id:fake:payload
27611 89/<- %ebx 4/r32/esp
27612 $test-increment-register:initialize-stmt:
27613
27614 53/push-ebx/outputs
27615 68/push 0x11/imm32/alloc-id:fake
27616 68/push 0/imm32/no-inouts
27617 68/push 0/imm32/no-inouts
27618 68/push 0/imm32/operation
27619 68/push 0/imm32/operation
27620 68/push 1/imm32
27621 89/<- %esi 4/r32/esp
27622 $test-increment-register:initialize-stmt-operation:
27623
27624 8d/copy-address *(esi+4) 0/r32/eax
27625 (copy-array Heap "increment" %eax)
27626
27627 c7 0/subop/copy *Curr-block-depth 0/imm32
27628 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
27629 (flush _test-output-buffered-file)
27630 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27636
27637 (check-next-stream-line-equal _test-output-stream "40/increment-eax" "F - test-increment-register")
27638
27639 89/<- %esp 5/r32/ebp
27640 5d/pop-to-ebp
27641 c3/return
27642
27643 test-add-reg-to-reg:
27644
27645
27646
27647
27648
27649 55/push-ebp
27650 89/<- %ebp 4/r32/esp
27651
27652 (clear-stream _test-output-stream)
27653 (clear-stream $_test-output-buffered-file->buffer)
27654 $test-add-reg-to-reg:initialize-type:
27655
27656 68/push 0/imm32/right:null
27657 68/push 0/imm32/right:null
27658 68/push 0/imm32/left:unused
27659 68/push 1/imm32/value:int
27660 68/push 1/imm32/is-atom?:true
27661 68/push 0x11/imm32/alloc-id:fake:payload
27662 89/<- %ecx 4/r32/esp
27663 $test-add-reg-to-reg:initialize-var1:
27664
27665 68/push 0/imm32/register
27666 68/push 0/imm32/register
27667 68/push 0/imm32/no-stack-offset
27668 68/push 1/imm32/block-depth
27669 51/push-ecx
27670 68/push 0x11/imm32/alloc-id:fake
27671 68/push 0/imm32/name
27672 68/push 0/imm32/name
27673 68/push 0x11/imm32/alloc-id:fake:payload
27674 89/<- %ecx 4/r32/esp
27675 $test-add-reg-to-reg:initialize-var1-name:
27676
27677 8d/copy-address *(ecx+4) 0/r32/eax
27678 (copy-array Heap "var1" %eax)
27679 $test-add-reg-to-reg:initialize-var1-register:
27680
27681 8d/copy-address *(ecx+0x1c) 0/r32/eax
27682 (copy-array Heap "eax" %eax)
27683 $test-add-reg-to-reg:initialize-var2:
27684
27685 68/push 0/imm32/register
27686 68/push 0/imm32/register
27687 68/push 0/imm32/no-stack-offset
27688 68/push 1/imm32/block-depth
27689 ff 6/subop/push *(ecx+0x10)
27690 68/push 0x11/imm32/alloc-id:fake
27691 68/push 0/imm32/name
27692 68/push 0/imm32/name
27693 68/push 0x11/imm32/alloc-id:fake:payload
27694 89/<- %edx 4/r32/esp
27695 $test-add-reg-to-reg:initialize-var2-name:
27696
27697 8d/copy-address *(edx+4) 0/r32/eax
27698 (copy-array Heap "var2" %eax)
27699 $test-add-reg-to-reg:initialize-var2-register:
27700
27701 8d/copy-address *(edx+0x1c) 0/r32/eax
27702 (copy-array Heap "ecx" %eax)
27703 $test-add-reg-to-reg:initialize-inouts:
27704
27705 68/push 0/imm32/is-deref:false
27706 68/push 0/imm32/next
27707 68/push 0/imm32/next
27708 52/push-edx/var2
27709 68/push 0x11/imm32/alloc-id:fake
27710 68/push 0x11/imm32/alloc-id:fake:payload
27711 89/<- %esi 4/r32/esp
27712 $test-add-reg-to-reg:initialize-outputs:
27713
27714 68/push 0/imm32/is-deref:false
27715 68/push 0/imm32/next
27716 68/push 0/imm32/next
27717 51/push-ecx/var1
27718 68/push 0x11/imm32/alloc-id:fake
27719 68/push 0x11/imm32/alloc-id:fake:payload
27720 89/<- %edi 4/r32/esp
27721 $test-add-reg-to-reg:initialize-stmt:
27722
27723 68/push 0/imm32/next
27724 68/push 0/imm32/next
27725 57/push-edi/outputs
27726 68/push 0x11/imm32/alloc-id:fake
27727 56/push-esi/inouts
27728 68/push 0x11/imm32/alloc-id:fake
27729 68/push 0/imm32/operation
27730 68/push 0/imm32/operation
27731 68/push 1/imm32/tag:stmt1
27732 89/<- %esi 4/r32/esp
27733 $test-add-reg-to-reg:initialize-stmt-operation:
27734
27735 8d/copy-address *(esi+4) 0/r32/eax
27736 (copy-array Heap "add" %eax)
27737
27738 c7 0/subop/copy *Curr-block-depth 0/imm32
27739 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
27740 (flush _test-output-buffered-file)
27741 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27747
27748 (check-next-stream-line-equal _test-output-stream "01/add-to %eax 0x00000001/r32" "F - test-add-reg-to-reg")
27749
27750 89/<- %esp 5/r32/ebp
27751 5d/pop-to-ebp
27752 c3/return
27753
27754 test-add-reg-to-mem:
27755
27756
27757
27758
27759
27760 55/push-ebp
27761 89/<- %ebp 4/r32/esp
27762
27763 (clear-stream _test-output-stream)
27764 (clear-stream $_test-output-buffered-file->buffer)
27765 $test-add-reg-to-mem:initialize-type:
27766
27767 68/push 0/imm32/right:null
27768 68/push 0/imm32/right:null
27769 68/push 0/imm32/left:unused
27770 68/push 1/imm32/value:int
27771 68/push 1/imm32/is-atom?:true
27772 68/push 0x11/imm32/alloc-id:fake:payload
27773 89/<- %ecx 4/r32/esp
27774 $test-add-reg-to-mem:initialize-var1:
27775
27776 68/push 0/imm32/register
27777 68/push 0/imm32/register
27778 68/push 8/imm32/stack-offset
27779 68/push 1/imm32/block-depth
27780 51/push-ecx
27781 68/push 0x11/imm32/alloc-id:fake
27782 68/push 0/imm32/name
27783 68/push 0/imm32/name
27784 68/push 0x11/imm32/alloc-id:fake:payload
27785 89/<- %ecx 4/r32/esp
27786 $test-add-reg-to-mem:initialize-var1-name:
27787
27788 8d/copy-address *(ecx+4) 0/r32/eax
27789 (copy-array Heap "var1" %eax)
27790 $test-add-reg-to-mem:initialize-var2:
27791
27792 68/push 0/imm32/register
27793 68/push 0/imm32/register
27794 68/push 0/imm32/no-stack-offset
27795 68/push 1/imm32/block-depth
27796 ff 6/subop/push *(ecx+0x10)
27797 68/push 0x11/imm32/alloc-id:fake
27798 68/push 0/imm32/name
27799 68/push 0/imm32/name
27800 68/push 0x11/imm32/alloc-id:fake:payload
27801 89/<- %edx 4/r32/esp
27802 $test-add-reg-to-mem:initialize-var2-name:
27803
27804 8d/copy-address *(edx+4) 0/r32/eax
27805 (copy-array Heap "var2" %eax)
27806 $test-add-reg-to-mem:initialize-var2-register:
27807
27808 8d/copy-address *(edx+0x1c) 0/r32/eax
27809 (copy-array Heap "ecx" %eax)
27810 $test-add-reg-to-mem:initialize-inouts:
27811
27812 68/push 0/imm32/is-deref:false
27813 68/push 0/imm32/next
27814 68/push 0/imm32/next
27815 52/push-edx/var2
27816 68/push 0x11/imm32/alloc-id:fake
27817 68/push 0x11/imm32/alloc-id:fake:payload
27818 89/<- %esi 4/r32/esp
27819
27820 68/push 0/imm32/is-deref:false
27821 56/push-esi/next
27822 68/push 0x11/imm32/alloc-id:fake
27823 51/push-ecx/var1
27824 68/push 0x11/imm32/alloc-id:fake
27825 68/push 0x11/imm32/alloc-id:fake:payload
27826 89/<- %esi 4/r32/esp
27827 $test-add-reg-to-mem:initialize-stmt:
27828
27829 68/push 0/imm32/next
27830 68/push 0/imm32/next
27831 68/push 0/imm32/outputs
27832 68/push 0/imm32/outputs
27833 56/push-esi/inouts
27834 68/push 0x11/imm32/alloc-id:fake
27835 68/push 0/imm32/operation
27836 68/push 0/imm32/operation
27837 68/push 1/imm32/tag:stmt1
27838 89/<- %esi 4/r32/esp
27839 $test-add-reg-to-mem:initialize-stmt-operation:
27840
27841 8d/copy-address *(esi+4) 0/r32/eax
27842 (copy-array Heap "add-to" %eax)
27843
27844 c7 0/subop/copy *Curr-block-depth 0/imm32
27845 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
27846 (flush _test-output-buffered-file)
27847 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27853
27854 (check-next-stream-line-equal _test-output-stream "01/add-to *(ebp+0x00000008) 0x00000001/r32" "F - test-add-reg-to-mem")
27855
27856 89/<- %esp 5/r32/ebp
27857 5d/pop-to-ebp
27858 c3/return
27859
27860 test-add-mem-to-reg:
27861
27862
27863
27864
27865
27866 55/push-ebp
27867 89/<- %ebp 4/r32/esp
27868
27869 (clear-stream _test-output-stream)
27870 (clear-stream $_test-output-buffered-file->buffer)
27871 $test-add-mem-to-reg:initialize-type:
27872
27873 68/push 0/imm32/right:null
27874 68/push 0/imm32/right:null
27875 68/push 0/imm32/left:unused
27876 68/push 1/imm32/value:int
27877 68/push 1/imm32/is-atom?:true
27878 68/push 0x11/imm32/alloc-id:fake:payload
27879 89/<- %ecx 4/r32/esp
27880 $test-add-mem-to-reg:initialize-var:
27881
27882 68/push 0/imm32/register
27883 68/push 0/imm32/register
27884 68/push 0/imm32/no-stack-offset
27885 68/push 1/imm32/block-depth
27886 51/push-ecx
27887 68/push 0x11/imm32/alloc-id:fake
27888 68/push 0/imm32/name
27889 68/push 0/imm32/name
27890 68/push 0x11/imm32/alloc-id:fake:payload
27891 89/<- %ecx 4/r32/esp
27892 $test-add-mem-to-reg:initialize-var-name:
27893
27894 8d/copy-address *(ecx+4) 0/r32/eax
27895 (copy-array Heap "var1" %eax)
27896 $test-add-mem-to-reg:initialize-var-register:
27897
27898 8d/copy-address *(ecx+0x1c) 0/r32/eax
27899 (copy-array Heap "eax" %eax)
27900 $test-add-mem-to-reg:initialize-var2:
27901
27902 68/push 0/imm32/register
27903 68/push 0/imm32/register
27904 68/push 8/imm32/stack-offset
27905 68/push 1/imm32/block-depth
27906 ff 6/subop/push *(ecx+0x10)
27907 68/push 0x11/imm32/alloc-id:fake
27908 68/push 0/imm32/name
27909 68/push 0/imm32/name
27910 68/push 0x11/imm32/alloc-id:fake:payload
27911 89/<- %edx 4/r32/esp
27912 $test-add-mem-to-reg:initialize-var2-name:
27913
27914 8d/copy-address *(edx+4) 0/r32/eax
27915 (copy-array Heap "var2" %eax)
27916 $test-add-mem-to-reg:initialize-inouts:
27917
27918 68/push 0/imm32/is-deref:false
27919 68/push 0/imm32/next
27920 68/push 0/imm32/next
27921 52/push-edx/var2
27922 68/push 0x11/imm32/alloc-id:fake
27923 68/push 0x11/imm32/alloc-id:fake:payload
27924 89/<- %esi 4/r32/esp
27925 $test-add-mem-to-reg:initialize-outputs:
27926
27927 68/push 0/imm32/is-deref:false
27928 68/push 0/imm32/next
27929 68/push 0/imm32/next
27930 51/push-ecx/var1
27931 68/push 0x11/imm32/alloc-id:fake
27932 68/push 0x11/imm32/alloc-id:fake:payload
27933 89/<- %edi 4/r32/esp
27934 $test-add-mem-to-reg:initialize-stmt:
27935
27936 68/push 0/imm32/next
27937 68/push 0/imm32/next
27938 57/push-edi/outputs
27939 68/push 0x11/imm32/alloc-id:fake
27940 56/push-esi/inouts
27941 68/push 0x11/imm32/alloc-id:fake
27942 68/push 0/imm32/operation
27943 68/push 0/imm32/operation
27944 68/push 1/imm32/tag:stmt1
27945 89/<- %esi 4/r32/esp
27946 $test-add-mem-to-reg:initialize-stmt-operation:
27947
27948 8d/copy-address *(esi+4) 0/r32/eax
27949 (copy-array Heap "add" %eax)
27950
27951 c7 0/subop/copy *Curr-block-depth 0/imm32
27952 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
27953 (flush _test-output-buffered-file)
27954 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
27960
27961 (check-next-stream-line-equal _test-output-stream "03/add *(ebp+0x00000008) 0x00000000/r32" "F - test-add-mem-to-reg")
27962
27963 89/<- %esp 5/r32/ebp
27964 5d/pop-to-ebp
27965 c3/return
27966
27967 test-add-literal-to-eax:
27968
27969
27970
27971
27972
27973 55/push-ebp
27974 89/<- %ebp 4/r32/esp
27975
27976 (clear-stream _test-output-stream)
27977 (clear-stream $_test-output-buffered-file->buffer)
27978 $test-add-literal-to-eax:initialize-var-type:
27979
27980 68/push 0/imm32/right:null
27981 68/push 0/imm32/right:null
27982 68/push 0/imm32/left:unused
27983 68/push 1/imm32/value:int
27984 68/push 1/imm32/is-atom?:true
27985 68/push 0x11/imm32/alloc-id:fake:payload
27986 89/<- %ecx 4/r32/esp
27987 $test-add-literal-to-eax:initialize-var:
27988
27989 68/push 0/imm32/register
27990 68/push 0/imm32/register
27991 68/push 0/imm32/no-stack-offset
27992 68/push 1/imm32/block-depth
27993 51/push-ecx
27994 68/push 0x11/imm32/alloc-id:fake
27995 68/push 0/imm32/name
27996 68/push 0/imm32/name
27997 68/push 0x11/imm32/alloc-id:fake:payload
27998 89/<- %ecx 4/r32/esp
27999 $test-add-literal-to-eax:initialize-var-name:
28000
28001 8d/copy-address *(ecx+4) 0/r32/eax
28002 (copy-array Heap "v" %eax)
28003 $test-add-literal-to-eax:initialize-var-register:
28004
28005 8d/copy-address *(ecx+0x1c) 0/r32/eax
28006 (copy-array Heap "eax" %eax)
28007 $test-add-literal-to-eax:initialize-literal-type:
28008
28009 68/push 0/imm32/right:null
28010 68/push 0/imm32/right:null
28011 68/push 0/imm32/left:unused
28012 68/push 0/imm32/value:literal
28013 68/push 1/imm32/is-atom?:true
28014 68/push 0x11/imm32/alloc-id:fake:payload
28015 89/<- %edx 4/r32/esp
28016 $test-add-literal-to-eax:initialize-literal:
28017
28018 68/push 0/imm32/register
28019 68/push 0/imm32/register
28020 68/push 0/imm32/no-stack-offset
28021 68/push 1/imm32/block-depth
28022 52/push-edx
28023 68/push 0x11/imm32/alloc-id:fake
28024 68/push 0/imm32/name
28025 68/push 0/imm32/name
28026 68/push 0x11/imm32/alloc-id:fake:payload
28027 89/<- %edx 4/r32/esp
28028 $test-add-literal-to-eax:initialize-literal-value:
28029
28030 8d/copy-address *(edx+4) 0/r32/eax
28031 (copy-array Heap "0x34" %eax)
28032 $test-add-literal-to-eax:initialize-inouts:
28033
28034 68/push 0/imm32/is-deref:false
28035 68/push 0/imm32/next
28036 68/push 0/imm32/next
28037 52/push-edx/l
28038 68/push 0x11/imm32/alloc-id:fake
28039 68/push 0x11/imm32/alloc-id:fake:payload
28040 89/<- %esi 4/r32/esp
28041 $test-add-literal-to-eax:initialize-outputs:
28042
28043 68/push 0/imm32/is-deref:false
28044 68/push 0/imm32/next
28045 68/push 0/imm32/next
28046 51/push-ecx/v
28047 68/push 0x11/imm32/alloc-id:fake
28048 68/push 0x11/imm32/alloc-id:fake:payload
28049 89/<- %edi 4/r32/esp
28050 $test-add-literal-to-eax:initialize-stmt:
28051
28052 68/push 0/imm32/next
28053 68/push 0/imm32/next
28054 57/push-edi/outputs
28055 68/push 0x11/imm32/alloc-id:fake
28056 56/push-esi/inouts
28057 68/push 0x11/imm32/alloc-id:fake
28058 68/push 0/imm32/operation
28059 68/push 0/imm32/operation
28060 68/push 1/imm32/tag:stmt1
28061 89/<- %esi 4/r32/esp
28062 $test-add-literal-to-eax:initialize-stmt-operation:
28063
28064 8d/copy-address *(esi+4) 0/r32/eax
28065 (copy-array Heap "add" %eax)
28066
28067 c7 0/subop/copy *Curr-block-depth 0/imm32
28068 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28069 (flush _test-output-buffered-file)
28070 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28076
28077 (check-next-stream-line-equal _test-output-stream "05/add-to-eax 0x34/imm32" "F - test-add-literal-to-eax")
28078
28079 89/<- %esp 5/r32/ebp
28080 5d/pop-to-ebp
28081 c3/return
28082
28083 test-add-literal-to-reg:
28084
28085
28086
28087
28088
28089 55/push-ebp
28090 89/<- %ebp 4/r32/esp
28091
28092 (clear-stream _test-output-stream)
28093 (clear-stream $_test-output-buffered-file->buffer)
28094 $test-add-literal-to-reg:initialize-var-type:
28095
28096 68/push 0/imm32/right:null
28097 68/push 0/imm32/right:null
28098 68/push 0/imm32/left:unused
28099 68/push 1/imm32/value:int
28100 68/push 1/imm32/is-atom?:true
28101 68/push 0x11/imm32/alloc-id:fake:payload
28102 89/<- %ecx 4/r32/esp
28103 $test-add-literal-to-reg:initialize-var:
28104
28105 68/push 0/imm32/register
28106 68/push 0/imm32/register
28107 68/push 0/imm32/no-stack-offset
28108 68/push 1/imm32/block-depth
28109 51/push-ecx
28110 68/push 0x11/imm32/alloc-id:fake
28111 68/push 0/imm32/name
28112 68/push 0/imm32/name
28113 68/push 0x11/imm32/alloc-id:fake:payload
28114 89/<- %ecx 4/r32/esp
28115 $test-add-literal-to-reg:initialize-var-name:
28116
28117 8d/copy-address *(ecx+4) 0/r32/eax
28118 (copy-array Heap "v" %eax)
28119 $test-add-literal-to-reg:initialize-var-register:
28120
28121 8d/copy-address *(ecx+0x1c) 0/r32/eax
28122 (copy-array Heap "ecx" %eax)
28123 $test-add-literal-to-reg:initialize-literal-type:
28124
28125 68/push 0/imm32/right:null
28126 68/push 0/imm32/right:null
28127 68/push 0/imm32/left:unused
28128 68/push 0/imm32/value:literal
28129 68/push 1/imm32/is-atom?:true
28130 68/push 0x11/imm32/alloc-id:fake:payload
28131 89/<- %edx 4/r32/esp
28132 $test-add-literal-to-reg:initialize-literal:
28133
28134 68/push 0/imm32/register
28135 68/push 0/imm32/register
28136 68/push 0/imm32/no-stack-offset
28137 68/push 1/imm32/block-depth
28138 52/push-edx
28139 68/push 0x11/imm32/alloc-id:fake
28140 68/push 0/imm32/name
28141 68/push 0/imm32/name
28142 68/push 0x11/imm32/alloc-id:fake:payload
28143 89/<- %edx 4/r32/esp
28144 $test-add-literal-to-reg:initialize-literal-value:
28145
28146 8d/copy-address *(edx+4) 0/r32/eax
28147 (copy-array Heap "0x34" %eax)
28148 $test-add-literal-to-reg:initialize-inouts:
28149
28150 68/push 0/imm32/is-deref:false
28151 68/push 0/imm32/next
28152 68/push 0/imm32/next
28153 52/push-edx/l
28154 68/push 0x11/imm32/alloc-id:fake
28155 68/push 0x11/imm32/alloc-id:fake:payload
28156 89/<- %esi 4/r32/esp
28157 $test-add-literal-to-reg:initialize-outputs:
28158
28159 68/push 0/imm32/is-deref:false
28160 68/push 0/imm32/next
28161 68/push 0/imm32/next
28162 51/push-ecx/v
28163 68/push 0x11/imm32/alloc-id:fake
28164 68/push 0x11/imm32/alloc-id:fake:payload
28165 89/<- %edi 4/r32/esp
28166 $test-add-literal-to-reg:initialize-stmt:
28167
28168 68/push 0/imm32/next
28169 68/push 0/imm32/next
28170 57/push-edi/outputs
28171 68/push 0x11/imm32/alloc-id:fake
28172 56/push-esi/inouts
28173 68/push 0x11/imm32/alloc-id:fake
28174 68/push 0/imm32/operation
28175 68/push 0/imm32/operation
28176 68/push 1/imm32/tag:stmt1
28177 89/<- %esi 4/r32/esp
28178 $test-add-literal-to-reg:initialize-stmt-operation:
28179
28180 8d/copy-address *(esi+4) 0/r32/eax
28181 (copy-array Heap "add" %eax)
28182
28183 c7 0/subop/copy *Curr-block-depth 0/imm32
28184 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28185 (flush _test-output-buffered-file)
28186 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28192
28193 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %ecx 0x34/imm32" "F - test-add-literal-to-reg")
28194
28195 89/<- %esp 5/r32/ebp
28196 5d/pop-to-ebp
28197 c3/return
28198
28199 test-add-literal-to-mem:
28200
28201
28202
28203
28204
28205 55/push-ebp
28206 89/<- %ebp 4/r32/esp
28207
28208 (clear-stream _test-output-stream)
28209 (clear-stream $_test-output-buffered-file->buffer)
28210 $test-add-literal-to-mem:initialize-type:
28211
28212 68/push 0/imm32/right:null
28213 68/push 0/imm32/right:null
28214 68/push 0/imm32/left:unused
28215 68/push 1/imm32/value:int
28216 68/push 1/imm32/is-atom?:true
28217 68/push 0x11/imm32/alloc-id:fake:payload
28218 89/<- %ecx 4/r32/esp
28219 $test-add-literal-to-mem:initialize-var1:
28220
28221 68/push 0/imm32/register
28222 68/push 0/imm32/register
28223 68/push 8/imm32/stack-offset
28224 68/push 1/imm32/block-depth
28225 51/push-ecx
28226 68/push 0x11/imm32/alloc-id:fake
28227 68/push 0/imm32/name
28228 68/push 0/imm32/name
28229 68/push 0x11/imm32/alloc-id:fake:payload
28230 89/<- %ecx 4/r32/esp
28231 $test-add-literal-to-mem:initialize-var1-name:
28232
28233 8d/copy-address *(ecx+4) 0/r32/eax
28234 (copy-array Heap "var1" %eax)
28235 $test-add-literal-to-mem:initialize-literal-type:
28236
28237 68/push 0/imm32/right:null
28238 68/push 0/imm32/right:null
28239 68/push 0/imm32/left:unused
28240 68/push 0/imm32/value:literal
28241 68/push 1/imm32/is-atom?:true
28242 68/push 0x11/imm32/alloc-id:fake:payload
28243 89/<- %edx 4/r32/esp
28244 $test-add-literal-to-mem:initialize-literal:
28245
28246 68/push 0/imm32/register
28247 68/push 0/imm32/register
28248 68/push 0/imm32/no-stack-offset
28249 68/push 1/imm32/block-depth
28250 52/push-edx
28251 68/push 0x11/imm32/alloc-id:fake
28252 68/push 0/imm32/name
28253 68/push 0/imm32/name
28254 68/push 0x11/imm32/alloc-id:fake:payload
28255 89/<- %edx 4/r32/esp
28256 $test-add-literal-to-mem:initialize-literal-value:
28257
28258 8d/copy-address *(edx+4) 0/r32/eax
28259 (copy-array Heap "0x34" %eax)
28260 $test-add-literal-to-mem:initialize-inouts:
28261
28262 68/push 0/imm32/is-deref:false
28263 68/push 0/imm32/next
28264 68/push 0/imm32/next
28265 52/push-edx/l
28266 68/push 0x11/imm32/alloc-id:fake
28267 68/push 0x11/imm32/alloc-id:fake:payload
28268 89/<- %esi 4/r32/esp
28269
28270 68/push 0/imm32/is-deref:false
28271 56/push-esi/next
28272 68/push 0x11/imm32/alloc-id:fake
28273 51/push-ecx/var1
28274 68/push 0x11/imm32/alloc-id:fake
28275 68/push 0x11/imm32/alloc-id:fake:payload
28276 89/<- %esi 4/r32/esp
28277 $test-add-literal-to-mem:initialize-stmt:
28278
28279 68/push 0/imm32/next
28280 68/push 0/imm32/next
28281 68/push 0/imm32/outputs
28282 68/push 0/imm32/outputs
28283 56/push-esi/inouts
28284 68/push 0x11/imm32/alloc-id:fake
28285 68/push 0/imm32/operation
28286 68/push 0/imm32/operation
28287 68/push 1/imm32/tag:stmt1
28288 89/<- %esi 4/r32/esp
28289 $test-add-literal-to-mem:initialize-stmt-operation:
28290
28291 8d/copy-address *(esi+4) 0/r32/eax
28292 (copy-array Heap "add-to" %eax)
28293
28294 c7 0/subop/copy *Curr-block-depth 0/imm32
28295 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28296 (flush _test-output-buffered-file)
28297 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28303
28304 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem")
28305
28306 89/<- %esp 5/r32/ebp
28307 5d/pop-to-ebp
28308 c3/return
28309
28310 test-shift-reg-by-literal:
28311
28312
28313
28314
28315
28316 55/push-ebp
28317 89/<- %ebp 4/r32/esp
28318
28319 (clear-stream _test-output-stream)
28320 (clear-stream $_test-output-buffered-file->buffer)
28321 $test-shift-reg-by-literal:initialize-var-type:
28322
28323 68/push 0/imm32/right:null
28324 68/push 0/imm32/right:null
28325 68/push 0/imm32/left:unused
28326 68/push 1/imm32/value:int
28327 68/push 1/imm32/is-atom?:true
28328 68/push 0x11/imm32/alloc-id:fake:payload
28329 89/<- %ecx 4/r32/esp
28330 $test-shift-reg-by-literal:initialize-var:
28331
28332 68/push 0/imm32/register
28333 68/push 0/imm32/register
28334 68/push 0/imm32/no-stack-offset
28335 68/push 1/imm32/block-depth
28336 51/push-ecx
28337 68/push 0x11/imm32/alloc-id:fake
28338 68/push 0/imm32/name
28339 68/push 0/imm32/name
28340 68/push 0x11/imm32/alloc-id:fake:payload
28341 89/<- %ecx 4/r32/esp
28342 $test-shift-reg-by-literal:initialize-var-name:
28343
28344 8d/copy-address *(ecx+4) 0/r32/eax
28345 (copy-array Heap "v" %eax)
28346 $test-shift-reg-by-literal:initialize-var-register:
28347
28348 8d/copy-address *(ecx+0x1c) 0/r32/eax
28349 (copy-array Heap "ecx" %eax)
28350 $test-shift-reg-by-literal:initialize-literal-type:
28351
28352 68/push 0/imm32/right:null
28353 68/push 0/imm32/right:null
28354 68/push 0/imm32/left:unused
28355 68/push 0/imm32/value:literal
28356 68/push 1/imm32/is-atom?:true
28357 68/push 0x11/imm32/alloc-id:fake:payload
28358 89/<- %edx 4/r32/esp
28359 $test-shift-reg-by-literal:initialize-literal:
28360
28361 68/push 0/imm32/register
28362 68/push 0/imm32/register
28363 68/push 0/imm32/no-stack-offset
28364 68/push 1/imm32/block-depth
28365 52/push-edx
28366 68/push 0x11/imm32/alloc-id:fake
28367 68/push 0/imm32/name
28368 68/push 0/imm32/name
28369 68/push 0x11/imm32/alloc-id:fake:payload
28370 89/<- %edx 4/r32/esp
28371 $test-shift-reg-by-literal:initialize-literal-value:
28372
28373 8d/copy-address *(edx+4) 0/r32/eax
28374 (copy-array Heap "2" %eax)
28375 $test-shift-reg-by-literal:initialize-inouts:
28376
28377 68/push 0/imm32/is-deref:false
28378 68/push 0/imm32/next
28379 68/push 0/imm32/next
28380 52/push-edx/l
28381 68/push 0x11/imm32/alloc-id:fake
28382 68/push 0x11/imm32/alloc-id:fake:payload
28383 89/<- %esi 4/r32/esp
28384 $test-shift-reg-by-literal:initialize-outputs:
28385
28386 68/push 0/imm32/is-deref:false
28387 68/push 0/imm32/next
28388 68/push 0/imm32/next
28389 51/push-ecx/v
28390 68/push 0x11/imm32/alloc-id:fake
28391 68/push 0x11/imm32/alloc-id:fake:payload
28392 89/<- %edi 4/r32/esp
28393 $test-shift-reg-by-literal:initialize-stmt:
28394
28395 68/push 0/imm32/next
28396 68/push 0/imm32/next
28397 57/push-edi/outputs
28398 68/push 0x11/imm32/alloc-id:fake
28399 56/push-esi/inouts
28400 68/push 0x11/imm32/alloc-id:fake
28401 68/push 0/imm32/operation
28402 68/push 0/imm32/operation
28403 68/push 1/imm32/tag:stmt1
28404 89/<- %esi 4/r32/esp
28405 $test-shift-reg-by-literal:initialize-stmt-operation:
28406
28407 8d/copy-address *(esi+4) 0/r32/eax
28408 (copy-array Heap "shift-left" %eax)
28409
28410 c7 0/subop/copy *Curr-block-depth 0/imm32
28411 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28412 (flush _test-output-buffered-file)
28413 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28419
28420 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left %ecx 2/imm8" "F - test-shift-reg-by-literal")
28421
28422 89/<- %esp 5/r32/ebp
28423 5d/pop-to-ebp
28424 c3/return
28425
28426 test-shift-mem-by-literal:
28427
28428
28429
28430
28431
28432 55/push-ebp
28433 89/<- %ebp 4/r32/esp
28434
28435 (clear-stream _test-output-stream)
28436 (clear-stream $_test-output-buffered-file->buffer)
28437 $test-shift-mem-by-literal:initialize-type:
28438
28439 68/push 0/imm32/right:null
28440 68/push 0/imm32/right:null
28441 68/push 0/imm32/left:unused
28442 68/push 1/imm32/value:int
28443 68/push 1/imm32/is-atom?:true
28444 68/push 0x11/imm32/alloc-id:fake:payload
28445 89/<- %ecx 4/r32/esp
28446 $test-shift-mem-by-literal:initialize-var1:
28447
28448 68/push 0/imm32/register
28449 68/push 0/imm32/register
28450 68/push 8/imm32/stack-offset
28451 68/push 1/imm32/block-depth
28452 51/push-ecx
28453 68/push 0x11/imm32/alloc-id:fake
28454 68/push 0/imm32/name
28455 68/push 0/imm32/name
28456 68/push 0x11/imm32/alloc-id:fake:payload
28457 89/<- %ecx 4/r32/esp
28458 $test-shift-mem-by-literal:initialize-var1-name:
28459
28460 8d/copy-address *(ecx+4) 0/r32/eax
28461 (copy-array Heap "var1" %eax)
28462 $test-shift-mem-by-literal:initialize-literal-type:
28463
28464 68/push 0/imm32/right:null
28465 68/push 0/imm32/right:null
28466 68/push 0/imm32/left:unused
28467 68/push 0/imm32/value:literal
28468 68/push 1/imm32/is-atom?:true
28469 68/push 0x11/imm32/alloc-id:fake:payload
28470 89/<- %edx 4/r32/esp
28471 $test-shift-mem-by-literal:initialize-literal:
28472
28473 68/push 0/imm32/register
28474 68/push 0/imm32/register
28475 68/push 0/imm32/no-stack-offset
28476 68/push 1/imm32/block-depth
28477 52/push-edx
28478 68/push 0x11/imm32/alloc-id:fake
28479 68/push 0/imm32/name
28480 68/push 0/imm32/name
28481 68/push 0x11/imm32/alloc-id:fake:payload
28482 89/<- %edx 4/r32/esp
28483 $test-shift-mem-by-literal:initialize-literal-value:
28484
28485 8d/copy-address *(edx+4) 0/r32/eax
28486 (copy-array Heap "3" %eax)
28487 $test-shift-mem-by-literal:initialize-inouts:
28488
28489 68/push 0/imm32/is-deref:false
28490 68/push 0/imm32/next
28491 68/push 0/imm32/next
28492 52/push-edx/l
28493 68/push 0x11/imm32/alloc-id:fake
28494 68/push 0x11/imm32/alloc-id:fake:payload
28495 89/<- %esi 4/r32/esp
28496
28497 68/push 0/imm32/is-deref:false
28498 56/push-esi/next
28499 68/push 0x11/imm32/alloc-id:fake
28500 51/push-ecx/var1
28501 68/push 0x11/imm32/alloc-id:fake
28502 68/push 0x11/imm32/alloc-id:fake:payload
28503 89/<- %esi 4/r32/esp
28504 $test-shift-mem-by-literal:initialize-stmt:
28505
28506 68/push 0/imm32/next
28507 68/push 0/imm32/next
28508 68/push 0/imm32/outputs
28509 68/push 0/imm32/outputs
28510 56/push-esi/inouts
28511 68/push 0x11/imm32/alloc-id:fake
28512 68/push 0/imm32/operation
28513 68/push 0/imm32/operation
28514 68/push 1/imm32/tag:stmt1
28515 89/<- %esi 4/r32/esp
28516 $test-shift-mem-by-literal:initialize-stmt-operation:
28517
28518 8d/copy-address *(esi+4) 0/r32/eax
28519 (copy-array Heap "shift-left" %eax)
28520
28521 c7 0/subop/copy *Curr-block-depth 0/imm32
28522 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28523 (flush _test-output-buffered-file)
28524 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28530
28531 (check-next-stream-line-equal _test-output-stream "c1/shift 4/subop/left *(ebp+0x00000008) 3/imm8" "F - test-shift-mem-by-literal")
28532
28533 89/<- %esp 5/r32/ebp
28534 5d/pop-to-ebp
28535 c3/return
28536
28537 test-compare-reg-with-reg:
28538
28539
28540
28541
28542
28543 55/push-ebp
28544 89/<- %ebp 4/r32/esp
28545
28546 (clear-stream _test-output-stream)
28547 (clear-stream $_test-output-buffered-file->buffer)
28548 $test-compare-reg-with-reg:initialize-type:
28549
28550 68/push 0/imm32/right:null
28551 68/push 0/imm32/right:null
28552 68/push 0/imm32/left:unused
28553 68/push 1/imm32/value:int
28554 68/push 1/imm32/is-atom?:true
28555 68/push 0x11/imm32/alloc-id:fake:payload
28556 89/<- %ecx 4/r32/esp
28557 $test-compare-reg-with-reg:initialize-var1:
28558
28559 68/push 0/imm32/register
28560 68/push 0/imm32/register
28561 68/push 0/imm32/no-stack-offset
28562 68/push 1/imm32/block-depth
28563 51/push-ecx
28564 68/push 0x11/imm32/alloc-id:fake
28565 68/push 0/imm32/name
28566 68/push 0/imm32/name
28567 68/push 0x11/imm32/alloc-id:fake:payload
28568 89/<- %ecx 4/r32/esp
28569 $test-compare-reg-with-reg:initialize-var1-name:
28570
28571 8d/copy-address *(ecx+4) 0/r32/eax
28572 (copy-array Heap "var1" %eax)
28573 $test-compare-reg-with-reg:initialize-var1-register:
28574
28575 8d/copy-address *(ecx+0x1c) 0/r32/eax
28576 (copy-array Heap "ecx" %eax)
28577 $test-compare-reg-with-reg:initialize-var2:
28578
28579 68/push 0/imm32/register
28580 68/push 0/imm32/register
28581 68/push 0/imm32/no-stack-offset
28582 68/push 1/imm32/block-depth
28583 ff 6/subop/push *(ecx+0x10)
28584 68/push 0x11/imm32/alloc-id:fake
28585 68/push 0/imm32/name
28586 68/push 0/imm32/name
28587 68/push 0x11/imm32/alloc-id:fake:payload
28588 89/<- %edx 4/r32/esp
28589 $test-compare-reg-with-reg:initialize-var2-name:
28590
28591 8d/copy-address *(edx+4) 0/r32/eax
28592 (copy-array Heap "var2" %eax)
28593 $test-compare-reg-with-reg:initialize-var2-register:
28594
28595 8d/copy-address *(edx+0x1c) 0/r32/eax
28596 (copy-array Heap "eax" %eax)
28597 $test-compare-reg-with-reg:initialize-inouts:
28598
28599 68/push 0/imm32/is-deref:false
28600 68/push 0/imm32/next
28601 68/push 0/imm32/next
28602 52/push-edx/var2
28603 68/push 0x11/imm32/alloc-id:fake
28604 68/push 0x11/imm32/alloc-id:fake:payload
28605 89/<- %esi 4/r32/esp
28606
28607 68/push 0/imm32/is-deref:false
28608 56/push-esi/next
28609 68/push 0x11/imm32/alloc-id:fake
28610 51/push-ecx/var1
28611 68/push 0x11/imm32/alloc-id:fake
28612 68/push 0x11/imm32/alloc-id:fake:payload
28613 89/<- %esi 4/r32/esp
28614 $test-compare-reg-with-reg:initialize-stmt:
28615
28616 68/push 0/imm32/next
28617 68/push 0/imm32/next
28618 68/push 0/imm32/outputs
28619 68/push 0/imm32/outputs
28620 56/push-esi/inouts
28621 68/push 0x11/imm32/alloc-id:fake
28622 68/push 0/imm32/operation
28623 68/push 0/imm32/operation
28624 68/push 1/imm32/tag:stmt1
28625 89/<- %esi 4/r32/esp
28626 $test-compare-reg-with-reg:initialize-stmt-operation:
28627
28628 8d/copy-address *(esi+4) 0/r32/eax
28629 (copy-array Heap "compare" %eax)
28630
28631 c7 0/subop/copy *Curr-block-depth 0/imm32
28632 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28633 (flush _test-output-buffered-file)
28634 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28640
28641 (check-next-stream-line-equal _test-output-stream "39/compare-> %ecx 0x00000000/r32" "F - test-compare-reg-with-reg")
28642
28643 89/<- %esp 5/r32/ebp
28644 5d/pop-to-ebp
28645 c3/return
28646
28647 test-compare-mem-with-reg:
28648
28649
28650
28651
28652
28653 55/push-ebp
28654 89/<- %ebp 4/r32/esp
28655
28656 (clear-stream _test-output-stream)
28657 (clear-stream $_test-output-buffered-file->buffer)
28658 $test-compare-mem-with-reg:initialize-type:
28659
28660 68/push 0/imm32/right:null
28661 68/push 0/imm32/right:null
28662 68/push 0/imm32/left:unused
28663 68/push 1/imm32/value:int
28664 68/push 1/imm32/is-atom?:true
28665 68/push 0x11/imm32/alloc-id:fake:payload
28666 89/<- %ecx 4/r32/esp
28667 $test-compare-mem-with-reg:initialize-var1:
28668
28669 68/push 0/imm32/register
28670 68/push 0/imm32/register
28671 68/push 8/imm32/stack-offset
28672 68/push 1/imm32/block-depth
28673 51/push-ecx
28674 68/push 0x11/imm32/alloc-id:fake
28675 68/push 0/imm32/name
28676 68/push 0/imm32/name
28677 68/push 0x11/imm32/alloc-id:fake:payload
28678 89/<- %ecx 4/r32/esp
28679 $test-compare-mem-with-reg:initialize-var1-name:
28680
28681 8d/copy-address *(ecx+4) 0/r32/eax
28682 (copy-array Heap "var1" %eax)
28683 $test-compare-mem-with-reg:initialize-var2:
28684
28685 68/push 0/imm32/register
28686 68/push 0/imm32/register
28687 68/push 0/imm32/no-stack-offset
28688 68/push 1/imm32/block-depth
28689 ff 6/subop/push *(ecx+0x10)
28690 68/push 0x11/imm32/alloc-id:fake
28691 68/push 0/imm32/name
28692 68/push 0/imm32/name
28693 68/push 0x11/imm32/alloc-id:fake:payload
28694 89/<- %edx 4/r32/esp
28695 $test-compare-mem-with-reg:initialize-var2-name:
28696
28697 8d/copy-address *(edx+4) 0/r32/eax
28698 (copy-array Heap "var2" %eax)
28699 $test-compare-mem-with-reg:initialize-var2-register:
28700
28701 8d/copy-address *(edx+0x1c) 0/r32/eax
28702 (copy-array Heap "eax" %eax)
28703 $test-compare-mem-with-reg:initialize-inouts:
28704
28705 68/push 0/imm32/is-deref:false
28706 68/push 0/imm32/next
28707 68/push 0/imm32/next
28708 52/push-edx/var2
28709 68/push 0x11/imm32/alloc-id:fake
28710 68/push 0x11/imm32/alloc-id:fake:payload
28711 89/<- %esi 4/r32/esp
28712
28713 68/push 0/imm32/is-deref:false
28714 56/push-esi/next
28715 68/push 0x11/imm32/alloc-id:fake
28716 51/push-ecx/var1
28717 68/push 0x11/imm32/alloc-id:fake
28718 68/push 0x11/imm32/alloc-id:fake:payload
28719 89/<- %esi 4/r32/esp
28720 $test-compare-mem-with-reg:initialize-stmt:
28721
28722 68/push 0/imm32/next
28723 68/push 0/imm32/next
28724 68/push 0/imm32/outputs
28725 68/push 0/imm32/outputs
28726 56/push-esi/inouts
28727 68/push 0x11/imm32/alloc-id:fake
28728 68/push 0/imm32/operation
28729 68/push 0/imm32/operation
28730 68/push 1/imm32/tag:stmt1
28731 89/<- %esi 4/r32/esp
28732 $test-compare-mem-with-reg:initialize-stmt-operation:
28733
28734 8d/copy-address *(esi+4) 0/r32/eax
28735 (copy-array Heap "compare" %eax)
28736
28737 c7 0/subop/copy *Curr-block-depth 0/imm32
28738 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28739 (flush _test-output-buffered-file)
28740 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28746
28747 (check-next-stream-line-equal _test-output-stream "39/compare-> *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-mem-with-reg")
28748
28749 89/<- %esp 5/r32/ebp
28750 5d/pop-to-ebp
28751 c3/return
28752
28753 test-compare-reg-with-mem:
28754
28755
28756
28757
28758
28759 55/push-ebp
28760 89/<- %ebp 4/r32/esp
28761
28762 (clear-stream _test-output-stream)
28763 (clear-stream $_test-output-buffered-file->buffer)
28764 $test-compare-reg-with-mem:initialize-type:
28765
28766 68/push 0/imm32/right:null
28767 68/push 0/imm32/right:null
28768 68/push 0/imm32/left:unused
28769 68/push 1/imm32/value:int
28770 68/push 1/imm32/is-atom?:true
28771 68/push 0x11/imm32/alloc-id:fake:payload
28772 89/<- %ecx 4/r32/esp
28773 $test-compare-reg-with-mem:initialize-var1:
28774
28775 68/push 0/imm32/register
28776 68/push 0/imm32/register
28777 68/push 0/imm32/no-stack-offset
28778 68/push 1/imm32/block-depth
28779 51/push-ecx
28780 68/push 0x11/imm32/alloc-id:fake
28781 68/push 0/imm32/name
28782 68/push 0/imm32/name
28783 68/push 0x11/imm32/alloc-id:fake:payload
28784 89/<- %ecx 4/r32/esp
28785 $test-compare-reg-with-mem:initialize-var1-name:
28786
28787 8d/copy-address *(ecx+4) 0/r32/eax
28788 (copy-array Heap "var1" %eax)
28789 $test-compare-reg-with-mem:initialize-var1-register:
28790
28791 8d/copy-address *(ecx+0x1c) 0/r32/eax
28792 (copy-array Heap "eax" %eax)
28793 $test-compare-reg-with-mem:initialize-var2:
28794
28795 68/push 0/imm32/register
28796 68/push 0/imm32/register
28797 68/push 8/imm32/stack-offset
28798 68/push 1/imm32/block-depth
28799 ff 6/subop/push *(ecx+0x10)
28800 68/push 0x11/imm32/alloc-id:fake
28801 68/push 0/imm32/name
28802 68/push 0/imm32/name
28803 68/push 0x11/imm32/alloc-id:fake:payload
28804 89/<- %edx 4/r32/esp
28805 $test-compare-reg-with-mem:initialize-var2-name:
28806
28807 8d/copy-address *(edx+4) 0/r32/eax
28808 (copy-array Heap "var2" %eax)
28809 $test-compare-reg-with-mem:initialize-inouts:
28810
28811 68/push 0/imm32/is-deref:false
28812 68/push 0/imm32/next
28813 68/push 0/imm32/next
28814 52/push-edx/var2
28815 68/push 0x11/imm32/alloc-id:fake
28816 68/push 0x11/imm32/alloc-id:fake:payload
28817 89/<- %esi 4/r32/esp
28818
28819 68/push 0/imm32/is-deref:false
28820 56/push-esi/next
28821 68/push 0x11/imm32/alloc-id:fake
28822 51/push-ecx/var1
28823 68/push 0x11/imm32/alloc-id:fake
28824 68/push 0x11/imm32/alloc-id:fake:payload
28825 89/<- %esi 4/r32/esp
28826 $test-compare-reg-with-mem:initialize-stmt:
28827
28828 68/push 0/imm32/next
28829 68/push 0/imm32/next
28830 68/push 0/imm32/outputs
28831 68/push 0/imm32/outputs
28832 56/push-esi/inouts
28833 68/push 0x11/imm32/alloc-id:fake
28834 68/push 0/imm32/operation
28835 68/push 0/imm32/operation
28836 68/push 1/imm32/tag:stmt1
28837 89/<- %esi 4/r32/esp
28838 $test-compare-reg-with-mem:initialize-stmt-operation:
28839
28840 8d/copy-address *(esi+4) 0/r32/eax
28841 (copy-array Heap "compare" %eax)
28842
28843 c7 0/subop/copy *Curr-block-depth 0/imm32
28844 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28845 (flush _test-output-buffered-file)
28846 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28852
28853 (check-next-stream-line-equal _test-output-stream "3b/compare<- *(ebp+0x00000008) 0x00000000/r32" "F - test-compare-reg-with-mem")
28854
28855 89/<- %esp 5/r32/ebp
28856 5d/pop-to-ebp
28857 c3/return
28858
28859 test-compare-mem-with-literal:
28860
28861
28862
28863
28864
28865 55/push-ebp
28866 89/<- %ebp 4/r32/esp
28867
28868 (clear-stream _test-output-stream)
28869 (clear-stream $_test-output-buffered-file->buffer)
28870 $test-compare-mem-with-literal:initialize-type:
28871
28872 68/push 0/imm32/right:null
28873 68/push 0/imm32/right:null
28874 68/push 0/imm32/left:unused
28875 68/push 1/imm32/value:int
28876 68/push 1/imm32/is-atom?:true
28877 68/push 0x11/imm32/alloc-id:fake:payload
28878 89/<- %ecx 4/r32/esp
28879 $test-compare-mem-with-literal:initialize-var1:
28880
28881 68/push 0/imm32/register
28882 68/push 0/imm32/register
28883 68/push 8/imm32/stack-offset
28884 68/push 1/imm32/block-depth
28885 51/push-ecx
28886 68/push 0x11/imm32/alloc-id:fake
28887 68/push 0/imm32/name
28888 68/push 0/imm32/name
28889 68/push 0x11/imm32/alloc-id:fake:payload
28890 89/<- %ecx 4/r32/esp
28891 $test-compare-mem-with-literal:initialize-var1-name:
28892
28893 8d/copy-address *(ecx+4) 0/r32/eax
28894 (copy-array Heap "var1" %eax)
28895 $test-compare-mem-with-literal:initialize-literal-type:
28896
28897 68/push 0/imm32/right:null
28898 68/push 0/imm32/right:null
28899 68/push 0/imm32/left:unused
28900 68/push 0/imm32/value:literal
28901 68/push 1/imm32/is-atom?:true
28902 68/push 0x11/imm32/alloc-id:fake:payload
28903 89/<- %edx 4/r32/esp
28904 $test-compare-mem-with-literal:initialize-literal:
28905
28906 68/push 0/imm32/register
28907 68/push 0/imm32/register
28908 68/push 0/imm32/no-stack-offset
28909 68/push 1/imm32/block-depth
28910 52/push-edx
28911 68/push 0x11/imm32/alloc-id:fake
28912 68/push 0/imm32/name
28913 68/push 0/imm32/name
28914 68/push 0x11/imm32/alloc-id:fake:payload
28915 89/<- %edx 4/r32/esp
28916 $test-compare-mem-with-literal:initialize-literal-value:
28917
28918 8d/copy-address *(edx+4) 0/r32/eax
28919 (copy-array Heap "0x34" %eax)
28920 $test-compare-mem-with-literal:initialize-inouts:
28921
28922 68/push 0/imm32/is-deref:false
28923 68/push 0/imm32/next
28924 68/push 0/imm32/next
28925 52/push-edx/l
28926 68/push 0x11/imm32/alloc-id:fake
28927 68/push 0x11/imm32/alloc-id:fake:payload
28928 89/<- %esi 4/r32/esp
28929
28930 68/push 0/imm32/is-deref:false
28931 56/push-esi/next
28932 68/push 0x11/imm32/alloc-id:fake
28933 51/push-ecx/var1
28934 68/push 0x11/imm32/alloc-id:fake
28935 68/push 0x11/imm32/alloc-id:fake:payload
28936 89/<- %esi 4/r32/esp
28937 $test-compare-mem-with-literal:initialize-stmt:
28938
28939 68/push 0/imm32/next
28940 68/push 0/imm32/next
28941 68/push 0/imm32/outputs
28942 68/push 0/imm32/outputs
28943 56/push-esi/inouts
28944 68/push 0x11/imm32/alloc-id:fake
28945 68/push 0/imm32/operation
28946 68/push 0/imm32/operation
28947 68/push 1/imm32/tag:stmt1
28948 89/<- %esi 4/r32/esp
28949 $test-compare-mem-with-literal:initialize-stmt-operation:
28950
28951 8d/copy-address *(esi+4) 0/r32/eax
28952 (copy-array Heap "compare" %eax)
28953
28954 c7 0/subop/copy *Curr-block-depth 0/imm32
28955 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
28956 (flush _test-output-buffered-file)
28957 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
28963
28964 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare *(ebp+0x00000008) 0x34/imm32" "F - test-compare-mem-with-literal")
28965
28966 89/<- %esp 5/r32/ebp
28967 5d/pop-to-ebp
28968 c3/return
28969
28970 test-compare-eax-with-literal:
28971
28972
28973
28974
28975
28976 55/push-ebp
28977 89/<- %ebp 4/r32/esp
28978
28979 (clear-stream _test-output-stream)
28980 (clear-stream $_test-output-buffered-file->buffer)
28981 $test-compare-eax-with-literal:initialize-type:
28982
28983 68/push 0/imm32/right:null
28984 68/push 0/imm32/right:null
28985 68/push 0/imm32/left:unused
28986 68/push 1/imm32/value:int
28987 68/push 1/imm32/is-atom?:true
28988 68/push 0x11/imm32/alloc-id:fake:payload
28989 89/<- %ecx 4/r32/esp
28990 $test-compare-eax-with-literal:initialize-var1:
28991
28992 68/push 0/imm32/register
28993 68/push 0/imm32/register
28994 68/push 0/imm32/no-stack-offset
28995 68/push 1/imm32/block-depth
28996 51/push-ecx
28997 68/push 0x11/imm32/alloc-id:fake
28998 68/push 0/imm32/name
28999 68/push 0/imm32/name
29000 68/push 0x11/imm32/alloc-id:fake:payload
29001 89/<- %ecx 4/r32/esp
29002 $test-compare-eax-with-literal:initialize-var1-name:
29003
29004 8d/copy-address *(ecx+4) 0/r32/eax
29005 (copy-array Heap "var1" %eax)
29006 $test-compare-eax-with-literal:initialize-var1-register:
29007
29008 8d/copy-address *(ecx+0x1c) 0/r32/eax
29009 (copy-array Heap "eax" %eax)
29010 $test-compare-eax-with-literal:initialize-literal-type:
29011
29012 68/push 0/imm32/right:null
29013 68/push 0/imm32/right:null
29014 68/push 0/imm32/left:unused
29015 68/push 0/imm32/value:literal
29016 68/push 1/imm32/is-atom?:true
29017 68/push 0x11/imm32/alloc-id:fake:payload
29018 89/<- %edx 4/r32/esp
29019 $test-compare-eax-with-literal:initialize-literal:
29020
29021 68/push 0/imm32/register
29022 68/push 0/imm32/register
29023 68/push 0/imm32/no-stack-offset
29024 68/push 1/imm32/block-depth
29025 52/push-edx
29026 68/push 0x11/imm32/alloc-id:fake
29027 68/push 0/imm32/name
29028 68/push 0/imm32/name
29029 68/push 0x11/imm32/alloc-id:fake:payload
29030 89/<- %edx 4/r32/esp
29031 $test-compare-eax-with-literal:initialize-literal-value:
29032
29033 8d/copy-address *(edx+4) 0/r32/eax
29034 (copy-array Heap "0x34" %eax)
29035 $test-compare-eax-with-literal:initialize-inouts:
29036
29037 68/push 0/imm32/is-deref:false
29038 68/push 0/imm32/next
29039 68/push 0/imm32/next
29040 52/push-edx/l
29041 68/push 0x11/imm32/alloc-id:fake
29042 68/push 0x11/imm32/alloc-id:fake:payload
29043 89/<- %esi 4/r32/esp
29044
29045 68/push 0/imm32/is-deref:false
29046 56/push-esi/next
29047 68/push 0x11/imm32/alloc-id:fake
29048 51/push-ecx/var1
29049 68/push 0x11/imm32/alloc-id:fake
29050 68/push 0x11/imm32/alloc-id:fake:payload
29051 89/<- %esi 4/r32/esp
29052 $test-compare-eax-with-literal:initialize-stmt:
29053
29054 68/push 0/imm32/next
29055 68/push 0/imm32/next
29056 68/push 0/imm32/outputs
29057 68/push 0/imm32/outputs
29058 56/push-esi/inouts
29059 68/push 0x11/imm32/alloc-id:fake
29060 68/push 0/imm32/operation
29061 68/push 0/imm32/operation
29062 68/push 1/imm32/tag:stmt1
29063 89/<- %esi 4/r32/esp
29064 $test-compare-eax-with-literal:initialize-stmt-operation:
29065
29066 8d/copy-address *(esi+4) 0/r32/eax
29067 (copy-array Heap "compare" %eax)
29068
29069 c7 0/subop/copy *Curr-block-depth 0/imm32
29070 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
29071 (flush _test-output-buffered-file)
29072 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
29078
29079 (check-next-stream-line-equal _test-output-stream "3d/compare-eax-with 0x34/imm32" "F - test-compare-eax-with-literal")
29080
29081 89/<- %esp 5/r32/ebp
29082 5d/pop-to-ebp
29083 c3/return
29084
29085 test-compare-reg-with-literal:
29086
29087
29088
29089
29090
29091 55/push-ebp
29092 89/<- %ebp 4/r32/esp
29093
29094 (clear-stream _test-output-stream)
29095 (clear-stream $_test-output-buffered-file->buffer)
29096 $test-compare-reg-with-literal:initialize-type:
29097
29098 68/push 0/imm32/right:null
29099 68/push 0/imm32/right:null
29100 68/push 0/imm32/left:unused
29101 68/push 1/imm32/value:int
29102 68/push 1/imm32/is-atom?:true
29103 68/push 0x11/imm32/alloc-id:fake:payload
29104 89/<- %ecx 4/r32/esp
29105 $test-compare-reg-with-literal:initialize-var1:
29106
29107 68/push 0/imm32/register
29108 68/push 0/imm32/register
29109 68/push 0/imm32/no-stack-offset
29110 68/push 1/imm32/block-depth
29111 51/push-ecx
29112 68/push 0x11/imm32/alloc-id:fake
29113 68/push 0/imm32/name
29114 68/push 0/imm32/name
29115 68/push 0x11/imm32/alloc-id:fake:payload
29116 89/<- %ecx 4/r32/esp
29117 $test-compare-reg-with-literal:initialize-var1-name:
29118
29119 8d/copy-address *(ecx+4) 0/r32/eax
29120 (copy-array Heap "var1" %eax)
29121 $test-compare-reg-with-literal:initialize-var1-register:
29122
29123 8d/copy-address *(ecx+0x1c) 0/r32/eax
29124 (copy-array Heap "ecx" %eax)
29125 $test-compare-reg-with-literal:initialize-literal-type:
29126
29127 68/push 0/imm32/right:null
29128 68/push 0/imm32/right:null
29129 68/push 0/imm32/left:unused
29130 68/push 0/imm32/value:literal
29131 68/push 1/imm32/is-atom?:true
29132 68/push 0x11/imm32/alloc-id:fake:payload
29133 89/<- %edx 4/r32/esp
29134 $test-compare-reg-with-literal:initialize-literal:
29135
29136 68/push 0/imm32/register
29137 68/push 0/imm32/register
29138 68/push 0/imm32/no-stack-offset
29139 68/push 1/imm32/block-depth
29140 52/push-edx
29141 68/push 0x11/imm32/alloc-id:fake
29142 68/push 0/imm32/name
29143 68/push 0/imm32/name
29144 68/push 0x11/imm32/alloc-id:fake:payload
29145 89/<- %edx 4/r32/esp
29146 $test-compare-reg-with-literal:initialize-literal-value:
29147
29148 8d/copy-address *(edx+4) 0/r32/eax
29149 (copy-array Heap "0x34" %eax)
29150 $test-compare-reg-with-literal:initialize-inouts:
29151
29152 68/push 0/imm32/is-deref:false
29153 68/push 0/imm32/next
29154 68/push 0/imm32/next
29155 52/push-edx/l
29156 68/push 0x11/imm32/alloc-id:fake
29157 68/push 0x11/imm32/alloc-id:fake:payload
29158 89/<- %esi 4/r32/esp
29159
29160 68/push 0/imm32/is-deref:false
29161 56/push-esi/next
29162 68/push 0x11/imm32/alloc-id:fake
29163 51/push-ecx/var1
29164 68/push 0x11/imm32/alloc-id:fake
29165 68/push 0x11/imm32/alloc-id:fake:payload
29166 89/<- %esi 4/r32/esp
29167 $test-compare-reg-with-literal:initialize-stmt:
29168
29169 68/push 0/imm32/next
29170 68/push 0/imm32/next
29171 68/push 0/imm32/outputs
29172 68/push 0/imm32/outputs
29173 56/push-esi/inouts
29174 68/push 0x11/imm32/alloc-id:fake
29175 68/push 0/imm32/operation
29176 68/push 0/imm32/operation
29177 68/push 1/imm32/tag:stmt1
29178 89/<- %esi 4/r32/esp
29179 $test-compare-reg-with-literal:initialize-stmt-operation:
29180
29181 8d/copy-address *(esi+4) 0/r32/eax
29182 (copy-array Heap "compare" %eax)
29183
29184 c7 0/subop/copy *Curr-block-depth 0/imm32
29185 (emit-subx-stmt _test-output-buffered-file %esi Primitives Stderr 0)
29186 (flush _test-output-buffered-file)
29187 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
29193
29194 (check-next-stream-line-equal _test-output-stream "81 7/subop/compare %ecx 0x34/imm32" "F - test-compare-reg-with-literal")
29195
29196 89/<- %esp 5/r32/ebp
29197 5d/pop-to-ebp
29198 c3/return
29199
29200 test-emit-subx-stmt-function-call:
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218 55/push-ebp
29219 89/<- %ebp 4/r32/esp
29220
29221 (clear-stream _test-output-stream)
29222 (clear-stream $_test-output-buffered-file->buffer)
29223 $test-emit-subx-function-call:initialize-type:
29224
29225 68/push 0/imm32/right:null
29226 68/push 0/imm32/right:null
29227 68/push 0/imm32/left:unused
29228 68/push 1/imm32/value:int
29229 68/push 1/imm32/is-atom?:true
29230 68/push 0x11/imm32/alloc-id:fake:payload
29231 89/<- %ecx 4/r32/esp
29232 $test-emit-subx-function-call:initialize-var:
29233
29234 68/push 0/imm32/no-register
29235 68/push 0/imm32/no-register
29236 68/push -8/imm32/stack-offset
29237 68/push 1/imm32/block-depth
29238 51/push-ecx/type
29239 68/push 0x11/imm32/alloc-id:fake
29240 68/push 0/imm32/name
29241 68/push 0/imm32/name
29242 68/push 0x11/imm32/alloc-id:fake:payload
29243 89/<- %ecx 4/r32/esp
29244 $test-emit-subx-function-call:initialize-var-name:
29245
29246 8d/copy-address *(ecx+4) 0/r32/eax
29247 (copy-array Heap "foo" %eax)
29248 $test-emit-subx-function-call:initialize-stmt-var:
29249
29250 68/push 0/imm32/is-deref:false
29251 68/push 0/imm32/next
29252 68/push 0/imm32/next
29253 51/push-ecx/var-foo
29254 68/push 0x11/imm32/alloc-id:fake
29255 68/push 0x11/imm32/alloc-id:fake:payload
29256 89/<- %ebx 4/r32/esp
29257 $test-emit-subx-function-call:initialize-stmt:
29258
29259 68/push 0/imm32/no-outputs
29260 68/push 0/imm32/no-outputs
29261 53/push-ebx/inouts
29262 68/push 0x11/imm32/alloc-id:fake
29263 68/push 0/imm32/operation
29264 68/push 0/imm32/operation
29265 68/push 1/imm32/tag
29266 89/<- %esi 4/r32/esp
29267 $test-emit-subx-function-call:initialize-stmt-operation:
29268
29269 8d/copy-address *(esi+4) 0/r32/eax
29270 (copy-array Heap "f" %eax)
29271
29272 c7 0/subop/copy *Curr-block-depth 0/imm32
29273 (emit-subx-stmt _test-output-buffered-file %esi 0 Stderr 0)
29274 (flush _test-output-buffered-file)
29275 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
29281
29282 (check-next-stream-line-equal _test-output-stream "(f *(ebp+0xfffffff8))" "F - test-emit-subx-stmt-function-call")
29283
29284 89/<- %esp 5/r32/ebp
29285 5d/pop-to-ebp
29286 c3/return
29287
29288 test-emit-subx-stmt-function-call-with-literal-arg:
29289
29290
29291
29292
29293
29294
29295 55/push-ebp
29296 89/<- %ebp 4/r32/esp
29297
29298 (clear-stream _test-output-stream)
29299 (clear-stream $_test-output-buffered-file->buffer)
29300 $test-emit-subx-function-call-with-literal-arg:initialize-type:
29301
29302 68/push 0/imm32/right:null
29303 68/push 0/imm32/right:null
29304 68/push 0/imm32/left:unused
29305 68/push 0/imm32/value:literal
29306 68/push 1/imm32/is-atom?:true
29307 68/push 0x11/imm32/alloc-id:fake:payload
29308 89/<- %ecx 4/r32/esp
29309 $test-emit-subx-function-call-with-literal-arg:initialize-var:
29310
29311 68/push 0/imm32/no-register
29312 68/push 0/imm32/no-register
29313 68/push 0/imm32/no-stack-offset
29314 68/push 1/imm32/block-depth
29315 51/push-ecx/type
29316 68/push 0x11/imm32/alloc-id:fake
29317 68/push 0/imm32/name
29318 68/push 0/imm32/name
29319 68/push 0x11/imm32/alloc-id:fake:payload
29320 89/<- %ecx 4/r32/esp
29321 $test-emit-subx-function-call-with-literal-arg:initialize-var-name:
29322
29323 8d/copy-address *(ecx+4) 0/r32/eax
29324 (copy-array Heap "0x34" %eax)
29325 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-var:
29326
29327 68/push 0/imm32/is-deref:false
29328 68/push 0/imm32/next
29329 68/push 0/imm32/next
29330 51/push-ecx/var-foo
29331 68/push 0x11/imm32/alloc-id:fake
29332 68/push 0x11/imm32/alloc-id:fake:payload
29333 89/<- %ebx 4/r32/esp
29334 $test-emit-subx-function-call-with-literal-arg:initialize-stmt:
29335
29336 68/push 0/imm32/no-outputs
29337 68/push 0/imm32/no-outputs
29338 53/push-ebx/inouts
29339 68/push 0x11/imm32/alloc-id:fake
29340 68/push 0/imm32/operation
29341 68/push 0/imm32/operation
29342 68/push 1/imm32/tag
29343 89/<- %esi 4/r32/esp
29344 $test-emit-subx-function-call-with-literal-arg:initialize-stmt-operation:
29345
29346 8d/copy-address *(esi+4) 0/r32/eax
29347 (copy-array Heap "f" %eax)
29348
29349 c7 0/subop/copy *Curr-block-depth 0/imm32
29350 (emit-subx-stmt _test-output-buffered-file %esi 0 %ebx Stderr 0)
29351 (flush _test-output-buffered-file)
29352 +-- 6 lines: #? # dump _test-output-stream --------------------------------------------------------------------------------------------------------------------------------------------------------------------
29358
29359 (check-next-stream-line-equal _test-output-stream "(f 0x34)" "F - test-emit-subx-stmt-function-call-with-literal-arg")
29360
29361 89/<- %esp 5/r32/ebp
29362 5d/pop-to-ebp
29363 c3/return
29364
29365 emit-indent:
29366
29367 55/push-ebp
29368 89/<- %ebp 4/r32/esp
29369
29370 50/push-eax
29371
29372 8b/-> *(ebp+0xc) 0/r32/eax
29373 {
29374
29375 3d/compare-eax-with 0/imm32
29376 7e/jump-if-<= break/disp8
29377 (write-buffered *(ebp+8) " ")
29378 48/decrement-eax
29379 eb/jump loop/disp8
29380 }
29381 $emit-indent:end:
29382
29383 58/pop-to-eax
29384
29385 89/<- %esp 5/r32/ebp
29386 5d/pop-to-ebp
29387 c3/return
29388
29389 emit-subx-prologue:
29390
29391 55/push-ebp
29392 89/<- %ebp 4/r32/esp
29393
29394 (write-buffered *(ebp+8) " # . prologue\n")
29395 (write-buffered *(ebp+8) " 55/push-ebp\n")
29396 (write-buffered *(ebp+8) " 89/<- %ebp 4/r32/esp\n")
29397 $emit-subx-prologue:end:
29398
29399 89/<- %esp 5/r32/ebp
29400 5d/pop-to-ebp
29401 c3/return
29402
29403 emit-subx-epilogue:
29404
29405 55/push-ebp
29406 89/<- %ebp 4/r32/esp
29407
29408 (write-buffered *(ebp+8) " # . epilogue\n")
29409 (write-buffered *(ebp+8) " 89/<- %esp 5/r32/ebp\n")
29410 (write-buffered *(ebp+8) " 5d/pop-to-ebp\n")
29411 (write-buffered *(ebp+8) " c3/return\n")
29412 $emit-subx-epilogue:end:
29413
29414 89/<- %esp 5/r32/ebp
29415 5d/pop-to-ebp
29416 c3/return