VirtualBox

Changeset 99994 in vbox


Ignore:
Timestamp:
May 26, 2023 10:09:30 PM (18 months ago)
Author:
vboxsync
Message:

VMM/IEM: Allow setting the FCW.IC bit (discontinued with the 387) as intel CPU (at least) still allows this on the 10980xe. ASSUME the FPU ignores it and the sign bit of infinity. bugref:10464

File:
1 edited

Legend:

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

    r99988 r99994  
    87398739    }
    87408740
    8741     pDst->FCW &= ~X86_FCW_ZERO_MASK;
     8741    pDst->FCW &= ~X86_FCW_ZERO_MASK | X86_FCW_IC_MASK; /* Intel 10980xe allows setting the IC bit. Win 3.11 CALC.EXE sets it. */
    87428742    iemFpuRecalcExceptionStatus(pDst);
    87438743
     
    90219021            }
    90229022
    9023             pDst->FCW &= ~X86_FCW_ZERO_MASK;
     9023            pDst->FCW &= ~X86_FCW_ZERO_MASK | X86_FCW_IC_MASK; /* Intel 10980xe allows setting the IC bit. Win 3.11 CALC.EXE sets it. */
    90249024            iemFpuRecalcExceptionStatus(pDst);
    90259025
     
    93769376    uint16_t const fOldFsw = pDstX87->FSW;
    93779377#endif
    9378     pDstX87->FCW &= ~X86_FCW_ZERO_MASK;
     9378    pDstX87->FCW &= ~X86_FCW_ZERO_MASK | X86_FCW_IC_MASK; /* Intel 10980xe allows setting the IC bit. Win 3.11 CALC.EXE sets it. */
    93799379    iemFpuRecalcExceptionStatus(pDstX87);
    93809380#ifdef LOG_ENABLED
     
    95639563     *        according to FSW. (This is what is currently implemented.) */
    95649564    PX86FXSTATE pFpuCtx = &pVCpu->cpum.GstCtx.XState.x87;
    9565     pFpuCtx->FCW = u16Fcw & ~X86_FCW_ZERO_MASK;
     9565    pFpuCtx->FCW = u16Fcw & (~X86_FCW_ZERO_MASK | X86_FCW_IC_MASK); /* Intel 10980xe allows setting the IC bit. Win 3.11 CALC.EXE sets it. */
    95669566#ifdef LOG_ENABLED
    95679567    uint16_t fOldFsw = pFpuCtx->FSW;
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