Skip to content
Snippets Groups Projects
STARSProgram.cpp 597 KiB
Newer Older
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
		FuncInsertResult = this->ZST_FuncTypeMap.insert(FuncNamePolicyPair);
		assert(FuncInsertResult.second);
		FuncNamePolicyPair.first.clear();
		FuncNamePolicyPair.first.append("listen");
		FuncInsertResult = this->ZST_FuncTypeMap.insert(FuncNamePolicyPair);
		assert(FuncInsertResult.second);
		FuncNamePolicyPair.first.clear();
		FuncNamePolicyPair.first.append("accept");
		FuncInsertResult = this->ZST_FuncTypeMap.insert(FuncNamePolicyPair);
		assert(FuncInsertResult.second);
		FuncNamePolicyPair.first.clear();
		FuncNamePolicyPair.first.append("connect");
		FuncInsertResult = this->ZST_FuncTypeMap.insert(FuncNamePolicyPair);
		assert(FuncInsertResult.second);
	}
	else {
		SMP_msg("WARNING: No policy file %s found. System call policies not in effect.\n", ZSTPolicyFileName.c_str());
	}
	return;
} // end of STARS_Program_t::ZST_InitPolicies()

// Initialize the OptCategory[] array to define how we emit optimizing annotations.
void STARS_Program_t::InitOptCategory(void) {
	// Default category is 0, no optimization without knowing context.
	(void)memset(OptCategory, 0, sizeof(OptCategory));
	// Category 1 instructions never need updating of their memory
	//  metadata by the Memory Monitor SDT. Currently, this is because
	//  these instructions only have effects on registers we do not maintain
	//  metadata for, such as the EIP and the FLAGS, e.g. jumps, compares,
	//  or because they are no-ops, including machine-dependent no-op idioms.
	//  Effects on floating-point regs are always NUMERIC and can be put into
	//  categury 1 because mmStrata knows these registers are NUMERIC and does
	//  not keep a metadata map for them.
	// Category 2 instructions always have a result type of 'n' (number).
	// Category 3 instructions have a result type of 'n' (number)
	//  whenever the second source operand is an operand of type 'n'.
	//  NOTE: MOV is only current example, and this will take some thought if 
	//   other examples arise.
	// Category 4 instructions have a result type identical to the 1st source operand type.
	//  NOTE: This is currently set for single-operand instructions such as
	//   INC, DEC. As a result, these are treated pretty much as if
	//   they were category 1 instructions, as there is no metadata update,
	//   unless the operand is a memory operand (i.e. mem or [reg]).
	//   If new instructions are added to this category that are not single
	//   operand and do require some updating, the category should be split.
	// Category 5 instructions have a result type identical to the 1st source operand
	//  type whenever the 2nd source operand is an operand of type 'n'.
	//  If the destination is memory, metadata still needs to be checked; if
	//  not, no metadata check is needed, so it becomes category 1.
	// Category 6 instructions always have a result type of 'p' (pointer).
	// Category 7 instructions are category 2 instructions with two destinations,
	//  such as multiply and divide instructions that affect EDX:EAX. There are
	//  forms of these instructions that only have one destination, so they have
	//  to be distinguished via the operand info.
	// Category 8 instructions implicitly write a numeric value to EDX:EAX, but
	//  EDX and EAX are not listed as operands. RDTSC, RDPMC, RDMSR, and other
	//  instructions that copy machine registers into EDX:EAX are category 8.
	// Category 9 instructions are floating point instructions that either
	//  have a memory destination (treat as category 0) or a FP reg destination
	//  (treat as category 1).
	// Category 10 instructions are the same as category 8, but also write
	//  to register ECX in addition to EDX:EAX.

	// NOTE: The Memory Monitor SDT needs just three categories, corresponding
	//  to categories 0, 1, and all others. For all categories > 1, the
	//  annotation should tell the SDT exactly how to update its metadata.
	//  For example, a division instruction will write type 'n' (NUM) as
	//  the metadata for result registers EDX:EAX. So, the annotation should
	//  list 'n', EDX, EAX, and a terminator of ZZ. CWD (convert word to
	//  doubleword) should have a list of 'n', EAX, ZZ.

	OptCategory[STARS_NN_null] = 0;            // Unknown Operation
	OptCategory[STARS_NN_aaa] = 2;                 // ASCII Adjust after Addition
	OptCategory[STARS_NN_aad] = 2;                 // ASCII Adjust AX before Division
	OptCategory[STARS_NN_aam] = 2;                 // ASCII Adjust AX after Multiply
	OptCategory[STARS_NN_aas] = 2;                 // ASCII Adjust AL after Subtraction
	OptCategory[STARS_NN_adc] = 5;                 // Add with Carry
	OptCategory[STARS_NN_add] = 5;                 // Add
	OptCategory[STARS_NN_and] = 0;                 // Logical AND
	OptCategory[STARS_NN_arpl] = 1;                // Adjust RPL Field of Selector
	OptCategory[STARS_NN_bound] = 1;               // Check Array Index Against Bounds
	OptCategory[STARS_NN_bsf] = 2;                 // Bit Scan Forward
	OptCategory[STARS_NN_bsr] = 2;                 // Bit Scan Reverse
	OptCategory[STARS_NN_bt] = 0;                  // Bit Test
	OptCategory[STARS_NN_btc] = 0;                 // Bit Test and Complement
	OptCategory[STARS_NN_btr] = 0;                 // Bit Test and Reset
	OptCategory[STARS_NN_bts] = 0;                 // Bit Test and Set
	OptCategory[STARS_NN_call] = 1;                // Call Procedure
	OptCategory[STARS_NN_callfi] = 1;              // Indirect Call Far Procedure
	OptCategory[STARS_NN_callni] = 1;              // Indirect Call Near Procedure
	OptCategory[STARS_NN_cbw] = 2;                 // AL -> AX (with sign)            ** No ops?
	OptCategory[STARS_NN_cwde] = 2;                // AX -> EAX (with sign)           **
	OptCategory[STARS_NN_cdqe] = 2;                // EAX -> RAX (with sign)          **
	OptCategory[STARS_NN_clc] = 1;                 // Clear Carry Flag
	OptCategory[STARS_NN_cld] = 1;                 // Clear Direction Flag
	OptCategory[STARS_NN_cli] = 1;                 // Clear Interrupt Flag
	OptCategory[STARS_NN_clts] = 1;                // Clear Task-Switched Flag in CR0
	OptCategory[STARS_NN_cmc] = 1;                 // Complement Carry Flag
	OptCategory[STARS_NN_cmp] = 1;                 // Compare Two Operands
	OptCategory[STARS_NN_cmps] = 1;                // Compare Strings
	OptCategory[STARS_NN_cwd] = 2;                 // AX -> DX:AX (with sign)
	OptCategory[STARS_NN_cdq] = 2;                 // EAX -> EDX:EAX (with sign)
	OptCategory[STARS_NN_cqo] = 2;                 // RAX -> RDX:RAX (with sign)
	OptCategory[STARS_NN_daa] = 2;                 // Decimal Adjust AL after Addition
	OptCategory[STARS_NN_das] = 2;                 // Decimal Adjust AL after Subtraction
	OptCategory[STARS_NN_dec] = 4;                 // Decrement by 1
	OptCategory[STARS_NN_div] = 7;                 // Unsigned Divide
	OptCategory[STARS_NN_enterw] = 0;              // Make Stack Frame for Procedure Parameters  **
	OptCategory[STARS_NN_enter] = 0;               // Make Stack Frame for Procedure Parameters  **
	OptCategory[STARS_NN_enterd] = 0;              // Make Stack Frame for Procedure Parameters  **
	OptCategory[STARS_NN_enterq] = 0;              // Make Stack Frame for Procedure Parameters  **
	OptCategory[STARS_NN_hlt] = 0;                 // Halt
	OptCategory[STARS_NN_idiv] = 7;                // Signed Divide
	OptCategory[STARS_NN_imul] = 7;                // Signed Multiply
	OptCategory[STARS_NN_in] = 0;                  // Input from Port                         **
	OptCategory[STARS_NN_inc] = 4;                 // Increment by 1
	OptCategory[STARS_NN_ins] = 2;                 // Input Byte(s) from Port to String       **
	OptCategory[STARS_NN_int] = 0;                 // Call to Interrupt Procedure
	OptCategory[STARS_NN_into] = 0;                // Call to Interrupt Procedure if Overflow Flag = 1
	OptCategory[STARS_NN_int3] = 0;                // Trap to Debugger
	OptCategory[STARS_NN_iretw] = 0;               // Interrupt Return
	OptCategory[STARS_NN_iret] = 0;                // Interrupt Return
	OptCategory[STARS_NN_iretd] = 0;               // Interrupt Return (use32)
	OptCategory[STARS_NN_iretq] = 0;               // Interrupt Return (use64)
	OptCategory[STARS_NN_ja] = 1;                  // Jump if Above (CF=0 & ZF=0)
	OptCategory[STARS_NN_jae] = 1;                 // Jump if Above or Equal (CF=0)
	OptCategory[STARS_NN_jb] = 1;                  // Jump if Below (CF=1)
	OptCategory[STARS_NN_jbe] = 1;                 // Jump if Below or Equal (CF=1 | ZF=1)
	OptCategory[STARS_NN_jc] = 1;                  // Jump if Carry (CF=1)
	OptCategory[STARS_NN_jcxz] = 1;                // Jump if CX is 0
	OptCategory[STARS_NN_jecxz] = 1;               // Jump if ECX is 0
	OptCategory[STARS_NN_jrcxz] = 1;               // Jump if RCX is 0
	OptCategory[STARS_NN_je] = 1;                  // Jump if Equal (ZF=1)
	OptCategory[STARS_NN_jg] = 1;                  // Jump if Greater (ZF=0 & SF=OF)
	OptCategory[STARS_NN_jge] = 1;                 // Jump if Greater or Equal (SF=OF)
	OptCategory[STARS_NN_jl] = 1;                  // Jump if Less (SF!=OF)
	OptCategory[STARS_NN_jle] = 1;                 // Jump if Less or Equal (ZF=1 | SF!=OF)
	OptCategory[STARS_NN_jna] = 1;                 // Jump if Not Above (CF=1 | ZF=1)
	OptCategory[STARS_NN_jnae] = 1;                // Jump if Not Above or Equal (CF=1)
	OptCategory[STARS_NN_jnb] = 1;                 // Jump if Not Below (CF=0)
	OptCategory[STARS_NN_jnbe] = 1;                // Jump if Not Below or Equal (CF=0 & ZF=0)
	OptCategory[STARS_NN_jnc] = 1;                 // Jump if Not Carry (CF=0)
	OptCategory[STARS_NN_jne] = 1;                 // Jump if Not Equal (ZF=0)
	OptCategory[STARS_NN_jng] = 1;                 // Jump if Not Greater (ZF=1 | SF!=OF)
	OptCategory[STARS_NN_jnge] = 1;                // Jump if Not Greater or Equal (SF!=OF)
	OptCategory[STARS_NN_jnl] = 1;                 // Jump if Not Less (SF=OF)
	OptCategory[STARS_NN_jnle] = 1;                // Jump if Not Less or Equal (ZF=0 & SF=OF)
	OptCategory[STARS_NN_jno] = 1;                 // Jump if Not Overflow (OF=0)
	OptCategory[STARS_NN_jnp] = 1;                 // Jump if Not Parity (PF=0)
	OptCategory[STARS_NN_jns] = 1;                 // Jump if Not Sign (SF=0)
	OptCategory[STARS_NN_jnz] = 1;                 // Jump if Not Zero (ZF=0)
	OptCategory[STARS_NN_jo] = 1;                  // Jump if Overflow (OF=1)
	OptCategory[STARS_NN_jp] = 1;                  // Jump if Parity (PF=1)
	OptCategory[STARS_NN_jpe] = 1;                 // Jump if Parity Even (PF=1)
	OptCategory[STARS_NN_jpo] = 1;                 // Jump if Parity Odd  (PF=0)
	OptCategory[STARS_NN_js] = 1;                  // Jump if Sign (SF=1)
	OptCategory[STARS_NN_jz] = 1;                  // Jump if Zero (ZF=1)
	OptCategory[STARS_NN_jmp] = 1;                 // Jump
	OptCategory[STARS_NN_jmpfi] = 1;               // Indirect Far Jump
	OptCategory[STARS_NN_jmpni] = 1;               // Indirect Near Jump
	OptCategory[STARS_NN_jmpshort] = 1;            // Jump Short (not used)
	OptCategory[STARS_NN_lahf] = 2;                // Load Flags into AH Register
	OptCategory[STARS_NN_lar] = 2;                 // Load Access Rights Byte
	OptCategory[STARS_NN_lea] = 0;                 // Load Effective Address           **
	OptCategory[STARS_NN_leavew] = 0;              // High Level Procedure Exit        **
	OptCategory[STARS_NN_leave] = 0;               // High Level Procedure Exit        **
	OptCategory[STARS_NN_leaved] = 0;              // High Level Procedure Exit        **
	OptCategory[STARS_NN_leaveq] = 0;              // High Level Procedure Exit        **
	OptCategory[STARS_NN_lgdt] = 0;                // Load Global Descriptor Table Register
	OptCategory[STARS_NN_lidt] = 0;                // Load Interrupt Descriptor Table Register
	OptCategory[STARS_NN_lgs] = 6;                 // Load Full Pointer to GS:xx
	OptCategory[STARS_NN_lss] = 6;                 // Load Full Pointer to SS:xx
	OptCategory[STARS_NN_lds] = 6;                 // Load Full Pointer to DS:xx
	OptCategory[STARS_NN_les] = 6;                 // Load Full Pointer to ES:xx
	OptCategory[STARS_NN_lfs] = 6;                 // Load Full Pointer to FS:xx
	OptCategory[STARS_NN_lldt] = 0;                // Load Local Descriptor Table Register
	OptCategory[STARS_NN_lmsw] = 1;                // Load Machine Status Word
	OptCategory[STARS_NN_lock] = 1;                // Assert LOCK# Signal Prefix
	OptCategory[STARS_NN_lods] = 0;                // Load String
	OptCategory[STARS_NN_loopw] = 1;               // Loop while ECX != 0
	OptCategory[STARS_NN_loop] = 1;                // Loop while CX != 0
	OptCategory[STARS_NN_loopd] = 1;               // Loop while ECX != 0
	OptCategory[STARS_NN_loopq] = 1;               // Loop while RCX != 0
	OptCategory[STARS_NN_loopwe] = 1;              // Loop while CX != 0 and ZF=1
	OptCategory[STARS_NN_loope] = 1;               // Loop while rCX != 0 and ZF=1
	OptCategory[STARS_NN_loopde] = 1;              // Loop while ECX != 0 and ZF=1
	OptCategory[STARS_NN_loopqe] = 1;              // Loop while RCX != 0 and ZF=1
	OptCategory[STARS_NN_loopwne] = 1;             // Loop while CX != 0 and ZF=0
	OptCategory[STARS_NN_loopne] = 1;              // Loop while rCX != 0 and ZF=0
	OptCategory[STARS_NN_loopdne] = 1;             // Loop while ECX != 0 and ZF=0
	OptCategory[STARS_NN_loopqne] = 1;             // Loop while RCX != 0 and ZF=0
	OptCategory[STARS_NN_lsl] = 6;                 // Load Segment Limit
	OptCategory[STARS_NN_ltr] = 1;                 // Load Task Register
	OptCategory[STARS_NN_mov] = 3;                 // Move Data
	OptCategory[STARS_NN_movsp] = 3;               // Move to/from Special Registers
	OptCategory[STARS_NN_movs] = 0;                // Move Byte(s) from String to String
	OptCategory[STARS_NN_movsx] = 3;               // Move with Sign-Extend
	OptCategory[STARS_NN_movzx] = 3;               // Move with Zero-Extend
	OptCategory[STARS_NN_mul] = 7;                 // Unsigned Multiplication of AL or AX
	OptCategory[STARS_NN_neg] = 2;                 // Two's Complement Negation   !!!!****!!!! Change this when mmStrata handles NEGATEDPTR type.
	OptCategory[STARS_NN_nop] = 1;                 // No Operation
	OptCategory[STARS_NN_not] = 2;                 // One's Complement Negation
	OptCategory[STARS_NN_or] = 0;                  // Logical Inclusive OR
	OptCategory[STARS_NN_out] = 0;                 // Output to Port
	OptCategory[STARS_NN_outs] = 0;                // Output Byte(s) to Port
	OptCategory[STARS_NN_pop] = 0;                 // Pop a word from the Stack
	OptCategory[STARS_NN_popaw] = 0;               // Pop all General Registers
	OptCategory[STARS_NN_popa] = 0;                // Pop all General Registers
	OptCategory[STARS_NN_popad] = 0;               // Pop all General Registers (use32)
	OptCategory[STARS_NN_popaq] = 0;               // Pop all General Registers (use64)
	OptCategory[STARS_NN_popfw] = 1;               // Pop Stack into Flags Register         **
	OptCategory[STARS_NN_popf] = 1;                // Pop Stack into Flags Register         **
	OptCategory[STARS_NN_popfd] = 1;               // Pop Stack into Eflags Register        **
	OptCategory[STARS_NN_popfq] = 1;               // Pop Stack into Rflags Register        **
	OptCategory[STARS_NN_push] = 0;                // Push Operand onto the Stack
	OptCategory[STARS_NN_pushaw] = 0;              // Push all General Registers
	OptCategory[STARS_NN_pusha] = 0;               // Push all General Registers
	OptCategory[STARS_NN_pushad] = 0;              // Push all General Registers (use32)
	OptCategory[STARS_NN_pushaq] = 0;              // Push all General Registers (use64)
	OptCategory[STARS_NN_pushfw] = 0;              // Push Flags Register onto the Stack
	OptCategory[STARS_NN_pushf] = 0;               // Push Flags Register onto the Stack
	OptCategory[STARS_NN_pushfd] = 0;              // Push Flags Register onto the Stack (use32)
	OptCategory[STARS_NN_pushfq] = 0;              // Push Flags Register onto the Stack (use64)
	OptCategory[STARS_NN_rcl] = 2;                 // Rotate Through Carry Left
	OptCategory[STARS_NN_rcr] = 2;                 // Rotate Through Carry Right
	OptCategory[STARS_NN_rol] = 2;                 // Rotate Left
	OptCategory[STARS_NN_ror] = 2;                 // Rotate Right
	OptCategory[STARS_NN_rep] = 0;                 // Repeat String Operation
	OptCategory[STARS_NN_repe] = 0;                // Repeat String Operation while ZF=1
	OptCategory[STARS_NN_repne] = 0;               // Repeat String Operation while ZF=0
	OptCategory[STARS_NN_retn] = 0;                // Return Near from Procedure
	OptCategory[STARS_NN_retf] = 0;                // Return Far from Procedure
	OptCategory[STARS_NN_sahf] = 1;                // Store AH into Flags Register
	OptCategory[STARS_NN_sal] = 2;                 // Shift Arithmetic Left
	OptCategory[STARS_NN_sar] = 2;                 // Shift Arithmetic Right
	OptCategory[STARS_NN_shl] = 2;                 // Shift Logical Left
	OptCategory[STARS_NN_shr] = 2;                 // Shift Logical Right
	OptCategory[STARS_NN_sbb] = 5;                 // Integer Subtraction with Borrow
	OptCategory[STARS_NN_scas] = 1;                // Compare String
	OptCategory[STARS_NN_seta] = 2;                // Set Byte if Above (CF=0 & ZF=0)
	OptCategory[STARS_NN_setae] = 2;               // Set Byte if Above or Equal (CF=0)
	OptCategory[STARS_NN_setb] = 2;                // Set Byte if Below (CF=1)
	OptCategory[STARS_NN_setbe] = 2;               // Set Byte if Below or Equal (CF=1 | ZF=1)
	OptCategory[STARS_NN_setc] = 2;                // Set Byte if Carry (CF=1)
	OptCategory[STARS_NN_sete] = 2;                // Set Byte if Equal (ZF=1)
	OptCategory[STARS_NN_setg] = 2;                // Set Byte if Greater (ZF=0 & SF=OF)
	OptCategory[STARS_NN_setge] = 2;               // Set Byte if Greater or Equal (SF=OF)
	OptCategory[STARS_NN_setl] = 2;                // Set Byte if Less (SF!=OF)
	OptCategory[STARS_NN_setle] = 2;               // Set Byte if Less or Equal (ZF=1 | SF!=OF)
	OptCategory[STARS_NN_setna] = 2;               // Set Byte if Not Above (CF=1 | ZF=1)
	OptCategory[STARS_NN_setnae] = 2;              // Set Byte if Not Above or Equal (CF=1)
	OptCategory[STARS_NN_setnb] = 2;               // Set Byte if Not Below (CF=0)
	OptCategory[STARS_NN_setnbe] = 2;              // Set Byte if Not Below or Equal (CF=0 & ZF=0)
	OptCategory[STARS_NN_setnc] = 2;               // Set Byte if Not Carry (CF=0)
	OptCategory[STARS_NN_setne] = 2;               // Set Byte if Not Equal (ZF=0)
	OptCategory[STARS_NN_setng] = 2;               // Set Byte if Not Greater (ZF=1 | SF!=OF)
	OptCategory[STARS_NN_setnge] = 2;              // Set Byte if Not Greater or Equal (SF!=OF)
	OptCategory[STARS_NN_setnl] = 2;               // Set Byte if Not Less (SF=OF)
	OptCategory[STARS_NN_setnle] = 2;              // Set Byte if Not Less or Equal (ZF=0 & SF=OF)
	OptCategory[STARS_NN_setno] = 2;               // Set Byte if Not Overflow (OF=0)
	OptCategory[STARS_NN_setnp] = 2;               // Set Byte if Not Parity (PF=0)
	OptCategory[STARS_NN_setns] = 2;               // Set Byte if Not Sign (SF=0)
	OptCategory[STARS_NN_setnz] = 2;               // Set Byte if Not Zero (ZF=0)
	OptCategory[STARS_NN_seto] = 2;                // Set Byte if Overflow (OF=1)
	OptCategory[STARS_NN_setp] = 2;                // Set Byte if Parity (PF=1)
	OptCategory[STARS_NN_setpe] = 2;               // Set Byte if Parity Even (PF=1)
	OptCategory[STARS_NN_setpo] = 2;               // Set Byte if Parity Odd  (PF=0)
	OptCategory[STARS_NN_sets] = 2;                // Set Byte if Sign (SF=1)
	OptCategory[STARS_NN_setz] = 2;                // Set Byte if Zero (ZF=1)
	OptCategory[STARS_NN_sgdt] = 0;                // Store Global Descriptor Table Register
	OptCategory[STARS_NN_sidt] = 0;                // Store Interrupt Descriptor Table Register
	OptCategory[STARS_NN_shld] = 2;                // Double Precision Shift Left
	OptCategory[STARS_NN_shrd] = 2;                // Double Precision Shift Right
	OptCategory[STARS_NN_sldt] = 6;                // Store Local Descriptor Table Register
	OptCategory[STARS_NN_smsw] = 2;                // Store Machine Status Word
	OptCategory[STARS_NN_stc] = 1;                 // Set Carry Flag
	OptCategory[STARS_NN_std] = 1;                 // Set Direction Flag
	OptCategory[STARS_NN_sti] = 1;                 // Set Interrupt Flag
	OptCategory[STARS_NN_stos] = 0;                // Store String
	OptCategory[STARS_NN_str] = 6;                 // Store Task Register
	OptCategory[STARS_NN_sub] = 5;                 // Integer Subtraction
	OptCategory[STARS_NN_test] = 1;                // Logical Compare
	OptCategory[STARS_NN_verr] = 1;                // Verify a Segment for Reading
	OptCategory[STARS_NN_verw] = 1;                // Verify a Segment for Writing
	OptCategory[STARS_NN_wait] = 1;                // Wait until BUSY# Pin is Inactive (HIGH)
	OptCategory[STARS_NN_xchg] = 0;                // Exchange Register/Memory with Register
	OptCategory[STARS_NN_xlat] = 0;                // Table Lookup Translation
	OptCategory[STARS_NN_xor] = 2;                 // Logical Exclusive OR

	//
	//      486 instructions
	//

	OptCategory[STARS_NN_cmpxchg] = 0;             // Compare and Exchange
	OptCategory[STARS_NN_bswap] = 2;               // Swap bytes in register
	OptCategory[STARS_NN_xadd] = 0;                // t<-dest; dest<-src+dest; src<-t
	OptCategory[STARS_NN_invd] = 1;                // Invalidate Data Cache
	OptCategory[STARS_NN_wbinvd] = 1;              // Invalidate Data Cache (write changes)
	OptCategory[STARS_NN_invlpg] = 1;              // Invalidate TLB entry

	//
	//      Pentium instructions
	//

	OptCategory[STARS_NN_rdmsr] = 8;               // Read Machine Status Register
	OptCategory[STARS_NN_wrmsr] = 1;               // Write Machine Status Register
	OptCategory[STARS_NN_cpuid] = 8;               // Get CPU ID
	OptCategory[STARS_NN_cmpxchg8b] = 0;           // Compare and Exchange Eight Bytes
	OptCategory[STARS_NN_rdtsc] = 8;               // Read Time Stamp Counter
	OptCategory[STARS_NN_rsm] = 1;                 // Resume from System Management Mode

	//
	//      Pentium Pro instructions
	//

	OptCategory[STARS_NN_cmova] = 0;               // Move if Above (CF=0 & ZF=0)
	OptCategory[STARS_NN_cmovb] = 0;               // Move if Below (CF=1)
	OptCategory[STARS_NN_cmovbe] = 0;              // Move if Below or Equal (CF=1 | ZF=1)
	OptCategory[STARS_NN_cmovg] = 0;               // Move if Greater (ZF=0 & SF=OF)
	OptCategory[STARS_NN_cmovge] = 0;              // Move if Greater or Equal (SF=OF)
	OptCategory[STARS_NN_cmovl] = 0;               // Move if Less (SF!=OF)
	OptCategory[STARS_NN_cmovle] = 0;              // Move if Less or Equal (ZF=1 | SF!=OF)
	OptCategory[STARS_NN_cmovnb] = 0;              // Move if Not Below (CF=0)
	OptCategory[STARS_NN_cmovno] = 0;              // Move if Not Overflow (OF=0)
	OptCategory[STARS_NN_cmovnp] = 0;              // Move if Not Parity (PF=0)
	OptCategory[STARS_NN_cmovns] = 0;              // Move if Not Sign (SF=0)
	OptCategory[STARS_NN_cmovnz] = 0;              // Move if Not Zero (ZF=0)
	OptCategory[STARS_NN_cmovo] = 0;               // Move if Overflow (OF=1)
	OptCategory[STARS_NN_cmovp] = 0;               // Move if Parity (PF=1)
	OptCategory[STARS_NN_cmovs] = 0;               // Move if Sign (SF=1)
	OptCategory[STARS_NN_cmovz] = 0;               // Move if Zero (ZF=1)
	OptCategory[STARS_NN_fcmovb] = 1;              // Floating Move if Below          
	OptCategory[STARS_NN_fcmove] = 1;              // Floating Move if Equal          
	OptCategory[STARS_NN_fcmovbe] = 1;             // Floating Move if Below or Equal 
	OptCategory[STARS_NN_fcmovu] = 1;              // Floating Move if Unordered      
	OptCategory[STARS_NN_fcmovnb] = 1;             // Floating Move if Not Below      
	OptCategory[STARS_NN_fcmovne] = 1;             // Floating Move if Not Equal      
	OptCategory[STARS_NN_fcmovnbe] = 1;            // Floating Move if Not Below or Equal
	OptCategory[STARS_NN_fcmovnu] = 1;             // Floating Move if Not Unordered     
	OptCategory[STARS_NN_fcomi] = 1;               // FP Compare, result in EFLAGS
	OptCategory[STARS_NN_fucomi] = 1;              // FP Unordered Compare, result in EFLAGS
	OptCategory[STARS_NN_fcomip] = 1;              // FP Compare, result in EFLAGS, pop stack
	OptCategory[STARS_NN_fucomip] = 1;             // FP Unordered Compare, result in EFLAGS, pop stack
	OptCategory[STARS_NN_rdpmc] = 8;               // Read Performance Monitor Counter

	//
	//      FPP instructions
	//

	OptCategory[STARS_NN_fld] = 1;                 // Load Real             ** Infer src is 'n'
	OptCategory[STARS_NN_fst] = 9;                 // Store Real            
	OptCategory[STARS_NN_fstp] = 9;                // Store Real and Pop   
	OptCategory[STARS_NN_fxch] = 1;                // Exchange Registers
	OptCategory[STARS_NN_fild] = 1;                // Load Integer          ** Infer src is 'n'
	OptCategory[STARS_NN_fist] = 0;                // Store Integer
	OptCategory[STARS_NN_fistp] = 0;               // Store Integer and Pop
	OptCategory[STARS_NN_fbld] = 1;                // Load BCD
	OptCategory[STARS_NN_fbstp] = 0;               // Store BCD and Pop
	OptCategory[STARS_NN_fadd] = 1;                // Add Real
	OptCategory[STARS_NN_faddp] = 1;               // Add Real and Pop
	OptCategory[STARS_NN_fiadd] = 1;               // Add Integer
	OptCategory[STARS_NN_fsub] = 1;                // Subtract Real
	OptCategory[STARS_NN_fsubp] = 1;               // Subtract Real and Pop
	OptCategory[STARS_NN_fisub] = 1;               // Subtract Integer
	OptCategory[STARS_NN_fsubr] = 1;               // Subtract Real Reversed
	OptCategory[STARS_NN_fsubrp] = 1;              // Subtract Real Reversed and Pop
	OptCategory[STARS_NN_fisubr] = 1;              // Subtract Integer Reversed
	OptCategory[STARS_NN_fmul] = 1;                // Multiply Real
	OptCategory[STARS_NN_fmulp] = 1;               // Multiply Real and Pop
	OptCategory[STARS_NN_fimul] = 1;               // Multiply Integer
	OptCategory[STARS_NN_fdiv] = 1;                // Divide Real
	OptCategory[STARS_NN_fdivp] = 1;               // Divide Real and Pop
	OptCategory[STARS_NN_fidiv] = 1;               // Divide Integer
	OptCategory[STARS_NN_fdivr] = 1;               // Divide Real Reversed
	OptCategory[STARS_NN_fdivrp] = 1;              // Divide Real Reversed and Pop
	OptCategory[STARS_NN_fidivr] = 1;              // Divide Integer Reversed
	OptCategory[STARS_NN_fsqrt] = 1;               // Square Root
	OptCategory[STARS_NN_fscale] = 1;              // Scale:  st(0) <- st(0) * 2^st(1)
	OptCategory[STARS_NN_fprem] = 1;               // Partial Remainder
	OptCategory[STARS_NN_frndint] = 1;             // Round to Integer
	OptCategory[STARS_NN_fxtract] = 1;             // Extract exponent and significand
	OptCategory[STARS_NN_fabs] = 1;                // Absolute value
	OptCategory[STARS_NN_fchs] = 1;                // Change Sign
	OptCategory[STARS_NN_fcom] = 1;                // Compare Real
	OptCategory[STARS_NN_fcomp] = 1;               // Compare Real and Pop
	OptCategory[STARS_NN_fcompp] = 1;              // Compare Real and Pop Twice
	OptCategory[STARS_NN_ficom] = 1;               // Compare Integer
	OptCategory[STARS_NN_ficomp] = 1;              // Compare Integer and Pop
	OptCategory[STARS_NN_ftst] = 1;                // Test
	OptCategory[STARS_NN_fxam] = 1;                // Examine
	OptCategory[STARS_NN_fptan] = 1;               // Partial tangent
	OptCategory[STARS_NN_fpatan] = 1;              // Partial arctangent
	OptCategory[STARS_NN_f2xm1] = 1;               // 2^x - 1
	OptCategory[STARS_NN_fyl2x] = 1;               // Y * lg2(X)
	OptCategory[STARS_NN_fyl2xp1] = 1;             // Y * lg2(X+1)
	OptCategory[STARS_NN_fldz] = 1;                // Load +0.0
	OptCategory[STARS_NN_fld1] = 1;                // Load +1.0
	OptCategory[STARS_NN_fldpi] = 1;               // Load PI=3.14...
	OptCategory[STARS_NN_fldl2t] = 1;              // Load lg2(10)
	OptCategory[STARS_NN_fldl2e] = 1;              // Load lg2(e)
	OptCategory[STARS_NN_fldlg2] = 1;              // Load lg10(2)
	OptCategory[STARS_NN_fldln2] = 1;              // Load ln(2)
	OptCategory[STARS_NN_finit] = 1;               // Initialize Processor
	OptCategory[STARS_NN_fninit] = 1;              // Initialize Processor (no wait)
	OptCategory[STARS_NN_fsetpm] = 1;              // Set Protected Mode
	OptCategory[STARS_NN_fldcw] = 1;               // Load Control Word
	OptCategory[STARS_NN_fstcw] = 0;               // Store Control Word
	OptCategory[STARS_NN_fnstcw] = 0;              // Store Control Word (no wait)
	OptCategory[STARS_NN_fstsw] = 2;               // Store Status Word to memory or AX
	OptCategory[STARS_NN_fnstsw] = 2;              // Store Status Word (no wait) to memory or AX
	OptCategory[STARS_NN_fclex] = 1;               // Clear Exceptions
	OptCategory[STARS_NN_fnclex] = 1;              // Clear Exceptions (no wait)
	OptCategory[STARS_NN_fstenv] = 0;              // Store Environment
	OptCategory[STARS_NN_fnstenv] = 0;             // Store Environment (no wait)
	OptCategory[STARS_NN_fldenv] = 1;              // Load Environment
	OptCategory[STARS_NN_fsave] = 0;               // Save State
	OptCategory[STARS_NN_fnsave] = 0;              // Save State (no wait)
	OptCategory[STARS_NN_frstor] = 1;              // Restore State    **  infer src is 'n'
	OptCategory[STARS_NN_fincstp] = 1;             // Increment Stack Pointer
	OptCategory[STARS_NN_fdecstp] = 1;             // Decrement Stack Pointer
	OptCategory[STARS_NN_ffree] = 1;               // Free Register
	OptCategory[STARS_NN_fnop] = 1;                // No Operation
	OptCategory[STARS_NN_feni] = 1;                // (8087 only)
	OptCategory[STARS_NN_fneni] = 1;               // (no wait) (8087 only)
	OptCategory[STARS_NN_fdisi] = 1;               // (8087 only)
	OptCategory[STARS_NN_fndisi] = 1;              // (no wait) (8087 only)

	//
	//      80387 instructions
	//

	OptCategory[STARS_NN_fprem1] = 1;              // Partial Remainder ( < half )
	OptCategory[STARS_NN_fsincos] = 1;             // t<-cos(st); st<-sin(st); push t
	OptCategory[STARS_NN_fsin] = 1;                // Sine
	OptCategory[STARS_NN_fcos] = 1;                // Cosine
	OptCategory[STARS_NN_fucom] = 1;               // Compare Unordered Real
	OptCategory[STARS_NN_fucomp] = 1;              // Compare Unordered Real and Pop
	OptCategory[STARS_NN_fucompp] = 1;             // Compare Unordered Real and Pop Twice

	//
	//      Instructions added 28.02.96
	//

	OptCategory[STARS_NN_setalc] = 2;              // Set AL to Carry Flag     **
	OptCategory[STARS_NN_svdc] = 0;                // Save Register and Descriptor
	OptCategory[STARS_NN_rsdc] = 0;                // Restore Register and Descriptor
	OptCategory[STARS_NN_svldt] = 0;               // Save LDTR and Descriptor
	OptCategory[STARS_NN_rsldt] = 0;               // Restore LDTR and Descriptor
	OptCategory[STARS_NN_svts] = 1;                // Save TR and Descriptor
	OptCategory[STARS_NN_rsts] = 1;                // Restore TR and Descriptor
	OptCategory[STARS_NN_icebp] = 1;               // ICE Break Point
	OptCategory[STARS_NN_loadall] = 0;             // Load the entire CPU state from ES:EDI

	//
	//      MMX instructions
	//

	OptCategory[STARS_NN_emms] = 1;                // Empty MMX state
	OptCategory[STARS_NN_movd] = 9;                // Move 32 bits
	OptCategory[STARS_NN_movq] = 9;                // Move 64 bits
	OptCategory[STARS_NN_packsswb] = 1;            // Pack with Signed Saturation (Word->Byte)
	OptCategory[STARS_NN_packssdw] = 1;            // Pack with Signed Saturation (Dword->Word)
	OptCategory[STARS_NN_packuswb] = 1;            // Pack with Unsigned Saturation (Word->Byte)
	OptCategory[STARS_NN_paddb] = 1;               // Packed Add Byte
	OptCategory[STARS_NN_paddw] = 1;               // Packed Add Word
	OptCategory[STARS_NN_paddd] = 1;               // Packed Add Dword
	OptCategory[STARS_NN_paddsb] = 1;              // Packed Add with Saturation (Byte)
	OptCategory[STARS_NN_paddsw] = 1;              // Packed Add with Saturation (Word)
	OptCategory[STARS_NN_paddusb] = 1;             // Packed Add Unsigned with Saturation (Byte)
	OptCategory[STARS_NN_paddusw] = 1;             // Packed Add Unsigned with Saturation (Word)
	OptCategory[STARS_NN_pand] = 1;                // Bitwise Logical And
	OptCategory[STARS_NN_pandn] = 1;               // Bitwise Logical And Not
	OptCategory[STARS_NN_pcmpeqb] = 1;             // Packed Compare for Equal (Byte)
	OptCategory[STARS_NN_pcmpeqw] = 1;             // Packed Compare for Equal (Word)
	OptCategory[STARS_NN_pcmpeqd] = 1;             // Packed Compare for Equal (Dword)
	OptCategory[STARS_NN_pcmpgtb] = 1;             // Packed Compare for Greater Than (Byte)
	OptCategory[STARS_NN_pcmpgtw] = 1;             // Packed Compare for Greater Than (Word)
	OptCategory[STARS_NN_pcmpgtd] = 1;             // Packed Compare for Greater Than (Dword)
	OptCategory[STARS_NN_pmaddwd] = 1;             // Packed Multiply and Add
	OptCategory[STARS_NN_pmulhw] = 1;              // Packed Multiply High
	OptCategory[STARS_NN_pmullw] = 1;              // Packed Multiply Low
	OptCategory[STARS_NN_por] = 1;                 // Bitwise Logical Or
	OptCategory[STARS_NN_psllw] = 1;               // Packed Shift Left Logical (Word)
	OptCategory[STARS_NN_pslld] = 1;               // Packed Shift Left Logical (Dword)
	OptCategory[STARS_NN_psllq] = 1;               // Packed Shift Left Logical (Qword)
	OptCategory[STARS_NN_psraw] = 1;               // Packed Shift Right Arithmetic (Word)
	OptCategory[STARS_NN_psrad] = 1;               // Packed Shift Right Arithmetic (Dword)
	OptCategory[STARS_NN_psrlw] = 1;               // Packed Shift Right Logical (Word)
	OptCategory[STARS_NN_psrld] = 1;               // Packed Shift Right Logical (Dword)
	OptCategory[STARS_NN_psrlq] = 1;               // Packed Shift Right Logical (Qword)
	OptCategory[STARS_NN_psubb] = 1;               // Packed Subtract Byte
	OptCategory[STARS_NN_psubw] = 1;               // Packed Subtract Word
	OptCategory[STARS_NN_psubd] = 1;               // Packed Subtract Dword
	OptCategory[STARS_NN_psubsb] = 1;              // Packed Subtract with Saturation (Byte)
	OptCategory[STARS_NN_psubsw] = 1;              // Packed Subtract with Saturation (Word)
	OptCategory[STARS_NN_psubusb] = 1;             // Packed Subtract Unsigned with Saturation (Byte)
	OptCategory[STARS_NN_psubusw] = 1;             // Packed Subtract Unsigned with Saturation (Word)
	OptCategory[STARS_NN_punpckhbw] = 1;           // Unpack High Packed Data (Byte->Word)
	OptCategory[STARS_NN_punpckhwd] = 1;           // Unpack High Packed Data (Word->Dword)
	OptCategory[STARS_NN_punpckhdq] = 1;           // Unpack High Packed Data (Dword->Qword)
	OptCategory[STARS_NN_punpcklbw] = 1;           // Unpack Low Packed Data (Byte->Word)
	OptCategory[STARS_NN_punpcklwd] = 1;           // Unpack Low Packed Data (Word->Dword)
	OptCategory[STARS_NN_punpckldq] = 1;           // Unpack Low Packed Data (Dword->Qword)
	OptCategory[STARS_NN_pxor] = 1;                // Bitwise Logical Exclusive Or

	//
	//      Undocumented Deschutes processor instructions
	//

	OptCategory[STARS_NN_fxsave] = 1;              // Fast save FP context            ** to where?
	OptCategory[STARS_NN_fxrstor] = 1;             // Fast restore FP context         ** from where?

	//      Pentium II instructions

	OptCategory[STARS_NN_sysenter] = 1;            // Fast Transition to System Call Entry Point
	OptCategory[STARS_NN_sysexit] = 1;             // Fast Transition from System Call Entry Point

	//      3DNow! instructions

	OptCategory[STARS_NN_pavgusb] = 1;             // Packed 8-bit Unsigned Integer Averaging
	OptCategory[STARS_NN_pfadd] = 1;               // Packed Floating-Point Addition
	OptCategory[STARS_NN_pfsub] = 1;               // Packed Floating-Point Subtraction
	OptCategory[STARS_NN_pfsubr] = 1;              // Packed Floating-Point Reverse Subtraction
	OptCategory[STARS_NN_pfacc] = 1;               // Packed Floating-Point Accumulate
	OptCategory[STARS_NN_pfcmpge] = 1;             // Packed Floating-Point Comparison, Greater or Equal
	OptCategory[STARS_NN_pfcmpgt] = 1;             // Packed Floating-Point Comparison, Greater
	OptCategory[STARS_NN_pfcmpeq] = 1;             // Packed Floating-Point Comparison, Equal
	OptCategory[STARS_NN_pfmin] = 1;               // Packed Floating-Point Minimum
	OptCategory[STARS_NN_pfmax] = 1;               // Packed Floating-Point Maximum
	OptCategory[STARS_NN_pi2fd] = 1;               // Packed 32-bit Integer to Floating-Point
	OptCategory[STARS_NN_pf2id] = 1;               // Packed Floating-Point to 32-bit Integer
	OptCategory[STARS_NN_pfrcp] = 1;               // Packed Floating-Point Reciprocal Approximation
	OptCategory[STARS_NN_pfrsqrt] = 1;             // Packed Floating-Point Reciprocal Square Root Approximation
	OptCategory[STARS_NN_pfmul] = 1;               // Packed Floating-Point Multiplication
	OptCategory[STARS_NN_pfrcpit1] = 1;            // Packed Floating-Point Reciprocal First Iteration Step
	OptCategory[STARS_NN_pfrsqit1] = 1;            // Packed Floating-Point Reciprocal Square Root First Iteration Step
	OptCategory[STARS_NN_pfrcpit2] = 1;            // Packed Floating-Point Reciprocal Second Iteration Step
	OptCategory[STARS_NN_pmulhrw] = 1;             // Packed Floating-Point 16-bit Integer Multiply with rounding
	OptCategory[STARS_NN_femms] = 1;               // Faster entry/exit of the MMX or floating-point state
	OptCategory[STARS_NN_prefetch] = 1;            // Prefetch at least a 32-byte line into L1 data cache
	OptCategory[STARS_NN_prefetchw] = 1;           // Prefetch processor cache line into L1 data cache (mark as modified)


	//      Pentium III instructions

	OptCategory[STARS_NN_addps] = 1;               // Packed Single-FP Add
	OptCategory[STARS_NN_addss] = 1;               // Scalar Single-FP Add
	OptCategory[STARS_NN_andnps] = 1;              // Bitwise Logical And Not for Single-FP
	OptCategory[STARS_NN_andps] = 1;               // Bitwise Logical And for Single-FP
	OptCategory[STARS_NN_cmpps] = 1;               // Packed Single-FP Compare
	OptCategory[STARS_NN_cmpss] = 1;               // Scalar Single-FP Compare
	OptCategory[STARS_NN_comiss] = 1;              // Scalar Ordered Single-FP Compare and Set EFLAGS
	OptCategory[STARS_NN_cvtpi2ps] = 1;            // Packed signed INT32 to Packed Single-FP conversion
	OptCategory[STARS_NN_cvtps2pi] = 1;            // Packed Single-FP to Packed INT32 conversion
	OptCategory[STARS_NN_cvtsi2ss] = 1;            // Scalar signed INT32 to Single-FP conversion
	OptCategory[STARS_NN_cvtss2si] = 2;            // Scalar Single-FP to signed INT32 conversion
	OptCategory[STARS_NN_cvttps2pi] = 1;           // Packed Single-FP to Packed INT32 conversion (truncate)
	OptCategory[STARS_NN_cvttss2si] = 2;           // Scalar Single-FP to signed INT32 conversion (truncate)
	OptCategory[STARS_NN_divps] = 1;               // Packed Single-FP Divide
	OptCategory[STARS_NN_divss] = 1;               // Scalar Single-FP Divide
	OptCategory[STARS_NN_ldmxcsr] = 1;             // Load Streaming SIMD Extensions Technology Control/Status Register
	OptCategory[STARS_NN_maxps] = 1;               // Packed Single-FP Maximum
	OptCategory[STARS_NN_maxss] = 1;               // Scalar Single-FP Maximum
	OptCategory[STARS_NN_minps] = 1;               // Packed Single-FP Minimum
	OptCategory[STARS_NN_minss] = 1;               // Scalar Single-FP Minimum
	OptCategory[STARS_NN_movaps] = 9;              // Move Aligned Four Packed Single-FP  ** infer memsrc 'n'?
	OptCategory[STARS_NN_movhlps] = 1;             // Move High to Low Packed Single-FP
	OptCategory[STARS_NN_movhps] = 1;              // Move High Packed Single-FP
	OptCategory[STARS_NN_movlhps] = 1;             // Move Low to High Packed Single-FP
	OptCategory[STARS_NN_movlps] = 1;              // Move Low Packed Single-FP
	OptCategory[STARS_NN_movmskps] = 1;            // Move Mask to Register
	OptCategory[STARS_NN_movss] = 9;               // Move Scalar Single-FP
	OptCategory[STARS_NN_movups] = 9;              // Move Unaligned Four Packed Single-FP
	OptCategory[STARS_NN_mulps] = 1;               // Packed Single-FP Multiply
	OptCategory[STARS_NN_mulss] = 1;               // Scalar Single-FP Multiply
	OptCategory[STARS_NN_orps] = 1;                // Bitwise Logical OR for Single-FP Data
	OptCategory[STARS_NN_rcpps] = 1;               // Packed Single-FP Reciprocal
	OptCategory[STARS_NN_rcpss] = 1;               // Scalar Single-FP Reciprocal
	OptCategory[STARS_NN_rsqrtps] = 1;             // Packed Single-FP Square Root Reciprocal
	OptCategory[STARS_NN_rsqrtss] = 1;             // Scalar Single-FP Square Root Reciprocal
	OptCategory[STARS_NN_shufps] = 1;              // Shuffle Single-FP
	OptCategory[STARS_NN_sqrtps] = 1;              // Packed Single-FP Square Root
	OptCategory[STARS_NN_sqrtss] = 1;              // Scalar Single-FP Square Root
	OptCategory[STARS_NN_stmxcsr] = 0;             // Store Streaming SIMD Extensions Technology Control/Status Register    ** Infer dest is 'n'
	OptCategory[STARS_NN_subps] = 1;               // Packed Single-FP Subtract
	OptCategory[STARS_NN_subss] = 1;               // Scalar Single-FP Subtract
	OptCategory[STARS_NN_ucomiss] = 1;             // Scalar Unordered Single-FP Compare and Set EFLAGS
	OptCategory[STARS_NN_unpckhps] = 1;            // Unpack High Packed Single-FP Data
	OptCategory[STARS_NN_unpcklps] = 1;            // Unpack Low Packed Single-FP Data
	OptCategory[STARS_NN_xorps] = 1;               // Bitwise Logical XOR for Single-FP Data
	OptCategory[STARS_NN_pavgb] = 1;               // Packed Average (Byte)
	OptCategory[STARS_NN_pavgw] = 1;               // Packed Average (Word)
	OptCategory[STARS_NN_pextrw] = 2;              // Extract Word
	OptCategory[STARS_NN_pinsrw] = 1;              // Insert Word
	OptCategory[STARS_NN_pmaxsw] = 1;              // Packed Signed Integer Word Maximum
	OptCategory[STARS_NN_pmaxub] = 1;              // Packed Unsigned Integer Byte Maximum
	OptCategory[STARS_NN_pminsw] = 1;              // Packed Signed Integer Word Minimum
	OptCategory[STARS_NN_pminub] = 1;              // Packed Unsigned Integer Byte Minimum
	OptCategory[STARS_NN_pmovmskb] = 1;            // Move Byte Mask to Integer
	OptCategory[STARS_NN_pmulhuw] = 1;             // Packed Multiply High Unsigned
	OptCategory[STARS_NN_psadbw] = 1;              // Packed Sum of Absolute Differences
	OptCategory[STARS_NN_pshufw] = 1;              // Packed Shuffle Word
	OptCategory[STARS_NN_maskmovq] = 0;            // Byte Mask write   ** Infer dest is 'n'
	OptCategory[STARS_NN_movntps] = 0;             // Move Aligned Four Packed Single-FP Non Temporal  * infer dest is 'n'
	OptCategory[STARS_NN_movntq] = 0;              // Move 64 Bits Non Temporal    ** Infer dest is 'n'
	OptCategory[STARS_NN_prefetcht0] = 1;          // Prefetch to all cache levels
	OptCategory[STARS_NN_prefetcht1] = 1;          // Prefetch to all cache levels
	OptCategory[STARS_NN_prefetcht2] = 1;          // Prefetch to L2 cache
	OptCategory[STARS_NN_prefetchnta] = 1;         // Prefetch to L1 cache
	OptCategory[STARS_NN_sfence] = 1;              // Store Fence

	// Pentium III Pseudo instructions

	OptCategory[STARS_NN_cmpeqps] = 1;             // Packed Single-FP Compare EQ
	OptCategory[STARS_NN_cmpltps] = 1;             // Packed Single-FP Compare LT
	OptCategory[STARS_NN_cmpleps] = 1;             // Packed Single-FP Compare LE
	OptCategory[STARS_NN_cmpunordps] = 1;          // Packed Single-FP Compare UNORD
	OptCategory[STARS_NN_cmpneqps] = 1;            // Packed Single-FP Compare NOT EQ
	OptCategory[STARS_NN_cmpnltps] = 1;            // Packed Single-FP Compare NOT LT
	OptCategory[STARS_NN_cmpnleps] = 1;            // Packed Single-FP Compare NOT LE
	OptCategory[STARS_NN_cmpordps] = 1;            // Packed Single-FP Compare ORDERED
	OptCategory[STARS_NN_cmpeqss] = 1;             // Scalar Single-FP Compare EQ
	OptCategory[STARS_NN_cmpltss] = 1;             // Scalar Single-FP Compare LT
	OptCategory[STARS_NN_cmpless] = 1;             // Scalar Single-FP Compare LE
	OptCategory[STARS_NN_cmpunordss] = 1;          // Scalar Single-FP Compare UNORD
	OptCategory[STARS_NN_cmpneqss] = 1;            // Scalar Single-FP Compare NOT EQ
	OptCategory[STARS_NN_cmpnltss] = 1;            // Scalar Single-FP Compare NOT LT
	OptCategory[STARS_NN_cmpnless] = 1;            // Scalar Single-FP Compare NOT LE
	OptCategory[STARS_NN_cmpordss] = 1;            // Scalar Single-FP Compare ORDERED

	// AMD K7 instructions

	// Revisit AMD if we port to it.
	OptCategory[STARS_NN_pf2iw] = 0;               // Packed Floating-Point to Integer with Sign Extend
	OptCategory[STARS_NN_pfnacc] = 0;              // Packed Floating-Point Negative Accumulate
	OptCategory[STARS_NN_pfpnacc] = 0;             // Packed Floating-Point Mixed Positive-Negative Accumulate
	OptCategory[STARS_NN_pi2fw] = 0;               // Packed 16-bit Integer to Floating-Point
	OptCategory[STARS_NN_pswapd] = 0;              // Packed Swap Double Word

	// Undocumented FP instructions (thanks to norbert.juffa@adm.com)

	OptCategory[STARS_NN_fstp1] = 9;               // Alias of Store Real and Pop
	OptCategory[STARS_NN_fcom2] = 1;               // Alias of Compare Real
	OptCategory[STARS_NN_fcomp3] = 1;              // Alias of Compare Real and Pop
	OptCategory[STARS_NN_fxch4] = 1;               // Alias of Exchange Registers
	OptCategory[STARS_NN_fcomp5] = 1;              // Alias of Compare Real and Pop
	OptCategory[STARS_NN_ffreep] = 1;              // Free Register and Pop
	OptCategory[STARS_NN_fxch7] = 1;               // Alias of Exchange Registers
	OptCategory[STARS_NN_fstp8] = 9;               // Alias of Store Real and Pop
	OptCategory[STARS_NN_fstp9] = 9;               // Alias of Store Real and Pop

	// Pentium 4 instructions

	OptCategory[STARS_NN_addpd] = 1;               // Add Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_addsd] = 1;               // Add Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_andnpd] = 1;              // Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_andpd] = 1;               // Bitwise Logical AND of Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_clflush] = 1;             // Flush Cache Line
	OptCategory[STARS_NN_cmppd] = 1;               // Compare Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_cmpsd] = 1;               // Compare Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_comisd] = 1;              // Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS
	OptCategory[STARS_NN_cvtdq2pd] = 1;            // Convert Packed Doubleword Integers to Packed Single-Precision Floating-Point Values
	OptCategory[STARS_NN_cvtdq2ps] = 1;            // Convert Packed Doubleword Integers to Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_cvtpd2dq] = 1;            // Convert Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvtpd2pi] = 1;            // Convert Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvtpd2ps] = 1;            // Convert Packed Double-Precision Floating-Point Values to Packed Single-Precision Floating-Point Values
	OptCategory[STARS_NN_cvtpi2pd] = 1;            // Convert Packed Doubleword Integers to Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_cvtps2dq] = 1;            // Convert Packed Single-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvtps2pd] = 1;            // Convert Packed Single-Precision Floating-Point Values to Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_cvtsd2si] = 2;            // Convert Scalar Double-Precision Floating-Point Value to Doubleword Integer
	OptCategory[STARS_NN_cvtsd2ss] = 1;            // Convert Scalar Double-Precision Floating-Point Value to Scalar Single-Precision Floating-Point Value
	OptCategory[STARS_NN_cvtsi2sd] = 1;            // Convert Doubleword Integer to Scalar Double-Precision Floating-Point Value
	OptCategory[STARS_NN_cvtss2sd] = 1;            // Convert Scalar Single-Precision Floating-Point Value to Scalar Double-Precision Floating-Point Value
	OptCategory[STARS_NN_cvttpd2dq] = 1;           // Convert With Truncation Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvttpd2pi] = 1;           // Convert with Truncation Packed Double-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvttps2dq] = 1;           // Convert With Truncation Packed Single-Precision Floating-Point Values to Packed Doubleword Integers
	OptCategory[STARS_NN_cvttsd2si] = 2;           // Convert with Truncation Scalar Double-Precision Floating-Point Value to Doubleword Integer
	OptCategory[STARS_NN_divpd] = 1;               // Divide Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_divsd] = 1;               // Divide Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_lfence] = 1;              // Load Fence
	OptCategory[STARS_NN_maskmovdqu] = 0;          // Store Selected Bytes of Double Quadword  ** Infer dest is 'n'
	OptCategory[STARS_NN_maxpd] = 1;               // Return Maximum Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_maxsd] = 1;               // Return Maximum Scalar Double-Precision Floating-Point Value
	OptCategory[STARS_NN_mfence] = 1;              // Memory Fence
	OptCategory[STARS_NN_minpd] = 1;               // Return Minimum Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_minsd] = 1;               // Return Minimum Scalar Double-Precision Floating-Point Value
	OptCategory[STARS_NN_movapd] = 9;              // Move Aligned Packed Double-Precision Floating-Point Values  ** Infer dest is 'n'
	OptCategory[STARS_NN_movdq2q] = 1;             // Move Quadword from XMM to MMX Register
	OptCategory[STARS_NN_movdqa] = 9;              // Move Aligned Double Quadword  ** Infer dest is 'n'
	OptCategory[STARS_NN_movdqu] = 9;              // Move Unaligned Double Quadword  ** Infer dest is 'n'
	OptCategory[STARS_NN_movhpd] = 9;              // Move High Packed Double-Precision Floating-Point Values  ** Infer dest is 'n'
	OptCategory[STARS_NN_movlpd] = 9;              // Move Low Packed Double-Precision Floating-Point Values  ** Infer dest is 'n'
	OptCategory[STARS_NN_movmskpd] = 2;            // Extract Packed Double-Precision Floating-Point Sign Mask
	OptCategory[STARS_NN_movntdq] = 0;             // Store Double Quadword Using Non-Temporal Hint
	OptCategory[STARS_NN_movnti] = 0;              // Store Doubleword Using Non-Temporal Hint
	OptCategory[STARS_NN_movntpd] = 0;             // Store Packed Double-Precision Floating-Point Values Using Non-Temporal Hint
	OptCategory[STARS_NN_movq2dq] = 1;             // Move Quadword from MMX to XMM Register
	OptCategory[STARS_NN_movsd] = 9;               // Move Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_movupd] = 9;              // Move Unaligned Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_mulpd] = 1;               // Multiply Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_mulsd] = 1;               // Multiply Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_orpd] = 1;                // Bitwise Logical OR of Double-Precision Floating-Point Values
	OptCategory[STARS_NN_paddq] = 1;               // Add Packed Quadword Integers
	OptCategory[STARS_NN_pause] = 1;               // Spin Loop Hint
	OptCategory[STARS_NN_pmuludq] = 1;             // Multiply Packed Unsigned Doubleword Integers
	OptCategory[STARS_NN_pshufd] = 1;              // Shuffle Packed Doublewords
	OptCategory[STARS_NN_pshufhw] = 1;             // Shuffle Packed High Words
	OptCategory[STARS_NN_pshuflw] = 1;             // Shuffle Packed Low Words
	OptCategory[STARS_NN_pslldq] = 1;              // Shift Double Quadword Left Logical
	OptCategory[STARS_NN_psrldq] = 1;              // Shift Double Quadword Right Logical
	OptCategory[STARS_NN_psubq] = 1;               // Subtract Packed Quadword Integers
	OptCategory[STARS_NN_punpckhqdq] = 1;          // Unpack High Data
	OptCategory[STARS_NN_punpcklqdq] = 1;          // Unpack Low Data
	OptCategory[STARS_NN_shufpd] = 1;              // Shuffle Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_sqrtpd] = 1;              // Compute Square Roots of Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_sqrtsd] = 1;              // Compute Square Rootof Scalar Double-Precision Floating-Point Value
	OptCategory[STARS_NN_subpd] = 1;               // Subtract Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_subsd] = 1;               // Subtract Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_ucomisd] = 1;             // Unordered Compare Scalar Ordered Double-Precision Floating-Point Values and Set EFLAGS
	OptCategory[STARS_NN_unpckhpd] = 1;            // Unpack and Interleave High Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_unpcklpd] = 1;            // Unpack and Interleave Low Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_xorpd] = 1;               // Bitwise Logical OR of Double-Precision Floating-Point Values


	// AMD syscall/sysret instructions  NOTE: not AMD, found in Intel manual

	OptCategory[STARS_NN_syscall] = 1;             // Low latency system call
	OptCategory[STARS_NN_sysret] = 1;              // Return from system call

	// AMD64 instructions    NOTE: not AMD, found in Intel manual

	OptCategory[STARS_NN_swapgs] = 1;              // Exchange GS base with KernelGSBase MSR

	// New Pentium instructions (SSE3)

	OptCategory[STARS_NN_movddup] = 9;             // Move One Double-FP and Duplicate
	OptCategory[STARS_NN_movshdup] = 9;            // Move Packed Single-FP High and Duplicate
	OptCategory[STARS_NN_movsldup] = 9;            // Move Packed Single-FP Low and Duplicate

	// Missing AMD64 instructions  NOTE: also found in Intel manual

	OptCategory[STARS_NN_movsxd] = 2;              // Move with Sign-Extend Doubleword
	OptCategory[STARS_NN_cmpxchg16b] = 0;          // Compare and Exchange 16 Bytes

	// SSE3 instructions

	OptCategory[STARS_NN_addsubpd] = 1;            // Add /Sub packed DP FP numbers
	OptCategory[STARS_NN_addsubps] = 1;            // Add /Sub packed SP FP numbers
	OptCategory[STARS_NN_haddpd] = 1;              // Add horizontally packed DP FP numbers
	OptCategory[STARS_NN_haddps] = 1;              // Add horizontally packed SP FP numbers
	OptCategory[STARS_NN_hsubpd] = 1;              // Sub horizontally packed DP FP numbers
	OptCategory[STARS_NN_hsubps] = 1;              // Sub horizontally packed SP FP numbers
	OptCategory[STARS_NN_monitor] = 1;             // Set up a linear address range to be monitored by hardware
	OptCategory[STARS_NN_mwait] = 1;               // Wait until write-back store performed within the range specified by the MONITOR instruction
	OptCategory[STARS_NN_fisttp] = 0;              // Store ST in intXX (chop) and pop
	OptCategory[STARS_NN_lddqu] = 1;               // Load unaligned integer 128-bit

	// SSSE3 instructions

	OptCategory[STARS_NN_psignb] = 1;              // Packed SIGN Byte
	OptCategory[STARS_NN_psignw] = 1;              // Packed SIGN Word
	OptCategory[STARS_NN_psignd] = 1;              // Packed SIGN Doubleword
	OptCategory[STARS_NN_pshufb] = 1;              // Packed Shuffle Bytes
	OptCategory[STARS_NN_pmulhrsw] = 1;            // Packed Multiply High with Round and Scale
	OptCategory[STARS_NN_pmaddubsw] = 1;           // Multiply and Add Packed Signed and Unsigned Bytes
	OptCategory[STARS_NN_phsubsw] = 1;             // Packed Horizontal Subtract and Saturate
	OptCategory[STARS_NN_phaddsw] = 1;             // Packed Horizontal Add and Saturate
	OptCategory[STARS_NN_phaddw] = 1;              // Packed Horizontal Add Word
	OptCategory[STARS_NN_phaddd] = 1;              // Packed Horizontal Add Doubleword
	OptCategory[STARS_NN_phsubw] = 1;              // Packed Horizontal Subtract Word
	OptCategory[STARS_NN_phsubd] = 1;              // Packed Horizontal Subtract Doubleword
	OptCategory[STARS_NN_palignr] = 1;             // Packed Align Right
	OptCategory[STARS_NN_pabsb] = 1;               // Packed Absolute Value Byte
	OptCategory[STARS_NN_pabsw] = 1;               // Packed Absolute Value Word
	OptCategory[STARS_NN_pabsd] = 1;               // Packed Absolute Value Doubleword

	// VMX instructions

	OptCategory[STARS_NN_vmcall] = 1;              // Call to VM Monitor
	OptCategory[STARS_NN_vmclear] = 0;             // Clear Virtual Machine Control Structure
	OptCategory[STARS_NN_vmlaunch] = 1;            // Launch Virtual Machine
	OptCategory[STARS_NN_vmresume] = 1;            // Resume Virtual Machine
	OptCategory[STARS_NN_vmptrld] = 6;             // Load Pointer to Virtual Machine Control Structure
	OptCategory[STARS_NN_vmptrst] = 0;             // Store Pointer to Virtual Machine Control Structure
	OptCategory[STARS_NN_vmread] = 0;              // Read Field from Virtual Machine Control Structure
	OptCategory[STARS_NN_vmwrite] = 0;             // Write Field from Virtual Machine Control Structure
	OptCategory[STARS_NN_vmxoff] = 1;              // Leave VMX Operation
	OptCategory[STARS_NN_vmxon] = 1;               // Enter VMX Operation

	OptCategory[STARS_NN_ud2] = 1;                 // Undefined Instruction

	// Added with x86-64

	OptCategory[STARS_NN_rdtscp] = 10;             // Read Time-Stamp Counter and Processor ID

	// Geode LX 3DNow! extensions

	OptCategory[STARS_NN_pfrcpv] = 1;              // Reciprocal Approximation for a Pair of 32-bit Floats
	OptCategory[STARS_NN_pfrsqrtv] = 1;            // Reciprocal Square Root Approximation for a Pair of 32-bit Floats

	// SSE2 pseudoinstructions

	OptCategory[STARS_NN_cmpeqpd] = 1;             // Packed Double-FP Compare EQ
	OptCategory[STARS_NN_cmpltpd] = 1;             // Packed Double-FP Compare LT
	OptCategory[STARS_NN_cmplepd] = 1;             // Packed Double-FP Compare LE
	OptCategory[STARS_NN_cmpunordpd] = 1;          // Packed Double-FP Compare UNORD
	OptCategory[STARS_NN_cmpneqpd] = 1;            // Packed Double-FP Compare NOT EQ
	OptCategory[STARS_NN_cmpnltpd] = 1;            // Packed Double-FP Compare NOT LT
	OptCategory[STARS_NN_cmpnlepd] = 1;            // Packed Double-FP Compare NOT LE
	OptCategory[STARS_NN_cmpordpd] = 1;            // Packed Double-FP Compare ORDERED
	OptCategory[STARS_NN_cmpeqsd] = 1;             // Scalar Double-FP Compare EQ
	OptCategory[STARS_NN_cmpltsd] = 1;             // Scalar Double-FP Compare LT
	OptCategory[STARS_NN_cmplesd] = 1;             // Scalar Double-FP Compare LE
	OptCategory[STARS_NN_cmpunordsd] = 1;          // Scalar Double-FP Compare UNORD
	OptCategory[STARS_NN_cmpneqsd] = 1;            // Scalar Double-FP Compare NOT EQ
	OptCategory[STARS_NN_cmpnltsd] = 1;            // Scalar Double-FP Compare NOT LT
	OptCategory[STARS_NN_cmpnlesd] = 1;            // Scalar Double-FP Compare NOT LE
	OptCategory[STARS_NN_cmpordsd] = 1;            // Scalar Double-FP Compare ORDERED

	// SSSE4.1 instructions

	OptCategory[STARS_NN_blendpd] = 1;              // Blend Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_blendps] = 1;              // Blend Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_blendvpd] = 1;             // Variable Blend Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_blendvps] = 1;             // Variable Blend Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_dppd] = 1;                 // Dot Product of Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_dpps] = 1;                 // Dot Product of Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_extractps] = 2;            // Extract Packed Single Precision Floating-Point Value
	OptCategory[STARS_NN_insertps] = 1;             // Insert Packed Single Precision Floating-Point Value
	OptCategory[STARS_NN_movntdqa] = 0;             // Load Double Quadword Non-Temporal Aligned Hint
	OptCategory[STARS_NN_mpsadbw] = 1;              // Compute Multiple Packed Sums of Absolute Difference
	OptCategory[STARS_NN_packusdw] = 1;             // Pack with Unsigned Saturation
	OptCategory[STARS_NN_pblendvb] = 1;             // Variable Blend Packed Bytes
	OptCategory[STARS_NN_pblendw] = 1;              // Blend Packed Words
	OptCategory[STARS_NN_pcmpeqq] = 1;              // Compare Packed Qword Data for Equal
	OptCategory[STARS_NN_pextrb] = 1;               // Extract Byte
	OptCategory[STARS_NN_pextrd] = 1;               // Extract Dword
	OptCategory[STARS_NN_pextrq] = 1;               // Extract Qword
	OptCategory[STARS_NN_phminposuw] = 1;           // Packed Horizontal Word Minimum
	OptCategory[STARS_NN_pinsrb] = 1;               // Insert Byte 
	OptCategory[STARS_NN_pinsrd] = 1;               // Insert Dword
	OptCategory[STARS_NN_pinsrq] = 1;               // Insert Qword
	OptCategory[STARS_NN_pmaxsb] = 1;               // Maximum of Packed Signed Byte Integers
	OptCategory[STARS_NN_pmaxsd] = 1;               // Maximum of Packed Signed Dword Integers
	OptCategory[STARS_NN_pmaxud] = 1;               // Maximum of Packed Unsigned Dword Integers
	OptCategory[STARS_NN_pmaxuw] = 1;               // Maximum of Packed Word Integers
	OptCategory[STARS_NN_pminsb] = 1;               // Minimum of Packed Signed Byte Integers
	OptCategory[STARS_NN_pminsd] = 1;               // Minimum of Packed Signed Dword Integers
	OptCategory[STARS_NN_pminud] = 1;               // Minimum of Packed Unsigned Dword Integers
	OptCategory[STARS_NN_pminuw] = 1;               // Minimum of Packed Word Integers
	OptCategory[STARS_NN_pmovsxbw] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovsxbd] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovsxbq] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovsxwd] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovsxwq] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovsxdq] = 1;             // Packed Move with Sign Extend
	OptCategory[STARS_NN_pmovzxbw] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmovzxbd] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmovzxbq] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmovzxwd] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmovzxwq] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmovzxdq] = 1;             // Packed Move with Zero Extend
	OptCategory[STARS_NN_pmuldq] = 1;               // Multiply Packed Signed Dword Integers
	OptCategory[STARS_NN_pmulld] = 1;               // Multiply Packed Signed Dword Integers and Store Low Result
	OptCategory[STARS_NN_ptest] = 1;                // Logical Compare
	OptCategory[STARS_NN_roundpd] = 1;              // Round Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_roundps] = 1;              // Round Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_roundsd] = 1;              // Round Scalar Double Precision Floating-Point Values
	OptCategory[STARS_NN_roundss] = 1;              // Round Scalar Single Precision Floating-Point Values

	// SSSE4.2 instructions
	OptCategory[STARS_NN_crc32] = 2;                // Accumulate CRC32 Value
	OptCategory[STARS_NN_pcmpestri] = 2;            // Packed Compare Explicit Length Strings, Return Index
	OptCategory[STARS_NN_pcmpestrm] = 2;            // Packed Compare Explicit Length Strings, Return Mask
	OptCategory[STARS_NN_pcmpistri] = 2;            // Packed Compare Implicit Length Strings, Return Index
	OptCategory[STARS_NN_pcmpistrm] = 2;            // Packed Compare Implicit Length Strings, Return Mask
	OptCategory[STARS_NN_pcmpgtq] = 1;              // Compare Packed Data for Greater Than
	OptCategory[STARS_NN_popcnt] = 2;               // Return the Count of Number of Bits Set to 1

	// AMD SSE4a instructions

	OptCategory[STARS_NN_extrq] = 1;                // Extract Field From Register
	OptCategory[STARS_NN_insertq] = 1;              // Insert Field
	OptCategory[STARS_NN_movntsd] = 0;              // Move Non-Temporal Scalar Double-Precision Floating-Point
	OptCategory[STARS_NN_movntss] = 0;              // Move Non-Temporal Scalar Single-Precision Floating-Point
	OptCategory[STARS_NN_lzcnt] = 2;                // Leading Zero Count

	// xsave/xrstor instructions

	OptCategory[STARS_NN_xgetbv] = 8;               // Get Value of Extended Control Register
	OptCategory[STARS_NN_xrstor] = 0;               // Restore Processor Extended States
	OptCategory[STARS_NN_xsave] = 1;                // Save Processor Extended States
	OptCategory[STARS_NN_xsetbv] = 1;               // Set Value of Extended Control Register

	// Intel Safer Mode Extensions (SMX)

	OptCategory[STARS_NN_getsec] = 1;               // Safer Mode Extensions (SMX) Instruction

	// AMD-V Virtualization ISA Extension

	OptCategory[STARS_NN_clgi] = 0;                 // Clear Global Interrupt Flag
	OptCategory[STARS_NN_invlpga] = 1;              // Invalidate TLB Entry in a Specified ASID
	OptCategory[STARS_NN_skinit] = 1;               // Secure Init and Jump with Attestation
	OptCategory[STARS_NN_stgi] = 0;                 // Set Global Interrupt Flag
	OptCategory[STARS_NN_vmexit] = 1;               // Stop Executing Guest, Begin Executing Host
	OptCategory[STARS_NN_vmload] = 0;               // Load State from VMCB
	OptCategory[STARS_NN_vmmcall] = 1;              // Call VMM
	OptCategory[STARS_NN_vmrun] = 1;                // Run Virtual Machine
	OptCategory[STARS_NN_vmsave] = 0;               // Save State to VMCB

	// VMX+ instructions

	OptCategory[STARS_NN_invept] = 1;               // Invalidate Translations Derived from EPT
	OptCategory[STARS_NN_invvpid] = 1;              // Invalidate Translations Based on VPID

	// Intel Atom instructions

	OptCategory[STARS_NN_movbe] = 3;                // Move Data After Swapping Bytes

	// Intel AES instructions

	OptCategory[STARS_NN_aesenc] = 1;                // Perform One Round of an AES Encryption Flow
	OptCategory[STARS_NN_aesenclast] = 1;            // Perform the Last Round of an AES Encryption Flow
	OptCategory[STARS_NN_aesdec] = 1;                // Perform One Round of an AES Decryption Flow
	OptCategory[STARS_NN_aesdeclast] = 1;            // Perform the Last Round of an AES Decryption Flow
	OptCategory[STARS_NN_aesimc] = 1;                // Perform the AES InvMixColumn Transformation
	OptCategory[STARS_NN_aeskeygenassist] = 1;       // AES Round Key Generation Assist

	// Carryless multiplication

	OptCategory[STARS_NN_pclmulqdq] = 1;            // Carry-Less Multiplication Quadword

	// Returns modified by operand size prefixes

	OptCategory[STARS_NN_retnw] = 0;               // Return Near from Procedure (use16)
	OptCategory[STARS_NN_retnd] = 0;               // Return Near from Procedure (use32)
	OptCategory[STARS_NN_retnq] = 0;               // Return Near from Procedure (use64)
	OptCategory[STARS_NN_retfw] = 0;               // Return Far from Procedure (use16)
	OptCategory[STARS_NN_retfd] = 0;               // Return Far from Procedure (use32)
	OptCategory[STARS_NN_retfq] = 0;               // Return Far from Procedure (use64)

	// RDRAND support

	OptCategory[STARS_NN_rdrand] = 2;               // Read Random Number

	// new GPR instructions

	OptCategory[STARS_NN_adcx] = 5;                 // Unsigned Integer Addition of Two Operands with Carry Flag
	OptCategory[STARS_NN_adox] = 5;                 // Unsigned Integer Addition of Two Operands with Overflow Flag
	OptCategory[STARS_NN_andn] = 0;                 // Logical AND NOT
	OptCategory[STARS_NN_bextr] = 2;                // Bit Field Extract
	OptCategory[STARS_NN_blsi] = 2;                 // Extract Lowest Set Isolated Bit
	OptCategory[STARS_NN_blsmsk] = 2;               // Get Mask Up to Lowest Set Bit
	OptCategory[STARS_NN_blsr] = 2;                 // Reset Lowest Set Bit
	OptCategory[STARS_NN_bzhi] = 2;                 // Zero High Bits Starting with Specified Bit Position
	OptCategory[STARS_NN_clac] = 1;                 // Clear AC Flag in EFLAGS Register
	OptCategory[STARS_NN_mulx] = 2;                 // Unsigned Multiply Without Affecting Flags
	OptCategory[STARS_NN_pdep] = 2;                 // Parallel Bits Deposit
	OptCategory[STARS_NN_pext] = 2;                 // Parallel Bits Extract
	OptCategory[STARS_NN_rorx] = 2;                 // Rotate Right Logical Without Affecting Flags
	OptCategory[STARS_NN_sarx] = 2;                 // Shift Arithmetically Right Without Affecting Flags
	OptCategory[STARS_NN_shlx] = 2;                 // Shift Logically Left Without Affecting Flags
	OptCategory[STARS_NN_shrx] = 2;                 // Shift Logically Right Without Affecting Flags
	OptCategory[STARS_NN_stac] = 1;                  // Set AC Flag in EFLAGS Register
	OptCategory[STARS_NN_tzcnt] = 2;                // Count the Number of Trailing Zero Bits
	OptCategory[STARS_NN_xsaveopt] = 1;             // Save Processor Extended States Optimized
	OptCategory[STARS_NN_invpcid] = 1;              // Invalidate Processor Context ID
	OptCategory[STARS_NN_rdseed] = 2;               // Read Random Seed
	OptCategory[STARS_NN_rdfsbase] = 6;             // Read FS Segment Base
	OptCategory[STARS_NN_rdgsbase] = 6;             // Read GS Segment Base
	OptCategory[STARS_NN_wrfsbase] = 6;             // Write FS Segment Base
	OptCategory[STARS_NN_wrgsbase] = 6;             // Write GS Segment Base

	// new AVX instructions

	OptCategory[STARS_NN_vaddpd] = 1;               // Add Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_vaddps] = 1;               // Packed Single-FP Add
	OptCategory[STARS_NN_vaddsd] = 1;               // Add Scalar Double-Precision Floating-Point Values
	OptCategory[STARS_NN_vaddss] = 1;               // Scalar Single-FP Add
	OptCategory[STARS_NN_vaddsubpd] = 1;            // Add /Sub packed DP FP numbers
	OptCategory[STARS_NN_vaddsubps] = 1;            // Add /Sub packed SP FP numbers
	OptCategory[STARS_NN_vaesdec] = 1;              // Perform One Round of an AES Decryption Flow
	OptCategory[STARS_NN_vaesdeclast] = 1;          // Perform the Last Round of an AES Decryption Flow
	OptCategory[STARS_NN_vaesenc] = 1;              // Perform One Round of an AES Encryption Flow
	OptCategory[STARS_NN_vaesenclast] = 1;          // Perform the Last Round of an AES Encryption Flow
	OptCategory[STARS_NN_vaesimc] = 1;              // Perform the AES InvMixColumn Transformation
	OptCategory[STARS_NN_vaeskeygenassist] = 1;     // AES Round Key Generation Assist
	OptCategory[STARS_NN_vandnpd] = 1;              // Bitwise Logical AND NOT of Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_vandnps] = 1;              // Bitwise Logical And Not for Single-FP
	OptCategory[STARS_NN_vandpd] = 1;               // Bitwise Logical AND of Packed Double-Precision Floating-Point Values
	OptCategory[STARS_NN_vandps] = 1;               // Bitwise Logical And for Single-FP
	OptCategory[STARS_NN_vblendpd] = 1;             // Blend Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_vblendps] = 1;             // Blend Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_vblendvpd] = 1;            // Variable Blend Packed Double Precision Floating-Point Values
	OptCategory[STARS_NN_vblendvps] = 1;            // Variable Blend Packed Single Precision Floating-Point Values
	OptCategory[STARS_NN_vbroadcastf128] = 1;       // Broadcast 128 Bits of Floating-Point Data
	OptCategory[STARS_NN_vbroadcasti128] = 1;       // Broadcast 128 Bits of Integer Data
	OptCategory[STARS_NN_vbroadcastsd] = 1;         // Broadcast Double-Precision Floating-Point Element
	OptCategory[STARS_NN_vbroadcastss] = 1;         // Broadcast Single-Precision Floating-Point Element
	OptCategory[STARS_NN_vcmppd] = 1;               // Compare Packed Double-Precision Floating-Point Values