Changeset 103849 in vbox
- Timestamp:
- Mar 14, 2024 12:04:43 PM (9 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r103846 r103849 2959 2959 'IEM_MC_ASSIGN_TO_SMALLER': (McBlock.parseMcGeneric, False, False, True, ), 2960 2960 'IEM_MC_BEGIN': (McBlock.parseMcBegin, False, False, True, ), 2961 'IEM_MC_BROADCAST_XREG_U16_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, False,),2961 'IEM_MC_BROADCAST_XREG_U16_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), 2962 2962 'IEM_MC_BROADCAST_XREG_U32_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), 2963 2963 'IEM_MC_BROADCAST_XREG_U64_ZX_VLMAX': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r103846 r103849 7077 7077 7078 7078 7079 #define IEM_MC_BROADCAST_XREG_U16_ZX_VLMAX(a_iXRegDst, a_u16Src) \ 7080 off = iemNativeEmitSimdBroadcastXregU16ZxVlmax(pReNative, off, a_iXRegDst, a_u16Src) 7081 7082 /** Emits code for IEM_MC_BROADCAST_XREG_U16_ZX_VLMAX. */ 7083 DECL_INLINE_THROW(uint32_t) 7084 iemNativeEmitSimdBroadcastXregU16ZxVlmax(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iXReg, uint8_t idxSrcVar) 7085 { 7086 IEMNATIVE_ASSERT_VAR_IDX(pReNative, idxSrcVar); 7087 IEMNATIVE_ASSERT_VAR_SIZE(pReNative, idxSrcVar, sizeof(uint16_t)); 7088 7089 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iXReg), 7090 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ForFullWrite); 7091 7092 uint8_t const idxVarReg = iemNativeVarRegisterAcquire(pReNative, idxSrcVar, &off); 7093 7094 off = iemNativeEmitSimdBroadcastGprToVecRegU16(pReNative, off, idxSimdRegDst, idxVarReg, false /*f256Bit*/); 7095 off = iemNativeEmitSimdZeroVecRegHighU128(pReNative, off, idxSimdRegDst); 7096 IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_LO_U128(pReNative, iXReg); 7097 IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_HI_U128(pReNative, iXReg); 7098 7099 /* Free but don't flush the source register. */ 7100 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); 7101 iemNativeVarRegisterRelease(pReNative, idxSrcVar); 7102 7103 return off; 7104 } 7105 7106 7079 7107 #define IEM_MC_BROADCAST_XREG_U32_ZX_VLMAX(a_iXRegDst, a_u32Src) \ 7080 7108 off = iemNativeEmitSimdBroadcastXregU32ZxVlmax(pReNative, off, a_iXRegDst, a_u32Src) -
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r103848 r103849 7907 7907 7908 7908 /** 7909 * Emits a vecdst = gprsrc broadcast, 16-bit. 7910 */ 7911 DECL_FORCE_INLINE(uint32_t) 7912 iemNativeEmitSimdBroadcastGprToVecRegU16Ex(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iVecRegDst, uint8_t iGprSrc, bool f256Bit = false) 7913 { 7914 #ifdef RT_ARCH_AMD64 7915 /* pinsrw vecdst, gpr, #0 */ 7916 pCodeBuf[off++] = X86_OP_PRF_SIZE_OP; 7917 if (iVecRegDst >= 8 || iGprSrc >= 8) 7918 pCodeBuf[off++] = (iVecRegDst < 8 ? 0 : X86_OP_REX_R) 7919 | (iGprSrc < 8 ? 0 : X86_OP_REX_B); 7920 pCodeBuf[off++] = 0x0f; 7921 pCodeBuf[off++] = 0xc4; 7922 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecRegDst & 7, iGprSrc & 7); 7923 pCodeBuf[off++] = 0x00; 7924 7925 /* vpbroadcastd {y,x}mm, xmm (ASSUMES AVX2). */ 7926 pCodeBuf[off++] = X86_OP_VEX3; 7927 pCodeBuf[off++] = X86_OP_VEX3_BYTE1_X 7928 | 0x02 /* opcode map. */ 7929 | ( iVecRegDst >= 8 7930 ? 0 7931 : X86_OP_VEX3_BYTE1_B | X86_OP_VEX3_BYTE1_R); 7932 pCodeBuf[off++] = X86_OP_VEX3_BYTE2_MAKE_NO_VVVV(false, f256Bit, X86_OP_VEX3_BYTE2_P_066H); 7933 pCodeBuf[off++] = 0x79; 7934 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, iVecRegDst & 7, iVecRegDst & 7); 7935 #elif defined(RT_ARCH_ARM64) 7936 /* ASSUMES that there are two adjacent 128-bit registers available for the 256-bit value. */ 7937 Assert(!(iVecRegDst & 0x1) || !f256Bit); 7938 7939 /* dup vecsrc, gpr */ 7940 pCodeBuf[off++] = Armv8A64MkVecInstrDup(iVecRegDst, iGprSrc, kArmv8InstrUmovInsSz_U16); 7941 if (f256Bit) 7942 pCodeBuf[off++] = Armv8A64MkVecInstrDup(iVecRegDst + 1, iGprSrc, kArmv8InstrUmovInsSz_U16); 7943 #else 7944 # error "port me" 7945 #endif 7946 return off; 7947 } 7948 7949 7950 /** 7951 * Emits a vecdst[x] = gprsrc broadcast, 16-bit. 7952 */ 7953 DECL_INLINE_THROW(uint32_t) 7954 iemNativeEmitSimdBroadcastGprToVecRegU16(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iVecRegDst, uint8_t iGprSrc, bool f256Bit = false) 7955 { 7956 #ifdef RT_ARCH_AMD64 7957 off = iemNativeEmitSimdBroadcastGprToVecRegU16Ex(iemNativeInstrBufEnsure(pReNative, off, 12), off, iVecRegDst, iGprSrc, f256Bit); 7958 #elif defined(RT_ARCH_ARM64) 7959 off = iemNativeEmitSimdBroadcastGprToVecRegU16Ex(iemNativeInstrBufEnsure(pReNative, off, f256Bit ? 2 : 1), off, iVecRegDst, iGprSrc, f256Bit); 7960 #else 7961 # error "port me" 7962 #endif 7963 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 7964 return off; 7965 } 7966 7967 7968 /** 7909 7969 * Emits a vecdst = gprsrc broadcast, 32-bit. 7910 7970 */
Note:
See TracChangeset
for help on using the changeset viewer.