VirtualBox

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


Ignore:
Timestamp:
Mar 11, 2024 5:04:02 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162148
Message:

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

File:
1 edited

Legend:

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

    r103777 r103779  
    72287228
    72297229/**
     7230 * Emits a vecdst[x] = gprsrc store, 32-bit.
     7231 */
     7232DECL_FORCE_INLINE(uint32_t)
     7233iemNativeEmitSimdStoreGprToVecRegU32Ex(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iVecRegDst, uint8_t iGprSrc, uint8_t iDWord)
     7234{
     7235#ifdef RT_ARCH_AMD64
     7236    /* pinsrq vecsrc, gpr, #iQWord (ASSUMES SSE4.1). */
     7237    pCodeBuf[off++] = X86_OP_PRF_SIZE_OP;
     7238    if (iGprDst >= 8 || iVecRegSrc >= 8)
     7239        pCodeBuf[off++] =   (iVecRegDst < 8 ? 0 : X86_OP_REX_R)
     7240                          | (iGprSrc < 8 ? 0 : X86_OP_REX_B);
     7241    pCodeBuf[off++] = 0x0f;
     7242    pCodeBuf[off++] = 0x3a;
     7243    pCodeBuf[off++] = 0x22;
     7244    pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecRegDst & 7, iGprSrc & 7);
     7245    pCodeBuf[off++] = iDWord;
     7246#elif defined(RT_ARCH_ARM64)
     7247    /* ins vecsrc[iDWord], gpr */
     7248    pCodeBuf[off++] = Armv8A64MkVecInstrIns(iVecRegDst, iGprSrc, iDWord, kArmv8InstrUmovInsSz_U32);
     7249#else
     7250# error "port me"
     7251#endif
     7252    return off;
     7253}
     7254
     7255
     7256/**
     7257 * Emits a vecdst[x] = gprsrc store, 64-bit.
     7258 */
     7259DECL_INLINE_THROW(uint32_t)
     7260iemNativeEmitSimdStoreGprToVecRegU32(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iVecRegDst, uint8_t iGprSrc, uint8_t iDWord)
     7261{
     7262    Assert(iDWord <= 3);
     7263
     7264#ifdef RT_ARCH_AMD64
     7265    off = iemNativeEmitSimdStoreGprToVecRegU32Ex(iemNativeInstrBufEnsure(pReNative, off, 7), off, iVecRegDst, iGprSrc, iDWord);
     7266#elif defined(RT_ARCH_ARM64)
     7267    off = iemNativeEmitSimdStoreGprToVecRegU32Ex(iemNativeInstrBufEnsure(pReNative, off, 1), off, iVecRegDst, iGprSrc, iDWord);
     7268#else
     7269# error "port me"
     7270#endif
     7271    IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
     7272    return off;
     7273}
     7274
     7275
     7276/**
    72307277 * Emits a vecdst[128:255] = 0 store.
    72317278 */
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