Changeset 41739 in vbox for trunk/src/VBox/Disassembler
- Timestamp:
- Jun 15, 2012 1:31:29 AM (12 years ago)
- Location:
- trunk/src/VBox/Disassembler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41738 r41739 471 471 472 472 // Should contain the parameter type on input 473 pCpu-> param1.param = pOp->fParam1;474 pCpu-> param2.param = pOp->fParam2;475 pCpu-> param3.param = pOp->fParam3;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 */ … … 495 495 if (pOp->idxParse1 != IDX_ParseNop) 496 496 { 497 size += pCpu->pfnDisasmFnTable[pOp->idxParse1](uCodePtr, pOp, &pCpu-> param1, pCpu);498 if (fFiltered == false) pCpu-> param1.cb = DISGetParamSize(pCpu, &pCpu->param1);497 size += pCpu->pfnDisasmFnTable[pOp->idxParse1](uCodePtr, pOp, &pCpu->Param1, pCpu); 498 if (fFiltered == false) pCpu->Param1.cb = DISGetParamSize(pCpu, &pCpu->Param1); 499 499 } 500 500 501 501 if (pOp->idxParse2 != IDX_ParseNop) 502 502 { 503 size += pCpu->pfnDisasmFnTable[pOp->idxParse2](uCodePtr+size, pOp, &pCpu-> param2, pCpu);504 if (fFiltered == false) pCpu-> param2.cb = DISGetParamSize(pCpu, &pCpu->param2);503 size += pCpu->pfnDisasmFnTable[pOp->idxParse2](uCodePtr+size, pOp, &pCpu->Param2, pCpu); 504 if (fFiltered == false) pCpu->Param2.cb = DISGetParamSize(pCpu, &pCpu->Param2); 505 505 } 506 506 507 507 if (pOp->idxParse3 != IDX_ParseNop) 508 508 { 509 size += pCpu->pfnDisasmFnTable[pOp->idxParse3](uCodePtr+size, pOp, &pCpu-> param3, pCpu);510 if (fFiltered == false) pCpu-> param3.cb = DISGetParamSize(pCpu, &pCpu->param3);509 size += pCpu->pfnDisasmFnTable[pOp->idxParse3](uCodePtr+size, pOp, &pCpu->Param3, pCpu); 510 if (fFiltered == false) pCpu->Param3.cb = DISGetParamSize(pCpu, &pCpu->Param3); 511 511 } 512 512 // else simple one byte instruction … … 534 534 535 535 // Should contain the parameter type on input 536 pCpu-> param1.param = fpop->fParam1;537 pCpu-> param2.param = fpop->fParam2;536 pCpu->Param1.param = fpop->fParam1; 537 pCpu->Param2.param = fpop->fParam2; 538 538 } 539 539 else … … 1569 1569 pParam->base.reg_gen = pParam->param - OP_PARM_REG_GEN32_START; 1570 1570 if ( (pOp->fOpType & DISOPTYPE_REXB_EXTENDS_OPREG) 1571 && pParam == &pCpu-> param1 /* ugly assumption that it only applies to the first parameter */1571 && pParam == &pCpu->Param1 /* ugly assumption that it only applies to the first parameter */ 1572 1572 && (pCpu->fPrefix & DISPREFIX_REX) 1573 1573 && (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS)) … … 1613 1613 { 1614 1614 if ( (pOp->fOpType & DISOPTYPE_REXB_EXTENDS_OPREG) 1615 && pParam == &pCpu-> param1 /* ugly assumption that it only applies to the first parameter */1615 && pParam == &pCpu->Param1 /* ugly assumption that it only applies to the first parameter */ 1616 1616 && (pCpu->fPrefix & DISPREFIX_REX) 1617 1617 && (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS)) … … 2655 2655 case OP_XCHG: 2656 2656 case OP_XOR: 2657 if (pCpu-> param1.fUse & (DISUSE_BASE | DISUSE_INDEX | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT322657 if (pCpu->Param1.fUse & (DISUSE_BASE | DISUSE_INDEX | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT32 2658 2658 | DISUSE_DISPLACEMENT16 | DISUSE_DISPLACEMENT8 | DISUSE_RIPDISPLACEMENT32)) 2659 2659 return; -
trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp
r41738 r41739 543 543 case OP_FLD: 544 544 if (pCpu->bOpCode == 0xdb) /* m80fp workaround. */ 545 *(int *)&pCpu-> param1.param &= ~0x1f; /* make it pure OP_PARM_M */545 *(int *)&pCpu->Param1.param &= ~0x1f; /* make it pure OP_PARM_M */ 546 546 break; 547 547 case OP_LAR: /* hack w -> v, probably not correct. */ 548 *(int *)&pCpu-> param2.param &= ~0x1f;549 *(int *)&pCpu-> param2.param |= OP_PARM_v;548 *(int *)&pCpu->Param2.param &= ~0x1f; 549 *(int *)&pCpu->Param2.param |= OP_PARM_v; 550 550 break; 551 551 } … … 554 554 * Formatting context and associated macros. 555 555 */ 556 PCDISOPPARAM pParam = &pCpu-> param1;556 PCDISOPPARAM pParam = &pCpu->Param1; 557 557 int iParam = 1; 558 558 … … 613 613 */ 614 614 if ( (pCpu->fPrefix & DISPREFIX_SEG) 615 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param1.fUse)616 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param2.fUse)617 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param3.fUse))615 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param1.fUse) 616 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param2.fUse) 617 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param3.fUse)) 618 618 { 619 619 PUT_STR(s_szSegPrefix[pCpu->idxSegPrefix], 2); … … 1113 1113 switch (++iParam) 1114 1114 { 1115 case 2: pParam = &pCpu-> param2; break;1116 case 3: pParam = &pCpu-> param3; break;1115 case 2: pParam = &pCpu->Param2; break; 1116 case 3: pParam = &pCpu->Param3; break; 1117 1117 default: pParam = NULL; break; 1118 1118 } … … 1292 1292 /* no effective address which it may apply to. */ 1293 1293 Assert((pCpu->fPrefix & DISPREFIX_SEG) || pCpu->uCpuMode == DISCPUMODE_64BIT); 1294 if ( !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param1.fUse)1295 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param2.fUse)1296 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu-> param3.fUse))1294 if ( !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param1.fUse) 1295 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param2.fUse) 1296 && !DISUSE_IS_EFFECTIVE_ADDR(pCpu->Param3.fUse)) 1297 1297 return true; 1298 1298 } … … 1449 1449 /* shl eax,1 will be assembled to the form without the immediate byte. */ 1450 1450 if ( pCpu->pCurInstr->fParam2 == OP_PARM_Ib 1451 && (uint8_t)pCpu-> param2.parval == 1)1451 && (uint8_t)pCpu->Param2.parval == 1) 1452 1452 { 1453 1453 switch (pCpu->pCurInstr->uOpcode)
Note:
See TracChangeset
for help on using the changeset viewer.