VirtualBox

Changeset 101570 in vbox for trunk/src


Ignore:
Timestamp:
Oct 24, 2023 12:46:54 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159651
Message:

VMM/IEM: Native IEM_MC_IF_EFL_BIT_NOT_SET translation. bugref:10371

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

Legend:

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

    r101569 r101570  
    28872887    'IEM_MC_IF_ECX_IS_NZ_AND_EFL_BIT_SET':                       (McBlock.parseMcGenericCond,       True,  False, ),
    28882888    'IEM_MC_IF_EFL_ANY_BITS_SET':                                (McBlock.parseMcGenericCond,       True,  True,  ),
    2889     'IEM_MC_IF_EFL_BIT_NOT_SET':                                 (McBlock.parseMcGenericCond,       True,  False, ),
     2889    'IEM_MC_IF_EFL_BIT_NOT_SET':                                 (McBlock.parseMcGenericCond,       True,  True, ),
    28902890    'IEM_MC_IF_EFL_BIT_NOT_SET_AND_BITS_EQ':                     (McBlock.parseMcGenericCond,       True,  False, ),
    28912891    'IEM_MC_IF_EFL_BIT_SET':                                     (McBlock.parseMcGenericCond,       True,  True,  ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r101569 r101570  
    43434343
    43444344
     4345#define IEM_MC_IF_EFL_BIT_NOT_SET(a_fBit) \
     4346        off = iemNativeEmitIfEflagsBitNotSet(pReNative, off, (a_fBit)); \
     4347        AssertReturn(off != UINT32_MAX, UINT32_MAX); \
     4348        do {
     4349
     4350/** Emits code for IEM_MC_IF_EFL_BIT_NOT_SET. */
     4351DECLINLINE(uint32_t) iemNativeEmitIfEflagsBitNotSet(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint32_t fBitInEfl)
     4352{
     4353    PIEMNATIVECOND pEntry = iemNativeCondPushIf(pReNative);
     4354    AssertReturn(pEntry, UINT32_MAX);
     4355
     4356    /* Get the eflags. */
     4357    uint8_t const idxEflReg = iemNativeRegAllocTmpForGuestReg(pReNative, &off, kIemNativeGstReg_EFlags,
     4358                                                              kIemNativeGstRegUse_ReadOnly);
     4359    AssertReturn(idxEflReg != UINT8_MAX, UINT32_MAX);
     4360
     4361    unsigned const iBitNo = ASMBitFirstSetU32(fBitInEfl) - 1;
     4362    Assert(RT_BIT_32(iBitNo) == fBitInEfl);
     4363
     4364    /* Test and jump. */
     4365    off = iemNativeEmitTestBitInGprAndJmpToLabelIfNotSet(pReNative, off, idxEflReg, iBitNo, pEntry->idxLabelElse);
     4366
     4367    /* Free but don't flush the EFlags register. */
     4368    iemNativeRegFreeTmp(pReNative, idxEflReg);
     4369
     4370    /* Make a copy of the core state now as we start the if-block. */
     4371    iemNativeCondStartIfBlock(pReNative, off);
     4372
     4373    return off;
     4374}
     4375
     4376
    43454377
    43464378/*********************************************************************************************************************************
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