VirtualBox

Changeset 100089 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Jun 7, 2023 1:39:11 AM (20 months ago)
Author:
vboxsync
Message:

VMM/IEM: Reworking the variations generated by the python script to match part of the fExec mode better. bugref:10369

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInline.h

    r100084 r100089  
    19821982
    19831983/**
    1984  * Updates the EIP/IP to point to the next instruction - only for 32-bit and
    1985  * 16-bit code.
    1986  *
    1987  * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
    1988  * @param   cbInstr             The number of bytes to add.
    1989  */
    1990 DECL_FORCE_INLINE(void) iemRegAddToEip32(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
    1991 {
    1992     /* See comment in iemRegAddToRip. */
    1993     uint32_t const uEipPrev = pVCpu->cpum.GstCtx.eip;
    1994     uint32_t const uEipNext = uEipPrev + cbInstr;
    1995     if (IEM_GET_TARGET_CPU(pVCpu) >= IEMTARGETCPU_386)
    1996         pVCpu->cpum.GstCtx.rip = (uint32_t)uEipNext;
    1997     else
    1998         pVCpu->cpum.GstCtx.rip = (uint16_t)uEipNext;
    1999 }
    2000 
    2001 
    2002 /**
    20031984 * Called by iemRegAddToRipAndFinishingClearingRF and others when any of the
    20041985 * following EFLAGS bits are set:
     
    21122093 * and CPUMCTX_INHIBIT_SHADOW.
    21132094 *
    2114  * Only called from 64-code code.
     2095 * Only called from 64-bit code.
    21152096 *
    21162097 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     
    21282109 * CPUMCTX_INHIBIT_SHADOW.
    21292110 *
    2130  * This is never from 64-code code.
     2111 * This is never from 64-bit code.
    21312112 *
    21322113 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     
    21352116DECL_FORCE_INLINE(VBOXSTRICTRC) iemRegAddToEip32AndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
    21362117{
    2137     iemRegAddToEip32(pVCpu, cbInstr);
     2118    pVCpu->cpum.GstCtx.rip = (uint32_t)(pVCpu->cpum.GstCtx.eip + cbInstr);
     2119    return iemRegFinishClearingRF(pVCpu);
     2120}
     2121
     2122
     2123/**
     2124 * Updates the IP to point to the next instruction and clears EFLAGS.RF and
     2125 * CPUMCTX_INHIBIT_SHADOW.
     2126 *
     2127 * This is only ever used from 16-bit code on a pre-386 CPU.
     2128 *
     2129 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     2130 * @param   cbInstr             The number of bytes to add.
     2131 */
     2132DECL_FORCE_INLINE(VBOXSTRICTRC) iemRegAddToIp16AndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
     2133{
     2134    pVCpu->cpum.GstCtx.rip = (uint16_t)(pVCpu->cpum.GstCtx.ip + cbInstr);
    21382135    return iemRegFinishClearingRF(pVCpu);
    21392136}
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