Changeset 41675 in vbox for trunk/src/VBox/Disassembler
- Timestamp:
- Jun 12, 2012 8:27:37 PM (12 years ago)
- Location:
- trunk/src/VBox/Disassembler
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41674 r41675 216 216 * accessed without faulting. (Consider 217 217 * DISInstrWithReader if this isn't the case.) 218 * @param enmCpuMode The CPU mode. CPUMODE_32BIT, CPUMODE_16BIT, orCPUMODE_64BIT.218 * @param enmCpuMode The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT. 219 219 * @param pfnReadBytes Callback for reading instruction bytes. 220 220 * @param pvUser User argument for the instruction reader. (Ends up in apvUserData[0].) … … 238 238 * @param uInstrAddr Address of the instruction to decode. What this means 239 239 * is left to the pfnReadBytes function. 240 * @param enmCpuMode The CPU mode. CPUMODE_32BIT, CPUMODE_16BIT, orCPUMODE_64BIT.240 * @param enmCpuMode The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT. 241 241 * @param pfnReadBytes Callback for reading instruction bytes. 242 242 * @param pvUser User argument for the instruction reader. (Ends up in apvUserData[0].) … … 259 259 * @param uInstrAddr Address of the instruction to decode. What this means 260 260 * is left to the pfnReadBytes function. 261 * @param enmCpuMode The CPU mode. CPUMODE_32BIT, CPUMODE_16BIT, orCPUMODE_64BIT.261 * @param enmCpuMode The CPU mode. DISCPUMODE_32BIT, DISCPUMODE_16BIT, or DISCPUMODE_64BIT. 262 262 * @param pfnReadBytes Callback for reading instruction bytes. 263 263 * @param fFilter Instruction type filter. … … 284 284 285 285 pCpu->mode = enmCpuMode; 286 if (enmCpuMode == CPUMODE_64BIT)286 if (enmCpuMode == DISCPUMODE_64BIT) 287 287 { 288 288 paOneByteMap = g_aOneByteMapX64; 289 pCpu->addrmode = CPUMODE_64BIT;290 pCpu->opmode = CPUMODE_32BIT;289 pCpu->addrmode = DISCPUMODE_64BIT; 290 pCpu->opmode = DISCPUMODE_32BIT; 291 291 } 292 292 else … … 296 296 pCpu->opmode = enmCpuMode; 297 297 } 298 pCpu->prefix = PREFIX_NONE;298 pCpu->prefix = DISPREFIX_NONE; 299 299 pCpu->enmPrefixSeg = DIS_SELREG_DS; 300 300 pCpu->uInstrAddr = uInstrAddr; … … 338 338 /** Last prefix byte (for SSE2 extension tables); don't include the REX prefix */ 339 339 pCpu->lastprefix = opcode; 340 pCpu->prefix &= ~ PREFIX_REX;340 pCpu->prefix &= ~DISPREFIX_REX; 341 341 } 342 342 … … 352 352 pCpu->enmPrefixSeg = (DIS_SELREG)(paOneByteMap[codebyte].param1 - OP_PARM_REG_SEG_START); 353 353 /* Segment prefixes for CS, DS, ES and SS are ignored in long mode. */ 354 if ( pCpu->mode != CPUMODE_64BIT354 if ( pCpu->mode != DISCPUMODE_64BIT 355 355 || pCpu->enmPrefixSeg >= DIS_SELREG_FS) 356 356 { 357 pCpu->prefix |= PREFIX_SEG;357 pCpu->prefix |= DISPREFIX_SEG; 358 358 } 359 359 iByte += sizeof(uint8_t); … … 362 362 // lock prefix byte 363 363 case OP_LOCK: 364 pCpu->prefix |= PREFIX_LOCK;364 pCpu->prefix |= DISPREFIX_LOCK; 365 365 iByte += sizeof(uint8_t); 366 366 continue; //fetch the next byte … … 368 368 // address size override prefix byte 369 369 case OP_ADDRSIZE: 370 pCpu->prefix |= PREFIX_ADDRSIZE;371 if (pCpu->mode == CPUMODE_16BIT)372 pCpu->addrmode = CPUMODE_32BIT;370 pCpu->prefix |= DISPREFIX_ADDRSIZE; 371 if (pCpu->mode == DISCPUMODE_16BIT) 372 pCpu->addrmode = DISCPUMODE_32BIT; 373 373 else 374 if (pCpu->mode == CPUMODE_32BIT)375 pCpu->addrmode = CPUMODE_16BIT;374 if (pCpu->mode == DISCPUMODE_32BIT) 375 pCpu->addrmode = DISCPUMODE_16BIT; 376 376 else 377 pCpu->addrmode = CPUMODE_32BIT; /* 64 bits */377 pCpu->addrmode = DISCPUMODE_32BIT; /* 64 bits */ 378 378 379 379 iByte += sizeof(uint8_t); … … 382 382 // operand size override prefix byte 383 383 case OP_OPSIZE: 384 pCpu->prefix |= PREFIX_OPSIZE;385 if (pCpu->mode == CPUMODE_16BIT)386 pCpu->opmode = CPUMODE_32BIT;384 pCpu->prefix |= DISPREFIX_OPSIZE; 385 if (pCpu->mode == DISCPUMODE_16BIT) 386 pCpu->opmode = DISCPUMODE_32BIT; 387 387 else 388 pCpu->opmode = CPUMODE_16BIT; /* for 32 and 64 bits mode (there is no 32 bits operand size override prefix) */388 pCpu->opmode = DISCPUMODE_16BIT; /* for 32 and 64 bits mode (there is no 32 bits operand size override prefix) */ 389 389 390 390 iByte += sizeof(uint8_t); … … 393 393 // rep and repne are not really prefixes, but we'll treat them as such 394 394 case OP_REPE: 395 pCpu->prefix |= PREFIX_REP;395 pCpu->prefix |= DISPREFIX_REP; 396 396 iByte += sizeof(uint8_t); 397 397 continue; //fetch the next byte 398 398 399 399 case OP_REPNE: 400 pCpu->prefix |= PREFIX_REPNE;400 pCpu->prefix |= DISPREFIX_REPNE; 401 401 iByte += sizeof(uint8_t); 402 402 continue; //fetch the next byte 403 403 404 404 case OP_REX: 405 Assert(pCpu->mode == CPUMODE_64BIT);405 Assert(pCpu->mode == DISCPUMODE_64BIT); 406 406 /* REX prefix byte */ 407 pCpu->prefix |= PREFIX_REX;407 pCpu->prefix |= DISPREFIX_REX; 408 408 pCpu->prefix_rex = PREFIX_REX_OP_2_FLAGS(paOneByteMap[codebyte].param1); 409 409 iByte += sizeof(uint8_t); 410 410 411 411 if (pCpu->prefix_rex & PREFIX_REX_FLAGS_W) 412 pCpu->opmode = CPUMODE_64BIT; /* overrides size prefix byte */412 pCpu->opmode = DISCPUMODE_64BIT; /* overrides size prefix byte */ 413 413 continue; //fetch the next byte 414 414 } … … 430 430 *pcbInstr = iByte; 431 431 432 if (pCpu->prefix & PREFIX_LOCK)432 if (pCpu->prefix & DISPREFIX_LOCK) 433 433 disValidateLockSequence(pCpu); 434 434 … … 471 471 472 472 /* Correct the operand size if the instruction is marked as forced or default 64 bits */ 473 if (pCpu->mode == CPUMODE_64BIT)473 if (pCpu->mode == DISCPUMODE_64BIT) 474 474 { 475 475 if (pOp->optype & OPTYPE_FORCED_64_OP_SIZE) 476 pCpu->opmode = CPUMODE_64BIT;476 pCpu->opmode = DISCPUMODE_64BIT; 477 477 else 478 478 if ( (pOp->optype & OPTYPE_DEFAULT_64_OP_SIZE) 479 && !(pCpu->prefix & PREFIX_OPSIZE))480 pCpu->opmode = CPUMODE_64BIT;479 && !(pCpu->prefix & DISPREFIX_OPSIZE)) 480 pCpu->opmode = DISCPUMODE_64BIT; 481 481 } 482 482 else … … 484 484 { 485 485 /* Forced 32 bits operand size for certain instructions (mov crx, mov drx). */ 486 Assert(pCpu->mode != CPUMODE_64BIT);487 pCpu->opmode = CPUMODE_32BIT;486 Assert(pCpu->mode != DISCPUMODE_64BIT); 487 pCpu->opmode = DISCPUMODE_32BIT; 488 488 } 489 489 … … 549 549 550 550 /* Correct the operand size if the instruction is marked as forced or default 64 bits */ 551 if (pCpu->mode == CPUMODE_64BIT)551 if (pCpu->mode == DISCPUMODE_64BIT) 552 552 { 553 553 /* Note: redundant, but just in case this ever changes */ 554 554 if (fpop->optype & OPTYPE_FORCED_64_OP_SIZE) 555 pCpu->opmode = CPUMODE_64BIT;555 pCpu->opmode = DISCPUMODE_64BIT; 556 556 else 557 557 if ( (fpop->optype & OPTYPE_DEFAULT_64_OP_SIZE) 558 && !(pCpu->prefix & PREFIX_OPSIZE))559 pCpu->opmode = CPUMODE_64BIT;558 && !(pCpu->prefix & DISPREFIX_OPSIZE)) 559 pCpu->opmode = DISCPUMODE_64BIT; 560 560 } 561 561 … … 601 601 index = pCpu->SIB.Bits.Index; 602 602 603 if (pCpu->addrmode == CPUMODE_32BIT)603 if (pCpu->addrmode == DISCPUMODE_32BIT) 604 604 { 605 605 ppszSIBIndexReg = szSIBIndexReg; … … 629 629 { 630 630 // [scaled index] + disp32 631 if (pCpu->addrmode == CPUMODE_32BIT)631 if (pCpu->addrmode == DISCPUMODE_32BIT) 632 632 { 633 633 pParam->flags |= USE_DISPLACEMENT32; … … 662 662 pCpu->SIB.Bits.Scale = SIB_SCALE(SIB); 663 663 664 if (pCpu->prefix & PREFIX_REX)664 if (pCpu->prefix & DISPREFIX_REX) 665 665 { 666 666 /* REX.B extends the Base field if not scaled index + disp32 */ … … 695 695 pCpu->SIB.Bits.Scale = SIB_SCALE(SIB); 696 696 697 if (pCpu->prefix & PREFIX_REX)697 if (pCpu->prefix & DISPREFIX_REX) 698 698 { 699 699 /* REX.B extends the Base field. */ … … 738 738 739 739 if ( pCpu->pCurInstr->opcode == OP_MOV_CR 740 && pCpu->opmode == CPUMODE_32BIT741 && (pCpu->prefix & PREFIX_LOCK))740 && pCpu->opmode == DISCPUMODE_32BIT 741 && (pCpu->prefix & DISPREFIX_LOCK)) 742 742 { 743 pCpu->prefix &= ~ PREFIX_LOCK;743 pCpu->prefix &= ~DISPREFIX_LOCK; 744 744 pParam->base.reg_ctrl = USE_REG_CR8; 745 745 } … … 787 787 /* @todo bound */ 788 788 789 if (pCpu->addrmode != CPUMODE_16BIT)790 { 791 Assert(pCpu->addrmode == CPUMODE_32BIT || pCpu->addrmode ==CPUMODE_64BIT);789 if (pCpu->addrmode != DISCPUMODE_16BIT) 790 { 791 Assert(pCpu->addrmode == DISCPUMODE_32BIT || pCpu->addrmode == DISCPUMODE_64BIT); 792 792 793 793 /* … … 805 805 { 806 806 /* 32 bits displacement */ 807 if (pCpu->mode != CPUMODE_64BIT)807 if (pCpu->mode != DISCPUMODE_64BIT) 808 808 { 809 809 pParam->flags |= USE_DISPLACEMENT32; … … 906 906 *pSibInc = 0; 907 907 908 if (pCpu->addrmode != CPUMODE_16BIT)909 { 910 Assert(pCpu->addrmode == CPUMODE_32BIT || pCpu->addrmode ==CPUMODE_64BIT);908 if (pCpu->addrmode != DISCPUMODE_16BIT) 909 { 910 Assert(pCpu->addrmode == DISCPUMODE_32BIT || pCpu->addrmode == DISCPUMODE_64BIT); 911 911 912 912 /* … … 989 989 *pSibInc = 0; 990 990 991 if (pCpu->addrmode != CPUMODE_16BIT)992 { 993 Assert(pCpu->addrmode == CPUMODE_32BIT || pCpu->addrmode ==CPUMODE_64BIT);991 if (pCpu->addrmode != DISCPUMODE_16BIT) 992 { 993 Assert(pCpu->addrmode == DISCPUMODE_32BIT || pCpu->addrmode == DISCPUMODE_64BIT); 994 994 /* 995 995 * Note: displacements in long mode are 8 or 32 bits and sign-extended to 64 bits … … 1080 1080 pCpu->ModRM.Bits.Mod = 3; 1081 1081 1082 if (pCpu->prefix & PREFIX_REX)1083 { 1084 Assert(pCpu->mode == CPUMODE_64BIT);1082 if (pCpu->prefix & DISPREFIX_REX) 1083 { 1084 Assert(pCpu->mode == DISCPUMODE_64BIT); 1085 1085 1086 1086 /* REX.R extends the Reg field. */ … … 1126 1126 pCpu->ModRM.Bits.Mod = 3; 1127 1127 1128 if (pCpu->prefix & PREFIX_REX)1129 { 1130 Assert(pCpu->mode == CPUMODE_64BIT);1128 if (pCpu->prefix & DISPREFIX_REX) 1129 { 1130 Assert(pCpu->mode == DISCPUMODE_64BIT); 1131 1131 1132 1132 /* REX.R extends the Reg field. */ … … 1181 1181 { 1182 1182 NOREF(pOp); 1183 if (pCpu->opmode == CPUMODE_32BIT)1183 if (pCpu->opmode == DISCPUMODE_32BIT) 1184 1184 { 1185 1185 pParam->parval = (uint32_t)(int8_t)DISReadByte(pCpu, uCodePtr); … … 1188 1188 } 1189 1189 else 1190 if (pCpu->opmode == CPUMODE_64BIT)1190 if (pCpu->opmode == DISCPUMODE_64BIT) 1191 1191 { 1192 1192 pParam->parval = (uint64_t)(int8_t)DISReadByte(pCpu, uCodePtr); … … 1265 1265 { 1266 1266 NOREF(pOp); 1267 if (pCpu->opmode == CPUMODE_32BIT)1267 if (pCpu->opmode == DISCPUMODE_32BIT) 1268 1268 { 1269 1269 pParam->parval = DISReadDWord(pCpu, uCodePtr); … … 1273 1273 } 1274 1274 1275 if (pCpu->opmode == CPUMODE_64BIT)1275 if (pCpu->opmode == DISCPUMODE_64BIT) 1276 1276 { 1277 1277 pParam->parval = DISReadQWord(pCpu, uCodePtr); … … 1291 1291 { 1292 1292 NOREF(uCodePtr); NOREF(pOp); NOREF(pParam); 1293 if (pCpu->opmode == CPUMODE_32BIT)1293 if (pCpu->opmode == DISCPUMODE_32BIT) 1294 1294 return sizeof(uint32_t); 1295 if (pCpu->opmode == CPUMODE_64BIT)1295 if (pCpu->opmode == DISCPUMODE_64BIT) 1296 1296 return sizeof(uint64_t); 1297 1297 return sizeof(uint16_t); … … 1303 1303 NOREF(pOp); 1304 1304 /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */ 1305 if (pCpu->opmode == CPUMODE_16BIT)1305 if (pCpu->opmode == DISCPUMODE_16BIT) 1306 1306 { 1307 1307 pParam->parval = DISReadWord(pCpu, uCodePtr); … … 1312 1312 1313 1313 /* 64 bits op mode means *sign* extend to 64 bits. */ 1314 if (pCpu->opmode == CPUMODE_64BIT)1314 if (pCpu->opmode == DISCPUMODE_64BIT) 1315 1315 { 1316 1316 pParam->parval = (uint64_t)(int32_t)DISReadDWord(pCpu, uCodePtr); … … 1332 1332 NOREF(uCodePtr); NOREF(pOp); NOREF(pParam); 1333 1333 /* Word for 16-bit operand-size or doubleword for 32 or 64-bit operand-size. */ 1334 if (pCpu->opmode == CPUMODE_16BIT)1334 if (pCpu->opmode == DISCPUMODE_16BIT) 1335 1335 return sizeof(uint16_t); 1336 1336 return sizeof(uint32_t); … … 1362 1362 { 1363 1363 NOREF(pOp); 1364 if (pCpu->opmode == CPUMODE_32BIT)1364 if (pCpu->opmode == DISCPUMODE_32BIT) 1365 1365 { 1366 1366 pParam->parval = DISReadDWord(pCpu, uCodePtr); … … 1370 1370 } 1371 1371 1372 if (pCpu->opmode == CPUMODE_64BIT)1372 if (pCpu->opmode == DISCPUMODE_64BIT) 1373 1373 { 1374 1374 /* 32 bits relative immediate sign extended to 64 bits. */ … … 1390 1390 { 1391 1391 NOREF(uCodePtr); NOREF(pOp); NOREF(pParam); 1392 if (pCpu->opmode == CPUMODE_16BIT)1392 if (pCpu->opmode == DISCPUMODE_16BIT) 1393 1393 return sizeof(int16_t); 1394 1394 /* Both 32 & 64 bits mode use 32 bits relative immediates. */ … … 1399 1399 unsigned ParseImmAddr(RTUINTPTR uCodePtr, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu) 1400 1400 { 1401 if (pCpu->addrmode == CPUMODE_32BIT)1401 if (pCpu->addrmode == DISCPUMODE_32BIT) 1402 1402 { 1403 1403 if (OP_PARM_VSUBTYPE(pParam->param) == OP_PARM_p) … … 1423 1423 } 1424 1424 1425 if (pCpu->addrmode == CPUMODE_64BIT)1425 if (pCpu->addrmode == DISCPUMODE_64BIT) 1426 1426 { 1427 1427 Assert(OP_PARM_VSUBTYPE(pParam->param) != OP_PARM_p); … … 1462 1462 { 1463 1463 NOREF(uCodePtr); NOREF(pOp); 1464 if (pCpu->addrmode == CPUMODE_32BIT)1464 if (pCpu->addrmode == DISCPUMODE_32BIT) 1465 1465 { 1466 1466 if (OP_PARM_VSUBTYPE(pParam->param) == OP_PARM_p) … … 1473 1473 } 1474 1474 } 1475 if (pCpu->addrmode == CPUMODE_64BIT)1475 if (pCpu->addrmode == DISCPUMODE_64BIT) 1476 1476 { 1477 1477 Assert(OP_PARM_VSUBTYPE(pParam->param) != OP_PARM_p); … … 1495 1495 { 1496 1496 // immediate far pointers - only 16:16 or 16:32; determined by operand, *not* address size! 1497 Assert(pCpu->opmode == CPUMODE_16BIT || pCpu->opmode ==CPUMODE_32BIT);1497 Assert(pCpu->opmode == DISCPUMODE_16BIT || pCpu->opmode == DISCPUMODE_32BIT); 1498 1498 Assert(OP_PARM_VSUBTYPE(pParam->param) == OP_PARM_p); 1499 if (pCpu->opmode == CPUMODE_32BIT)1499 if (pCpu->opmode == DISCPUMODE_32BIT) 1500 1500 { 1501 1501 // far 16:32 pointer … … 1519 1519 NOREF(uCodePtr); NOREF(pOp); 1520 1520 // immediate far pointers - only 16:16 or 16:32 1521 Assert(pCpu->opmode == CPUMODE_16BIT || pCpu->opmode ==CPUMODE_32BIT);1521 Assert(pCpu->opmode == DISCPUMODE_16BIT || pCpu->opmode == DISCPUMODE_32BIT); 1522 1522 Assert(OP_PARM_VSUBTYPE(pParam->param) == OP_PARM_p); 1523 if (pCpu->opmode == CPUMODE_32BIT)1523 if (pCpu->opmode == DISCPUMODE_32BIT) 1524 1524 { 1525 1525 // far 16:32 pointer … … 1556 1556 { 1557 1557 /* 32-bit EAX..EDI registers. */ 1558 if (pCpu->opmode == CPUMODE_32BIT)1558 if (pCpu->opmode == DISCPUMODE_32BIT) 1559 1559 { 1560 1560 /* Use 32-bit registers. */ … … 1564 1564 } 1565 1565 else 1566 if (pCpu->opmode == CPUMODE_64BIT)1566 if (pCpu->opmode == DISCPUMODE_64BIT) 1567 1567 { 1568 1568 /* Use 64-bit registers. */ … … 1570 1570 if ( (pOp->optype & OPTYPE_REXB_EXTENDS_OPREG) 1571 1571 && pParam == &pCpu->param1 /* ugly assumption that it only applies to the first parameter */ 1572 && (pCpu->prefix & PREFIX_REX)1572 && (pCpu->prefix & DISPREFIX_REX) 1573 1573 && (pCpu->prefix_rex & PREFIX_REX_FLAGS)) 1574 1574 pParam->base.reg_gen += 8; … … 1610 1610 pParam->cb = 1; 1611 1611 1612 if (pCpu->opmode == CPUMODE_64BIT)1612 if (pCpu->opmode == DISCPUMODE_64BIT) 1613 1613 { 1614 1614 if ( (pOp->optype & OPTYPE_REXB_EXTENDS_OPREG) 1615 1615 && pParam == &pCpu->param1 /* ugly assumption that it only applies to the first parameter */ 1616 && (pCpu->prefix & PREFIX_REX)1616 && (pCpu->prefix & DISPREFIX_REX) 1617 1617 && (pCpu->prefix_rex & PREFIX_REX_FLAGS)) 1618 1618 pParam->base.reg_gen += 8; /* least significant byte of R8-R15 */ … … 1640 1640 1641 1641 pParam->flags |= USE_POINTER_DS_BASED; 1642 if (pCpu->addrmode == CPUMODE_32BIT)1642 if (pCpu->addrmode == DISCPUMODE_32BIT) 1643 1643 { 1644 1644 pParam->base.reg_gen = USE_REG_ESI; … … 1646 1646 } 1647 1647 else 1648 if (pCpu->addrmode == CPUMODE_64BIT)1648 if (pCpu->addrmode == DISCPUMODE_64BIT) 1649 1649 { 1650 1650 pParam->base.reg_gen = USE_REG_RSI; … … 1665 1665 1666 1666 pParam->flags |= USE_POINTER_DS_BASED; 1667 if (pCpu->addrmode == CPUMODE_32BIT)1667 if (pCpu->addrmode == DISCPUMODE_32BIT) 1668 1668 { 1669 1669 pParam->base.reg_gen = USE_REG_ESI; … … 1671 1671 } 1672 1672 else 1673 if (pCpu->addrmode == CPUMODE_64BIT)1673 if (pCpu->addrmode == DISCPUMODE_64BIT) 1674 1674 { 1675 1675 pParam->base.reg_gen = USE_REG_RSI; … … 1690 1690 1691 1691 pParam->flags |= USE_POINTER_ES_BASED; 1692 if (pCpu->addrmode == CPUMODE_32BIT)1692 if (pCpu->addrmode == DISCPUMODE_32BIT) 1693 1693 { 1694 1694 pParam->base.reg_gen = USE_REG_EDI; … … 1696 1696 } 1697 1697 else 1698 if (pCpu->addrmode == CPUMODE_64BIT)1698 if (pCpu->addrmode == DISCPUMODE_64BIT) 1699 1699 { 1700 1700 pParam->base.reg_gen = USE_REG_RDI; … … 1715 1715 1716 1716 pParam->flags |= USE_POINTER_ES_BASED; 1717 if (pCpu->addrmode == CPUMODE_32BIT)1717 if (pCpu->addrmode == DISCPUMODE_32BIT) 1718 1718 { 1719 1719 pParam->base.reg_gen = USE_REG_EDI; … … 1721 1721 } 1722 1722 else 1723 if (pCpu->addrmode == CPUMODE_64BIT)1723 if (pCpu->addrmode == DISCPUMODE_64BIT) 1724 1724 { 1725 1725 pParam->base.reg_gen = USE_REG_RDI; … … 1760 1760 1761 1761 /* Cancel prefix changes. */ 1762 pCpu->prefix &= ~ PREFIX_OPSIZE;1762 pCpu->prefix &= ~DISPREFIX_OPSIZE; 1763 1763 pCpu->opmode = pCpu->mode; 1764 1764 } … … 1772 1772 1773 1773 /* Cancel prefix changes. */ 1774 pCpu->prefix &= ~ PREFIX_REPNE;1774 pCpu->prefix &= ~DISPREFIX_REPNE; 1775 1775 } 1776 1776 break; … … 1783 1783 1784 1784 /* Cancel prefix changes. */ 1785 pCpu->prefix &= ~ PREFIX_REP;1785 pCpu->prefix &= ~DISPREFIX_REP; 1786 1786 } 1787 1787 break; … … 1827 1827 1828 1828 /* Cancel prefix changes. */ 1829 pCpu->prefix &= ~ PREFIX_OPSIZE;1829 pCpu->prefix &= ~DISPREFIX_OPSIZE; 1830 1830 pCpu->opmode = pCpu->mode; 1831 1831 } … … 1844 1844 1845 1845 /* Cancel prefix changes. */ 1846 pCpu->prefix &= ~ PREFIX_REPNE;1846 pCpu->prefix &= ~DISPREFIX_REPNE; 1847 1847 } 1848 1848 } … … 1878 1878 1879 1879 /* Cancel prefix changes. */ 1880 pCpu->prefix &= ~ PREFIX_OPSIZE;1880 pCpu->prefix &= ~DISPREFIX_OPSIZE; 1881 1881 pCpu->opmode = pCpu->mode; 1882 1882 } … … 1895 1895 NOREF(pParam); 1896 1896 1897 if (pCpu->prefix & PREFIX_REP)1897 if (pCpu->prefix & DISPREFIX_REP) 1898 1898 { 1899 1899 pOp = &g_aMapX86_NopPause[1]; /* PAUSE */ 1900 pCpu->prefix &= ~ PREFIX_REP;1900 pCpu->prefix &= ~DISPREFIX_REP; 1901 1901 } 1902 1902 else … … 2185 2185 reg = MODRM_REG(modrm); 2186 2186 2187 if (pCpu->prefix & PREFIX_OPSIZE)2187 if (pCpu->prefix & DISPREFIX_OPSIZE) 2188 2188 reg += 8; //2nd table 2189 2189 … … 2206 2206 modrm = DISReadByte(pCpu, uCodePtr); 2207 2207 reg = MODRM_REG(modrm); 2208 if (pCpu->prefix & PREFIX_OPSIZE)2208 if (pCpu->prefix & DISPREFIX_OPSIZE) 2209 2209 reg += 8; //2nd table 2210 2210 … … 2228 2228 modrm = DISReadByte(pCpu, uCodePtr); 2229 2229 reg = MODRM_REG(modrm); 2230 if (pCpu->prefix & PREFIX_OPSIZE)2230 if (pCpu->prefix & DISPREFIX_OPSIZE) 2231 2231 reg += 8; //2nd table 2232 2232 … … 2306 2306 subtype = OP_PARM_VSUBTYPE(pParam->param); 2307 2307 if (fRegAddr) 2308 subtype = (pCpu->addrmode == CPUMODE_64BIT) ? OP_PARM_q : OP_PARM_d;2308 subtype = (pCpu->addrmode == DISCPUMODE_64BIT) ? OP_PARM_q : OP_PARM_d; 2309 2309 else 2310 2310 if (subtype == OP_PARM_v || subtype == OP_PARM_NONE) … … 2312 2312 switch(pCpu->opmode) 2313 2313 { 2314 case CPUMODE_32BIT:2314 case DISCPUMODE_32BIT: 2315 2315 subtype = OP_PARM_d; 2316 2316 break; 2317 case CPUMODE_64BIT:2317 case DISCPUMODE_64BIT: 2318 2318 subtype = OP_PARM_q; 2319 2319 break; 2320 case CPUMODE_16BIT:2320 case DISCPUMODE_16BIT: 2321 2321 subtype = OP_PARM_w; 2322 2322 break; … … 2330 2330 { 2331 2331 case OP_PARM_b: 2332 Assert(idx < (pCpu->prefix & PREFIX_REX) ? 16 : 8);2332 Assert(idx < (pCpu->prefix & DISPREFIX_REX) ? 16 : 8); 2333 2333 2334 2334 /* AH, BH, CH & DH map to DIL, SIL, EBL & SPL when a rex prefix is present. */ 2335 2335 /* Intel® 64 and IA-32 Architectures Software Developers Manual: 3.4.1.1 */ 2336 if ( (pCpu->prefix & PREFIX_REX)2336 if ( (pCpu->prefix & DISPREFIX_REX) 2337 2337 && idx >= USE_REG_AH 2338 2338 && idx <= USE_REG_BH) … … 2346 2346 2347 2347 case OP_PARM_w: 2348 Assert(idx < (pCpu->prefix & PREFIX_REX) ? 16 : 8);2348 Assert(idx < (pCpu->prefix & DISPREFIX_REX) ? 16 : 8); 2349 2349 2350 2350 pParam->flags |= USE_REG_GEN16; … … 2353 2353 2354 2354 case OP_PARM_d: 2355 Assert(idx < (pCpu->prefix & PREFIX_REX) ? 16 : 8);2355 Assert(idx < (pCpu->prefix & DISPREFIX_REX) ? 16 : 8); 2356 2356 2357 2357 pParam->flags |= USE_REG_GEN32; … … 2618 2618 void disValidateLockSequence(PDISCPUSTATE pCpu) 2619 2619 { 2620 Assert(pCpu->prefix & PREFIX_LOCK);2620 Assert(pCpu->prefix & DISPREFIX_LOCK); 2621 2621 2622 2622 /* -
trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp
r41668 r41675 206 206 switch (pCpu->addrmode) 207 207 { 208 case CPUMODE_16BIT:208 case DISCPUMODE_16BIT: 209 209 { 210 210 Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen16)); … … 214 214 } 215 215 216 case CPUMODE_32BIT:216 case DISCPUMODE_32BIT: 217 217 { 218 218 Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen32)); … … 222 222 } 223 223 224 case CPUMODE_64BIT:224 case DISCPUMODE_64BIT: 225 225 { 226 226 Assert(pParam->index.reg_gen < RT_ELEMENTS(g_aszYasmRegGen64)); … … 392 392 if ( pOp->opcode == OP_INVALID 393 393 || ( pOp->opcode == OP_ILLUD2 394 && (pCpu->prefix & PREFIX_LOCK)))394 && (pCpu->prefix & DISPREFIX_LOCK))) 395 395 { 396 396 … … 401 401 * Prefixes 402 402 */ 403 if (pCpu->prefix & PREFIX_LOCK)403 if (pCpu->prefix & DISPREFIX_LOCK) 404 404 PUT_SZ("lock "); 405 if(pCpu->prefix & PREFIX_REP)405 if(pCpu->prefix & DISPREFIX_REP) 406 406 PUT_SZ("rep "); 407 else if(pCpu->prefix & PREFIX_REPNE)407 else if(pCpu->prefix & DISPREFIX_REPNE) 408 408 PUT_SZ("repne "); 409 409 … … 417 417 { 418 418 case OP_JECXZ: 419 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "jcxz %Jb" : pCpu->opmode ==CPUMODE_32BIT ? "jecxz %Jb" : "jrcxz %Jb";419 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "jcxz %Jb" : pCpu->opmode == DISCPUMODE_32BIT ? "jecxz %Jb" : "jrcxz %Jb"; 420 420 break; 421 421 case OP_PUSHF: 422 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "pushfw" : pCpu->opmode ==CPUMODE_32BIT ? "pushfd" : "pushfq";422 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "pushfw" : pCpu->opmode == DISCPUMODE_32BIT ? "pushfd" : "pushfq"; 423 423 break; 424 424 case OP_POPF: 425 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "popfw" : pCpu->opmode ==CPUMODE_32BIT ? "popfd" : "popfq";425 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "popfw" : pCpu->opmode == DISCPUMODE_32BIT ? "popfd" : "popfq"; 426 426 break; 427 427 case OP_PUSHA: 428 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "pushaw" : "pushad";428 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "pushaw" : "pushad"; 429 429 break; 430 430 case OP_POPA: 431 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "popaw" : "popad";431 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "popaw" : "popad"; 432 432 break; 433 433 case OP_INSB: … … 435 435 break; 436 436 case OP_INSWD: 437 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "insw" : pCpu->opmode ==CPUMODE_32BIT ? "insd" : "insq";437 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "insw" : pCpu->opmode == DISCPUMODE_32BIT ? "insd" : "insq"; 438 438 break; 439 439 case OP_OUTSB: … … 441 441 break; 442 442 case OP_OUTSWD: 443 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "outsw" : pCpu->opmode ==CPUMODE_32BIT ? "outsd" : "outsq";443 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "outsw" : pCpu->opmode == DISCPUMODE_32BIT ? "outsd" : "outsq"; 444 444 break; 445 445 case OP_MOVSB: … … 447 447 break; 448 448 case OP_MOVSWD: 449 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "movsw" : pCpu->opmode ==CPUMODE_32BIT ? "movsd" : "movsq";449 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "movsw" : pCpu->opmode == DISCPUMODE_32BIT ? "movsd" : "movsq"; 450 450 break; 451 451 case OP_CMPSB: … … 453 453 break; 454 454 case OP_CMPWD: 455 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "cmpsw" : pCpu->opmode ==CPUMODE_32BIT ? "cmpsd" : "cmpsq";455 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "cmpsw" : pCpu->opmode == DISCPUMODE_32BIT ? "cmpsd" : "cmpsq"; 456 456 break; 457 457 case OP_SCASB: … … 459 459 break; 460 460 case OP_SCASWD: 461 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "scasw" : pCpu->opmode ==CPUMODE_32BIT ? "scasd" : "scasq";461 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "scasw" : pCpu->opmode == DISCPUMODE_32BIT ? "scasd" : "scasq"; 462 462 break; 463 463 case OP_LODSB: … … 465 465 break; 466 466 case OP_LODSWD: 467 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "lodsw" : pCpu->opmode ==CPUMODE_32BIT ? "lodsd" : "lodsq";467 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "lodsw" : pCpu->opmode == DISCPUMODE_32BIT ? "lodsd" : "lodsq"; 468 468 break; 469 469 case OP_STOSB: … … 471 471 break; 472 472 case OP_STOSWD: 473 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "stosw" : pCpu->opmode ==CPUMODE_32BIT ? "stosd" : "stosq";473 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "stosw" : pCpu->opmode == DISCPUMODE_32BIT ? "stosd" : "stosq"; 474 474 break; 475 475 case OP_CBW: 476 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "cbw" : pCpu->opmode ==CPUMODE_32BIT ? "cwde" : "cdqe";476 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "cbw" : pCpu->opmode == DISCPUMODE_32BIT ? "cwde" : "cdqe"; 477 477 break; 478 478 case OP_CWD: 479 pszFmt = pCpu->opmode == CPUMODE_16BIT ? "cwd" : pCpu->opmode ==CPUMODE_32BIT ? "cdq" : "cqo";479 pszFmt = pCpu->opmode == DISCPUMODE_16BIT ? "cwd" : pCpu->opmode == DISCPUMODE_32BIT ? "cdq" : "cqo"; 480 480 break; 481 481 case OP_SHL: … … 576 576 switch (pCpu->opmode) \ 577 577 { \ 578 case CPUMODE_16BIT: PUT_SZ("word "); break; \579 case CPUMODE_32BIT: PUT_SZ("dword "); break; \580 case CPUMODE_64BIT: PUT_SZ("qword "); break; \578 case DISCPUMODE_16BIT: PUT_SZ("word "); break; \ 579 case DISCPUMODE_32BIT: PUT_SZ("dword "); break; \ 580 case DISCPUMODE_64BIT: PUT_SZ("qword "); break; \ 581 581 default: break; \ 582 582 } \ … … 604 604 #define PUT_SEGMENT_OVERRIDE() \ 605 605 do { \ 606 if (pCpu->prefix & PREFIX_SEG) \606 if (pCpu->prefix & DISPREFIX_SEG) \ 607 607 PUT_STR(s_szSegPrefix[pCpu->enmPrefixSeg], 3); \ 608 608 } while (0) … … 612 612 * Segment prefixing for instructions that doesn't do memory access. 613 613 */ 614 if ( (pCpu->prefix & PREFIX_SEG)614 if ( (pCpu->prefix & DISPREFIX_SEG) 615 615 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param1.flags) 616 616 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param2.flags) … … 812 812 813 813 case USE_IMMEDIATE32: 814 if ( pCpu->opmode != (pCpu->mode == CPUMODE_16BIT ? CPUMODE_16BIT :CPUMODE_32BIT) /* not perfect */814 if ( pCpu->opmode != (pCpu->mode == DISCPUMODE_16BIT ? DISCPUMODE_16BIT : DISCPUMODE_32BIT) /* not perfect */ 815 815 || ( (fFlags & DIS_FMT_FLAGS_STRICT) 816 816 && ( (int8_t)pParam->parval == (int32_t)pParam->parval … … 897 897 898 898 RTUINTPTR uTrgAddr = pCpu->uInstrAddr + pCpu->opsize + offDisplacement; 899 if (pCpu->mode == CPUMODE_16BIT)899 if (pCpu->mode == DISCPUMODE_16BIT) 900 900 PUT_NUM_16(uTrgAddr); 901 else if (pCpu->mode == CPUMODE_32BIT)901 else if (pCpu->mode == DISCPUMODE_32BIT) 902 902 PUT_NUM_32(uTrgAddr); 903 903 else … … 1202 1202 * Mod rm + SIB: Check for duplicate EBP encodings that yasm won't use for very good reasons. 1203 1203 */ 1204 if ( pCpu->addrmode != CPUMODE_16BIT ///@todo correct?1204 if ( pCpu->addrmode != DISCPUMODE_16BIT ///@todo correct? 1205 1205 && pCpu->ModRM.Bits.Rm == 4 1206 1206 && pCpu->ModRM.Bits.Mod != 3) … … 1235 1235 { 1236 1236 case 0xf0: 1237 f = PREFIX_LOCK;1237 f = DISPREFIX_LOCK; 1238 1238 break; 1239 1239 1240 1240 case 0xf2: 1241 1241 case 0xf3: 1242 f = PREFIX_REP; /* yes, both */1242 f = DISPREFIX_REP; /* yes, both */ 1243 1243 break; 1244 1244 … … 1249 1249 case 0x64: 1250 1250 case 0x65: 1251 f = PREFIX_SEG;1251 f = DISPREFIX_SEG; 1252 1252 break; 1253 1253 1254 1254 case 0x66: 1255 f = PREFIX_OPSIZE;1255 f = DISPREFIX_OPSIZE; 1256 1256 break; 1257 1257 1258 1258 case 0x67: 1259 f = PREFIX_ADDRSIZE;1259 f = DISPREFIX_ADDRSIZE; 1260 1260 break; 1261 1261 1262 1262 case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: 1263 1263 case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: 1264 f = pCpu->mode == CPUMODE_64BIT ?PREFIX_REX : 0;1264 f = pCpu->mode == DISCPUMODE_64BIT ? DISPREFIX_REX : 0; 1265 1265 break; 1266 1266 … … 1277 1277 1278 1278 /* segment overrides are fun */ 1279 if (fPrefixes & PREFIX_SEG)1279 if (fPrefixes & DISPREFIX_SEG) 1280 1280 { 1281 1281 /* no effective address which it may apply to. */ 1282 Assert((pCpu->prefix & PREFIX_SEG) || pCpu->mode ==CPUMODE_64BIT);1282 Assert((pCpu->prefix & DISPREFIX_SEG) || pCpu->mode == DISCPUMODE_64BIT); 1283 1283 if ( !DIS_IS_EFFECTIVE_ADDR(pCpu->param1.flags) 1284 1284 && !DIS_IS_EFFECTIVE_ADDR(pCpu->param2.flags) … … 1288 1288 1289 1289 /* fixed register + addr override doesn't go down all that well. */ 1290 if (fPrefixes & PREFIX_ADDRSIZE)1291 { 1292 Assert(pCpu->prefix & PREFIX_ADDRSIZE);1290 if (fPrefixes & DISPREFIX_ADDRSIZE) 1291 { 1292 Assert(pCpu->prefix & DISPREFIX_ADDRSIZE); 1293 1293 if ( pCpu->pCurInstr->param3 == OP_PARM_NONE 1294 1294 && pCpu->pCurInstr->param2 == OP_PARM_NONE … … 1335 1335 1336 1336 /* All but the segment prefix is bad news. */ 1337 if (fPrefixes & ~ PREFIX_SEG)1337 if (fPrefixes & ~DISPREFIX_SEG) 1338 1338 { 1339 1339 switch (pCpu->pCurInstr->opcode) … … 1344 1344 && pCpu->pCurInstr->param1 <= OP_PARM_REG_SEG_END) 1345 1345 return true; 1346 if ( (fPrefixes & ~ PREFIX_OPSIZE)1346 if ( (fPrefixes & ~DISPREFIX_OPSIZE) 1347 1347 && pCpu->pCurInstr->param1 >= OP_PARM_REG_GEN32_START 1348 1348 && pCpu->pCurInstr->param1 <= OP_PARM_REG_GEN32_END) … … 1354 1354 case OP_PUSHA: 1355 1355 case OP_PUSHF: 1356 if (fPrefixes & ~ PREFIX_OPSIZE)1356 if (fPrefixes & ~DISPREFIX_OPSIZE) 1357 1357 return true; 1358 1358 break; … … 1361 1361 1362 1362 /* Implicit 8-bit register instructions doesn't mix with operand size. */ 1363 if ( (fPrefixes & PREFIX_OPSIZE)1363 if ( (fPrefixes & DISPREFIX_OPSIZE) 1364 1364 && ( ( pCpu->pCurInstr->param1 == OP_PARM_Gb /* r8 */ 1365 1365 && pCpu->pCurInstr->param2 == OP_PARM_Eb /* r8/mem8 */) … … 1506 1506 if ( pCpu->pCurInstr->opcode == OP_MOVZX 1507 1507 && pCpu->opcode == 0xB7 1508 && (pCpu->mode == CPUMODE_16BIT) != !!(fPrefixes &PREFIX_OPSIZE))1508 && (pCpu->mode == DISCPUMODE_16BIT) != !!(fPrefixes & DISPREFIX_OPSIZE)) 1509 1509 return true; 1510 1510 -
trunk/src/VBox/Disassembler/DisasmReg.cpp
r41668 r41675 210 210 switch(pCpu->opmode) 211 211 { 212 case CPUMODE_32BIT:212 case DISCPUMODE_32BIT: 213 213 subtype = OP_PARM_d; 214 214 break; 215 case CPUMODE_64BIT:215 case DISCPUMODE_64BIT: 216 216 subtype = OP_PARM_q; 217 217 break; 218 case CPUMODE_16BIT:218 case DISCPUMODE_16BIT: 219 219 subtype = OP_PARM_w; 220 220 break; … … 241 241 242 242 case OP_PARM_p: /* far pointer */ 243 if (pCpu->addrmode == CPUMODE_32BIT)243 if (pCpu->addrmode == DISCPUMODE_32BIT) 244 244 return 6; /* 16:32 */ 245 245 else 246 if (pCpu->addrmode == CPUMODE_64BIT)246 if (pCpu->addrmode == DISCPUMODE_64BIT) 247 247 return 12; /* 16:64 */ 248 248 else … … 260 260 DISDECL(DIS_SELREG) DISDetectSegReg(PDISCPUSTATE pCpu, POP_PARAMETER pParam) 261 261 { 262 if (pCpu->prefix & PREFIX_SEG)262 if (pCpu->prefix & DISPREFIX_SEG) 263 263 { 264 264 /* Use specified SEG: prefix. */ … … 285 285 DISDECL(uint8_t) DISQuerySegPrefixByte(PDISCPUSTATE pCpu) 286 286 { 287 Assert(pCpu->prefix & PREFIX_SEG);287 Assert(pCpu->prefix & DISPREFIX_SEG); 288 288 switch(pCpu->enmPrefixSeg) 289 289 { … … 592 592 if (pParam->flags & USE_DISPLACEMENT8) 593 593 { 594 if (pCpu->mode == CPUMODE_32BIT)594 if (pCpu->mode == DISCPUMODE_32BIT) 595 595 pParamVal->val.val32 += (int32_t)pParam->uDisp.i8; 596 596 else 597 if (pCpu->mode == CPUMODE_64BIT)597 if (pCpu->mode == DISCPUMODE_64BIT) 598 598 pParamVal->val.val64 += (int64_t)pParam->uDisp.i8; 599 599 else … … 603 603 if (pParam->flags & USE_DISPLACEMENT16) 604 604 { 605 if (pCpu->mode == CPUMODE_32BIT)605 if (pCpu->mode == DISCPUMODE_32BIT) 606 606 pParamVal->val.val32 += (int32_t)pParam->uDisp.i16; 607 607 else 608 if (pCpu->mode == CPUMODE_64BIT)608 if (pCpu->mode == DISCPUMODE_64BIT) 609 609 pParamVal->val.val64 += (int64_t)pParam->uDisp.i16; 610 610 else … … 614 614 if (pParam->flags & USE_DISPLACEMENT32) 615 615 { 616 if (pCpu->mode == CPUMODE_32BIT)616 if (pCpu->mode == DISCPUMODE_32BIT) 617 617 pParamVal->val.val32 += pParam->uDisp.i32; 618 618 else … … 622 622 if (pParam->flags & USE_DISPLACEMENT64) 623 623 { 624 Assert(pCpu->mode == CPUMODE_64BIT);624 Assert(pCpu->mode == DISCPUMODE_64BIT); 625 625 pParamVal->val.val64 += pParam->uDisp.i64; 626 626 } … … 628 628 if (pParam->flags & USE_RIPDISPLACEMENT32) 629 629 { 630 Assert(pCpu->mode == CPUMODE_64BIT);630 Assert(pCpu->mode == DISCPUMODE_64BIT); 631 631 /* Relative to the RIP of the next instruction. */ 632 632 pParamVal->val.val64 += pParam->uDisp.i32 + pCtx->rip + pCpu->opsize; -
trunk/src/VBox/Disassembler/DisasmTest.cpp
r41669 r41675 50 50 char szOutput[256]; 51 51 52 if (RT_SUCCESS(DISInstrToStr(pbInstr, CPUMODE_32BIT, &cpu, &cb, szOutput, sizeof(szOutput))))52 if (RT_SUCCESS(DISInstrToStr(pbInstr, DISCPUMODE_32BIT, &cpu, &cb, szOutput, sizeof(szOutput)))) 53 53 { 54 54 printf("%s", szOutput); … … 73 73 char szOutput[256]; 74 74 75 if (RT_SUCCESS(DISInstrToStr(pbInstr, CPUMODE_64BIT, &cpu, &cb, szOutput, sizeof(szOutput))))75 if (RT_SUCCESS(DISInstrToStr(pbInstr, DISCPUMODE_64BIT, &cpu, &cb, szOutput, sizeof(szOutput)))) 76 76 printf("%s", szOutput); 77 77 else -
trunk/src/VBox/Disassembler/DisasmTestCore.cpp
r41674 r41675 39 39 unsigned cb; 40 40 DISCPUSTATE cpu; 41 if (DISInstr((void *)(uintptr_t)&DISInstr, CPUMODE_32BIT, &cpu, &cb))41 if (DISInstr((void *)(uintptr_t)&DISInstr, DISCPUMODE_32BIT, &cpu, &cb)) 42 42 printf("ok %d\n", cpu.addrmode); 43 43 else -
trunk/src/VBox/Disassembler/testcase/tstDisasm-2.cpp
r41671 r41675 303 303 304 304 case kAsmStyle_yasm: 305 RTPrintf(" BITS %d\n", enmCpuMode == CPUMODE_16BIT ? 16 : enmCpuMode ==CPUMODE_32BIT ? 32 : 64);305 RTPrintf(" BITS %d\n", enmCpuMode == DISCPUMODE_16BIT ? 16 : enmCpuMode == DISCPUMODE_32BIT ? 32 : 64); 306 306 pfnFormatter = MyDisasYasmFormatter; 307 307 break; … … 492 492 UNDEFOPHANDLING enmUndefOp = kUndefOp_Fail; 493 493 bool fListing = true; 494 DISCPUMODE enmCpuMode = CPUMODE_32BIT;494 DISCPUMODE enmCpuMode = DISCPUMODE_32BIT; 495 495 RTFOFF off = 0; 496 496 RTFOFF cbMax = _1G; … … 532 532 case 'c': 533 533 if (ValueUnion.u32 == 16) 534 enmCpuMode = CPUMODE_16BIT;534 enmCpuMode = DISCPUMODE_16BIT; 535 535 else if (ValueUnion.u32 == 32) 536 enmCpuMode = CPUMODE_32BIT;536 enmCpuMode = DISCPUMODE_32BIT; 537 537 else if (ValueUnion.u32 == 64) 538 enmCpuMode = CPUMODE_64BIT;538 enmCpuMode = DISCPUMODE_64BIT; 539 539 else 540 540 {
Note:
See TracChangeset
for help on using the changeset viewer.