VirtualBox

Changeset 101580 in vbox for trunk


Ignore:
Timestamp:
Oct 24, 2023 1:06:41 PM (15 months ago)
Author:
vboxsync
Message:

VMM/IEM: Fixes for IEM_MC_IF_EFL_BITS_NE and enabled native translation of IEM_MC_IF_EFL_BITS_EQ. bugref:10371

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

Legend:

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

    r101576 r101580  
    28912891    'IEM_MC_IF_EFL_BIT_SET':                                     (McBlock.parseMcGenericCond,       True,  True,  ),
    28922892    'IEM_MC_IF_EFL_BIT_SET_OR_BITS_NE':                          (McBlock.parseMcGenericCond,       True,  False, ),
    2893     'IEM_MC_IF_EFL_BITS_EQ':                                     (McBlock.parseMcGenericCond,       True,  False, ),
    2894     'IEM_MC_IF_EFL_BITS_NE':                                     (McBlock.parseMcGenericCond,       True,  True, ),
     2893    'IEM_MC_IF_EFL_BITS_EQ':                                     (McBlock.parseMcGenericCond,       True,  True, ),
     2894    'IEM_MC_IF_EFL_BITS_NE':                                     (McBlock.parseMcGenericCond,       True,  True,  ),
    28952895    'IEM_MC_IF_EFL_NO_BITS_SET':                                 (McBlock.parseMcGenericCond,       True,  True,  ),
    28962896    'IEM_MC_IF_FCW_IM':                                          (McBlock.parseMcGenericCond,       True,  False, ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r101576 r101580  
    44154415    off = iemNativeEmitXorGpr32ByGpr32(pReNative, off, idxTmpReg, idxEflReg);
    44164416
    4417     /* Test and jump. */
    4418     if (fNotEqual)
    4419         off = iemNativeEmitTestBitInGprAndJmpToLabelIfSet(pReNative, off, idxTmpReg, iBitNo1, pEntry->idxLabelElse);
    4420     else
    4421         off = iemNativeEmitTestBitInGprAndJmpToLabelIfNotSet(pReNative, off, idxTmpReg, iBitNo1, pEntry->idxLabelElse);
    4422 
    4423     iemNativeRegFreeTmp(pReNative, idxTmpReg);
    4424 
    44254417#elif defined(RT_ARCH_ARM64)
    44264418    uint8_t const idxTmpReg = iemNativeRegAllocTmp(pReNative, &off);
     
    44334425    pu32CodeBuf[off++] = Armv8A64MkInstrAndImm(idxTmpReg, idxEflReg, 0 /*uImm7SizeLen -> 32*/, 32 - iBitNo1, false /*f64Bit*/);
    44344426
    4435     /* eeyore tmpreg, eflreg, LSL/LSR, #abs(iBitNo2 - iBitNo1) */
     4427    /* eeyore tmpreg, eflreg, tmpreg, LSL/LSR, #abs(iBitNo2 - iBitNo1) */
    44364428    if (iBitNo1 > iBitNo2)
    4437         pu32CodeBuf[off++] = Armv8A64MkInstrEor(idxTmpReg, idxTmpReg, idxEflReg, false /*64bit*/,
    4438                                                 iBitNo1 - iBitNo2, kArmv8A64InstrShift_Lsl);
     4429        pu32CodeBuf[off++] = Armv8A64MkInstrEor(idxTmpReg, idxEflReg, idxTmpReg, false /*64bit*/,
     4430                                                iBitNo1 - iBitNo2, kArmv8A64InstrShift_Lsr);
    44394431    else
    4440         pu32CodeBuf[off++] = Armv8A64MkInstrEor(idxTmpReg, idxTmpReg, idxEflReg, false /*64bit*/,
    4441                                                 iBitNo2 - iBitNo1, kArmv8A64InstrShift_Lsr);
     4432        pu32CodeBuf[off++] = Armv8A64MkInstrEor(idxTmpReg, idxEflReg, idxTmpReg, false /*64bit*/,
     4433                                                iBitNo2 - iBitNo1, kArmv8A64InstrShift_Lsl);
    44424434
    44434435    IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
     4436
     4437#else
     4438# error "Port me"
     4439#endif
    44444440
    44454441    /* Test and jump. */
    44464442    if (fNotEqual)
    4447         off = iemNativeEmitTestBitInGprAndJmpToLabelIfSet(pReNative, off, idxTmpReg, iBitNo1, pEntry->idxLabelElse);
     4443        off = iemNativeEmitTestBitInGprAndJmpToLabelIfSet(pReNative, off, idxTmpReg, iBitNo2, pEntry->idxLabelElse);
    44484444    else
    4449         off = iemNativeEmitTestBitInGprAndJmpToLabelIfNotSet(pReNative, off, idxTmpReg, iBitNo1, pEntry->idxLabelElse);
    4450 
     4445        off = iemNativeEmitTestBitInGprAndJmpToLabelIfNotSet(pReNative, off, idxTmpReg, iBitNo2, pEntry->idxLabelElse);
     4446
     4447    /* Free but don't flush the EFlags and tmp registers. */
    44514448    iemNativeRegFreeTmp(pReNative, idxTmpReg);
    4452 
    4453 #else
    4454 # error "Port me"
    4455 #endif
    4456 
    4457     /* Free but don't flush the EFlags register. */
    44584449    iemNativeRegFreeTmp(pReNative, idxEflReg);
    44594450
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