VirtualBox

Changeset 9097 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 25, 2008 10:11:11 PM (17 years ago)
Author:
vboxsync
Message:

ParseEscFP: Why copy fpop->param[12] to pCpu->param[12].parval? Copying it to pCpu->param[12].param as well for now.
ParseImmByteSX: Added a todo for AMD64 because I'm seeing words instead of dwords/qwords there in the output.
UseModRM: Set USE_EFFICIENT_ADDRESS in OP_PARAMETER::flags if it's an efficient address in order to assist instruction formatting.

File:
1 edited

Legend:

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

    r9012 r9097  
    468468        pCpu->param1.parval = fpop->param1;
    469469        pCpu->param2.parval = fpop->param2;
     470#if 1 /** @todo bird: why parval above? fmul and similar needs dword/qword data in param. */
     471        pCpu->param1.param = fpop->param1;
     472        pCpu->param2.param = fpop->param2;
     473#endif
    470474    }
    471475    else
     
    743747            {   /* SIB byte follows ModRM */
    744748                UseSIB(lpszCodeBlock, pOp, pParam, pCpu);
     749                pParam->flags |= USE_EFFICIENT_ADDRESS;
    745750            }
    746751            else
     
    750755                if (pCpu->mode == CPUMODE_32BIT)
    751756                {
    752                     pParam->flags |= USE_DISPLACEMENT32;
     757                    pParam->flags |= USE_DISPLACEMENT32 | USE_EFFICIENT_ADDRESS;
    753758                    pParam->disp32 = pCpu->disp;
    754759                    disasmPrintDisp32(pParam);
     
    756761                else
    757762                {
    758                     pParam->flags |= USE_RIPDISPLACEMENT32;
     763                    pParam->flags |= USE_RIPDISPLACEMENT32 | USE_EFFICIENT_ADDRESS;
    759764                    pParam->disp32 = pCpu->disp;
    760765                    disasmAddStringF(pParam->szParam, sizeof(pParam->szParam), "RIP+");
     
    763768            }
    764769            else {//register address
    765                 pParam->flags |= USE_BASE;
     770                pParam->flags |= USE_BASE | USE_EFFICIENT_ADDRESS;
    766771                disasmModRMReg(pCpu, pOp, rm, pParam, 1);
    767772            }
     
    781786            }
    782787            pParam->disp8 = pCpu->disp;
    783             pParam->flags |= USE_DISPLACEMENT8;
     788            pParam->flags |= USE_DISPLACEMENT8 | USE_EFFICIENT_ADDRESS;
    784789
    785790            if (pParam->disp8 != 0)
     
    804809            }
    805810            pParam->disp32 = pCpu->disp;
    806             pParam->flags |= USE_DISPLACEMENT32;
     811            pParam->flags |= USE_DISPLACEMENT32 | USE_EFFICIENT_ADDRESS;
    807812
    808813            if (pParam->disp32 != 0)
     
    829834            {//16 bits displacement
    830835                pParam->disp16 = pCpu->disp;
    831                 pParam->flags |= USE_DISPLACEMENT16;
     836                pParam->flags |= USE_DISPLACEMENT16 | USE_EFFICIENT_ADDRESS;
    832837                disasmPrintDisp16(pParam);
    833838            }
    834839            else
    835840            {
    836                 pParam->flags |= USE_BASE;
     841                pParam->flags |= USE_BASE | USE_EFFICIENT_ADDRESS;
    837842                disasmModRMReg16(pCpu, pOp, rm, pParam);
    838843            }
     
    845850            disasmModRMReg16(pCpu, pOp, rm, pParam);
    846851            pParam->disp8 = pCpu->disp;
    847             pParam->flags |= USE_BASE | USE_DISPLACEMENT8;
     852            pParam->flags |= USE_BASE | USE_DISPLACEMENT8 | USE_EFFICIENT_ADDRESS;
    848853
    849854            if (pParam->disp8 != 0)
     
    861866            disasmModRMReg16(pCpu, pOp, rm, pParam);
    862867            pParam->disp16 = pCpu->disp;
    863             pParam->flags |= USE_BASE | USE_DISPLACEMENT16;
     868            pParam->flags |= USE_BASE | USE_DISPLACEMENT16 | USE_EFFICIENT_ADDRESS;
    864869
    865870            if (pParam->disp16 != 0)
     
    11481153unsigned ParseImmByteSX(RTUINTPTR lpszCodeBlock, PCOPCODE pOp, POP_PARAMETER pParam, PDISCPUSTATE pCpu)
    11491154{
    1150     if (pCpu->opmode == CPUMODE_32BIT)
     1155    if (pCpu->opmode == CPUMODE_32BIT) /** @todo In AMD64 mode we're ending up with 16-bit parvals now, see the disassembler _output_ for tstAsmSignExtend-1.asm. */
    11511156    {
    11521157        pParam->parval = (uint32_t)(int8_t)DISReadByte(pCpu, lpszCodeBlock);
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