Changeset 39086 in vbox for trunk/src/VBox/Disassembler/DisasmCore.cpp
- Timestamp:
- Oct 24, 2011 9:39:47 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r35346 r39086 485 485 int index; 486 486 const OPCODE *fpop; 487 unsigned size = 0, ModRM; 487 unsigned size = 0; 488 unsigned ModRM; 489 NOREF(pOp); 488 490 489 491 ModRM = DISReadByte(pCpu, lpszCodeBlock); … … 566 568 const char **ppszSIBIndexReg; 567 569 const char **ppszSIBBaseReg; 570 NOREF(lpszCodeBlock); NOREF(pOp); 568 571 569 572 scale = pCpu->SIB.Bits.Scale; … … 637 640 unsigned size = sizeof(uint8_t); 638 641 unsigned SIB; 642 NOREF(pOp); NOREF(pParam); 639 643 640 644 SIB = DISReadByte(pCpu, lpszCodeBlock); … … 669 673 unsigned size = sizeof(uint8_t); 670 674 unsigned SIB; 675 NOREF(pOp); NOREF(pParam); 671 676 672 677 SIB = DISReadByte(pCpu, lpszCodeBlock); … … 1088 1093 unsigned ParseIllegal(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1089 1094 { 1095 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1090 1096 AssertFailed(); 1091 1097 return 0; … … 1190 1196 ////AssertMsgFailed(("??\n")); 1191 1197 //nothing to do apparently 1198 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1192 1199 return 0; 1193 1200 } … … 1196 1203 unsigned ParseImmByte(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1197 1204 { 1205 NOREF(pOp); 1198 1206 pParam->parval = DISReadByte(pCpu, lpszCodeBlock); 1199 1207 pParam->flags |= USE_IMMEDIATE8; … … 1207 1215 unsigned ParseImmByte_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1208 1216 { 1217 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1209 1218 return sizeof(uint8_t); 1210 1219 } … … 1213 1222 unsigned ParseImmByteSX(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1214 1223 { 1224 NOREF(pOp); 1215 1225 if (pCpu->opmode == CPUMODE_32BIT) 1216 1226 { … … 1241 1251 unsigned ParseImmByteSX_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1242 1252 { 1253 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1243 1254 return sizeof(uint8_t); 1244 1255 } … … 1247 1258 unsigned ParseImmUshort(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1248 1259 { 1260 NOREF(pOp); 1249 1261 pParam->parval = DISReadWord(pCpu, lpszCodeBlock); 1250 1262 pParam->flags |= USE_IMMEDIATE16; … … 1258 1270 unsigned ParseImmUshort_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1259 1271 { 1272 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1260 1273 return sizeof(uint16_t); 1261 1274 } … … 1264 1277 unsigned ParseImmUlong(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1265 1278 { 1279 NOREF(pOp); 1266 1280 pParam->parval = DISReadDWord(pCpu, lpszCodeBlock); 1267 1281 pParam->flags |= USE_IMMEDIATE32; … … 1275 1289 unsigned ParseImmUlong_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1276 1290 { 1291 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1277 1292 return sizeof(uint32_t); 1278 1293 } … … 1281 1296 unsigned ParseImmQword(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1282 1297 { 1298 NOREF(pOp); 1283 1299 pParam->parval = DISReadQWord(pCpu, lpszCodeBlock); 1284 1300 pParam->flags |= USE_IMMEDIATE64; … … 1293 1309 unsigned ParseImmQword_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1294 1310 { 1311 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1295 1312 return sizeof(uint64_t); 1296 1313 } … … 1299 1316 unsigned ParseImmV(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1300 1317 { 1318 NOREF(pOp); 1301 1319 if (pCpu->opmode == CPUMODE_32BIT) 1302 1320 { … … 1332 1350 unsigned ParseImmV_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1333 1351 { 1352 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); 1334 1353 if (pCpu->opmode == CPUMODE_32BIT) 1335 1354 return sizeof(uint32_t); 1336 else1337 1355 if (pCpu->opmode == CPUMODE_64BIT) 1338 1356 return sizeof(uint64_t); 1339 1340 1357 return sizeof(uint16_t); 1341 1358 } … … 1344 1361 unsigned ParseImmZ(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1345 1362 { 1363 NOREF(pOp); 1346 1364 /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */ 1347 1365 if (pCpu->opmode == CPUMODE_16BIT) … … 1378 1396 unsigned ParseImmZ_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1379 1397 { 1398 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); 1380 1399 /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */ 1381 1400 if (pCpu->opmode == CPUMODE_16BIT) … … 1389 1408 unsigned ParseImmBRel(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1390 1409 { 1410 NOREF(pOp); 1391 1411 pParam->parval = DISReadByte(pCpu, lpszCodeBlock); 1392 1412 pParam->flags |= USE_IMMEDIATE8_REL; … … 1401 1421 unsigned ParseImmBRel_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1402 1422 { 1423 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); NOREF(pCpu); 1403 1424 return sizeof(char); 1404 1425 } … … 1408 1429 unsigned ParseImmVRel(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1409 1430 { 1431 NOREF(pOp); 1410 1432 if (pCpu->opmode == CPUMODE_32BIT) 1411 1433 { … … 1443 1465 unsigned ParseImmVRel_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1444 1466 { 1467 NOREF(lpszCodeBlock); NOREF(pOp); NOREF(pParam); 1445 1468 if (pCpu->opmode == CPUMODE_16BIT) 1446 1469 return sizeof(int16_t); … … 1525 1548 unsigned ParseImmAddr_SizeOnly(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1526 1549 { 1550 NOREF(lpszCodeBlock); NOREF(pOp); 1527 1551 if (pCpu->addrmode == CPUMODE_32BIT) 1528 1552 { … … 1557 1581 unsigned ParseFixedReg(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1558 1582 { 1583 NOREF(lpszCodeBlock); 1584 1559 1585 /* 1560 1586 * Sets up flags for stored in OPC fixed registers. … … 1656 1682 unsigned ParseXv(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1657 1683 { 1684 NOREF(pu8CodeBlock); 1658 1685 disasmGetPtrString(pCpu, pOp, pParam); 1659 1686 disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "DS:ESI" : "DS:SI"); … … 1682 1709 unsigned ParseXb(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1683 1710 { 1711 NOREF(pu8CodeBlock); NOREF(pOp); 1684 1712 disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "DS:ESI" : "DS:SI"); 1685 1713 … … 1707 1735 unsigned ParseYv(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1708 1736 { 1737 NOREF(pu8CodeBlock); 1709 1738 disasmGetPtrString(pCpu, pOp, pParam); 1710 1739 disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "ES:EDI" : "ES:DI"); … … 1733 1762 unsigned ParseYb(RTUINTPTR pu8CodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1734 1763 { 1764 NOREF(pu8CodeBlock); NOREF(pOp); 1735 1765 disasmAddString(pParam->szParam, (pCpu->addrmode == CPUMODE_32BIT) ? "ES:EDI" : "ES:DI"); 1736 1766 … … 1760 1790 const OPCODE *pOpcode; 1761 1791 int size = sizeof(uint8_t); 1792 NOREF(pOp); NOREF(pParam); 1762 1793 1763 1794 /* 2nd byte */ … … 1818 1849 const OPCODE *pOpcode; 1819 1850 int size = sizeof(uint8_t); 1851 NOREF(pOp); NOREF(pParam); 1820 1852 1821 1853 /* 3rd byte */ … … 1878 1910 const OPCODE *pOpcode; 1879 1911 int size = sizeof(uint8_t); 1912 NOREF(pOp); NOREF(pParam); 1880 1913 1881 1914 /* 3rd byte */ … … 1911 1944 { 1912 1945 unsigned size = 0; 1946 NOREF(pParam); 1913 1947 1914 1948 if (pCpu->prefix & PREFIX_REP) … … 1929 1963 int idx = (pCpu->opcode - 0x80) * 8; 1930 1964 unsigned size = 0, modrm, reg; 1965 NOREF(pParam); 1931 1966 1932 1967 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 1948 1983 int idx; 1949 1984 unsigned size = 0, modrm, reg; 1985 NOREF(pParam); 1950 1986 1951 1987 switch (pCpu->opcode) … … 1987 2023 int idx = (pCpu->opcode - 0xF6) * 8; 1988 2024 unsigned size = 0, modrm, reg; 2025 NOREF(pParam); 1989 2026 1990 2027 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2006 2043 { 2007 2044 unsigned size = 0, modrm, reg; 2045 NOREF(pParam); 2008 2046 2009 2047 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2025 2063 { 2026 2064 unsigned size = 0, modrm, reg; 2065 NOREF(pParam); 2027 2066 2028 2067 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2084 2123 { 2085 2124 unsigned size = 0, modrm, reg; 2125 NOREF(pParam); 2086 2126 2087 2127 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2103 2143 { 2104 2144 unsigned size = 0, modrm, reg, rm, mod; 2145 NOREF(pParam); 2105 2146 2106 2147 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2130 2171 { 2131 2172 unsigned size = 0, modrm, reg; 2173 NOREF(pParam); 2132 2174 2133 2175 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2149 2191 { 2150 2192 unsigned size = 0, modrm, reg; 2193 NOREF(pParam); 2151 2194 2152 2195 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2168 2211 { 2169 2212 unsigned size = 0, modrm, reg; 2213 NOREF(pParam); 2170 2214 2171 2215 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2187 2231 { 2188 2232 unsigned size = 0, modrm, reg; 2233 NOREF(pParam); 2189 2234 2190 2235 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2208 2253 { 2209 2254 unsigned size = 0, modrm, reg; 2255 NOREF(pParam); 2210 2256 2211 2257 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2229 2275 { 2230 2276 unsigned size = 0, modrm, reg; 2277 NOREF(pParam); 2231 2278 2232 2279 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2250 2297 { 2251 2298 unsigned size = 0, modrm, reg, mod, rm; 2299 NOREF(pParam); 2252 2300 2253 2301 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2273 2321 { 2274 2322 unsigned size = 0, modrm, reg; 2323 NOREF(pParam); 2275 2324 2276 2325 modrm = DISReadByte(pCpu, lpszCodeBlock); … … 2301 2350 { 2302 2351 int subtype, type, mod; 2352 NOREF(pOp); NOREF(pCpu); 2303 2353 2304 2354 mod = pCpu->ModRM.Bits.Mod; … … 2383 2433 void disasmModRMReg16(PDISCPUSTATE pCpu, PCOPCODE pOp, unsigned idx, POP_PARAMETER pParam) 2384 2434 { 2435 NOREF(pCpu); NOREF(pOp); 2385 2436 disasmAddString(pParam->szParam, szModRMReg1616[idx]); 2386 2437 pParam->flags |= USE_REG_GEN16; … … 2396 2447 void disasmModRMSReg(PDISCPUSTATE pCpu, PCOPCODE pOp, unsigned idx, POP_PARAMETER pParam) 2397 2448 { 2449 NOREF(pCpu); NOREF(pOp); 2398 2450 #if 0 //def DEBUG_Sander 2399 2451 AssertMsg(idx < RT_ELEMENTS(szModRMSegReg), ("idx=%d\n", idx)); … … 2416 2468 void disasmPrintAbs32(POP_PARAMETER pParam) 2417 2469 { 2418 disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); 2470 disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); NOREF(pParam); 2419 2471 } 2420 2472 //***************************************************************************** … … 2422 2474 void disasmPrintDisp32(POP_PARAMETER pParam) 2423 2475 { 2424 disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); 2476 disasmAddStringF1(pParam->szParam, "%08Xh", pParam->disp32); NOREF(pParam); 2425 2477 } 2426 2478 //***************************************************************************** … … 2428 2480 void disasmPrintDisp64(POP_PARAMETER pParam) 2429 2481 { 2430 disasmAddStringF1(pParam->szParam, "%16RX64h", pParam->disp64); 2482 disasmAddStringF1(pParam->szParam, "%16RX64h", pParam->disp64); NOREF(pParam); 2431 2483 } 2432 2484 //***************************************************************************** … … 2434 2486 void disasmPrintDisp8(POP_PARAMETER pParam) 2435 2487 { 2436 disasmAddStringF1(pParam->szParam, "%d", pParam->disp8); 2488 disasmAddStringF1(pParam->szParam, "%d", pParam->disp8); NOREF(pParam); 2437 2489 } 2438 2490 //***************************************************************************** … … 2440 2492 void disasmPrintDisp16(POP_PARAMETER pParam) 2441 2493 { 2442 disasmAddStringF1(pParam->szParam, "%04Xh", pParam->disp16); 2494 disasmAddStringF1(pParam->szParam, "%04Xh", pParam->disp16); NOREF(pParam); 2443 2495 } 2444 2496 //***************************************************************************** … … 2447 2499 { 2448 2500 int subtype = OP_PARM_VSUBTYPE(pParam->param); 2501 NOREF(pOp); 2449 2502 2450 2503 if (subtype == OP_PARM_v)
Note:
See TracChangeset
for help on using the changeset viewer.