VirtualBox

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


Ignore:
Timestamp:
Oct 14, 2024 11:01:21 PM (3 months ago)
Author:
vboxsync
Message:

VMM/IEM: Just mask out IEMNATIVE_SIMD_REG_FIXED_MASK from fHstRegs in iemNativeVarSaveVolatileRegsPreHlpCall & iemNativeVarRestoreVolatileRegsPostHlpCall and eliminating the associated if (fixed-type) continue; checks. Saved over 300ns/TB here on arm (3893 -> 3566 ns/TB). bugref:10720

File:
1 edited

Legend:

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

    r106197 r106314  
    78157815    iemNativeSimdRegFlushGuestShadowsByHostMask(pReNative, IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK);
    78167816
    7817     fHstRegs = pReNative->Core.bmHstSimdRegs & IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK;
     7817    fHstRegs = pReNative->Core.bmHstSimdRegs & (IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK & ~IEMNATIVE_SIMD_REG_FIXED_MASK);
    78187818    if (fHstRegs)
    78197819    {
     
    78247824
    78257825            /* Fixed reserved and temporary registers don't need saving. */
    7826             if (   pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_FixedReserved
    7827                 || pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_FixedTmp)
    7828                 continue;
    7829 
     7826            /*Assert(   pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat != kIemNativeWhat_FixedReserved
     7827                   && pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat != kIemNativeWhat_FixedTmp); included below */
    78307828            Assert(pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_Var);
    78317829
     
    79437941    }
    79447942#ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR
    7945     fHstRegs = pReNative->Core.bmHstSimdRegs & IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK;
     7943    fHstRegs = pReNative->Core.bmHstSimdRegs & (IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK & ~IEMNATIVE_SIMD_REG_FIXED_MASK);
    79467944    if (fHstRegs)
    79477945    {
     
    79517949            fHstRegs &= ~RT_BIT_32(idxHstReg);
    79527950
    7953             if (   pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_FixedTmp
    7954                 || pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_FixedReserved)
    7955                 continue;
     7951            /*Assert(   pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat != kIemNativeWhat_FixedTmp
     7952                   && pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat != kIemNativeWhat_FixedReserved); - included below. */
    79567953            Assert(pReNative->Core.aHstSimdRegs[idxHstReg].enmWhat == kIemNativeWhat_Var);
    79577954
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