From b697b343185fd60ddbf899bb2426a77cecf7306c Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 26 Nov 2019 18:07:55 -0800 Subject: 5763 --- html/apps/mu.subx.html | 1730 +++++++++++++++++++++++++----------------------- 1 file changed, 886 insertions(+), 844 deletions(-) (limited to 'html') diff --git a/html/apps/mu.subx.html b/html/apps/mu.subx.html index 785e24f8..964fc239 100644 --- a/html/apps/mu.subx.html +++ b/html/apps/mu.subx.html @@ -991,9 +991,9 @@ if ('onhashchange' in window) { 949 # 950 (write-buffered %edi *ecx) 951 (write-buffered %edi ":\n") - 952 (emit-subx-prologue %edi) + 952 (emit-subx-prologue %edi) 953 (emit-subx-block %edi *(ecx+0x10)) # Function-body - 954 (emit-subx-epilogue %edi) + 954 (emit-subx-epilogue %edi) 955 $emit-subx-function:end: 956 # . restore registers 957 5f/pop-to-edi @@ -1127,7 +1127,7 @@ if ('onhashchange' in window) { 1085 _Primitive-add-lit-to-mem/imm32/next 1086 _Primitive-add-lit-to-mem: 1087 # add-to var1, lit => 81 0/subop/add var1/rm32 lit/imm32 -1088 "add"/imm32/name +1088 "add-to"/imm32/name 1089 Int-var-and-literal/imm32/inouts 1090 0/imm32/outputs 1091 "81 0/subop/add"/imm32/subx-name @@ -1149,7 +1149,7 @@ if ('onhashchange' in window) { 1107 1108 Int-var-and-second-int-var-in-some-register: 1109 Int-var-on-stack/imm32 -1110 Int-var-in-some-register/imm32/next +1110 Single-int-var-in-some-register/imm32/next 1111 1112 Int-var-and-literal: 1113 Int-var-on-stack/imm32 @@ -1547,852 +1547,894 @@ if ('onhashchange' in window) { 1505 e9/jump $mu-stmt-matches-primitive?:end/disp32 1506 } 1507 $mu-stmt-matches-primitive?:check-inouts: -1508 # curr = stmt->inouts +1508 # for (curr/esi in stmt->inouts, curr2/edi in primitive->inouts) 1509 8b/-> *(ecx+8) 6/r32/esi # Stmt1-inouts -1510 # curr2 = primitive->inouts -1511 8b/-> *(edx+4) 7/r32/edi # Primitive-inouts -1512 { -1513 # if (curr == 0) return (curr2 == 0) -1514 { -1515 81 7/subop/compare %esi 0/imm32 -1516 75/jump-if-not-equal break/disp8 -1517 { -1518 81 7/subop/compare %edi 0/imm32 -1519 75/jump-if-not-equal break/disp8 -1520 # return true -1521 b8/copy-to-eax 1/imm32 -1522 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1523 } -1524 # return false -1525 b8/copy-to-eax 0/imm32 -1526 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1527 } -1528 # if (curr2 == 0) return false -1529 { -1530 81 7/subop/compare %edi 0/imm32 -1531 75/jump-if-not-equal break/disp8 -1532 b8/copy-to-eax 0/imm32 -1533 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1534 } -1535 # if (curr != curr2) return false -1536 { -1537 (operand-matches-primitive? *esi *edi) # => eax -1538 3d/compare-eax-and 0/imm32 -1539 75/jump-if-not-equal break/disp8 -1540 b8/copy-to-eax 0/imm32 -1541 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1542 } -1543 # curr=curr->next -1544 8b/-> *(ecx+4) 1/r32/ecx # Operand-next -1545 # curr2=curr2->next -1546 8b/-> *(edx+4) 2/r32/edx # Operand-next +1510 8b/-> *(edx+4) 7/r32/edi # Primitive-inouts +1511 { +1512 # if (curr == 0) return (curr2 == 0) +1513 { +1514 81 7/subop/compare %esi 0/imm32 +1515 75/jump-if-not-equal break/disp8 +1516 { +1517 81 7/subop/compare %edi 0/imm32 +1518 75/jump-if-not-equal break/disp8 +1519 # return true +1520 b8/copy-to-eax 1/imm32 +1521 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1522 } +1523 # return false +1524 b8/copy-to-eax 0/imm32 +1525 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1526 } +1527 # if (curr2 == 0) return false +1528 { +1529 81 7/subop/compare %edi 0/imm32 +1530 75/jump-if-not-equal break/disp8 +1531 b8/copy-to-eax 0/imm32 +1532 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1533 } +1534 # if (curr != curr2) return false +1535 { +1536 (operand-matches-primitive? *esi *edi) # => eax +1537 3d/compare-eax-and 0/imm32 +1538 75/jump-if-not-equal break/disp8 +1539 b8/copy-to-eax 0/imm32 +1540 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1541 } +1542 # curr=curr->next +1543 8b/-> *(esi+4) 6/r32/esi # Operand-next +1544 # curr2=curr2->next +1545 8b/-> *(edi+4) 7/r32/edi # Operand-next +1546 eb/jump loop/disp8 1547 } 1548 $mu-stmt-matches-primitive?:check-outputs: -1549 # ecx = stmt -1550 8b/-> *(ebp+8) 1/r32/ecx -1551 # edx = primitive -1552 8b/-> *(ebp+0xc) 2/r32/edx -1553 # curr = stmt->outputs -1554 8b/-> *(ecx+0xc) 6/r32/esi # Stmt1-outputs -1555 # curr2 = primitive->outputs -1556 8b/-> *(edx+8) 7/r32/edi # Primitive-outputs -1557 { -1558 # if (curr == 0) return (curr2 == 0) -1559 { -1560 81 7/subop/compare %esi 0/imm32 -1561 75/jump-if-not-equal break/disp8 -1562 { -1563 81 7/subop/compare %edi 0/imm32 -1564 75/jump-if-not-equal break/disp8 -1565 # return true -1566 b8/copy-to-eax 1/imm32 -1567 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1568 } -1569 # return false -1570 b8/copy-to-eax 0/imm32 -1571 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1572 } -1573 # if (curr2 == 0) return false -1574 { -1575 81 7/subop/compare %edi 0/imm32 -1576 75/jump-if-not-equal break/disp8 -1577 b8/copy-to-eax 0/imm32 -1578 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1579 } -1580 # if (curr != curr2) return false -1581 { -1582 (operand-matches-primitive? *esi *edi) # => eax -1583 3d/compare-eax-and 0/imm32 -1584 75/jump-if-not-equal break/disp8 -1585 b8/copy-to-eax 0/imm32 -1586 e9/jump $mu-stmt-matches-primitive?:end/disp32 -1587 } -1588 # curr=curr->next -1589 8b/-> *(ecx+4) 1/r32/ecx # Operand-next -1590 # curr2=curr2->next -1591 8b/-> *(edx+4) 2/r32/edx # Operand-next -1592 } -1593 $mu-stmt-matches-primitive?:return-true: -1594 b8/copy-to-eax 1/imm32 -1595 $mu-stmt-matches-primitive?:end: -1596 # . restore registers -1597 5f/pop-to-edi -1598 5e/pop-to-esi -1599 5b/pop-to-ebx -1600 5a/pop-to-edx -1601 59/pop-to-ecx -1602 # . epilogue -1603 89/<- %esp 5/r32/ebp -1604 5d/pop-to-ebp -1605 c3/return -1606 -1607 operand-matches-primitive?: # var : (address var), primout-var : (address var) => result/eax : boolean -1608 # . prologue -1609 55/push-ebp -1610 89/<- %ebp 4/r32/esp -1611 # . save registers -1612 56/push-esi -1613 57/push-edi -1614 # esi = var -1615 8b/-> *(ebp+8) 6/r32/esi -1616 # edi = primout-var -1617 8b/-> *(ebp+0xc) 7/r32/edi -1618 # if (var->type != primout-var->type) return false -1619 8b/-> *(esi+4) 0/r32/eax # Var-type -1620 39/compare *(edi+4) 0/r32/eax # Var-type -1621 b8/copy-to-eax 0/imm32/false -1622 75/jump-if-not-equal $operand-matches-primitive?:end/disp8 -1623 # return false if var->register doesn't match primout-var->register -1624 { -1625 # if addresses are equal, don't return here -1626 8b/-> *(esi+0x10) 0/r32/eax -1627 39/compare *(edi+0x10) 0/r32/eax -1628 74/jump-if-equal break/disp8 -1629 # if either address is 0, return false -1630 3d/compare-eax-and 0/imm32 -1631 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result -1632 81 7/subop/compare *(edi+0x10) 0/imm32 -1633 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result -1634 # if primout-var->register is "*", return true -1635 (string-equal? *(edi+0x10) "*") # Var-register -1636 3d/compare-eax-and 0/imm32 -1637 b8/copy-to-eax 1/imm32/true -1638 75/jump-if-not-equal $operand-matches-primitive?:end/disp8 -1639 # if string contents don't match, return false -1640 (string-equal? *(esi+0x10) *(edi+0x10)) # Var-register Var-register -1641 3d/compare-eax-and 0/imm32 -1642 b8/copy-to-eax 0/imm32/false -1643 74/jump-if-equal $operand-matches-primitive?:end/disp8 -1644 } -1645 # return true -1646 b8/copy-to-eax 1/imm32/true -1647 $operand-matches-primitive?:end: -1648 # . restore registers -1649 5f/pop-to-edi -1650 5e/pop-to-esi -1651 # . epilogue -1652 89/<- %esp 5/r32/ebp -1653 5d/pop-to-ebp -1654 c3/return -1655 -1656 test-emit-subx-statement-primitive: -1657 # Primitive operation on a variable on the stack. -1658 # increment foo -1659 # => -1660 # ff 0/subop/increment *(ebp-8) -1661 # -1662 # There's a variable on the var stack as follows: -1663 # name: 'foo' -1664 # type: int -1665 # stack-offset: -8 -1666 # -1667 # There's a primitive with this info: -1668 # name: 'increment' -1669 # inouts: int/mem -1670 # value: 'ff 0/subop/increment' -1671 # -1672 # There's nothing in functions. -1673 # -1674 # . prologue -1675 55/push-ebp -1676 89/<- %ebp 4/r32/esp -1677 # setup -1678 (clear-stream _test-output-stream) -1679 (clear-stream _test-output-buffered-file->buffer) -1680 # var-foo/ecx : var -1681 68/push 0/imm32/no-register -1682 68/push -8/imm32/stack-offset -1683 68/push 1/imm32/block-depth -1684 68/push 1/imm32/type-int -1685 68/push "foo"/imm32 -1686 89/<- %ecx 4/r32/esp -1687 #? $aa-var-in-ecx: -1688 # vars/edx : (stack 1) -1689 51/push-ecx/var-foo -1690 68/push 1/imm32/data-length -1691 68/push 1/imm32/top -1692 89/<- %edx 4/r32/esp -1693 #? $aa-vars-in-edx: -1694 # operand/ebx : (list var) -1695 68/push 0/imm32/next -1696 51/push-ecx/var-foo -1697 89/<- %ebx 4/r32/esp -1698 #? $aa-stmt-operand-in-ebx: -1699 # stmt/esi : statement +1549 # for (curr/esi in stmt->outputs, curr2/edi in primitive->outputs) +1550 8b/-> *(ecx+0xc) 6/r32/esi # Stmt1-outputs +1551 8b/-> *(edx+8) 7/r32/edi # Primitive-outputs +1552 { +1553 # if (curr == 0) return (curr2 == 0) +1554 { +1555 81 7/subop/compare %esi 0/imm32 +1556 75/jump-if-not-equal break/disp8 +1557 { +1558 81 7/subop/compare %edi 0/imm32 +1559 75/jump-if-not-equal break/disp8 +1560 # return true +1561 b8/copy-to-eax 1/imm32 +1562 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1563 } +1564 # return false +1565 b8/copy-to-eax 0/imm32 +1566 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1567 } +1568 # if (curr2 == 0) return false +1569 { +1570 81 7/subop/compare %edi 0/imm32 +1571 75/jump-if-not-equal break/disp8 +1572 b8/copy-to-eax 0/imm32 +1573 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1574 } +1575 # if (curr != curr2) return false +1576 { +1577 (operand-matches-primitive? *esi *edi) # => eax +1578 3d/compare-eax-and 0/imm32 +1579 75/jump-if-not-equal break/disp8 +1580 b8/copy-to-eax 0/imm32 +1581 e9/jump $mu-stmt-matches-primitive?:end/disp32 +1582 } +1583 # curr=curr->next +1584 8b/-> *(ecx+4) 1/r32/ecx # Operand-next +1585 # curr2=curr2->next +1586 8b/-> *(edx+4) 2/r32/edx # Operand-next +1587 eb/jump loop/disp8 +1588 } +1589 $mu-stmt-matches-primitive?:return-true: +1590 b8/copy-to-eax 1/imm32 +1591 $mu-stmt-matches-primitive?:end: +1592 # . restore registers +1593 5f/pop-to-edi +1594 5e/pop-to-esi +1595 5b/pop-to-ebx +1596 5a/pop-to-edx +1597 59/pop-to-ecx +1598 # . epilogue +1599 89/<- %esp 5/r32/ebp +1600 5d/pop-to-ebp +1601 c3/return +1602 +1603 operand-matches-primitive?: # var : (address var), primout-var : (address var) => result/eax : boolean +1604 # . prologue +1605 55/push-ebp +1606 89/<- %ebp 4/r32/esp +1607 # . save registers +1608 56/push-esi +1609 57/push-edi +1610 # esi = var +1611 8b/-> *(ebp+8) 6/r32/esi +1612 # edi = primout-var +1613 8b/-> *(ebp+0xc) 7/r32/edi +1614 # if (var->type != primout-var->type) return false +1615 8b/-> *(esi+4) 0/r32/eax # Var-type +1616 39/compare *(edi+4) 0/r32/eax # Var-type +1617 b8/copy-to-eax 0/imm32/false +1618 75/jump-if-not-equal $operand-matches-primitive?:end/disp8 +1619 # return false if var->register doesn't match primout-var->register +1620 { +1621 # if addresses are equal, don't return here +1622 8b/-> *(esi+0x10) 0/r32/eax +1623 39/compare *(edi+0x10) 0/r32/eax +1624 74/jump-if-equal break/disp8 +1625 # if either address is 0, return false +1626 3d/compare-eax-and 0/imm32 +1627 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result +1628 81 7/subop/compare *(edi+0x10) 0/imm32 +1629 74/jump-if-equal $operand-matches-primitive?:end/disp8 # eax goes from meaning var->register to result +1630 # if primout-var->register is "*", return true +1631 (string-equal? *(edi+0x10) "*") # Var-register +1632 3d/compare-eax-and 0/imm32 +1633 b8/copy-to-eax 1/imm32/true +1634 75/jump-if-not-equal $operand-matches-primitive?:end/disp8 +1635 # if string contents don't match, return false +1636 (string-equal? *(esi+0x10) *(edi+0x10)) # Var-register Var-register +1637 3d/compare-eax-and 0/imm32 +1638 b8/copy-to-eax 0/imm32/false +1639 74/jump-if-equal $operand-matches-primitive?:end/disp8 +1640 } +1641 # return true +1642 b8/copy-to-eax 1/imm32/true +1643 $operand-matches-primitive?:end: +1644 # . restore registers +1645 5f/pop-to-edi +1646 5e/pop-to-esi +1647 # . epilogue +1648 89/<- %esp 5/r32/ebp +1649 5d/pop-to-ebp +1650 c3/return +1651 +1652 test-emit-subx-statement-primitive: +1653 # Primitive operation on a variable on the stack. +1654 # increment foo +1655 # => +1656 # ff 0/subop/increment *(ebp-8) +1657 # +1658 # There's a variable on the var stack as follows: +1659 # name: 'foo' +1660 # type: int +1661 # stack-offset: -8 +1662 # +1663 # There's a primitive with this info: +1664 # name: 'increment' +1665 # inouts: int/mem +1666 # value: 'ff 0/subop/increment' +1667 # +1668 # There's nothing in functions. +1669 # +1670 # . prologue +1671 55/push-ebp +1672 89/<- %ebp 4/r32/esp +1673 # setup +1674 (clear-stream _test-output-stream) +1675 (clear-stream _test-output-buffered-file->buffer) +1676 # var-foo/ecx : var +1677 68/push 0/imm32/no-register +1678 68/push -8/imm32/stack-offset +1679 68/push 1/imm32/block-depth +1680 68/push 1/imm32/type-int +1681 68/push "foo"/imm32 +1682 89/<- %ecx 4/r32/esp +1683 # vars/edx : (stack 1) +1684 51/push-ecx/var-foo +1685 68/push 1/imm32/data-length +1686 68/push 1/imm32/top +1687 89/<- %edx 4/r32/esp +1688 # operand/ebx : (list var) +1689 68/push 0/imm32/next +1690 51/push-ecx/var-foo +1691 89/<- %ebx 4/r32/esp +1692 # stmt/esi : statement +1693 68/push 0/imm32/next +1694 68/push 0/imm32/outputs +1695 53/push-ebx/operands +1696 68/push "increment"/imm32/operation +1697 68/push 1/imm32 +1698 89/<- %esi 4/r32/esp +1699 # primitives/ebx : primitive 1700 68/push 0/imm32/next -1701 68/push 0/imm32/outputs -1702 53/push-ebx/operands -1703 68/push "increment"/imm32/operation -1704 68/push 1/imm32 -1705 89/<- %esi 4/r32/esp -1706 #? $aa-stmt-in-esi: -1707 # primitives/ebx : primitive -1708 68/push 0/imm32/next -1709 68/push 0/imm32/no-imm32 -1710 68/push 0/imm32/no-r32 -1711 68/push 1/imm32/rm32-is-first-inout -1712 68/push "ff 0/subop/increment"/imm32/subx-name -1713 68/push 0/imm32/outputs -1714 53/push-ebx/inouts # hack; in practice we won't have the same var in function definition and call -1715 68/push "increment"/imm32/name -1716 89/<- %ebx 4/r32/esp -1717 $aa-primitive-in-ebx: -1718 # convert -1719 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) -1720 (flush _test-output-buffered-file) -1721 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -1727 # check output -1728 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-statement-primitive") -1729 # . epilogue -1730 89/<- %esp 5/r32/ebp -1731 5d/pop-to-ebp -1732 c3/return -1733 -1734 test-emit-subx-statement-primitive-register: -1735 # Primitive operation on a variable in a register. -1736 # foo <- increment -1737 # => -1738 # ff 0/subop/increment %eax # sub-optimal, but should suffice -1739 # -1740 # There's a variable on the var stack as follows: -1741 # name: 'foo' -1742 # type: int -1743 # register: 'eax' -1744 # -1745 # There's a primitive with this info: -1746 # name: 'increment' -1747 # out: int/reg -1748 # value: 'ff 0/subop/increment' -1749 # -1750 # There's nothing in functions. -1751 # -1752 # . prologue -1753 55/push-ebp -1754 89/<- %ebp 4/r32/esp -1755 # setup -1756 (clear-stream _test-output-stream) -1757 (clear-stream _test-output-buffered-file->buffer) -1758 # var-foo/ecx : var in eax -1759 68/push "eax"/imm32/register -1760 68/push 0/imm32/no-stack-offset -1761 68/push 1/imm32/block-depth -1762 68/push 1/imm32/type-int -1763 68/push "foo"/imm32 -1764 89/<- %ecx 4/r32/esp -1765 # vars/edx : (stack 1) -1766 51/push-ecx/var-foo -1767 68/push 1/imm32/data-length -1768 68/push 1/imm32/top -1769 89/<- %edx 4/r32/esp -1770 # operand/ebx : (list var) -1771 68/push 0/imm32/next -1772 51/push-ecx/var-foo -1773 89/<- %ebx 4/r32/esp -1774 # stmt/esi : statement -1775 68/push 0/imm32/next -1776 53/push-ebx/outputs -1777 68/push 0/imm32/inouts -1778 68/push "increment"/imm32/operation -1779 68/push 1/imm32 -1780 89/<- %esi 4/r32/esp -1781 # formal-var/ebx : var in any register -1782 68/push Any-register/imm32 -1783 68/push 0/imm32/no-stack-offset -1784 68/push 1/imm32/block-depth -1785 68/push 1/imm32/type-int -1786 68/push "dummy"/imm32 -1787 89/<- %ebx 4/r32/esp -1788 # operand/ebx : (list var) -1789 68/push 0/imm32/next -1790 53/push-ebx/formal-var -1791 89/<- %ebx 4/r32/esp -1792 # primitives/ebx : primitive -1793 68/push 0/imm32/next -1794 68/push 0/imm32/no-imm32 -1795 68/push 0/imm32/no-r32 -1796 68/push 3/imm32/rm32-in-first-output -1797 68/push "ff 0/subop/increment"/imm32/subx-name -1798 53/push-ebx/outputs -1799 68/push 0/imm32/inouts -1800 68/push "increment"/imm32/name -1801 89/<- %ebx 4/r32/esp -1802 # convert -1803 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) -1804 (flush _test-output-buffered-file) -1805 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -1811 # check output -1812 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-primitive-register") -1813 # . epilogue -1814 89/<- %esp 5/r32/ebp -1815 5d/pop-to-ebp -1816 c3/return -1817 -1818 test-emit-subx-statement-select-primitive: -1819 # Select the right primitive between overloads. -1820 # foo <- increment -1821 # => -1822 # ff 0/subop/increment %eax # sub-optimal, but should suffice -1823 # -1824 # There's a variable on the var stack as follows: -1825 # name: 'foo' -1826 # type: int -1827 # register: 'eax' -1828 # -1829 # There's two primitives, as follows: -1830 # - name: 'increment' -1831 # out: int/reg -1832 # value: 'ff 0/subop/increment' -1833 # - name: 'increment' -1834 # inout: int/mem -1835 # value: 'ff 0/subop/increment' -1836 # -1837 # There's nothing in functions. -1838 # -1839 # . prologue -1840 55/push-ebp -1841 89/<- %ebp 4/r32/esp -1842 # setup -1843 (clear-stream _test-output-stream) -1844 (clear-stream _test-output-buffered-file->buffer) -1845 # var-foo/ecx : var in eax -1846 68/push "eax"/imm32/register -1847 68/push 0/imm32/no-stack-offset -1848 68/push 1/imm32/block-depth -1849 68/push 1/imm32/type-int -1850 68/push "foo"/imm32 -1851 89/<- %ecx 4/r32/esp -1852 # vars/edx : (stack 1) -1853 51/push-ecx/var-foo -1854 68/push 1/imm32/data-length -1855 68/push 1/imm32/top -1856 89/<- %edx 4/r32/esp -1857 # real-outputs/edi : (list var) -1858 68/push 0/imm32/next -1859 51/push-ecx/var-foo -1860 89/<- %edi 4/r32/esp -1861 # stmt/esi : statement -1862 68/push 0/imm32/next -1863 57/push-edi/outputs -1864 68/push 0/imm32/inouts -1865 68/push "increment"/imm32/operation -1866 68/push 1/imm32 -1867 89/<- %esi 4/r32/esp -1868 # formal-var/ebx : var in any register -1869 68/push Any-register/imm32 -1870 68/push 0/imm32/no-stack-offset -1871 68/push 1/imm32/block-depth -1872 68/push 1/imm32/type-int -1873 68/push "dummy"/imm32 -1874 89/<- %ebx 4/r32/esp -1875 # formal-outputs/ebx : (list var) -1876 68/push 0/imm32/next -1877 53/push-ebx/formal-var -1878 89/<- %ebx 4/r32/esp -1879 # primitive1/ebx : primitive -1880 68/push 0/imm32/next -1881 68/push 0/imm32/no-imm32 -1882 68/push 0/imm32/no-r32 -1883 68/push 3/imm32/rm32-in-first-output -1884 68/push "ff 0/subop/increment"/imm32/subx-name -1885 53/push-ebx/outputs/formal-outputs -1886 68/push 0/imm32/inouts -1887 68/push "increment"/imm32/name -1888 89/<- %ebx 4/r32/esp -1889 # primitives/ebx : primitive -1890 53/push-ebx/next -1891 68/push 0/imm32/no-imm32 -1892 68/push 0/imm32/no-r32 -1893 68/push 1/imm32/rm32-is-first-inout -1894 68/push "ff 0/subop/increment"/imm32/subx-name -1895 68/push 0/imm32/outputs -1896 57/push-edi/inouts/real-outputs # hack; in practice we won't have the same var in function definition and call -1897 68/push "increment"/imm32/name -1898 89/<- %ebx 4/r32/esp -1899 # convert -1900 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) -1901 (flush _test-output-buffered-file) -1902 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -1908 # check output -1909 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-select-primitive") -1910 # . epilogue -1911 89/<- %esp 5/r32/ebp -1912 5d/pop-to-ebp -1913 c3/return -1914 -1915 test-emit-subx-statement-select-primitive-2: -1916 # Select the right primitive between overloads. -1917 # foo <- increment -1918 # => -1919 # ff 0/subop/increment %eax # sub-optimal, but should suffice -1920 # -1921 # There's a variable on the var stack as follows: -1922 # name: 'foo' -1923 # type: int -1924 # register: 'eax' -1925 # -1926 # There's two primitives, as follows: -1927 # - name: 'increment' -1928 # out: int/reg -1929 # value: 'ff 0/subop/increment' -1930 # - name: 'increment' -1931 # inout: int/mem -1932 # value: 'ff 0/subop/increment' -1933 # -1934 # There's nothing in functions. -1935 # -1936 # . prologue -1937 55/push-ebp -1938 89/<- %ebp 4/r32/esp -1939 # setup -1940 (clear-stream _test-output-stream) -1941 (clear-stream _test-output-buffered-file->buffer) -1942 # var-foo/ecx : var in eax -1943 68/push "eax"/imm32/register -1944 68/push 0/imm32/no-stack-offset -1945 68/push 1/imm32/block-depth -1946 68/push 1/imm32/type-int -1947 68/push "foo"/imm32 -1948 89/<- %ecx 4/r32/esp -1949 # vars/edx : (stack 1) -1950 51/push-ecx/var-foo -1951 68/push 1/imm32/data-length -1952 68/push 1/imm32/top -1953 89/<- %edx 4/r32/esp -1954 # inouts/edi : (list var) -1955 68/push 0/imm32/next -1956 51/push-ecx/var-foo -1957 89/<- %edi 4/r32/esp -1958 # stmt/esi : statement -1959 68/push 0/imm32/next -1960 68/push 0/imm32/outputs -1961 57/push-edi/inouts -1962 68/push "increment"/imm32/operation -1963 68/push 1/imm32 -1964 89/<- %esi 4/r32/esp -1965 # formal-var/ebx : var in any register -1966 68/push Any-register/imm32 -1967 68/push 0/imm32/no-stack-offset -1968 68/push 1/imm32/block-depth -1969 68/push 1/imm32/type-int -1970 68/push "dummy"/imm32 -1971 89/<- %ebx 4/r32/esp -1972 # operand/ebx : (list var) -1973 68/push 0/imm32/next -1974 53/push-ebx/formal-var -1975 89/<- %ebx 4/r32/esp -1976 # primitive1/ebx : primitive -1977 68/push 0/imm32/next -1978 68/push 0/imm32/no-imm32 -1979 68/push 0/imm32/no-r32 -1980 68/push 3/imm32/rm32-in-first-output -1981 68/push "ff 0/subop/increment"/imm32/subx-name -1982 53/push-ebx/outputs/formal-outputs -1983 68/push 0/imm32/inouts -1984 68/push "increment"/imm32/name -1985 89/<- %ebx 4/r32/esp -1986 # primitives/ebx : primitive -1987 53/push-ebx/next -1988 68/push 0/imm32/no-imm32 -1989 68/push 0/imm32/no-r32 -1990 68/push 1/imm32/rm32-is-first-inout -1991 68/push "ff 0/subop/increment"/imm32/subx-name -1992 68/push 0/imm32/outputs -1993 57/push-edi/inouts/real-outputs # hack; in practice we won't have the same var in function definition and call -1994 68/push "increment"/imm32/name -1995 89/<- %ebx 4/r32/esp -1996 # convert -1997 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) -1998 (flush _test-output-buffered-file) -1999 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2005 # check output -2006 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-select-primitive-2") -2007 # . epilogue -2008 89/<- %esp 5/r32/ebp -2009 5d/pop-to-ebp -2010 c3/return -2011 -2012 test-increment-register: -2013 # Select the right primitive between overloads. -2014 # foo <- increment -2015 # => -2016 # ff 0/subop/increment %eax # sub-optimal, but should suffice +1701 68/push 0/imm32/no-imm32 +1702 68/push 0/imm32/no-r32 +1703 68/push 1/imm32/rm32-is-first-inout +1704 68/push "ff 0/subop/increment"/imm32/subx-name +1705 68/push 0/imm32/outputs +1706 53/push-ebx/inouts # hack; in practice we won't have the same var in function definition and call +1707 68/push "increment"/imm32/name +1708 89/<- %ebx 4/r32/esp +1709 # convert +1710 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) +1711 (flush _test-output-buffered-file) +1712 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +1718 # check output +1719 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment *(ebp+0xfffffff8)" "F - test-emit-subx-statement-primitive") +1720 # . epilogue +1721 89/<- %esp 5/r32/ebp +1722 5d/pop-to-ebp +1723 c3/return +1724 +1725 test-emit-subx-statement-primitive-register: +1726 # Primitive operation on a variable in a register. +1727 # foo <- increment +1728 # => +1729 # ff 0/subop/increment %eax # sub-optimal, but should suffice +1730 # +1731 # There's a variable on the var stack as follows: +1732 # name: 'foo' +1733 # type: int +1734 # register: 'eax' +1735 # +1736 # There's a primitive with this info: +1737 # name: 'increment' +1738 # out: int/reg +1739 # value: 'ff 0/subop/increment' +1740 # +1741 # There's nothing in functions. +1742 # +1743 # . prologue +1744 55/push-ebp +1745 89/<- %ebp 4/r32/esp +1746 # setup +1747 (clear-stream _test-output-stream) +1748 (clear-stream _test-output-buffered-file->buffer) +1749 # var-foo/ecx : var in eax +1750 68/push "eax"/imm32/register +1751 68/push 0/imm32/no-stack-offset +1752 68/push 1/imm32/block-depth +1753 68/push 1/imm32/type-int +1754 68/push "foo"/imm32 +1755 89/<- %ecx 4/r32/esp +1756 # vars/edx : (stack 1) +1757 51/push-ecx/var-foo +1758 68/push 1/imm32/data-length +1759 68/push 1/imm32/top +1760 89/<- %edx 4/r32/esp +1761 # operand/ebx : (list var) +1762 68/push 0/imm32/next +1763 51/push-ecx/var-foo +1764 89/<- %ebx 4/r32/esp +1765 # stmt/esi : statement +1766 68/push 0/imm32/next +1767 53/push-ebx/outputs +1768 68/push 0/imm32/inouts +1769 68/push "increment"/imm32/operation +1770 68/push 1/imm32 +1771 89/<- %esi 4/r32/esp +1772 # formal-var/ebx : var in any register +1773 68/push Any-register/imm32 +1774 68/push 0/imm32/no-stack-offset +1775 68/push 1/imm32/block-depth +1776 68/push 1/imm32/type-int +1777 68/push "dummy"/imm32 +1778 89/<- %ebx 4/r32/esp +1779 # operand/ebx : (list var) +1780 68/push 0/imm32/next +1781 53/push-ebx/formal-var +1782 89/<- %ebx 4/r32/esp +1783 # primitives/ebx : primitive +1784 68/push 0/imm32/next +1785 68/push 0/imm32/no-imm32 +1786 68/push 0/imm32/no-r32 +1787 68/push 3/imm32/rm32-in-first-output +1788 68/push "ff 0/subop/increment"/imm32/subx-name +1789 53/push-ebx/outputs +1790 68/push 0/imm32/inouts +1791 68/push "increment"/imm32/name +1792 89/<- %ebx 4/r32/esp +1793 # convert +1794 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) +1795 (flush _test-output-buffered-file) +1796 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +1802 # check output +1803 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-primitive-register") +1804 # . epilogue +1805 89/<- %esp 5/r32/ebp +1806 5d/pop-to-ebp +1807 c3/return +1808 +1809 test-emit-subx-statement-select-primitive: +1810 # Select the right primitive between overloads. +1811 # foo <- increment +1812 # => +1813 # ff 0/subop/increment %eax # sub-optimal, but should suffice +1814 # +1815 # There's a variable on the var stack as follows: +1816 # name: 'foo' +1817 # type: int +1818 # register: 'eax' +1819 # +1820 # There's two primitives, as follows: +1821 # - name: 'increment' +1822 # out: int/reg +1823 # value: 'ff 0/subop/increment' +1824 # - name: 'increment' +1825 # inout: int/mem +1826 # value: 'ff 0/subop/increment' +1827 # +1828 # There's nothing in functions. +1829 # +1830 # . prologue +1831 55/push-ebp +1832 89/<- %ebp 4/r32/esp +1833 # setup +1834 (clear-stream _test-output-stream) +1835 (clear-stream _test-output-buffered-file->buffer) +1836 # var-foo/ecx : var in eax +1837 68/push "eax"/imm32/register +1838 68/push 0/imm32/no-stack-offset +1839 68/push 1/imm32/block-depth +1840 68/push 1/imm32/type-int +1841 68/push "foo"/imm32 +1842 89/<- %ecx 4/r32/esp +1843 # vars/edx : (stack 1) +1844 51/push-ecx/var-foo +1845 68/push 1/imm32/data-length +1846 68/push 1/imm32/top +1847 89/<- %edx 4/r32/esp +1848 # real-outputs/edi : (list var) +1849 68/push 0/imm32/next +1850 51/push-ecx/var-foo +1851 89/<- %edi 4/r32/esp +1852 # stmt/esi : statement +1853 68/push 0/imm32/next +1854 57/push-edi/outputs +1855 68/push 0/imm32/inouts +1856 68/push "increment"/imm32/operation +1857 68/push 1/imm32 +1858 89/<- %esi 4/r32/esp +1859 # formal-var/ebx : var in any register +1860 68/push Any-register/imm32 +1861 68/push 0/imm32/no-stack-offset +1862 68/push 1/imm32/block-depth +1863 68/push 1/imm32/type-int +1864 68/push "dummy"/imm32 +1865 89/<- %ebx 4/r32/esp +1866 # formal-outputs/ebx : (list var) +1867 68/push 0/imm32/next +1868 53/push-ebx/formal-var +1869 89/<- %ebx 4/r32/esp +1870 # primitive1/ebx : primitive +1871 68/push 0/imm32/next +1872 68/push 0/imm32/no-imm32 +1873 68/push 0/imm32/no-r32 +1874 68/push 3/imm32/rm32-in-first-output +1875 68/push "ff 0/subop/increment"/imm32/subx-name +1876 53/push-ebx/outputs/formal-outputs +1877 68/push 0/imm32/inouts +1878 68/push "increment"/imm32/name +1879 89/<- %ebx 4/r32/esp +1880 # primitives/ebx : primitive +1881 53/push-ebx/next +1882 68/push 0/imm32/no-imm32 +1883 68/push 0/imm32/no-r32 +1884 68/push 1/imm32/rm32-is-first-inout +1885 68/push "ff 0/subop/increment"/imm32/subx-name +1886 68/push 0/imm32/outputs +1887 57/push-edi/inouts/real-outputs # hack; in practice we won't have the same var in function definition and call +1888 68/push "increment"/imm32/name +1889 89/<- %ebx 4/r32/esp +1890 # convert +1891 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) +1892 (flush _test-output-buffered-file) +1893 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +1899 # check output +1900 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-select-primitive") +1901 # . epilogue +1902 89/<- %esp 5/r32/ebp +1903 5d/pop-to-ebp +1904 c3/return +1905 +1906 test-emit-subx-statement-select-primitive-2: +1907 # Select the right primitive between overloads. +1908 # foo <- increment +1909 # => +1910 # ff 0/subop/increment %eax # sub-optimal, but should suffice +1911 # +1912 # There's a variable on the var stack as follows: +1913 # name: 'foo' +1914 # type: int +1915 # register: 'eax' +1916 # +1917 # There's two primitives, as follows: +1918 # - name: 'increment' +1919 # out: int/reg +1920 # value: 'ff 0/subop/increment' +1921 # - name: 'increment' +1922 # inout: int/mem +1923 # value: 'ff 0/subop/increment' +1924 # +1925 # There's nothing in functions. +1926 # +1927 # . prologue +1928 55/push-ebp +1929 89/<- %ebp 4/r32/esp +1930 # setup +1931 (clear-stream _test-output-stream) +1932 (clear-stream _test-output-buffered-file->buffer) +1933 # var-foo/ecx : var in eax +1934 68/push "eax"/imm32/register +1935 68/push 0/imm32/no-stack-offset +1936 68/push 1/imm32/block-depth +1937 68/push 1/imm32/type-int +1938 68/push "foo"/imm32 +1939 89/<- %ecx 4/r32/esp +1940 # vars/edx : (stack 1) +1941 51/push-ecx/var-foo +1942 68/push 1/imm32/data-length +1943 68/push 1/imm32/top +1944 89/<- %edx 4/r32/esp +1945 # inouts/edi : (list var) +1946 68/push 0/imm32/next +1947 51/push-ecx/var-foo +1948 89/<- %edi 4/r32/esp +1949 # stmt/esi : statement +1950 68/push 0/imm32/next +1951 68/push 0/imm32/outputs +1952 57/push-edi/inouts +1953 68/push "increment"/imm32/operation +1954 68/push 1/imm32 +1955 89/<- %esi 4/r32/esp +1956 # formal-var/ebx : var in any register +1957 68/push Any-register/imm32 +1958 68/push 0/imm32/no-stack-offset +1959 68/push 1/imm32/block-depth +1960 68/push 1/imm32/type-int +1961 68/push "dummy"/imm32 +1962 89/<- %ebx 4/r32/esp +1963 # operand/ebx : (list var) +1964 68/push 0/imm32/next +1965 53/push-ebx/formal-var +1966 89/<- %ebx 4/r32/esp +1967 # primitive1/ebx : primitive +1968 68/push 0/imm32/next +1969 68/push 0/imm32/no-imm32 +1970 68/push 0/imm32/no-r32 +1971 68/push 3/imm32/rm32-in-first-output +1972 68/push "ff 0/subop/increment"/imm32/subx-name +1973 53/push-ebx/outputs/formal-outputs +1974 68/push 0/imm32/inouts +1975 68/push "increment"/imm32/name +1976 89/<- %ebx 4/r32/esp +1977 # primitives/ebx : primitive +1978 53/push-ebx/next +1979 68/push 0/imm32/no-imm32 +1980 68/push 0/imm32/no-r32 +1981 68/push 1/imm32/rm32-is-first-inout +1982 68/push "ff 0/subop/increment"/imm32/subx-name +1983 68/push 0/imm32/outputs +1984 57/push-edi/inouts/real-outputs # hack; in practice we won't have the same var in function definition and call +1985 68/push "increment"/imm32/name +1986 89/<- %ebx 4/r32/esp +1987 # convert +1988 (emit-subx-statement _test-output-buffered-file %esi %edx %ebx 0) +1989 (flush _test-output-buffered-file) +1990 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +1996 # check output +1997 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-emit-subx-statement-select-primitive-2") +1998 # . epilogue +1999 89/<- %esp 5/r32/ebp +2000 5d/pop-to-ebp +2001 c3/return +2002 +2003 test-increment-register: +2004 # Select the right primitive between overloads. +2005 # foo <- increment +2006 # => +2007 # ff 0/subop/increment %eax # sub-optimal, but should suffice +2008 # +2009 # There's a variable on the var stack as follows: +2010 # name: 'foo' +2011 # type: int +2012 # register: 'eax' +2013 # +2014 # Primitives are the global definitions. +2015 # +2016 # There are no functions defined. 2017 # -2018 # There's a variable on the var stack as follows: -2019 # name: 'foo' -2020 # type: int -2021 # register: 'eax' -2022 # -2023 # Primitives are the global definitions. -2024 # -2025 # There are no functions defined. -2026 # -2027 # . prologue -2028 55/push-ebp -2029 89/<- %ebp 4/r32/esp -2030 # setup -2031 (clear-stream _test-output-stream) -2032 (clear-stream _test-output-buffered-file->buffer) -2033 # var-foo/ecx : var in eax -2034 68/push "eax"/imm32/register -2035 68/push 0/imm32/no-stack-offset -2036 68/push 1/imm32/block-depth -2037 68/push 1/imm32/type-int -2038 68/push "foo"/imm32 -2039 89/<- %ecx 4/r32/esp -2040 # vars/edx : (stack 1) -2041 51/push-ecx/var-foo -2042 68/push 1/imm32/data-length -2043 68/push 1/imm32/top -2044 89/<- %edx 4/r32/esp -2045 # real-outputs/edi : (list var) -2046 68/push 0/imm32/next -2047 51/push-ecx/var-foo -2048 89/<- %edi 4/r32/esp -2049 # stmt/esi : statement -2050 68/push 0/imm32/next -2051 57/push-edi/outputs -2052 68/push 0/imm32/inouts -2053 68/push "increment"/imm32/operation -2054 68/push 1/imm32 -2055 89/<- %esi 4/r32/esp -2056 # convert -2057 (emit-subx-statement _test-output-buffered-file %esi %edx Primitives 0) -2058 (flush _test-output-buffered-file) -2059 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2065 # check output -2066 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-increment-register") -2067 # . epilogue -2068 89/<- %esp 5/r32/ebp -2069 5d/pop-to-ebp -2070 c3/return -2071 -2072 test-increment-var: -2073 # Select the right primitive between overloads. -2074 # foo <- increment -2075 # => -2076 # ff 0/subop/increment %eax # sub-optimal, but should suffice +2018 # . prologue +2019 55/push-ebp +2020 89/<- %ebp 4/r32/esp +2021 # setup +2022 (clear-stream _test-output-stream) +2023 (clear-stream _test-output-buffered-file->buffer) +2024 # var-foo/ecx : var in eax +2025 68/push "eax"/imm32/register +2026 68/push 0/imm32/no-stack-offset +2027 68/push 1/imm32/block-depth +2028 68/push 1/imm32/type-int +2029 68/push "foo"/imm32 +2030 89/<- %ecx 4/r32/esp +2031 # vars/edx : (stack 1) +2032 51/push-ecx/var-foo +2033 68/push 1/imm32/data-length +2034 68/push 1/imm32/top +2035 89/<- %edx 4/r32/esp +2036 # real-outputs/edi : (list var) +2037 68/push 0/imm32/next +2038 51/push-ecx/var-foo +2039 89/<- %edi 4/r32/esp +2040 # stmt/esi : statement +2041 68/push 0/imm32/next +2042 57/push-edi/outputs +2043 68/push 0/imm32/inouts +2044 68/push "increment"/imm32/operation +2045 68/push 1/imm32 +2046 89/<- %esi 4/r32/esp +2047 # convert +2048 (emit-subx-statement _test-output-buffered-file %esi %edx Primitives 0) +2049 (flush _test-output-buffered-file) +2050 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2056 # check output +2057 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-increment-register") +2058 # . epilogue +2059 89/<- %esp 5/r32/ebp +2060 5d/pop-to-ebp +2061 c3/return +2062 +2063 test-increment-var: +2064 # Select the right primitive between overloads. +2065 # foo <- increment +2066 # => +2067 # ff 0/subop/increment %eax # sub-optimal, but should suffice +2068 # +2069 # There's a variable on the var stack as follows: +2070 # name: 'foo' +2071 # type: int +2072 # register: 'eax' +2073 # +2074 # Primitives are the global definitions. +2075 # +2076 # There are no functions defined. 2077 # -2078 # There's a variable on the var stack as follows: -2079 # name: 'foo' -2080 # type: int -2081 # register: 'eax' -2082 # -2083 # Primitives are the global definitions. -2084 # -2085 # There are no functions defined. -2086 # -2087 # . prologue -2088 55/push-ebp -2089 89/<- %ebp 4/r32/esp -2090 # setup -2091 (clear-stream _test-output-stream) -2092 (clear-stream _test-output-buffered-file->buffer) -2093 # var-foo/ecx : var in eax -2094 68/push "eax"/imm32/register -2095 68/push 0/imm32/no-stack-offset -2096 68/push 1/imm32/block-depth -2097 68/push 1/imm32/type-int -2098 68/push "foo"/imm32 -2099 89/<- %ecx 4/r32/esp -2100 # vars/edx : (stack 1) -2101 51/push-ecx/var-foo -2102 68/push 1/imm32/data-length -2103 68/push 1/imm32/top -2104 89/<- %edx 4/r32/esp -2105 # inouts/edi : (list var) -2106 68/push 0/imm32/next -2107 51/push-ecx/var-foo -2108 89/<- %edi 4/r32/esp -2109 # stmt/esi : statement -2110 68/push 0/imm32/next -2111 68/push 0/imm32/outputs -2112 57/push-edi/inouts -2113 68/push "increment"/imm32/operation -2114 68/push 1/imm32 -2115 89/<- %esi 4/r32/esp -2116 # convert -2117 (emit-subx-statement _test-output-buffered-file %esi %edx Primitives 0) -2118 (flush _test-output-buffered-file) -2119 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2125 # check output -2126 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-increment-var") -2127 # . epilogue -2128 89/<- %esp 5/r32/ebp -2129 5d/pop-to-ebp -2130 c3/return -2131 -2132 test-add-reg-to-reg: -2133 # var1/reg <- add var2/reg -2134 # => -2135 # 01 %var1 var2 -2136 # -2137 # . prologue -2138 55/push-ebp -2139 89/<- %ebp 4/r32/esp -2140 # setup -2141 (clear-stream _test-output-stream) -2142 (clear-stream _test-output-buffered-file->buffer) -2143 # var-var1/ecx : var in eax -2144 68/push "eax"/imm32/register -2145 68/push 0/imm32/no-stack-offset -2146 68/push 1/imm32/block-depth -2147 68/push 1/imm32/type-int -2148 68/push "var1"/imm32 -2149 89/<- %ecx 4/r32/esp -2150 # var-var2/edx : var in ecx -2151 68/push "ecx"/imm32/register -2152 68/push 0/imm32/no-stack-offset -2153 68/push 1/imm32/block-depth -2154 68/push 1/imm32/type-int -2155 68/push "var2"/imm32 -2156 89/<- %edx 4/r32/esp -2157 # inouts/esi : (list var2) -2158 68/push 0/imm32/next -2159 52/push-edx/var-var2 -2160 89/<- %esi 4/r32/esp -2161 # outputs/edi : (list var1) -2162 68/push 0/imm32/next -2163 51/push-ecx/var-var1 -2164 89/<- %edi 4/r32/esp -2165 # stmt/esi : statement -2166 68/push 0/imm32/next -2167 57/push-edi/outputs -2168 56/push-esi/inouts -2169 68/push "add"/imm32/operation -2170 68/push 1/imm32 -2171 89/<- %esi 4/r32/esp -2172 # convert -2173 (emit-subx-statement _test-output-buffered-file %esi 0 Primitives 0) -2174 (flush _test-output-buffered-file) -2175 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2181 # check output -2182 (check-next-stream-line-equal _test-output-stream "01 %eax 0x00000001/r32" "F - test-add-reg-to-reg") -2183 # . epilogue -2184 89/<- %esp 5/r32/ebp -2185 5d/pop-to-ebp -2186 c3/return -2187 -2188 test-add-literal-to-reg: -2189 # var1/eax <- add 0x34 -2190 # => -2191 # 81 0/subop/add %eax 0x34/imm32 -2192 # -2193 # . prologue -2194 55/push-ebp -2195 89/<- %ebp 4/r32/esp -2196 # setup -2197 (clear-stream _test-output-stream) -2198 (clear-stream _test-output-buffered-file->buffer) -2199 # var-var1/ecx : var in eax -2200 68/push "eax"/imm32/register -2201 68/push 0/imm32/no-stack-offset -2202 68/push 1/imm32/block-depth -2203 68/push 1/imm32/type-int -2204 68/push "var1"/imm32 -2205 89/<- %ecx 4/r32/esp -2206 # var-var2/edx : var literal -2207 68/push 0/imm32/no-register -2208 68/push 0/imm32/no-stack-offset -2209 68/push 1/imm32/block-depth -2210 68/push 0/imm32/type-literal -2211 68/push "0x34"/imm32 -2212 89/<- %edx 4/r32/esp -2213 # inouts/esi : (list var2) -2214 68/push 0/imm32/next -2215 52/push-edx/var-var2 -2216 89/<- %esi 4/r32/esp -2217 # outputs/edi : (list var1) -2218 68/push 0/imm32/next -2219 51/push-ecx/var-var1 -2220 89/<- %edi 4/r32/esp -2221 # stmt/esi : statement -2222 68/push 0/imm32/next -2223 57/push-edi/outputs -2224 56/push-esi/inouts -2225 68/push "add"/imm32/operation -2226 68/push 1/imm32 -2227 89/<- %esi 4/r32/esp -2228 # convert -2229 (emit-subx-statement _test-output-buffered-file %esi 0 Primitives 0) -2230 (flush _test-output-buffered-file) -2231 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2237 # check output -2238 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %eax 0x34/imm32" "F - test-add-literal-to-reg") -2239 # . epilogue -2240 89/<- %esp 5/r32/ebp -2241 5d/pop-to-ebp -2242 c3/return -2243 -2244 test-emit-subx-statement-function-call: -2245 # Call a function on a variable on the stack. -2246 # f foo -2247 # => -2248 # (f2 *(ebp-8)) -2249 # (Changing the function name supports overloading in general, but here it -2250 # just serves to help disambiguate things.) -2251 # -2252 # There's a variable on the var stack as follows: -2253 # name: 'foo' -2254 # type: int -2255 # stack-offset: -8 -2256 # -2257 # There's nothing in primitives. -2258 # -2259 # There's a function with this info: -2260 # name: 'f' -2261 # inout: int/mem -2262 # value: 'f2' -2263 # -2264 # . prologue -2265 55/push-ebp -2266 89/<- %ebp 4/r32/esp -2267 # setup -2268 (clear-stream _test-output-stream) -2269 (clear-stream _test-output-buffered-file->buffer) -2270 # var-foo/ecx : var -2271 68/push 0/imm32/no-register -2272 68/push -8/imm32/stack-offset -2273 68/push 0/imm32/block-depth -2274 68/push 1/imm32/type-int -2275 68/push "foo"/imm32 -2276 89/<- %ecx 4/r32/esp -2277 # vars/edx = (stack 1) -2278 51/push-ecx/var-foo -2279 68/push 1/imm32/data-length -2280 68/push 1/imm32/top -2281 89/<- %edx 4/r32/esp -2282 # operands/esi : (list var) -2283 68/push 0/imm32/next -2284 51/push-ecx/var-foo -2285 89/<- %esi 4/r32/esp -2286 # stmt/esi : statement -2287 68/push 0/imm32/next -2288 68/push 0/imm32/outputs -2289 56/push-esi/inouts -2290 68/push "f"/imm32/operation -2291 68/push 1/imm32 -2292 89/<- %esi 4/r32/esp -2293 # functions/ebx : function -2294 68/push 0/imm32/next -2295 68/push 0/imm32/body -2296 68/push 0/imm32/outputs -2297 51/push-ecx/inouts # hack; in practice we won't have the same var in function definition and call -2298 68/push "f2"/imm32/subx-name -2299 68/push "f"/imm32/name -2300 89/<- %ebx 4/r32/esp -2301 # convert -2302 (emit-subx-statement _test-output-buffered-file %esi %edx 0 %ebx) -2303 (flush _test-output-buffered-file) -2304 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2310 # check output -2311 (check-next-stream-line-equal _test-output-stream "(f2 *(ebp+0xfffffff8))" "F - test-emit-subx-statement-function-call") -2312 # . epilogue -2313 89/<- %esp 5/r32/ebp -2314 5d/pop-to-ebp -2315 c3/return -2316 -2317 test-emit-subx-statement-function-call-with-literal-arg: -2318 # Call a function on a literal. -2319 # f 34 -2320 # => -2321 # (f2 34) -2322 # -2323 # . prologue -2324 55/push-ebp -2325 89/<- %ebp 4/r32/esp -2326 # setup -2327 (clear-stream _test-output-stream) -2328 (clear-stream _test-output-buffered-file->buffer) -2329 # var-foo/ecx : literal -2330 68/push 0/imm32/no-register -2331 68/push 0/imm32/no-stack-offset -2332 68/push 0/imm32/block-depth -2333 68/push 0/imm32/type-literal -2334 68/push "34"/imm32 -2335 89/<- %ecx 4/r32/esp -2336 # vars/edx = (stack 1) -2337 51/push-ecx/var-foo -2338 68/push 1/imm32/data-length -2339 68/push 1/imm32/top -2340 89/<- %edx 4/r32/esp -2341 # operands/esi : (list var) -2342 68/push 0/imm32/next -2343 51/push-ecx/var-foo -2344 89/<- %esi 4/r32/esp -2345 # stmt/esi : statement -2346 68/push 0/imm32/next -2347 68/push 0/imm32/outputs -2348 56/push-esi/inouts -2349 68/push "f"/imm32/operation -2350 68/push 1/imm32 -2351 89/<- %esi 4/r32/esp -2352 # functions/ebx : function -2353 68/push 0/imm32/next -2354 68/push 0/imm32/body -2355 68/push 0/imm32/outputs -2356 51/push-ecx/inouts # hack; in practice we won't have the same var in function definition and call -2357 68/push "f2"/imm32/subx-name -2358 68/push "f"/imm32/name -2359 89/<- %ebx 4/r32/esp -2360 # convert -2361 (emit-subx-statement _test-output-buffered-file %esi %edx 0 %ebx) -2362 (flush _test-output-buffered-file) -2363 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -2369 # check output -2370 (check-next-stream-line-equal _test-output-stream "(f2 34)" "F - test-emit-subx-statement-function-call-with-literal-arg") -2371 # . epilogue -2372 89/<- %esp 5/r32/ebp -2373 5d/pop-to-ebp -2374 c3/return -2375 -2376 emit-subx-prologue: # out : (address buffered-file) -2377 # . prologue -2378 55/push-ebp -2379 89/<- %ebp 4/r32/esp -2380 # -2381 (write-buffered *(ebp+8) "# . prologue\n") -2382 (write-buffered *(ebp+8) "55/push-ebp\n") -2383 (write-buffered *(ebp+8) "89/<- %ebp 4/r32/esp\n") -2384 $emit-subx-prologue:end: -2385 # . epilogue -2386 89/<- %esp 5/r32/ebp -2387 5d/pop-to-ebp -2388 c3/return -2389 -2390 emit-subx-epilogue: # out : (address buffered-file) -2391 # . prologue -2392 55/push-ebp -2393 89/<- %ebp 4/r32/esp -2394 # -2395 (write-buffered *(ebp+8) "# . epilogue\n") -2396 (write-buffered *(ebp+8) "89/<- %esp 5/r32/ebp\n") -2397 (write-buffered *(ebp+8) "5d/pop-to-ebp\n") -2398 (write-buffered *(ebp+8) "c3/return\n") -2399 $emit-subx-epilogue:end: -2400 # . epilogue -2401 89/<- %esp 5/r32/ebp -2402 5d/pop-to-ebp -2403 c3/return +2078 # . prologue +2079 55/push-ebp +2080 89/<- %ebp 4/r32/esp +2081 # setup +2082 (clear-stream _test-output-stream) +2083 (clear-stream _test-output-buffered-file->buffer) +2084 # var-foo/ecx : var in eax +2085 68/push "eax"/imm32/register +2086 68/push 0/imm32/no-stack-offset +2087 68/push 1/imm32/block-depth +2088 68/push 1/imm32/type-int +2089 68/push "foo"/imm32 +2090 89/<- %ecx 4/r32/esp +2091 # vars/edx : (stack 1) +2092 51/push-ecx/var-foo +2093 68/push 1/imm32/data-length +2094 68/push 1/imm32/top +2095 89/<- %edx 4/r32/esp +2096 # inouts/edi : (list var) +2097 68/push 0/imm32/next +2098 51/push-ecx/var-foo +2099 89/<- %edi 4/r32/esp +2100 # stmt/esi : statement +2101 68/push 0/imm32/next +2102 68/push 0/imm32/outputs +2103 57/push-edi/inouts +2104 68/push "increment"/imm32/operation +2105 68/push 1/imm32 +2106 89/<- %esi 4/r32/esp +2107 # convert +2108 (emit-subx-statement _test-output-buffered-file %esi %edx Primitives 0) +2109 (flush _test-output-buffered-file) +2110 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2116 # check output +2117 (check-next-stream-line-equal _test-output-stream "ff 0/subop/increment %eax" "F - test-increment-var") +2118 # . epilogue +2119 89/<- %esp 5/r32/ebp +2120 5d/pop-to-ebp +2121 c3/return +2122 +2123 test-add-reg-to-reg: +2124 # var1/reg <- add var2/reg +2125 # => +2126 # 01 %var1 var2 +2127 # +2128 # . prologue +2129 55/push-ebp +2130 89/<- %ebp 4/r32/esp +2131 # setup +2132 (clear-stream _test-output-stream) +2133 (clear-stream _test-output-buffered-file->buffer) +2134 # var-var1/ecx : var in eax +2135 68/push "eax"/imm32/register +2136 68/push 0/imm32/no-stack-offset +2137 68/push 1/imm32/block-depth +2138 68/push 1/imm32/type-int +2139 68/push "var1"/imm32 +2140 89/<- %ecx 4/r32/esp +2141 # var-var2/edx : var in ecx +2142 68/push "ecx"/imm32/register +2143 68/push 0/imm32/no-stack-offset +2144 68/push 1/imm32/block-depth +2145 68/push 1/imm32/type-int +2146 68/push "var2"/imm32 +2147 89/<- %edx 4/r32/esp +2148 # inouts/esi : (list var2) +2149 68/push 0/imm32/next +2150 52/push-edx/var-var2 +2151 89/<- %esi 4/r32/esp +2152 # outputs/edi : (list var1) +2153 68/push 0/imm32/next +2154 51/push-ecx/var-var1 +2155 89/<- %edi 4/r32/esp +2156 # stmt/esi : statement +2157 68/push 0/imm32/next +2158 57/push-edi/outputs +2159 56/push-esi/inouts +2160 68/push "add"/imm32/operation +2161 68/push 1/imm32 +2162 89/<- %esi 4/r32/esp +2163 # convert +2164 (emit-subx-statement _test-output-buffered-file %esi 0 Primitives 0) +2165 (flush _test-output-buffered-file) +2166 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2172 # check output +2173 (check-next-stream-line-equal _test-output-stream "01 %eax 0x00000001/r32" "F - test-add-reg-to-reg") +2174 # . epilogue +2175 89/<- %esp 5/r32/ebp +2176 5d/pop-to-ebp +2177 c3/return +2178 +2179 test-add-literal-to-reg: +2180 # var1/eax <- add 0x34 +2181 # => +2182 # 81 0/subop/add %eax 0x34/imm32 +2183 # +2184 # . prologue +2185 55/push-ebp +2186 89/<- %ebp 4/r32/esp +2187 # setup +2188 (clear-stream _test-output-stream) +2189 (clear-stream _test-output-buffered-file->buffer) +2190 # var-var1/ecx : var in eax +2191 68/push "eax"/imm32/register +2192 68/push 0/imm32/no-stack-offset +2193 68/push 1/imm32/block-depth +2194 68/push 1/imm32/type-int +2195 68/push "var1"/imm32 +2196 89/<- %ecx 4/r32/esp +2197 # var-var2/edx : var literal +2198 68/push 0/imm32/no-register +2199 68/push 0/imm32/no-stack-offset +2200 68/push 1/imm32/block-depth +2201 68/push 0/imm32/type-literal +2202 68/push "0x34"/imm32 +2203 89/<- %edx 4/r32/esp +2204 # inouts/esi : (list var2) +2205 68/push 0/imm32/next +2206 52/push-edx/var-var2 +2207 89/<- %esi 4/r32/esp +2208 # outputs/edi : (list var1) +2209 68/push 0/imm32/next +2210 51/push-ecx/var-var1 +2211 89/<- %edi 4/r32/esp +2212 # stmt/esi : statement +2213 68/push 0/imm32/next +2214 57/push-edi/outputs +2215 56/push-esi/inouts +2216 68/push "add"/imm32/operation +2217 68/push 1/imm32 +2218 89/<- %esi 4/r32/esp +2219 # convert +2220 (emit-subx-statement _test-output-buffered-file %esi 0 Primitives 0) +2221 (flush _test-output-buffered-file) +2222 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2228 # check output +2229 (check-next-stream-line-equal _test-output-stream "81 0/subop/add %eax 0x34/imm32" "F - test-add-literal-to-reg") +2230 # . epilogue +2231 89/<- %esp 5/r32/ebp +2232 5d/pop-to-ebp +2233 c3/return +2234 +2235 test-add-literal-to-mem: +2236 # add-to var1, 0x34 +2237 # => +2238 # 81 0/subop/add %eax 0x34/imm32 +2239 # +2240 # . prologue +2241 55/push-ebp +2242 89/<- %ebp 4/r32/esp +2243 # setup +2244 (clear-stream _test-output-stream) +2245 (clear-stream _test-output-buffered-file->buffer) +2246 # var-var1/ecx : var +2247 68/push 0/imm32/no-register +2248 68/push 8/imm32/stack-offset +2249 68/push 1/imm32/block-depth +2250 68/push 1/imm32/type-int +2251 68/push "var1"/imm32 +2252 89/<- %ecx 4/r32/esp +2253 # var-var2/edx : var literal +2254 68/push 0/imm32/no-register +2255 68/push 0/imm32/no-stack-offset +2256 68/push 1/imm32/block-depth +2257 68/push 0/imm32/type-literal +2258 68/push "0x34"/imm32 +2259 89/<- %edx 4/r32/esp +2260 # inouts/esi : (list var2) +2261 68/push 0/imm32/next +2262 52/push-edx/var-var2 +2263 89/<- %esi 4/r32/esp +2264 # inouts = (list var1 inouts) +2265 56/push-esi/next +2266 51/push-ecx/var-var1 +2267 89/<- %esi 4/r32/esp +2268 # stmt/esi : statement +2269 68/push 0/imm32/next +2270 68/push 0/imm32/outputs +2271 56/push-esi/inouts +2272 68/push "add-to"/imm32/operation +2273 68/push 1/imm32 +2274 89/<- %esi 4/r32/esp +2275 # convert +2276 (emit-subx-statement _test-output-buffered-file %esi 0 Primitives 0) +2277 (flush _test-output-buffered-file) +2278 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2284 # check output +2285 (check-next-stream-line-equal _test-output-stream "81 0/subop/add *(ebp+0x00000008) 0x34/imm32" "F - test-add-literal-to-mem") +2286 # . epilogue +2287 89/<- %esp 5/r32/ebp +2288 5d/pop-to-ebp +2289 c3/return +2290 +2291 test-emit-subx-statement-function-call: +2292 # Call a function on a variable on the stack. +2293 # f foo +2294 # => +2295 # (f2 *(ebp-8)) +2296 # (Changing the function name supports overloading in general, but here it +2297 # just serves to help disambiguate things.) +2298 # +2299 # There's a variable on the var stack as follows: +2300 # name: 'foo' +2301 # type: int +2302 # stack-offset: -8 +2303 # +2304 # There's nothing in primitives. +2305 # +2306 # There's a function with this info: +2307 # name: 'f' +2308 # inout: int/mem +2309 # value: 'f2' +2310 # +2311 # . prologue +2312 55/push-ebp +2313 89/<- %ebp 4/r32/esp +2314 # setup +2315 (clear-stream _test-output-stream) +2316 (clear-stream _test-output-buffered-file->buffer) +2317 # var-foo/ecx : var +2318 68/push 0/imm32/no-register +2319 68/push -8/imm32/stack-offset +2320 68/push 0/imm32/block-depth +2321 68/push 1/imm32/type-int +2322 68/push "foo"/imm32 +2323 89/<- %ecx 4/r32/esp +2324 # vars/edx = (stack 1) +2325 51/push-ecx/var-foo +2326 68/push 1/imm32/data-length +2327 68/push 1/imm32/top +2328 89/<- %edx 4/r32/esp +2329 # operands/esi : (list var) +2330 68/push 0/imm32/next +2331 51/push-ecx/var-foo +2332 89/<- %esi 4/r32/esp +2333 # stmt/esi : statement +2334 68/push 0/imm32/next +2335 68/push 0/imm32/outputs +2336 56/push-esi/inouts +2337 68/push "f"/imm32/operation +2338 68/push 1/imm32 +2339 89/<- %esi 4/r32/esp +2340 # functions/ebx : function +2341 68/push 0/imm32/next +2342 68/push 0/imm32/body +2343 68/push 0/imm32/outputs +2344 51/push-ecx/inouts # hack; in practice we won't have the same var in function definition and call +2345 68/push "f2"/imm32/subx-name +2346 68/push "f"/imm32/name +2347 89/<- %ebx 4/r32/esp +2348 # convert +2349 (emit-subx-statement _test-output-buffered-file %esi %edx 0 %ebx) +2350 (flush _test-output-buffered-file) +2351 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2357 # check output +2358 (check-next-stream-line-equal _test-output-stream "(f2 *(ebp+0xfffffff8))" "F - test-emit-subx-statement-function-call") +2359 # . epilogue +2360 89/<- %esp 5/r32/ebp +2361 5d/pop-to-ebp +2362 c3/return +2363 +2364 test-emit-subx-statement-function-call-with-literal-arg: +2365 # Call a function on a literal. +2366 # f 34 +2367 # => +2368 # (f2 34) +2369 # +2370 # . prologue +2371 55/push-ebp +2372 89/<- %ebp 4/r32/esp +2373 # setup +2374 (clear-stream _test-output-stream) +2375 (clear-stream _test-output-buffered-file->buffer) +2376 # var-foo/ecx : literal +2377 68/push 0/imm32/no-register +2378 68/push 0/imm32/no-stack-offset +2379 68/push 0/imm32/block-depth +2380 68/push 0/imm32/type-literal +2381 68/push "34"/imm32 +2382 89/<- %ecx 4/r32/esp +2383 # vars/edx = (stack 1) +2384 51/push-ecx/var-foo +2385 68/push 1/imm32/data-length +2386 68/push 1/imm32/top +2387 89/<- %edx 4/r32/esp +2388 # operands/esi : (list var) +2389 68/push 0/imm32/next +2390 51/push-ecx/var-foo +2391 89/<- %esi 4/r32/esp +2392 # stmt/esi : statement +2393 68/push 0/imm32/next +2394 68/push 0/imm32/outputs +2395 56/push-esi/inouts +2396 68/push "f"/imm32/operation +2397 68/push 1/imm32 +2398 89/<- %esi 4/r32/esp +2399 # functions/ebx : function +2400 68/push 0/imm32/next +2401 68/push 0/imm32/body +2402 68/push 0/imm32/outputs +2403 51/push-ecx/inouts # hack; in practice we won't have the same var in function definition and call +2404 68/push "f2"/imm32/subx-name +2405 68/push "f"/imm32/name +2406 89/<- %ebx 4/r32/esp +2407 # convert +2408 (emit-subx-statement _test-output-buffered-file %esi %edx 0 %ebx) +2409 (flush _test-output-buffered-file) +2410 +-- 6 lines: #? # dump _test-output-stream ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +2416 # check output +2417 (check-next-stream-line-equal _test-output-stream "(f2 34)" "F - test-emit-subx-statement-function-call-with-literal-arg") +2418 # . epilogue +2419 89/<- %esp 5/r32/ebp +2420 5d/pop-to-ebp +2421 c3/return +2422 +2423 emit-subx-prologue: # out : (address buffered-file) +2424 # . prologue +2425 55/push-ebp +2426 89/<- %ebp 4/r32/esp +2427 # +2428 (write-buffered *(ebp+8) "# . prologue\n") +2429 (write-buffered *(ebp+8) "55/push-ebp\n") +2430 (write-buffered *(ebp+8) "89/<- %ebp 4/r32/esp\n") +2431 $emit-subx-prologue:end: +2432 # . epilogue +2433 89/<- %esp 5/r32/ebp +2434 5d/pop-to-ebp +2435 c3/return +2436 +2437 emit-subx-epilogue: # out : (address buffered-file) +2438 # . prologue +2439 55/push-ebp +2440 89/<- %ebp 4/r32/esp +2441 # +2442 (write-buffered *(ebp+8) "# . epilogue\n") +2443 (write-buffered *(ebp+8) "89/<- %esp 5/r32/ebp\n") +2444 (write-buffered *(ebp+8) "5d/pop-to-ebp\n") +2445 (write-buffered *(ebp+8) "c3/return\n") +2446 $emit-subx-epilogue:end: +2447 # . epilogue +2448 89/<- %esp 5/r32/ebp +2449 5d/pop-to-ebp +2450 c3/return -- cgit 1.4.1-2-gfad0