Changeset 41738 in vbox for trunk/src/VBox/Disassembler/DisasmCore.cpp
- Timestamp:
- Jun 15, 2012 1:25:47 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41737 r41738 358 358 // segment override prefix byte 359 359 case OP_SEG: 360 pCpu->idxSegPrefix = (DISSELREG)(paOneByteMap[codebyte]. param1 - OP_PARM_REG_SEG_START);360 pCpu->idxSegPrefix = (DISSELREG)(paOneByteMap[codebyte].fParam1 - OP_PARM_REG_SEG_START); 361 361 /* Segment prefixes for CS, DS, ES and SS are ignored in long mode. */ 362 362 if ( pCpu->uCpuMode != DISCPUMODE_64BIT … … 414 414 /* REX prefix byte */ 415 415 pCpu->fPrefix |= DISPREFIX_REX; 416 pCpu->fRexPrefix = DISPREFIX_REX_OP_2_FLAGS(paOneByteMap[codebyte]. param1);416 pCpu->fRexPrefix = DISPREFIX_REX_OP_2_FLAGS(paOneByteMap[codebyte].fParam1); 417 417 iByte += sizeof(uint8_t); 418 418 … … 459 459 * Note! Multibyte opcodes are always marked harmless until the final byte. 460 460 */ 461 if ((pOp-> optype & pCpu->fFilter) == 0)461 if ((pOp->fOpType & pCpu->fFilter) == 0) 462 462 { 463 463 fFiltered = true; … … 471 471 472 472 // Should contain the parameter type on input 473 pCpu->param1.param = pOp-> param1;474 pCpu->param2.param = pOp-> param2;475 pCpu->param3.param = pOp-> param3;473 pCpu->param1.param = pOp->fParam1; 474 pCpu->param2.param = pOp->fParam2; 475 pCpu->param3.param = pOp->fParam3; 476 476 477 477 /* Correct the operand size if the instruction is marked as forced or default 64 bits */ 478 478 if (pCpu->uCpuMode == DISCPUMODE_64BIT) 479 479 { 480 if (pOp-> optype & DISOPTYPE_FORCED_64_OP_SIZE)480 if (pOp->fOpType & DISOPTYPE_FORCED_64_OP_SIZE) 481 481 pCpu->uOpMode = DISCPUMODE_64BIT; 482 482 else 483 if ( (pOp-> optype & DISOPTYPE_DEFAULT_64_OP_SIZE)483 if ( (pOp->fOpType & DISOPTYPE_DEFAULT_64_OP_SIZE) 484 484 && !(pCpu->fPrefix & DISPREFIX_OPSIZE)) 485 485 pCpu->uOpMode = DISCPUMODE_64BIT; 486 486 } 487 487 else 488 if (pOp-> optype & DISOPTYPE_FORCED_32_OP_SIZE_X86)488 if (pOp->fOpType & DISOPTYPE_FORCED_32_OP_SIZE_X86) 489 489 { 490 490 /* Forced 32 bits operand size for certain instructions (mov crx, mov drx). */ … … 534 534 535 535 // Should contain the parameter type on input 536 pCpu->param1.param = fpop-> param1;537 pCpu->param2.param = fpop-> param2;536 pCpu->param1.param = fpop->fParam1; 537 pCpu->param2.param = fpop->fParam2; 538 538 } 539 539 else … … 547 547 * @note Multibyte opcodes are always marked harmless until the final byte. 548 548 */ 549 if ((fpop-> optype & pCpu->fFilter) == 0)549 if ((fpop->fOpType & pCpu->fFilter) == 0) 550 550 pCpu->pfnDisasmFnTable = g_apfnCalcSize; 551 551 else … … 557 557 { 558 558 /* Note: redundant, but just in case this ever changes */ 559 if (fpop-> optype & DISOPTYPE_FORCED_64_OP_SIZE)559 if (fpop->fOpType & DISOPTYPE_FORCED_64_OP_SIZE) 560 560 pCpu->uOpMode = DISCPUMODE_64BIT; 561 561 else 562 if ( (fpop-> optype & DISOPTYPE_DEFAULT_64_OP_SIZE)562 if ( (fpop->fOpType & DISOPTYPE_DEFAULT_64_OP_SIZE) 563 563 && !(pCpu->fPrefix & DISPREFIX_OPSIZE)) 564 564 pCpu->uOpMode = DISCPUMODE_64BIT; … … 1077 1077 * encoding of the MOD field in the MODR/M byte. 1078 1078 */ 1079 if (pOp-> optype & DISOPTYPE_MOD_FIXED_11)1079 if (pOp->fOpType & DISOPTYPE_MOD_FIXED_11) 1080 1080 pCpu->ModRM.Bits.Mod = 3; 1081 1081 … … 1123 1123 * encoding of the MOD field in the MODR/M byte. 1124 1124 */ 1125 if (pOp-> optype & DISOPTYPE_MOD_FIXED_11)1125 if (pOp->fOpType & DISOPTYPE_MOD_FIXED_11) 1126 1126 pCpu->ModRM.Bits.Mod = 3; 1127 1127 … … 1568 1568 /* Use 64-bit registers. */ 1569 1569 pParam->base.reg_gen = pParam->param - OP_PARM_REG_GEN32_START; 1570 if ( (pOp-> optype & DISOPTYPE_REXB_EXTENDS_OPREG)1570 if ( (pOp->fOpType & DISOPTYPE_REXB_EXTENDS_OPREG) 1571 1571 && pParam == &pCpu->param1 /* ugly assumption that it only applies to the first parameter */ 1572 1572 && (pCpu->fPrefix & DISPREFIX_REX) … … 1612 1612 if (pCpu->uOpMode == DISCPUMODE_64BIT) 1613 1613 { 1614 if ( (pOp-> optype & DISOPTYPE_REXB_EXTENDS_OPREG)1614 if ( (pOp->fOpType & DISOPTYPE_REXB_EXTENDS_OPREG) 1615 1615 && pParam == &pCpu->param1 /* ugly assumption that it only applies to the first parameter */ 1616 1616 && (pCpu->fPrefix & DISPREFIX_REX)
Note:
See TracChangeset
for help on using the changeset viewer.