Changeset 103834 in vbox
- Timestamp:
- Mar 13, 2024 3:32:59 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 162204
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r103828 r103834 2997 2997 'IEM_MC_CLEAR_FSW_EX': (McBlock.parseMcGeneric, True, True, False, ), 2998 2998 'IEM_MC_CLEAR_HIGH_GREG_U64': (McBlock.parseMcGeneric, True, True, True, ), 2999 'IEM_MC_CLEAR_XREG_U32_MASK': (McBlock.parseMcGeneric, True, True, False,),2999 'IEM_MC_CLEAR_XREG_U32_MASK': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), 3000 3000 'IEM_MC_CLEAR_YREG_128_UP': (McBlock.parseMcGeneric, True, True, g_fNativeSimd), 3001 3001 'IEM_MC_COMMIT_EFLAGS': (McBlock.parseMcGeneric, True, True, True, ), -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r103828 r103834 7105 7105 } 7106 7106 7107 7108 #define IEM_MC_CLEAR_XREG_U32_MASK(a_iXReg, a_bMask) \ 7109 off = iemNativeEmitSimdClearXregU32Mask(pReNative, off, a_iXReg, a_bMask) 7110 7111 7112 /** Emits code for IEM_MC_CLEAR_XREG_U32_MASK. */ 7113 DECL_INLINE_THROW(uint32_t) 7114 iemNativeEmitSimdClearXregU32Mask(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iXReg, uint8_t bImm8Mask) 7115 { 7116 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iXReg), 7117 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForUpdate); 7118 7119 /** @todo r=aeichner For certain bit combinations we could reduce the number of emitted instructions. */ 7120 if (bImm8Mask & RT_BIT(0)) 7121 off = iemNativeEmitSimdZeroVecRegElemU32(pReNative, off, idxSimdRegDst, 0 /*iDWord*/); 7122 if (bImm8Mask & RT_BIT(1)) 7123 off = iemNativeEmitSimdZeroVecRegElemU32(pReNative, off, idxSimdRegDst, 1 /*iDWord*/); 7124 if (bImm8Mask & RT_BIT(2)) 7125 off = iemNativeEmitSimdZeroVecRegElemU32(pReNative, off, idxSimdRegDst, 2 /*iDWord*/); 7126 if (bImm8Mask & RT_BIT(3)) 7127 off = iemNativeEmitSimdZeroVecRegElemU32(pReNative, off, idxSimdRegDst, 3 /*iDWord*/); 7128 IEMNATIVE_SIMD_REG_STATE_SET_DIRTY_LO_U128(pReNative, iXReg); 7129 7130 /* Free but don't flush the destination register. */ 7131 iemNativeSimdRegFreeTmp(pReNative, idxSimdRegDst); 7132 7133 return off; 7134 } 7135 7107 7136 #endif /* IEMNATIVE_WITH_SIMD_REG_ALLOCATOR */ 7108 7137 -
trunk/src/VBox/VMM/include/IEMN8veRecompilerEmit.h
r103828 r103834 7538 7538 7539 7539 /** 7540 * Emits a vecdst.au32[iDWord] = 0 store. 7541 */ 7542 DECL_FORCE_INLINE(uint32_t) 7543 iemNativeEmitSimdZeroVecRegElemU32Ex(PIEMNATIVEINSTR pCodeBuf, uint32_t off, uint8_t iVecReg, uint8_t iDWord) 7544 { 7545 Assert(iDWord <= 7); 7546 7547 #ifdef RT_ARCH_AMD64 7548 /* 7549 * xor tmp0, tmp0 7550 * pinsrd xmm, tmp0, iDword 7551 */ 7552 if (IEMNATIVE_REG_FIXED_TMP0 >= 8) 7553 pCodeBuf[off++] = X86_OP_REX_R | X86_OP_REX_B; 7554 pCodeBuf[off++] = 0x33; 7555 pCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, IEMNATIVE_REG_FIXED_TMP0 & 7, IEMNATIVE_REG_FIXED_TMP0 & 7); 7556 off = iemNativeEmitSimdStoreGprToVecRegU32Ex(&pCodeBuf[off], off, iVecReg, IEMNATIVE_REG_FIXED_TMP0, iDWord); 7557 #elif defined(RT_ARCH_ARM64) 7558 /* ASSUMES that there are two adjacent 128-bit registers available for the 256-bit value. */ 7559 Assert(!(iVecReg & 0x1)); 7560 /* ins vecsrc[iDWord], wzr */ 7561 if (iDWord >= 4) 7562 pCodeBuf[off++] = Armv8A64MkVecInstrIns(iVecReg + 1, ARMV8_A64_REG_WZR, iDWord - 4, kArmv8InstrUmovInsSz_U32); 7563 else 7564 pCodeBuf[off++] = Armv8A64MkVecInstrIns(iVecReg, ARMV8_A64_REG_WZR, iDWord, kArmv8InstrUmovInsSz_U32); 7565 #else 7566 # error "port me" 7567 #endif 7568 return off; 7569 } 7570 7571 7572 /** 7573 * Emits a vecdst.au32[iDWord] = 0 store. 7574 */ 7575 DECL_INLINE_THROW(uint32_t) 7576 iemNativeEmitSimdZeroVecRegElemU32(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iVecReg, uint8_t iDWord) 7577 { 7578 7579 #ifdef RT_ARCH_AMD64 7580 off = iemNativeEmitSimdZeroVecRegElemU32Ex(iemNativeInstrBufEnsure(pReNative, off, 10), off, iVecReg, iDWord); 7581 #elif defined(RT_ARCH_ARM64) 7582 off = iemNativeEmitSimdZeroVecRegElemU32Ex(iemNativeInstrBufEnsure(pReNative, off, 1), off, iVecReg, iDWord); 7583 #else 7584 # error "port me" 7585 #endif 7586 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 7587 return off; 7588 } 7589 7590 7591 /** 7540 7592 * Emits a vecdst[0:127] = 0 store. 7541 7593 */
Note:
See TracChangeset
for help on using the changeset viewer.