VirtualBox

Ignore:
Timestamp:
Mar 11, 2024 5:35:04 PM (11 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement emitter for IEM_MC_FETCH_YREG_U32(), bugref:10614

File:
1 edited

Legend:

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

    r103782 r103784  
    71547154{
    71557155#ifdef RT_ARCH_AMD64
    7156     /* pextrd gpr, vecsrc, #iDWord (ASSUMES SSE4.1). */
    7157     pCodeBuf[off++] = X86_OP_PRF_SIZE_OP;
    7158     if (iGprDst >= 8 || iVecRegSrc >= 8)
    7159         pCodeBuf[off++] =   (iVecRegSrc < 8 ? 0 : X86_OP_REX_R)
    7160                           | (iGprDst < 8 ? 0 : X86_OP_REX_B);
    7161     pCodeBuf[off++] = 0x0f;
    7162     pCodeBuf[off++] = 0x3a;
    7163     pCodeBuf[off++] = 0x16;
    7164     pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecRegSrc & 7, iGprDst & 7);
    7165     pCodeBuf[off++] = iDWord;
     7156    if (iDWord >= 4)
     7157    {
     7158        /** @todo Currently not used. */
     7159        AssertReleaseFailed();
     7160    }
     7161    else
     7162    {
     7163        /* pextrd gpr, vecsrc, #iDWord (ASSUMES SSE4.1). */
     7164        pCodeBuf[off++] = X86_OP_PRF_SIZE_OP;
     7165        if (iGprDst >= 8 || iVecRegSrc >= 8)
     7166            pCodeBuf[off++] =   (iVecRegSrc < 8 ? 0 : X86_OP_REX_R)
     7167                              | (iGprDst < 8 ? 0 : X86_OP_REX_B);
     7168        pCodeBuf[off++] = 0x0f;
     7169        pCodeBuf[off++] = 0x3a;
     7170        pCodeBuf[off++] = 0x16;
     7171        pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecRegSrc & 7, iGprDst & 7);
     7172        pCodeBuf[off++] = iDWord;
     7173    }
    71667174#elif defined(RT_ARCH_ARM64)
    71677175    /* umov gprdst, vecsrc[iDWord] */
     
    71807188iemNativeEmitSimdLoadGprFromVecRegU32(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iGprDst, uint8_t iVecRegSrc, uint8_t iDWord)
    71817189{
    7182     Assert(iDWord <= 3);
     7190    Assert(iDWord <= 7);
    71837191
    71847192#ifdef RT_ARCH_AMD64
    71857193    off = iemNativeEmitSimdLoadGprFromVecRegU32Ex(iemNativeInstrBufEnsure(pReNative, off, 7), off, iGprDst, iVecRegSrc, iDWord);
    71867194#elif defined(RT_ARCH_ARM64)
    7187     off = iemNativeEmitSimdLoadGprFromVecRegU32Ex(iemNativeInstrBufEnsure(pReNative, off, 1), off, iGprDst, iVecRegSrc, iDWord);
     7195    /* ASSUMES that there are two adjacent 128-bit registers available for the 256-bit value. */
     7196    Assert(!(iVecRegSrc & 0x1));
     7197    /* Need to access the "high" 128-bit vector register. */
     7198    if (iDWord >= 4)
     7199        off = iemNativeEmitSimdLoadGprFromVecRegU64Ex(iemNativeInstrBufEnsure(pReNative, off, 1), off, iGprDst, iVecRegSrc + 1, iDWord - 4);
     7200    else
     7201        off = iemNativeEmitSimdLoadGprFromVecRegU32Ex(iemNativeInstrBufEnsure(pReNative, off, 1), off, iGprDst, iVecRegSrc, iDWord);
    71887202#else
    71897203# error "port me"
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