VirtualBox

Ignore:
Timestamp:
Sep 23, 2024 1:59:08 PM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Recompilation-time checks of skipped EFLAGS. bugref:10720

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h

    r106101 r106117  
    217217    {
    218218        STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedLogical);
     219        pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS;
    219220# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    220221        off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
     
    290291        IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
    291292
    292 #  ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
     293#ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING
     294        pReNative->fSkippingEFlags &= ~X86_EFL_STATUS_BITS;
     295# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    293296        off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, 0, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
    294 #  endif
     297# endif
     298#endif
    295299    }
    296300    return off;
     
    321325    {
    322326        STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedArithmetic);
     327        pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS;
    323328# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    324329        off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
     
    328333#endif
    329334    {
    330 #ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
     335#ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING
    331336        uint32_t fSkipped = 0;
    332337#endif
     
    485490        IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
    486491
    487 #ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
     492#ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING
     493        pReNative->fSkippingEFlags = fSkipped;
     494# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    488495        off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, fSkipped, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
     496# endif
    489497#endif
    490498    }
     
    15721580    {
    15731581        STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflSkippedShift);
     1582        pReNative->fSkippingEFlags |= X86_EFL_STATUS_BITS;
    15741583# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    15751584        off = iemNativeEmitOrImmIntoVCpuU32(pReNative, off, X86_EFL_STATUS_BITS, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
     
    17361745        IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
    17371746
    1738 #  ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
     1747#ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING
     1748        pReNative->fSkippingEFlags = 0;
     1749# ifdef IEMNATIVE_STRICT_EFLAGS_SKIPPING
    17391750        off = iemNativeEmitStoreImmToVCpuU32(pReNative, off, 0, RT_UOFFSETOF(VMCPU, iem.s.fSkippingEFlags));
    1740 #  endif
     1751# endif
     1752#endif
    17411753    }
    17421754    return off;
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