VirtualBox

Changeset 101568 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Oct 24, 2023 12:42:06 AM (16 months ago)
Author:
vboxsync
Message:

VMM/IEM: Native IEM_MC_IF_EFL_ANY_BITS_SET translation. bugref:10371

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

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

    r101557 r101568  
    28862886    'IEM_MC_IF_ECX_IS_NZ_AND_EFL_BIT_NOT_SET':                   (McBlock.parseMcGenericCond,       True,  False, ),
    28872887    'IEM_MC_IF_ECX_IS_NZ_AND_EFL_BIT_SET':                       (McBlock.parseMcGenericCond,       True,  False, ),
    2888     'IEM_MC_IF_EFL_ANY_BITS_SET':                                (McBlock.parseMcGenericCond,       True,  False, ),
     2888    'IEM_MC_IF_EFL_ANY_BITS_SET':                                (McBlock.parseMcGenericCond,       True,  True, ),
    28892889    'IEM_MC_IF_EFL_BIT_NOT_SET':                                 (McBlock.parseMcGenericCond,       True,  False, ),
    28902890    'IEM_MC_IF_EFL_BIT_NOT_SET_AND_BITS_EQ':                     (McBlock.parseMcGenericCond,       True,  False, ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r101557 r101568  
    42534253
    42544254
     4255#define IEM_MC_IF_EFL_ANY_BITS_SET(a_fBits) \
     4256        off = iemNativeEmitIfEflagAnysBitsSet(pReNative, off, (a_fBits)); \
     4257        AssertReturn(off != UINT32_MAX, UINT32_MAX); \
     4258        do {
     4259
     4260/** Emits code for IEM_MC_IF_EFL_ANY_BITS_SET. */
     4261DECLINLINE(uint32_t) iemNativeEmitIfEflagAnysBitsSet(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint32_t fBitsInEfl)
     4262{
     4263    PIEMNATIVECOND pEntry = iemNativeCondPushIf(pReNative);
     4264    AssertReturn(pEntry, UINT32_MAX);
     4265
     4266    /* Get the eflags. */
     4267    uint8_t const idxEflReg = iemNativeRegAllocTmpForGuestReg(pReNative, &off, kIemNativeGstReg_EFlags,
     4268                                                              kIemNativeGstRegUse_ReadOnly);
     4269    AssertReturn(idxEflReg != UINT8_MAX, UINT32_MAX);
     4270
     4271    /* Test and jump. */
     4272    off = iemNativeEmitTestAnyBitsInGprAndJmpToLabelIfNoneSet(pReNative, off, idxEflReg, fBitsInEfl, pEntry->idxLabelElse);
     4273
     4274    /* Free but don't flush the EFlags register. */
     4275    iemNativeRegFreeTmp(pReNative, idxEflReg);
     4276
     4277    /* Make a copy of the core state now as we start the if-block. */
     4278    iemNativeCondStartIfBlock(pReNative, off);
     4279
     4280    return off;
     4281}
     4282
     4283
    42554284#define IEM_MC_IF_EFL_BIT_SET(a_fBit) \
    42564285        off = iemNativeEmitIfEflagsBitSet(pReNative, off, (a_fBit)); \
     
    45944623                        case kIemTbDbgEntryType_Label:
    45954624                        {
    4596                             const char *pszName     = "what_the_fudge";
    4597                             const char *pszCommment = "";
    4598                             bool        fNumbered   = pDbgInfo->aEntries[iDbgEntry].Label.uData != 0;
     4625                            const char *pszName    = "what_the_fudge";
     4626                            const char *pszComment = "";
     4627                            bool        fNumbered  = pDbgInfo->aEntries[iDbgEntry].Label.uData != 0;
    45994628                            switch ((IEMNATIVELABELTYPE)pDbgInfo->aEntries[iDbgEntry].Label.enmLabel)
    46004629                            {
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