VirtualBox

Ignore:
Timestamp:
Apr 17, 2024 9:57:03 PM (10 months ago)
Author:
vboxsync
Message:

VMM/IEM: Adding a TB lookup table to each TB, so we can cache which TB comes next on branches and other TB exits/completion. bugref:10656

File:
1 edited

Legend:

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

    r104341 r104357  
    833833
    834834/**
     835 * Emits a store of an immediate value to a 64-bit VCpu field.
     836 *
     837 * @note Will allocate temporary registers on both ARM64 and AMD64.
     838 */
     839DECL_FORCE_INLINE_THROW(uint32_t)
     840iemNativeEmitStoreImmToVCpuU64(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint64_t uImm, uint32_t offVCpu)
     841{
     842#ifdef RT_ARCH_AMD64
     843    /* mov mem32, imm32 */
     844    uint8_t const idxRegImm = iemNativeRegAllocTmpImm(pReNative, &off, uImm);
     845    off = iemNativeEmitStoreGprToVCpuU64Ex(iemNativeInstrBufEnsure(pReNative, off, 7), off, idxRegImm, offVCpu);
     846    IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
     847    iemNativeRegFreeTmpImm(pReNative, idxRegImm);
     848
     849#elif defined(RT_ARCH_ARM64)
     850    uint8_t const idxRegImm = uImm == 0 ? ARMV8_A64_REG_XZR : iemNativeRegAllocTmpImm(pReNative, &off, uImm);
     851    off = iemNativeEmitGprByVCpuLdSt(pReNative, off, idxRegImm, offVCpu, kArmv8A64InstrLdStType_St_Dword, sizeof(uint64_t));
     852    if (idxRegImm != ARMV8_A64_REG_XZR)
     853        iemNativeRegFreeTmpImm(pReNative, idxRegImm);
     854
     855#else
     856# error "port me"
     857#endif
     858    return off;
     859}
     860
     861
     862/**
    835863 * Emits a store of an immediate value to a 32-bit VCpu field.
    836864 *
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