VirtualBox

Changeset 99231 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 30, 2023 1:28:07 PM (22 months ago)
Author:
vboxsync
Message:

Disassember,*: Start separating the disassembler into a architecture specific and common part, bugref:10394 [build fixes]

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r99208 r99231  
    227227            if (     RT_SUCCESS(rc)
    228228                &&   pDis->uCpuMode == DISCPUMODE_32BIT  /** @todo why does this matter? */
    229                 &&  !(pDis->fPrefix & (DISPREFIX_REPNE | DISPREFIX_REP | DISPREFIX_SEG)))
     229                &&  !(pDis->arch.x86.fPrefix & (DISPREFIX_REPNE | DISPREFIX_REP | DISPREFIX_SEG)))
    230230            {
    231                 switch (pDis->bOpCode)
     231                switch (pDis->arch.x86.bOpCode)
    232232                {
    233233                    /** @todo Find other instructions we can safely skip, possibly
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r99220 r99231  
    790790    }
    791791
    792     LogFlow(("Reused instr %RGv %d at %RGv param1.fUse=%llx param1.reg=%d\n", pCtx->rip, pDis->pCurInstr->uOpcode, pvFault, pDis->Param1.fUse,  pDis->Param1.Base.idxGenReg));
     792    LogFlow(("Reused instr %RGv %d at %RGv param1.fUse=%llx param1.reg=%d\n", pCtx->rip, pDis->pCurInstr->uOpcode, pvFault, pDis->Param1.fUse,  pDis->Param1.arch.x86.Base.idxGenReg));
    793793
    794794    /* Non-supervisor mode write means it's used for something else. */
     
    822822        case OP_MOVSWD:
    823823        case OP_STOSWD:
    824             if (    pDis->fPrefix == (DISPREFIX_REP|DISPREFIX_REX)
     824            if (    pDis->arch.x86.fPrefix == (DISPREFIX_REP|DISPREFIX_REX)
    825825                &&  pCtx->rcx >= 0x40
    826826               )
     
    839839            if (    (    (pDis->Param1.fUse & DISUSE_REG_GEN32)
    840840                     ||  (pDis->Param1.fUse & DISUSE_REG_GEN64))
    841                 &&  (pDis->Param1.Base.idxGenReg == DISGREG_ESP))
     841                &&  (pDis->Param1.arch.x86.Base.idxGenReg == DISGREG_ESP))
    842842            {
    843843                Log4(("pgmRZPoolMonitorIsReused: ESP\n"));
     
    939939                                              PCPUMCTX pCtx, RTGCPHYS GCPhysFault, RTGCPTR pvFault)
    940940{
    941     unsigned uIncrement = pDis->Param1.cb;
     941    unsigned uIncrement = pDis->Param1.arch.x86.cb;
    942942    NOREF(pVM);
    943943
     
    946946
    947947# ifdef VBOX_STRICT
    948     if (pDis->uOpMode == DISCPUMODE_32BIT)
     948    if (pDis->arch.x86.uOpMode == DISCPUMODE_32BIT)
    949949        Assert(uIncrement == 4);
    950950    else
     
    11841184    if (    pPage->GCPtrLastAccessHandlerRip >= pCtx->rip - 0x40      /* observed loops in Windows 7 x64 */
    11851185        &&  pPage->GCPtrLastAccessHandlerRip <  pCtx->rip + 0x40
    1186         &&  pvFault == (pPage->GCPtrLastAccessHandlerFault + pDis->Param1.cb)
     1186        &&  pvFault == (pPage->GCPtrLastAccessHandlerFault + pDis->Param1.arch.x86.cb)
    11871187        &&  pVCpu->pgm.s.cPoolAccessHandler == pPage->cLastAccessHandler + 1)
    11881188    {
     
    12161216         * Simple instructions, no REP prefix.
    12171217         */
    1218         if (!(pDis->fPrefix & (DISPREFIX_REP | DISPREFIX_REPNE)))
     1218        if (!(pDis->arch.x86.fPrefix & (DISPREFIX_REP | DISPREFIX_REPNE)))
    12191219        {
    12201220            rc = pgmRZPoolAccessPfHandlerSimple(pVM, pVCpu, pPool, pPage, pDis, pCtx, GCPhysFault, &fReused);
     
    12591259        if (    pDis->pCurInstr->uOpcode == OP_STOSWD
    12601260            &&  !pCtx->eflags.Bits.u1DF
    1261             &&  pDis->uOpMode == pDis->uCpuMode
    1262             &&  pDis->uAddrMode == pDis->uCpuMode)
     1261            &&  pDis->arch.x86.uOpMode == pDis->uCpuMode
     1262            &&  pDis->arch.x86.uAddrMode == pDis->uCpuMode)
    12631263        {
    12641264            bool fValidStosd = false;
    12651265
    12661266            if (    pDis->uCpuMode == DISCPUMODE_32BIT
    1267                 &&  pDis->fPrefix == DISPREFIX_REP
     1267                &&  pDis->arch.x86.fPrefix == DISPREFIX_REP
    12681268                &&  pCtx->ecx <= 0x20
    12691269                &&  pCtx->ecx * 4 <= GUEST_PAGE_SIZE - ((uintptr_t)pvFault & GUEST_PAGE_OFFSET_MASK)
     
    12771277            else
    12781278            if (    pDis->uCpuMode == DISCPUMODE_64BIT
    1279                 &&  pDis->fPrefix == (DISPREFIX_REP | DISPREFIX_REX)
     1279                &&  pDis->arch.x86.fPrefix == (DISPREFIX_REP | DISPREFIX_REX)
    12801280                &&  pCtx->rcx <= 0x20
    12811281                &&  pCtx->rcx * 8 <= GUEST_PAGE_SIZE - ((uintptr_t)pvFault & GUEST_PAGE_OFFSET_MASK)
     
    12991299        STAM_COUNTER_INC(&pPool->StatMonitorPfRZRepPrefix);
    13001300        Log4(("pgmRZPoolAccessPfHandler: eax=%#x ecx=%#x edi=%#x esi=%#x rip=%RGv opcode=%d prefix=%#x\n",
    1301               pCtx->eax, pCtx->ecx, pCtx->edi, pCtx->esi, (RTGCPTR)pCtx->rip, pDis->pCurInstr->uOpcode, pDis->fPrefix));
     1301              pCtx->eax, pCtx->ecx, pCtx->edi, pCtx->esi, (RTGCPTR)pCtx->rip, pDis->pCurInstr->uOpcode, pDis->arch.x86.fPrefix));
    13021302        fNotReusedNotForking = true;
    13031303    }
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