VirtualBox

Changeset 41739 in vbox for trunk/src/VBox/Disassembler


Ignore:
Timestamp:
Jun 15, 2012 1:31:29 AM (12 years ago)
Author:
vboxsync
Message:

DISCPUSTATE: s/param/Param/

Location:
trunk/src/VBox/Disassembler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r41738 r41739  
    471471
    472472    // 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;
    476476
    477477    /* Correct the operand size if the instruction is marked as forced or default 64 bits */
     
    495495    if (pOp->idxParse1 != IDX_ParseNop)
    496496    {
    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);
    499499    }
    500500
    501501    if (pOp->idxParse2 != IDX_ParseNop)
    502502    {
    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);
    505505    }
    506506
    507507    if (pOp->idxParse3 != IDX_ParseNop)
    508508    {
    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);
    511511    }
    512512    // else simple one byte instruction
     
    534534
    535535        // 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;
    538538    }
    539539    else
     
    15691569            pParam->base.reg_gen = pParam->param - OP_PARM_REG_GEN32_START;
    15701570            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 */
    15721572                &&  (pCpu->fPrefix & DISPREFIX_REX)
    15731573                &&  (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS))
     
    16131613        {
    16141614            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 */
    16161616                &&  (pCpu->fPrefix & DISPREFIX_REX)
    16171617                &&  (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS))
     
    26552655        case OP_XCHG:
    26562656        case OP_XOR:
    2657             if (pCpu->param1.fUse & (DISUSE_BASE | DISUSE_INDEX | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT32
     2657            if (pCpu->Param1.fUse & (DISUSE_BASE | DISUSE_INDEX | DISUSE_DISPLACEMENT64 | DISUSE_DISPLACEMENT32
    26582658                                     | DISUSE_DISPLACEMENT16 | DISUSE_DISPLACEMENT8 | DISUSE_RIPDISPLACEMENT32))
    26592659                return;
  • trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp

    r41738 r41739  
    543543            case OP_FLD:
    544544                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 */
    546546                break;
    547547            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;
    550550                break;
    551551        }
     
    554554         * Formatting context and associated macros.
    555555         */
    556         PCDISOPPARAM pParam = &pCpu->param1;
     556        PCDISOPPARAM pParam = &pCpu->Param1;
    557557        int iParam = 1;
    558558
     
    613613         */
    614614        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))
    618618        {
    619619            PUT_STR(s_szSegPrefix[pCpu->idxSegPrefix], 2);
     
    11131113                    switch (++iParam)
    11141114                    {
    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;
    11171117                        default: pParam = NULL; break;
    11181118                    }
     
    12921292        /* no effective address which it may apply to. */
    12931293        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))
    12971297            return true;
    12981298    }
     
    14491449    /* shl eax,1 will be assembled to the form without the immediate byte. */
    14501450    if (    pCpu->pCurInstr->fParam2 == OP_PARM_Ib
    1451         &&  (uint8_t)pCpu->param2.parval == 1)
     1451        &&  (uint8_t)pCpu->Param2.parval == 1)
    14521452    {
    14531453        switch (pCpu->pCurInstr->uOpcode)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette