VirtualBox

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


Ignore:
Timestamp:
Oct 20, 2017 2:50:34 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118457
Message:

IEM: Do not clip EIP to 16 bits when running 16-bit code, Intel doesn't either (see bugref:7851). Fixes Plan 9.

File:
1 edited

Legend:

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

    r69141 r69148  
    65546554    AssertCompile(IEMMODE_16BIT == 0 && IEMMODE_32BIT == 1 && IEMMODE_64BIT == 2);
    65556555#if ARCH_BITS >= 64
    6556     static uint64_t const s_aRipMasks[] = { UINT64_C(0xffff), UINT64_C(0xffffffff), UINT64_MAX };
     6556    static uint64_t const s_aRipMasks[] = { UINT64_C(0xffffffff), UINT64_C(0xffffffff), UINT64_MAX };
    65576557    Assert(pCtx->rip <= s_aRipMasks[(unsigned)pVCpu->iem.s.enmCpuMode]);
    65586558    pCtx->rip = (pCtx->rip + cbInstr) & s_aRipMasks[(unsigned)pVCpu->iem.s.enmCpuMode];
     
    65616561        pCtx->rip += cbInstr;
    65626562    else
    6563     {
    6564         static uint32_t const s_aEipMasks[] = { UINT32_C(0xffff), UINT32_MAX };
    6565         pCtx->eip = (pCtx->eip + cbInstr) & s_aEipMasks[(unsigned)pVCpu->iem.s.enmCpuMode];
    6566     }
     6563        pCtx->eip += cbInstr;
    65676564#endif
    65686565}
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