VirtualBox

Changeset 106113 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Sep 21, 2024 12:01:43 AM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164890
Message:

VMM/IEM: Added special register allocator functions for EFLAGS so we can properly assert liveness info validity. bugref:10720 bugref:10372

File:
1 edited

Legend:

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

    r106101 r106113  
    18221822                                                            IEMNATIVEGSTREGUSE enmIntendedUse = kIemNativeGstRegUse_ReadOnly,
    18231823                                                            bool fNoVolatileRegs = false, bool fSkipLivenessAssert = false);
     1824#if defined(IEMNATIVE_WITH_LIVENESS_ANALYSIS) && defined(VBOX_STRICT)
     1825DECL_HIDDEN_THROW(uint8_t)  iemNativeRegAllocTmpForGuestEFlags(PIEMRECOMPILERSTATE pReNative, uint32_t *poff,
     1826                                                               IEMNATIVEGSTREGUSE enmIntendedUse, uint64_t fRead,
     1827                                                               uint64_t fWrite = 0, uint64_t fPotentialCall = 0);
     1828#else
     1829DECL_FORCE_INLINE_THROW(uint8_t)
     1830iemNativeRegAllocTmpForGuestEFlags(PIEMRECOMPILERSTATE pReNative, uint32_t *poff, IEMNATIVEGSTREGUSE enmIntendedUse,
     1831                                   uint64_t fRead, uint64_t fWrite = 0, uint64_t fPotentialCall = 0)
     1832{
     1833    RT_NOREF(fRead, fWrite, fPotentialCall);
     1834    return iemNativeRegAllocTmpForGuestReg(pReNative, poff, kIemNativeGstReg_EFlags, enmIntendedUse);
     1835}
     1836#endif
     1837
    18241838DECL_HIDDEN_THROW(uint8_t)  iemNativeRegAllocTmpForGuestRegIfAlreadyPresent(PIEMRECOMPILERSTATE pReNative, uint32_t *poff,
    18251839                                                                            IEMNATIVEGSTREG enmGstReg);
     1840#if defined(IEMNATIVE_WITH_LIVENESS_ANALYSIS) && defined(VBOX_STRICT)
     1841DECL_HIDDEN_THROW(uint8_t)  iemNativeRegAllocTmpForGuestEFlagsIfAlreadyPresent(PIEMRECOMPILERSTATE pReNative, uint32_t *poff,
     1842                                                                               uint64_t fRead, uint64_t fWrite = 0);
     1843#else
     1844DECL_FORCE_INLINE_THROW(uint8_t)
     1845iemNativeRegAllocTmpForGuestEFlagsIfAlreadyPresent(PIEMRECOMPILERSTATE pReNative, uint32_t *poff,
     1846                                                   uint64_t fRead, uint64_t fWrite = 0)
     1847{
     1848    RT_NOREF(fRead, fWrite);
     1849    return iemNativeRegAllocTmpForGuestRegIfAlreadyPresent(pReNative, poff, kIemNativeGstReg_EFlags);
     1850}
     1851#endif
    18261852
    18271853DECL_HIDDEN_THROW(uint32_t) iemNativeRegAllocArgs(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t cArgs);
     
    23522378}
    23532379
    2354 
    23552380# ifdef VBOX_STRICT
     2381
    23562382/** For assertions only - caller checks that idxCurCall isn't zero. */
    23572383DECL_FORCE_INLINE(uint32_t)
     
    23602386    return iemNativeLivenessGetStateByGstReg(&pReNative->paLivenessEntries[pReNative->idxCurCall - 1], enmGstReg);
    23612387}
     2388
     2389
     2390/** For assertions only - caller checks that idxCurCall isn't zero. */
     2391DECL_FORCE_INLINE(uint32_t)
     2392iemNativeLivenessGetPrevStateByGstRegEx(PIEMRECOMPILERSTATE pReNative, IEMNATIVEGSTREG enmGstReg)
     2393{
     2394    return iemNativeLivenessGetStateByGstRegEx(&pReNative->paLivenessEntries[pReNative->idxCurCall - 1], enmGstReg);
     2395}
     2396
    23622397# endif /* VBOX_STRICT */
    2363 
    23642398#endif /* IEMNATIVE_WITH_LIVENESS_ANALYSIS */
    23652399
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