VirtualBox

Ignore:
Timestamp:
Mar 26, 2024 9:05:49 PM (11 months ago)
Author:
vboxsync
Message:

VMM/IEM: Build fix and marked the two local SHL/SAR operations as not working correctly for 16-bit values. bugref:10371

File:
1 edited

Legend:

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

    r104058 r104072  
    37133713    IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVar, cbLocal);
    37143714
    3715     if (cbLocal <= sizeof(uint32_t))
     3715    if (cbLocal <= sizeof(uint32_t)) /** @todo r=bird: for cbLocal < sizeof(uint32_t), this'll require a AND or something to restrict the result. */
    37163716        off = iemNativeEmitShiftGpr32Left(pReNative, off, idxVarReg, cShift);
    37173717    else
     
    37503750    IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVar, cbLocal);
    37513751
    3752     if (cbLocal <= sizeof(uint32_t))
     3752    if (cbLocal <= sizeof(uint32_t)) /** @todo r=bird: This is NOT working for cbLocal < sizeof(uint32_t) if negative! */
    37533753        off = iemNativeEmitArithShiftGpr32Right(pReNative, off, idxVarReg, cShift);
    37543754    else
     
    37763776    IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVarEffAddr, sizeof(RTGCPTR));
    37773777    IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxVar);
    3778     IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVar, cbLocal); RT_NOREF(cbLocal);
     3778    IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxVar, cbLocal);
    37793779
    37803780    uint8_t const idxVarReg        = iemNativeVarRegisterAcquire(pReNative, idxVar, &off, true /*fInitialized*/);
     
    37843784    if (cbLocal <= sizeof(uint32_t))
    37853785    {
    3786         uint8_t const idxRegTmp = iemNativeRegAllocTmp(pReNative, &off, idxVar);
     3786/** @todo ARM64: In case of boredone, the extended add instruction can do the
     3787 * conversion directly: ADD idxVarRegEffAddr, idxVarRegEffAddr, [w]idxVarReg, SXTH/SXTW */
     3788        uint8_t const idxRegTmp = iemNativeRegAllocTmp(pReNative, &off);
    37873789
    37883790        switch (cbLocal)
    37893791        {
    3790             case sizeof(int8_t):  off = iemNativeEmitLoadGprSignExtendedFromGpr8(pReNative, off, idxRegTmp, idxVarReg); break;
    37913792            case sizeof(int16_t): off = iemNativeEmitLoadGprSignExtendedFromGpr16(pReNative, off, idxRegTmp, idxVarReg); break;
    37923793            case sizeof(int32_t): off = iemNativeEmitLoadGprSignExtendedFromGpr32(pReNative, off, idxRegTmp, idxVarReg); break;
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