VirtualBox

Ignore:
Timestamp:
Mar 13, 2024 11:32:12 AM (11 months ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

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

    r103821 r103822  
    73987398
    73997399/**
     7400 * Emits a vecdst[0:255] = 0 store.
     7401 */
     7402DECL_FORCE_INLINE(uint32_t)
     7403iemNativeEmitSimdZeroVecRegU256Ex(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iVecReg)
     7404{
     7405#ifdef RT_ARCH_AMD64
     7406    /* vpxor ymm, ymm, ymm */
     7407    if (iVecReg < 8)
     7408    {
     7409        pCodeBuf[off++] = X86_OP_VEX2;
     7410        pCodeBuf[off++] = X86_OP_VEX2_BYTE1_MAKE(false, iVecReg, true, X86_OP_VEX3_BYTE2_P_066H);
     7411    }
     7412    else
     7413    {
     7414        pCodeBuf[off++] = X86_OP_VEX3;
     7415        pCodeBuf[off++] = X86_OP_VEX3_BYTE1_X | 0x01;
     7416        pCodeBuf[off++] = X86_OP_VEX3_BYTE2_MAKE(false, iVecReg, true, X86_OP_VEX3_BYTE2_P_066H);
     7417    }
     7418    pCodeBuf[off++] = 0xef;
     7419    pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecReg & 7, iVecReg & 7);
     7420#elif defined(RT_ARCH_ARM64)
     7421    /* ASSUMES that there are two adjacent 128-bit registers available for the 256-bit value. */
     7422    Assert(!(iVecReg & 0x1));
     7423    /* eor vecreg, vecreg, vecreg */
     7424    pCodeBuf[off++] = Armv8A64MkVecInstrEor(iVecReg,     iVecReg,     iVecReg);
     7425    pCodeBuf[off++] = Armv8A64MkVecInstrEor(iVecReg + 1, iVecReg + 1, iVecReg + 1);
     7426#else
     7427# error "port me"
     7428#endif
     7429    return off;
     7430}
     7431
     7432
     7433/**
     7434 * Emits a vecdst[0:255] = 0 store.
     7435 */
     7436DECL_INLINE_THROW(uint32_t)
     7437iemNativeEmitSimdZeroVecRegU256(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iVecReg)
     7438{
     7439#ifdef RT_ARCH_AMD64
     7440    off = iemNativeEmitSimdZeroVecRegU256Ex(iemNativeInstrBufEnsure(pReNative, off, 5), off, iVecReg);
     7441#elif defined(RT_ARCH_ARM64)
     7442    off = iemNativeEmitSimdZeroVecRegU256Ex(iemNativeInstrBufEnsure(pReNative, off, 2), off, iVecReg);
     7443#else
     7444# error "port me"
     7445#endif
     7446    IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);
     7447    return off;
     7448}
     7449
     7450
     7451/**
    74007452 * Emits a vecdst = gprsrc broadcast, 32-bit.
    74017453 */
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