VirtualBox

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


Ignore:
Timestamp:
Aug 23, 2024 9:03:01 PM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Don't force PC updating during IEM_MC_ADVANCE_RIP_AND_FINISH inside IF/ELSE/ENDIF blocks. This is more work on todo 4 in bugref:10720. bugref:10373

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h

    r105853 r105854  
    578578
    579579#ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING
    580     STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
    581 
    582580    pReNative->Core.offPc += cbInstr;
    583581    Log4(("offPc=%x cbInstr=%#x off=%#x\n", pReNative->Core.offPc, cbInstr, off));
     
    588586    off = iemNativePcAdjustCheck(pReNative, off);
    589587# endif
    590 
    591     if (pReNative->cCondDepth)
    592         off = iemNativeEmitPcWriteback(pReNative, off);
    593     else
    594         pReNative->Core.cInstrPcUpdateSkipped++;
    595 
     588# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
     589    STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
     590    pReNative->Core.cInstrPcUpdateSkipped++;
     591# endif
    596592#endif
    597593
     
    631627
    632628#ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING
    633     STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
    634 
    635629    pReNative->Core.offPc += cbInstr;
    636630    Log4(("offPc=%x cbInstr=%#x off=%#x\n", pReNative->Core.offPc, cbInstr, off));
     
    641635    off = iemNativePcAdjustCheck(pReNative, off);
    642636# endif
    643 
    644     if (pReNative->cCondDepth)
    645         off = iemNativeEmitPcWriteback(pReNative, off);
    646     else
    647         pReNative->Core.cInstrPcUpdateSkipped++;
     637# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
     638    STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
     639    pReNative->Core.cInstrPcUpdateSkipped++;
     640# endif
    648641#endif
    649642
     
    684677
    685678#ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING
    686     STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
    687 
    688679    pReNative->Core.offPc += cbInstr;
    689680    Log4(("offPc=%x cbInstr=%#x off=%#x\n", pReNative->Core.offPc, cbInstr, off));
     
    694685    off = iemNativePcAdjustCheck(pReNative, off);
    695686# endif
    696 
    697     if (pReNative->cCondDepth)
    698         off = iemNativeEmitPcWriteback(pReNative, off);
    699     else
    700         pReNative->Core.cInstrPcUpdateSkipped++;
     687# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
     688    STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativePcUpdateTotal);
     689    pReNative->Core.cInstrPcUpdateSkipped++;
     690# endif
    701691#endif
    702692
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r105853 r105854  
    20712071#ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING
    20722072    pReNative->Core.offPc                  = 0;
     2073# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
    20732074    pReNative->Core.cInstrPcUpdateSkipped  = 0;
     2075# endif
    20742076# ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING_DEBUG
    20752077    pReNative->Core.fDebugPcInitialized    = false;
     
    57885790# endif
    57895791
     5792    pReNative->Core.offPc                 = 0;
     5793# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
    57905794    STAM_COUNTER_ADD(&pReNative->pVCpu->iem.s.StatNativePcUpdateDelayed, pReNative->Core.cInstrPcUpdateSkipped);
    5791     pReNative->Core.offPc                 = 0;
    57925795    pReNative->Core.cInstrPcUpdateSkipped = 0;
     5796# endif
    57935797
    57945798    return off;
  • trunk/src/VBox/VMM/include/IEMN8veRecompiler.h

    r105853 r105854  
    12451245     * as long as possible. */
    12461246    uint32_t                    offPc;
     1247# if defined(IEMNATIVE_WITH_TB_DEBUG_INFO) || defined(VBOX_WITH_STATISTICS)
    12471248    /** Number of instructions where we could skip the updating. */
    12481249    uint8_t                     cInstrPcUpdateSkipped;
     1250# endif
    12491251# ifdef IEMNATIVE_WITH_DELAYED_PC_UPDATING_DEBUG
    12501252    /** Set after we've loaded PC into uPcUpdatingDebug at the first update. */
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