VirtualBox

Changeset 101911 in vbox for trunk/src


Ignore:
Timestamp:
Nov 7, 2023 1:29:56 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160007
Message:

VMM/IEM: Added IEM_MC_NO_NATIVE_RECOMPILE and cleaned up iemNativeFixupFixedJump. bugref:10371

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py

    r101850 r101911  
    30973097    'IEM_MC_UPDATE_FSW_WITH_MEM_OP':                             (McBlock.parseMcGeneric,           True,  False, ),
    30983098    'IEM_MC_UPDATE_FSW_WITH_MEM_OP_THEN_POP':                    (McBlock.parseMcGeneric,           True,  False, ),
     3099    'IEM_MC_NO_NATIVE_RECOMPILE':                                (McBlock.parseMcGeneric,           False, False, ),
    30993100};
    31003101
  • trunk/src/VBox/VMM/include/IEMMc.h

    r101850 r101911  
    5555    } while (0)
    5656
     57
     58/** Dummy MC that prevents native recompilation. */
     59#define IEM_MC_NO_NATIVE_RECOMPILE()                    ((void)0)
    5760
    5861/** Advances RIP, finishes the instruction and returns.
  • trunk/src/VBox/VMM/include/IEMN8veRecompiler.h

    r101906 r101911  
    31303130# elif defined(RT_ARCH_ARM64)
    31313131    uint32_t * const pu32CodeBuf = pReNative->pInstrBuf;
    3132     Assert((uint32_t)RT_ABS((int32_t)(offTarget - offFixup)) < RT_BIT_32(18)); /* off by one for negative jumps, but not relevant here */
    3133     pu32CodeBuf[offFixup] = (pu32CodeBuf[offFixup] & ~((RT_BIT_32(19) - 1U) << 5))
    3134                           | (((offTarget - offFixup) & (RT_BIT_32(19) - 1U)) << 5);
     3132
     3133    int32_t const offDisp = offTarget - offFixup;
     3134    Assert(offDisp >= -262144 && offDisp < 262144);
     3135    Assert((pu32CodeBuf[offFixup] & UINT32_C(0xff000000)) == UINT32_C(0x54000000)); /* B.COND + BC.COND */
     3136
     3137    pu32CodeBuf[offFixup] = (pu32CodeBuf[offFixup] & UINT32_C(0xff00001f))
     3138                          | (((uint32_t)offDisp    & UINT32_C(0x0007ffff)) << 5);
    31353139
    31363140# endif
  • trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp

    r101850 r101911  
    567567#define IEM_MC_END() \
    568568    }
     569#define IEM_MC_NO_NATIVE_RECOMPILE()                    ((void)0)
    569570
    570571#define IEM_MC_ADVANCE_RIP_AND_FINISH()                 do { (void)fMcBegin; return VINF_SUCCESS; } while (0)
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