VirtualBox

Changeset 101538 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Oct 21, 2023 10:30:50 PM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159615
Message:

VMM/IEM: Freed up some space in IEMTB for a pointer to debug info or something. bugref:10371

Location:
trunk/src/VBox/VMM
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py

    r101537 r101538  
    28892889    'IEM_MC_IF_EFL_BIT_NOT_SET':                                 (McBlock.parseMcGenericCond,       True,  False, ),
    28902890    'IEM_MC_IF_EFL_BIT_NOT_SET_AND_BITS_EQ':                     (McBlock.parseMcGenericCond,       True,  False, ),
    2891     'IEM_MC_IF_EFL_BIT_SET':                                     (McBlock.parseMcGenericCond,       True,  False,), #True,  ),
     2891    'IEM_MC_IF_EFL_BIT_SET':                                     (McBlock.parseMcGenericCond,       True,  False, ), #True,  ),
    28922892    'IEM_MC_IF_EFL_BIT_SET_OR_BITS_NE':                          (McBlock.parseMcGenericCond,       True,  False, ),
    28932893    'IEM_MC_IF_EFL_BITS_EQ':                                     (McBlock.parseMcGenericCond,       True,  False, ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r101537 r101538  
    37813781    /* Truncate the result to 16-bit IP if the operand size is 16-bit. */
    37823782    if (enmEffOpSize == IEMMODE_16BIT)
    3783     {
    3784         Assert(enmEffOpSize == IEMMODE_16BIT);
    37853783        off = iemNativeEmitClear16UpGpr(pReNative, off, idxPcReg);
    3786     }
    37873784
    37883785    /* Perform limit checking, potentially raising #GP(0) and exit the TB. */
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdRecompiler.cpp

    r101484 r101538  
    888888    pTb->Gen.uData          = 0;
    889889    pTb->cbOpcodes          = 0;
    890     pTb->cbOpcodesAllocated = 0;
    891890    pTb->pabOpcodes         = NULL;
    892891
     
    12021201            if (pTb->pabOpcodes)
    12031202            {
     1203                pVCpu->iem.s.cbOpcodesAllocated = cCalls * 16;
    12041204                pTb->Thrd.cAllocated        = cCalls;
    1205                 pTb->cbOpcodesAllocated     = cCalls * 16;
    12061205                pTb->Thrd.cCalls            = 0;
    12071206                pTb->cbOpcodes              = 0;
     
    12991298            {
    13001299                pTb->Thrd.cAllocated    = cCalls;
    1301                 pTb->cbOpcodesAllocated = cbOpcodes;
    13021300                pTb->pNext              = NULL;
    13031301                pTb->cUsed              = 0;
     
    19471945        pTb->cbOpcodes                    = offOpcode + cbInstr;
    19481946        pTb->aRanges[idxRange].cbOpcodes += cbInstr;
    1949         Assert(pTb->cbOpcodes <= pTb->cbOpcodesAllocated);
     1947        Assert(pTb->cbOpcodes <= pVCpu->iem.s.cbOpcodesAllocated);
    19501948    }
    19511949
     
    19671965    iemThreadedCopyOpcodeBytesInline(pVCpu, &pTb->pabOpcodes[offOpcode], cbInstr);
    19681966    pTb->cbOpcodes = offOpcode + cbInstr;
    1969     Assert(pTb->cbOpcodes <= pTb->cbOpcodesAllocated);
     1967    Assert(pTb->cbOpcodes <= pVCpu->iem.s.cbOpcodesAllocated);
    19701968
    19711969    return true;
     
    21962194        /* Still space in the TB? */
    21972195        if (   pTb->Thrd.cCalls + 5 < pTb->Thrd.cAllocated
    2198             && pTb->cbOpcodes + 16 <= pTb->cbOpcodesAllocated)
     2196            && pTb->cbOpcodes + 16 <= pVCpu->iem.s.cbOpcodesAllocated)
    21992197            iemThreadedCompileInitDecoder(pVCpu, true /*fReInit*/, 0);
    22002198        else
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables.h

    r101387 r101538  
    208208            pTb->cbOpcodes                       = offOpcodeMc2 + pVCpu->iem.s.offOpcode; \
    209209            pTb->aRanges[idxRangeMc2].cbOpcodes += cbInstrMc2; \
    210             Assert(pTb->cbOpcodes <= pTb->cbOpcodesAllocated); \
     210            Assert(pTb->cbOpcodes <= pVCpu->iem.s.cbOpcodesAllocated); \
    211211        } \
    212212        else if (iemThreadedCompileBeginEmitCallsComplications(pVCpu, pTb)) \
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r101484 r101538  
    887887    /** The IEMCPU::msRecompilerPollNow last time it was used. */
    888888    uint32_t            msLastUsed;
    889     /** The allocation chunk this TB belongs to. */
    890     uint8_t             idxAllocChunk;
    891 
    892     uint8_t             abUnused[3];
    893     uint32_t            uUnused;
    894 
    895889
    896890    /** @name What uniquely identifies the block.
     
    941935    };
    942936
    943     /** Number of bytes of opcodes stored in pabOpcodes. */
     937    /** The allocation chunk this TB belongs to. */
     938    uint8_t             idxAllocChunk;
     939    uint8_t             bUnused;
     940
     941    /** Number of bytes of opcodes stored in pabOpcodes.
     942     * @todo this field isn't really needed, aRanges keeps the actual info. */
    944943    uint16_t            cbOpcodes;
    945     /** The max storage available in the pabOpcodes block. */
    946     uint16_t            cbOpcodesAllocated;
    947944    /** Pointer to the opcode bytes this block was recompiled from. */
    948945    uint8_t            *pabOpcodes;
     946
     947    /** Debug info or smth. */
     948    void               *pvDbg;
    949949
    950950    /* --- 64 byte cache line end --- */
     
    981981     * The GCPhysPc w/o page offset is element zero, so starting here with 1. */
    982982    RTGCPHYS            aGCPhysPages[2];
     983
    983984} IEMTB;
    984985#pragma pack()
    985 AssertCompileMemberOffset(IEMTB, x86, 36);
    986 AssertCompileMemberOffset(IEMTB, cRanges, 38);
    987 AssertCompileMemberOffset(IEMTB, Thrd, 40);
    988 AssertCompileMemberOffset(IEMTB, Thrd.cCalls, 48);
    989 AssertCompileMemberOffset(IEMTB, cbOpcodes, 52);
     986AssertCompileMemberAlignment(IEMTB, GCPhysPc, sizeof(RTGCPHYS));
     987AssertCompileMemberAlignment(IEMTB, Thrd, sizeof(void *));
     988AssertCompileMemberAlignment(IEMTB, pabOpcodes, sizeof(void *));
     989AssertCompileMemberAlignment(IEMTB, pvDbg, sizeof(void *));
     990AssertCompileMemberAlignment(IEMTB, aGCPhysPages, sizeof(RTGCPHYS));
     991AssertCompileMemberOffset(IEMTB, aRanges[0], 64);
    990992AssertCompileMemberSize(IEMTB, aRanges[0], 6);
    991993#if 1
     
    15031505     * iemCImpl_sti code and subsequently cleared by the recompiler. */
    15041506    bool                    fTbCurInstrIsSti;
     1507    /** The size of the IEMTB::pabOpcodes allocation in pThrdCompileTbR3. */
     1508    uint16_t                cbOpcodesAllocated;
    15051509    /** Spaced reserved for recompiler data / alignment. */
    1506     bool                    afRecompilerStuff1[2+4];
     1510    bool                    afRecompilerStuff1[4];
    15071511    /** The virtual sync time at the last timer poll call. */
    15081512    uint32_t                msRecompilerPollNow;
Note: See TracChangeset for help on using the changeset viewer.

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