VirtualBox

Ignore:
Timestamp:
Mar 13, 2024 8:06:55 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162208
Message:

VMM/IEM: Emit the IEM_MC_MAYBE_RAISE_DEVICE_NOT_AVAILABLE()/IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT()/IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT() checks only once per TB or after a helper was called which could modify cr0/cr4/xcr0. Most of the time the check can be omitted for SIMD code, bugref:10614

File:
1 edited

Legend:

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

    r103829 r103838  
    12061206# define IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_HI_U128(a_pReNative, a_iSimdReg) \
    12071207    ((a_pReNative)->Core.bmGstSimdRegShadowDirtyHi128 |= RT_BIT_64(a_iSimdReg))
     1208
     1209/** Flag for indicating that IEM_MC_MAYBE_RAISE_DEVICE_NOT_AVAILABLE() has emitted code in the current TB. */
     1210# define IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_DEVICE_NOT_AVAILABLE RT_BIT_32(0)
     1211/** Flag for indicating that IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT() has emitted code in the current TB. */
     1212# define IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_SSE                  RT_BIT_32(1)
     1213/** Flag for indicating that IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT() has emitted code in the current TB. */
     1214# define IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_AVX                  RT_BIT_32(2)
    12081215#endif
    12091216
     
    13061313    /** The expected IEMCPU::fExec value for the current call/instruction. */
    13071314    uint32_t                    fExec;
     1315#ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR
     1316    /** IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_XXX flags for exception flags
     1317     * we only emit once per TB (or when the cr0/cr4/xcr0 register changes).
     1318     *
     1319     * This is an optimization because these control registers can only be changed from
     1320     * by calling a C helper we can catch. Should reduce the number of instructions in a TB
     1321     * consisting of multiple SIMD instructions.
     1322     */
     1323    uint32_t                    fSimdRaiseXcptChecksEmitted;
     1324#endif
    13081325
    13091326    /** Core state requiring care with branches. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette