VirtualBox

Changeset 103855 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Mar 14, 2024 2:50:08 PM (9 months ago)
Author:
vboxsync
Message:

VMM/IEM: Use the clobbered register mask (fGstShwFlush) instead of pfnCImpl to check whether fSimdRaiseXcptChecksEmitted needs updating in iemNativeEmitCallCImplCommon. bugref:10614

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h

    r103853 r103855  
    20872087
    20882088#ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR
    2089     /* Clear the appropriate check emitted flags when a helper is called which could modify a control register. */
     2089    /* Clear the appropriate IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_XXX flags
     2090       when a calls clobber any of the relevatn control registers. */
     2091# if 1
     2092    if (!(fGstShwFlush & (RT_BIT_64(kIemNativeGstReg_Cr0) | RT_BIT_64(kIemNativeGstReg_Cr4) | RT_BIT_64(kIemNativeGstReg_Xcr0))))
     2093    {
     2094        /* Likely as long as call+ret are done via cimpl. */
     2095        Assert(   /*pfnCImpl != (uintptr_t)iemCImpl_mov_Cd_Rd && pfnCImpl != (uintptr_t)iemCImpl_xsetbv
     2096               &&*/ pfnCImpl != (uintptr_t)iemCImpl_lmsw      && pfnCImpl != (uintptr_t)iemCImpl_clts);
     2097    }
     2098    else if (fGstShwFlush & RT_BIT_64(kIemNativeGstReg_Xcr0))
     2099        pReNative->fSimdRaiseXcptChecksEmitted &= ~IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_AVX;
     2100    else if (fGstShwFlush & RT_BIT_64(kIemNativeGstReg_Cr4))
     2101        pReNative->fSimdRaiseXcptChecksEmitted &= ~(  IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_AVX
     2102                                                    | IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_SSE);
     2103    else
     2104        pReNative->fSimdRaiseXcptChecksEmitted &= ~(  IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_AVX
     2105                                                    | IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_SSE
     2106                                                    | IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_DEVICE_NOT_AVAILABLE);
     2107
     2108# else
    20902109    if (pfnCImpl == (uintptr_t)iemCImpl_xsetbv) /* Modifies xcr0 which only the AVX check uses. */
    20912110        pReNative->fSimdRaiseXcptChecksEmitted &= ~IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_AVX;
     
    20992118                                                    | IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_SSE
    21002119                                                    | IEMNATIVE_SIMD_RAISE_XCPT_CHECKS_EMITTED_MAYBE_DEVICE_NOT_AVAILABLE);
     2120# endif
    21012121#endif
    21022122
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