VirtualBox

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


Ignore:
Timestamp:
May 9, 2018 6:26:28 PM (7 years ago)
Author:
vboxsync
Message:

IEM: Allow 32-bit code in real mode like real CPUs do; fixed real mode far call with 32-bit operand size. See bugref:5653

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

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

    r71857 r72181  
    36563656                            uint64_t    uCr2)
    36573657{
    3658     AssertReturn(pVCpu->iem.s.enmCpuMode == IEMMODE_16BIT, VERR_IEM_IPE_6);
    36593658    NOREF(uErr); NOREF(uCr2);
    36603659
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r71994 r72181  
    18251825     * limit.
    18261826     */
    1827     if (   pVCpu->iem.s.enmCpuMode == IEMMODE_16BIT
    1828         && IEM_IS_REAL_OR_V86_MODE(pVCpu))
     1827    if (IEM_IS_REAL_OR_V86_MODE(pVCpu))
    18291828    {
    18301829        if (offSeg > pCtx->cs.u32Limit)
     
    19951994     * limit.
    19961995     */
    1997     if (   pVCpu->iem.s.enmCpuMode == IEMMODE_16BIT
    1998         && IEM_IS_REAL_OR_V86_MODE(pVCpu))
     1996    if (IEM_IS_REAL_OR_V86_MODE(pVCpu))
    19991997    {
    20001998        Assert(enmEffOpSize == IEMMODE_16BIT || enmEffOpSize == IEMMODE_32BIT);
    20011999
    20022000        /* Check stack first - may #SS(0). */
    2003         rcStrict = iemMemStackPushBeginSpecial(pVCpu, enmEffOpSize == IEMMODE_32BIT ? 6 : 4,
     2001        rcStrict = iemMemStackPushBeginSpecial(pVCpu, enmEffOpSize == IEMMODE_32BIT ? 4+4 : 2+2,
    20042002                                               &uPtrRet.pv, &uNewRsp);
    20052003        if (rcStrict != VINF_SUCCESS)
     
    20192017        {
    20202018            uPtrRet.pu32[0] = pCtx->eip + cbInstr;
    2021             uPtrRet.pu16[3] = pCtx->cs.Sel;
     2019            uPtrRet.pu16[2] = pCtx->cs.Sel;
    20222020        }
    20232021        rcStrict = iemMemStackPushCommitSpecial(pVCpu, uPtrRet.pv, uNewRsp);
     
    22492247     * Real mode and V8086 mode are easy.
    22502248     */
    2251     if (   pVCpu->iem.s.enmCpuMode == IEMMODE_16BIT
    2252         && IEM_IS_REAL_OR_V86_MODE(pVCpu))
     2249    if (IEM_IS_REAL_OR_V86_MODE(pVCpu))
    22532250    {
    22542251        Assert(enmEffOpSize == IEMMODE_32BIT || enmEffOpSize == IEMMODE_16BIT);
     
    41304127     * Real mode and V8086 mode are easy.
    41314128     */
    4132     if (   pVCpu->iem.s.enmCpuMode == IEMMODE_16BIT
    4133         && IEM_IS_REAL_OR_V86_MODE(pVCpu))
     4129    if (IEM_IS_REAL_OR_V86_MODE(pVCpu))
    41344130    {
    41354131        *pSel           = uSel;
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