VirtualBox

Changeset 102512 in vbox for trunk/src


Ignore:
Timestamp:
Dec 7, 2023 8:43:12 AM (14 months ago)
Author:
vboxsync
Message:

VMM/IEM: Arm build fix. Fixed jumps in EFLAGS VBOX_STRICT code so they work on arm as well (correct fixed jumps in general to behave the similarly on both targets). bugref:10371

File:
1 edited

Legend:

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

    r102510 r102512  
    26632663/**
    26642664 * Emits a Jcc rel32 / B.cc imm19 with a fixed displacement.
    2665  * How @a offJmp is applied is are target specific.
     2665 *
     2666 * The @a offTarget is applied x86-style, so zero means the next instruction.
     2667 * The unit is IEMNATIVEINSTR.
    26662668 */
    26672669DECL_INLINE_THROW(uint32_t)
     
    26882690#elif defined(RT_ARCH_ARM64)
    26892691    uint32_t *pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1);
    2690     pu32CodeBuf[off++] = Armv8A64MkInstrBCond(enmCond, offTarget);
     2692    pu32CodeBuf[off++] = Armv8A64MkInstrBCond(enmCond, offTarget + 1);
    26912693
    26922694#else
     
    27002702/**
    27012703 * Emits a JZ/JE rel32 / B.EQ imm19 with a fixed displacement.
    2702  * How @a offJmp is applied is are target specific.
     2704 *
     2705 * The @a offTarget is applied x86-style, so zero means the next instruction.
     2706 * The unit is IEMNATIVEINSTR.
    27032707 */
    27042708DECL_INLINE_THROW(uint32_t) iemNativeEmitJzToFixed(PIEMRECOMPILERSTATE pReNative, uint32_t off, int32_t offTarget)
     
    27162720/**
    27172721 * Emits a JNZ/JNE rel32 / B.NE imm19 with a fixed displacement.
    2718  * How @a offJmp is applied is are target specific.
     2722 *
     2723 * The @a offTarget is applied x86-style, so zero means the next instruction.
     2724 * The unit is IEMNATIVEINSTR.
    27192725 */
    27202726DECL_INLINE_THROW(uint32_t) iemNativeEmitJnzToFixed(PIEMRECOMPILERSTATE pReNative, uint32_t off, int32_t offTarget)
     
    27322738/**
    27332739 * Emits a JBE/JNA rel32 / B.LS imm19 with a fixed displacement.
    2734  * How @a offJmp is applied is are target specific.
     2740 *
     2741 * The @a offTarget is applied x86-style, so zero means the next instruction.
     2742 * The unit is IEMNATIVEINSTR.
    27352743 */
    27362744DECL_INLINE_THROW(uint32_t) iemNativeEmitJbeToFixed(PIEMRECOMPILERSTATE pReNative, uint32_t off, int32_t offTarget)
     
    27482756/**
    27492757 * Emits a JA/JNBE rel32 / B.EQ imm19 with a fixed displacement.
    2750  * How @a offJmp is applied is are target specific.
     2758 *
     2759 * The @a offTarget is applied x86-style, so zero means the next instruction.
     2760 * The unit is IEMNATIVEINSTR.
    27512761 */
    27522762DECL_INLINE_THROW(uint32_t) iemNativeEmitJaToFixed(PIEMRECOMPILERSTATE pReNative, uint32_t off, int32_t offTarget)
     
    29702980    uint32_t uImmR     = 0;
    29712981    uint32_t uImmNandS = 0;
    2972     if (Armv8A64ConvertMask32ToImmRImmS(uImm, &uImmNandS, &uImmR))
     2982    if (Armv8A64ConvertMask32ToImmRImmS(fBits, &uImmNandS, &uImmR))
    29732983    {
    29742984        uint32_t *pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1);
    2975         pu32CodeBuf[off++] = Armv8A64MkInstrAndsImm(ARMV8_A64_REG_XZR, iGprDst, uImmNandS, uImmR, false /*f64Bit*/);
     2985        pu32CodeBuf[off++] = Armv8A64MkInstrAndsImm(ARMV8_A64_REG_XZR, iGprSrc, uImmNandS, uImmR, false /*f64Bit*/);
    29762986    }
    29772987    else
    29782988    {
    29792989        /* Use temporary register for the 64-bit immediate. */
    2980         uint8_t iTmpReg = iemNativeRegAllocTmpImm(pReNative, &off, uImm);
     2990        uint8_t iTmpReg = iemNativeRegAllocTmpImm(pReNative, &off, fBits);
    29812991        uint32_t *pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 1);
    29822992        pu32CodeBuf[off++] = Armv8A64MkInstrAnds(ARMV8_A64_REG_XZR, iGprSrc, iTmpReg, false /*f64Bit*/);
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