VirtualBox

Changeset 104210 in vbox for trunk


Ignore:
Timestamp:
Apr 6, 2024 12:38:26 AM (10 months ago)
Author:
vboxsync
Message:

VMM/IEM: Made iemNativeVarRegisterAcquire automatically convert from immediate to stack so that IEM_MC_ADD_LOCAL_S16_TO_EFF_ADDR and friends works with absolute addresses. bugref:10370

File:
1 edited

Legend:

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

    r104151 r104210  
    69736973    {
    69746974        Assert(idxStackSlot == UINT8_MAX);
    6975         AssertStmt(!fInitialized, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_NOT_INITIALIZED));
    6976     }
     6975        if (pVar->enmKind != kIemNativeVarKind_Immediate)
     6976            AssertStmt(!fInitialized, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_NOT_INITIALIZED));
     6977        else
     6978        {
     6979            /*
     6980             * Convert from immediate to stack/register.  This is currently only
     6981             * required by IEM_MC_ADD_LOCAL_S16_TO_EFF_ADDR, IEM_MC_ADD_LOCAL_S32_TO_EFF_ADDR
     6982             * and IEM_MC_ADD_LOCAL_S64_TO_EFF_ADDR in connection with BT, BTS, BTR, and BTC.
     6983             */
     6984            AssertStmt(fInitialized, IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_VAR_NOT_INITIALIZED));
     6985            Log11(("iemNativeVarRegisterAcquire: idxVar=%#x idxReg=%u uValue=%RX64 converting from immediate to stack\n",
     6986                   idxVar, idxReg, pVar->u.uValue));
     6987            *poff = iemNativeEmitLoadGprImm64(pReNative, *poff, idxReg, pVar->u.uValue);
     6988            pVar->enmKind = kIemNativeVarKind_Stack;
     6989        }
     6990    }
     6991
    69776992    pVar->fRegAcquired = true;
    69786993    return idxReg;
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