VirtualBox

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


Ignore:
Timestamp:
Apr 6, 2023 12:06:25 AM (22 months ago)
Author:
vboxsync
Message:

VMM/IEM: More work on processing MC blocks and generating threaded functions from them. IEMThreadedFunctions.cpp compiles now. Did some PC update optimizations when doing addressing variations. bugref:10369

File:
1 edited

Legend:

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

    r99298 r99299  
    17711771
    17721772/**
     1773 * Updates the EIP/IP to point to the next instruction - only for 32-bit and
     1774 * 16-bit code.
     1775 *
     1776 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     1777 * @param   cbInstr             The number of bytes to add.
     1778 */
     1779DECL_FORCE_INLINE(void) iemRegAddToEip32(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
     1780{
     1781    /* See comment in iemRegAddToRip. */
     1782    uint32_t const uEipPrev = pVCpu->cpum.GstCtx.eip;
     1783    uint32_t const uEipNext = uEipPrev + cbInstr;
     1784    if (IEM_GET_TARGET_CPU(pVCpu) >= IEMTARGETCPU_386)
     1785        pVCpu->cpum.GstCtx.rip = (uint32_t)uEipNext;
     1786    else
     1787        pVCpu->cpum.GstCtx.rip = (uint16_t)uEipNext;
     1788}
     1789
     1790
     1791/**
    17731792 * Called by iemRegAddToRipAndFinishingClearingRF and others when any of the
    17741793 * following EFLAGS bits are set:
     
    18711890 * @param   cbInstr             The number of bytes to add.
    18721891 */
    1873 DECLINLINE(VBOXSTRICTRC) iemRegAddToRipAndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
     1892DECL_FORCE_INLINE(VBOXSTRICTRC) iemRegAddToRipAndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
    18741893{
    18751894    iemRegAddToRip(pVCpu, cbInstr);
     1895    return iemRegFinishClearingRF(pVCpu);
     1896}
     1897
     1898
     1899/**
     1900 * Updates the RIP to point to the next instruction and clears EFLAGS.RF
     1901 * and CPUMCTX_INHIBIT_SHADOW.
     1902 *
     1903 * Only called from 64-code code.
     1904 *
     1905 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     1906 * @param   cbInstr             The number of bytes to add.
     1907 */
     1908DECL_FORCE_INLINE(VBOXSTRICTRC) iemRegAddToRip64AndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
     1909{
     1910    pVCpu->cpum.GstCtx.rip = pVCpu->cpum.GstCtx.rip + cbInstr;
     1911    return iemRegFinishClearingRF(pVCpu);
     1912}
     1913
     1914
     1915/**
     1916 * Updates the EIP to point to the next instruction and clears EFLAGS.RF and
     1917 * CPUMCTX_INHIBIT_SHADOW.
     1918 *
     1919 * This is never from 64-code code.
     1920 *
     1921 * @param   pVCpu               The cross context virtual CPU structure of the calling thread.
     1922 * @param   cbInstr             The number of bytes to add.
     1923 */
     1924DECL_FORCE_INLINE(VBOXSTRICTRC) iemRegAddToEip32AndFinishingClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT
     1925{
     1926    iemRegAddToEip32(pVCpu, cbInstr);
    18761927    return iemRegFinishClearingRF(pVCpu);
    18771928}
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