VirtualBox

Ignore:
Timestamp:
Dec 29, 2023 7:40:03 PM (14 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implemented making the TLB-missed call w/o trashing/flushing stuff in volatile registers. bugref:10371

File:
1 edited

Legend:

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

    r102724 r102733  
    43014301DECL_FORCE_INLINE_THROW(uint32_t)
    43024302iemNativeEmitLoadArgGregFromStackVar(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxRegArg, uint8_t idxVar,
    4303                                      int32_t offAddend = 0, bool fVarAllowInVolatileReg = false)
     4303                                     int32_t offAddend = 0, uint32_t fHstVolatileRegsAllowed = UINT32_MAX,
     4304                                     bool fSpilledVarsInVolatileRegs = false)
    43044305{
    43054306    IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar);
     
    43084309
    43094310    uint8_t const idxRegVar = pReNative->Core.aVars[idxVar].idxReg;
    4310     if (idxRegVar < RT_ELEMENTS(pReNative->Core.aHstRegs))
    4311     {
    4312         Assert(!(RT_BIT_32(idxRegVar) & IEMNATIVE_CALL_VOLATILE_GREG_MASK) || fVarAllowInVolatileReg);
    4313         RT_NOREF(fVarAllowInVolatileReg);
     4311    if (   idxRegVar < RT_ELEMENTS(pReNative->Core.aHstRegs)
     4312        && (   (RT_BIT_32(idxRegVar) & (~IEMNATIVE_CALL_VOLATILE_GREG_MASK | fHstVolatileRegsAllowed))
     4313            || !fSpilledVarsInVolatileRegs ))
     4314    {
     4315        AssertStmt(   !(RT_BIT_32(idxRegVar) & IEMNATIVE_CALL_VOLATILE_GREG_MASK)
     4316                   || (RT_BIT_32(idxRegVar) & fHstVolatileRegsAllowed),
     4317                   IEMNATIVE_DO_LONGJMP(pReNative,  VERR_IEM_REG_IPE_13));
    43144318        if (!offAddend)
    43154319        {
     
    43394343DECL_FORCE_INLINE_THROW(uint32_t)
    43404344iemNativeEmitLoadArgGregFromImmOrStackVar(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxRegArg, uint8_t idxVar,
    4341                                           int32_t offAddend = 0, bool fVarAllowInVolatileReg = false)
     4345                                          int32_t offAddend = 0, uint32_t fHstVolatileRegsAllowed = 0,
     4346                                          bool fSpilledVarsInVolatileRegs = false)
    43424347{
    43434348    IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar);
     
    43454350        off = iemNativeEmitLoadGprImm64(pReNative, off, idxRegArg, pReNative->Core.aVars[idxVar].u.uValue + offAddend);
    43464351    else
    4347         off = iemNativeEmitLoadArgGregFromStackVar(pReNative, off, idxRegArg, idxVar, offAddend, fVarAllowInVolatileReg);
     4352        off = iemNativeEmitLoadArgGregFromStackVar(pReNative, off, idxRegArg, idxVar, offAddend,
     4353                                                   fHstVolatileRegsAllowed, fSpilledVarsInVolatileRegs);
    43484354    return off;
    43494355}
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