VirtualBox

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


Ignore:
Timestamp:
Dec 28, 2023 12:28:00 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160892
Message:

VMM/IEM: Enabled the memmap TLB code on x86. bugref:10371

File:
1 edited

Legend:

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

    r102718 r102720  
    174174 *      - ARM64: 4 instruction words (16 bytes).
    175175 */
    176 DECLINLINE(uint32_t) iemNativeEmitLoadGprImmEx(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iGpr, uint64_t uImm64)
     176DECL_FORCE_INLINE(uint32_t)
     177iemNativeEmitLoadGprImmEx(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iGpr, uint64_t uImm64)
    177178{
    178179#ifdef RT_ARCH_AMD64
     
    191192            pCodeBuf[off++] = X86_OP_REX_B;
    192193        pCodeBuf[off++] = 0xb8 + (iGpr & 7);
     194        pCodeBuf[off++] = RT_BYTE1(uImm64);
     195        pCodeBuf[off++] = RT_BYTE2(uImm64);
     196        pCodeBuf[off++] = RT_BYTE3(uImm64);
     197        pCodeBuf[off++] = RT_BYTE4(uImm64);
     198    }
     199    else if (uImm64 == (uint64_t)(int32_t)uImm64)
     200    {
     201        /* mov gpr, sx(imm32) */
     202        if (iGpr < 8)
     203            pCodeBuf[off++] = X86_OP_REX_W;
     204        else
     205            pCodeBuf[off++] = X86_OP_REX_W | X86_OP_REX_B;
     206        pCodeBuf[off++] = 0xc7;
     207        pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, iGpr & 7);
    193208        pCodeBuf[off++] = RT_BYTE1(uImm64);
    194209        pCodeBuf[off++] = RT_BYTE2(uImm64);
     
    31013116    if (iGprLeft >= 8)
    31023117        pCodeBuf[off++] = X86_OP_REX_B;
    3103     if (uImm <= UINT32_C(0xff))
     3118    if (uImm <= UINT32_C(0x7f))
    31043119    {
    31053120        /* cmp Ev, Ib */
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