VirtualBox

Ignore:
Timestamp:
Aug 23, 2024 8:36:08 PM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Don't force PC updating before branches, nor flushing of dirty guest shadowed registers either. Both needs more work before todo 4 in bugref:10720 can be marked as resolved. bugref:10373 bugref:10629

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h

    r105673 r105853  
    43604360 */
    43614361DECL_FORCE_INLINE_THROW(uint32_t)
    4362 iemNativeEmitAddGpr32ImmEx(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iGprDst, int32_t iAddend)
     4362iemNativeEmitAddGpr32ImmEx(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iGprDst, int32_t iAddend, uint8_t iGprTmp = UINT8_MAX)
    43634363{
    43644364#if defined(RT_ARCH_AMD64)
     
    43754375    pCodeBuf[off++] = RT_BYTE3((uint32_t)iAddend);
    43764376    pCodeBuf[off++] = RT_BYTE4((uint32_t)iAddend);
     4377    RT_NOREF(iGprTmp);
    43774378
    43784379#elif defined(RT_ARCH_ARM64)
     
    43864387        if (uAbsAddend & 0xfffU)
    43874388            pCodeBuf[off++] = Armv8A64MkInstrAddSubUImm12(fSub, iGprDst, iGprDst, uAbsAddend & 0xfff, false /*f64Bit*/);
     4389    }
     4390    else if (iGprTmp != UINT8_MAX)
     4391    {
     4392        off = iemNativeEmitLoadGpr32ImmEx(pCodeBuf, off, iGprTmp, iAddend);
     4393        pCodeBuf[off++] = Armv8A64MkInstrAddReg(iGprDst, iGprDst, iGprTmp, false /*f64Bit*/);
    43884394    }
    43894395    else
     
    82668272
    82678273/**
     8274 * Helper for marking the current conditional branch as exiting the TB.
     8275 *
     8276 * This simplifies the state consolidation later when we reach the IEM_MC_ENDIF.
     8277 */
     8278DECL_FORCE_INLINE(void) iemNativeMarkCurCondBranchAsExiting(PIEMRECOMPILERSTATE pReNative)
     8279{
     8280    uint8_t idxCondDepth = pReNative->cCondDepth;
     8281    if (idxCondDepth)
     8282    {
     8283        idxCondDepth--;
     8284        pReNative->aCondStack[idxCondDepth].afExitTb[pReNative->aCondStack[idxCondDepth].fInElse] = true;
     8285    }
     8286}
     8287
     8288
     8289/**
    82688290 * Emits a Jcc rel32 / B.cc imm19 to the given label (ASSUMED requiring fixup).
    82698291 */
     
    82738295{
    82748296    Assert(IEMNATIVELABELTYPE_IS_EXIT_REASON(enmExitReason));
     8297
    82758298#if defined(IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE) && defined(RT_ARCH_AMD64)
    82768299    /* jcc rel32 */
     
    83808403{
    83818404    Assert(IEMNATIVELABELTYPE_IS_EXIT_REASON(enmExitReason));
     8405
     8406    iemNativeMarkCurCondBranchAsExiting(pReNative);
     8407
    83828408#ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE
    83838409# ifdef RT_ARCH_AMD64
     
    84098435{
    84108436    Assert(IEMNATIVELABELTYPE_IS_EXIT_REASON(enmExitReason));
     8437
     8438    iemNativeMarkCurCondBranchAsExiting(pReNative);
     8439
    84118440#ifdef IEMNATIVE_WITH_RECOMPILER_PER_CHUNK_TAIL_CODE
    84128441# ifdef RT_ARCH_AMD64
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