Changeset 103822 in vbox
- Timestamp:
- Mar 13, 2024 11:32:12 AM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 162191
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/x86.h
r103821 r103822 5183 5183 /** @} */ 5184 5184 5185 /** @name X86_OP_VEX2_XXX - 2-byte VEX prefix helpers. 5186 * @{ */ 5187 #define X86_OP_VEX2_BYTE1_P_MASK 0x3 5188 # define X86_OP_VEX2_BYTE1_P_NO_PRF 0 5189 # define X86_OP_VEX2_BYTE1_P_066H 1 5190 # define X86_OP_VEX2_BYTE1_P_0F3H 2 5191 # define X86_OP_VEX2_BYTE1_P_0F2H 3 5192 #define X86_OP_VEX2_BYTE1_L RT_BIT(2) 5193 #define X86_OP_VEX2_BYTE1_VVVV_MASK 0x78 5194 #define X86_OP_VEX2_BYTE1_VVVV_SHIFT 3 5195 #define X86_OP_VEX2_BYTE1_VVVV_NONE 15 5196 #define X86_OP_VEX2_BYTE1_R RT_BIT(7) 5197 5198 #define X86_OP_VEX2_BYTE1_MAKE(a_fRegW, a_iSrcReg, a_f256BitAvx, a_fPrf) \ 5199 ( ((a_fRegW) ? 0 : X86_OP_VEX2_BYTE1_R) \ 5200 | (~((uint8_t)(a_iSrcReg) & 0xf) << X86_OP_VEX2_BYTE1_VVVV_SHIFT) \ 5201 | ((a_f256BitAvx) ? X86_OP_VEX2_BYTE1_L : 0) \ 5202 | ((a_fPrf) & X86_OP_VEX2_BYTE1_P_MASK)) 5203 /** @} */ 5204 5185 5205 /** @name X86_OP_VEX3_XXX - 3-byte VEX prefix helpers. 5186 5206 * @{ */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r103818 r103822 3343 3343 'IEM_MC_STORE_YREG_U128_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, False, ), 3344 3344 'IEM_MC_STORE_YREG_U256_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, False, ), 3345 'IEM_MC_STORE_YREG_U32_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, False,),3345 'IEM_MC_STORE_YREG_U32_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), 3346 3346 'IEM_MC_STORE_YREG_U64_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, False, ), 3347 3347 'IEM_MC_SUB_GREG_U16': (McBlock.parseMcGeneric, True, True, True, ), -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r103818 r103822 6941 6941 } 6942 6942 6943 6944 #define IEM_MC_STORE_YREG_U32_ZX_VLMAX(a_iYRegDst, a_u32Src) \ 6945 off = iemNativeEmitSimdStoreYregU32ZxVlmax(pReNative, off, a_iYRegDst, a_u32Src) 6946 6947 /** Emits code for IEM_MC_STORE_YREG_U32_ZX_VLMAX. */ 6948 DECL_INLINE_THROW(uint32_t) 6949 iemNativeEmitSimdStoreYregU32ZxVlmax(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iYReg, uint8_t idxSrcVar) 6950 { 6951 IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxSrcVar); 6952 IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxSrcVar, sizeof(uint32_t)); 6953 6954 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYReg), 6955 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ForFullWrite); 6956 6957 uint8_t const idxVarReg = iemNativeVarRegisterAcquire(pReNative, idxSrcVar, &off); 6958 6959 off = iemNativeEmitSimdZeroVecRegU256(pReNative, off, idxSimdRegDst); 6960 off = iemNativeEmitSimdStoreGprToVecRegU32(pReNative, off, idxSimdRegDst, idxVarReg, 0 /*iDWord*/); 6961 IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_LO_U128(pReNative, iYReg); 6962 IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_HI_U128(pReNative, iYReg); 6963 6964 /* Free but don't flush the source register. */ 6965 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); 6966 iemNativeVarRegisterRelease(pReNative, idxSrcVar); 6967 6968 return off; 6969 } 6970 6943 6971 #endif /* IEMNATIVE_WITH_SIMD_REG_ALLOCATOR */ 6944 6972 -
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r103821 r103822 7398 7398 7399 7399 /** 7400 * Emits a vecdst[0:255] = 0 store. 7401 */ 7402 DECL_FORCE_INLINE(uint32_t) 7403 iemNativeEmitSimdZeroVecRegU256Ex(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 */ 7436 DECL_INLINE_THROW(uint32_t) 7437 iemNativeEmitSimdZeroVecRegU256(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 /** 7400 7452 * Emits a vecdst = gprsrc broadcast, 32-bit. 7401 7453 */
Note:
See TracChangeset
for help on using the changeset viewer.