VirtualBox

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


Ignore:
Timestamp:
Sep 28, 2022 10:41:01 AM (2 years ago)
Author:
vboxsync
Message:

IEM: FNSTENV must clear pending math exceptions to avoid exception loops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp

    r96896 r96914  
    93069306        return rcStrict;
    93079307
     9308    /* Mask all math exceptions. Any possibly pending exceptions will be cleared. */
     9309    PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87;
     9310    pFpuCtx->FCW |=   X86_FCW_PM | X86_FCW_UM | X86_FCW_OM | X86_FCW_ZM | X86_FCW_DM | X86_FCW_IM;
     9311    pFpuCtx->FSW &= ~(X86_FSW_PE | X86_FSW_UE | X86_FSW_OE | X86_FSW_ZE | X86_FSW_DE | X86_FSW_IE | X86_FSW_ES);
     9312    iemHlpUsedFpu(pVCpu);
     9313
    93089314    /* Note: C0, C1, C2 and C3 are documented as undefined, we leave them untouched! */
    93099315    iemRegAddToRipAndClearRF(pVCpu, cbInstr);
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