Changeset 8150 in vbox for trunk/src/VBox/Disassembler
- Timestamp:
- Apr 18, 2008 2:01:13 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r8149 r8150 1083 1083 { 1084 1084 if (pCpu->opmode == CPUMODE_32BIT) 1085 {1086 1085 return sizeof(uint32_t); 1087 } 1088 else 1089 { 1090 return sizeof(uint16_t); 1091 } 1086 return sizeof(uint16_t); 1092 1087 } 1093 1088 //***************************************************************************** … … 1137 1132 { 1138 1133 if (pCpu->opmode == CPUMODE_32BIT) 1139 {1140 1134 return sizeof(int32_t); 1141 } 1142 else 1143 { 1144 return sizeof(uint16_t); 1145 } 1135 return sizeof(uint16_t); 1146 1136 } 1147 1137 //***************************************************************************** … … 1500 1490 //little hack to make sure the ModRM byte is included in the returned size 1501 1491 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1502 {1503 1492 size = sizeof(uint8_t); //ModRM byte 1504 }1505 1493 1506 1494 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1522 1510 //little hack to make sure the ModRM byte is included in the returned size 1523 1511 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1524 {1525 1512 size = sizeof(uint8_t); //ModRM byte 1526 }1527 1513 1528 1514 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1543 1529 //little hack to make sure the ModRM byte is included in the returned size 1544 1530 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1545 {1546 1531 size = sizeof(uint8_t); //ModRM byte 1547 }1548 1532 1549 1533 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1564 1548 //little hack to make sure the ModRM byte is included in the returned size 1565 1549 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1566 {1567 1550 size = sizeof(uint8_t); //ModRM byte 1568 }1569 1551 1570 1552 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1622 1604 //little hack to make sure the ModRM byte is included in the returned size 1623 1605 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1624 {1625 1606 size = sizeof(uint8_t); //ModRM byte 1626 }1627 1607 1628 1608 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1642 1622 1643 1623 if (mod == 3 && rm == 0) 1644 {1645 1624 pOp = (PCOPCODE)&g_aMapX86_Group7_mod11_rm000[reg]; 1646 }1647 1625 else 1648 1626 if (mod == 3 && rm == 1) 1649 {1650 1627 pOp = (PCOPCODE)&g_aMapX86_Group7_mod11_rm001[reg]; 1651 }1652 1628 else 1653 1629 pOp = (PCOPCODE)&g_aMapX86_Group7_mem[reg]; … … 1655 1631 //little hack to make sure the ModRM byte is included in the returned size 1656 1632 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1657 {1658 1633 size = sizeof(uint8_t); //ModRM byte 1659 }1660 1634 1661 1635 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1676 1650 //little hack to make sure the ModRM byte is included in the returned size 1677 1651 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1678 {1679 1652 size = sizeof(uint8_t); //ModRM byte 1680 }1681 1653 1682 1654 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1697 1669 //little hack to make sure the ModRM byte is included in the returned size 1698 1670 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1699 {1700 1671 size = sizeof(uint8_t); //ModRM byte 1701 }1702 1672 1703 1673 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1718 1688 //little hack to make sure the ModRM byte is included in the returned size 1719 1689 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1720 {1721 1690 size = sizeof(uint8_t); //ModRM byte 1722 }1723 1691 1724 1692 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1736 1704 1737 1705 if (pCpu->prefix & PREFIX_OPSIZE) 1738 {1739 1706 reg += 8; //2nd table 1740 }1741 1707 1742 1708 pOp = (PCOPCODE)&g_aMapX86_Group12[reg]; … … 1744 1710 //little hack to make sure the ModRM byte is included in the returned size 1745 1711 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1746 {1747 1712 size = sizeof(uint8_t); //ModRM byte 1748 }1749 1713 1750 1714 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); 1751 1752 1715 return size; 1753 1716 } … … 1761 1724 reg = MODRM_REG(modrm); 1762 1725 if (pCpu->prefix & PREFIX_OPSIZE) 1763 {1764 1726 reg += 8; //2nd table 1765 }1766 1727 1767 1728 pOp = (PCOPCODE)&g_aMapX86_Group13[reg]; … … 1769 1730 //little hack to make sure the ModRM byte is included in the returned size 1770 1731 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1771 {1772 1732 size = sizeof(uint8_t); //ModRM byte 1773 }1774 1733 1775 1734 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1786 1745 reg = MODRM_REG(modrm); 1787 1746 if (pCpu->prefix & PREFIX_OPSIZE) 1788 {1789 1747 reg += 8; //2nd table 1790 }1791 1748 1792 1749 pOp = (PCOPCODE)&g_aMapX86_Group14[reg]; … … 1794 1751 //little hack to make sure the ModRM byte is included in the returned size 1795 1752 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1796 {1797 1753 size = sizeof(uint8_t); //ModRM byte 1798 }1799 1754 1800 1755 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); … … 1820 1775 //little hack to make sure the ModRM byte is included in the returned size 1821 1776 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1822 {1823 1777 size = sizeof(uint8_t); //ModRM byte 1824 }1825 1778 1826 1779 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); 1827 1828 1780 return size; 1829 1781 } … … 1841 1793 //little hack to make sure the ModRM byte is included in the returned size 1842 1794 if (pOp->idxParse1 != IDX_ParseModRM && pOp->idxParse2 != IDX_ParseModRM) 1843 {1844 1795 size = sizeof(uint8_t); //ModRM byte 1845 }1846 1796 1847 1797 size += ParseInstruction(lpszCodeBlock, pOp, pCpu); 1848 1849 1798 return size; 1850 1799 } … … 1863 1812 subtype = OP_PARM_VSUBTYPE(pParam->param); 1864 1813 if (fRegAddr) 1865 {1866 1814 subtype = OP_PARM_d; 1867 }1868 1815 else 1869 1816 if (subtype == OP_PARM_v || subtype == OP_PARM_NONE) 1870 {1871 1817 subtype = (pCpu->opmode == CPUMODE_32BIT) ? OP_PARM_d : OP_PARM_w; 1872 }1873 1818 1874 1819 switch (subtype)
Note:
See TracChangeset
for help on using the changeset viewer.