Changeset 103990 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 21, 2024 2:23:23 PM (11 months ago)
- svn:sync-xref-src-repo-rev:
- 162375
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h
r103986 r103990 7199 7199 iemNativeEmitSimdCopyXregU128(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iXRegDst, uint8_t iXRegSrc) 7200 7200 { 7201 /* Allocate destination and source register. */ 7201 /* 7202 * Allocate destination and source register. 7203 * 7204 * @note The order is important here when iXRegSrc == iXRegDst, because if iXRegDst gets allocated first for the full write 7205 * it won't load the actual value from CPUMCTX. When allocating iXRegSrc afterwards it will get duplicated from the already 7206 * allocated host register for iXRegDst containing garbage. This will be catched by the guest register value checking. 7207 */ 7208 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iXRegSrc), 7209 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); 7202 7210 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iXRegDst), 7203 7211 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ForFullWrite); 7204 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iXRegSrc),7205 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly);7206 7212 7207 7213 off = iemNativeEmitSimdLoadVecRegFromVecRegU128(pReNative, off, idxSimdRegDst, idxSimdRegSrc); … … 7514 7520 iemNativeEmitSimdCopyYregU128ZxVlmax(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iYRegDst, uint8_t iYRegSrc) 7515 7521 { 7516 /* Allocate destination and source register. */ 7522 /* 7523 * Allocate destination and source register. 7524 * 7525 * @note The order is important here when iYRegSrc == iYRegDst, because if iYRegDst gets allocated first for the full write 7526 * it won't load the actual value from CPUMCTX. When allocating iYRegSrc afterwards it will get duplicated from the already 7527 * allocated host register for iYRegDst containing garbage. This will be catched by the guest register value checking. 7528 */ 7529 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegSrc), 7530 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly); 7517 7531 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegDst), 7518 7532 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ForFullWrite); 7519 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegSrc),7520 kIemNativeGstSimdRegLdStSz_Low128, kIemNativeGstRegUse_ReadOnly);7521 7533 7522 7534 off = iemNativeEmitSimdLoadVecRegFromVecRegU128(pReNative, off, idxSimdRegDst, idxSimdRegSrc); … … 7540 7552 iemNativeEmitSimdCopyYregU256ZxVlmax(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t iYRegDst, uint8_t iYRegSrc) 7541 7553 { 7542 /* Allocate destination and source register. */ 7554 /* 7555 * Allocate destination and source register. 7556 * 7557 * @note The order is important here when iYRegSrc == iYRegDst, because if iYRegDst gets allocated first for the full write 7558 * it won't load the actual value from CPUMCTX. When allocating iYRegSrc afterwards it will get duplicated from the already 7559 * allocated host register for iYRegDst containing garbage. This will be catched by the guest register value checking. 7560 */ 7561 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegSrc), 7562 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ReadOnly); 7543 7563 uint8_t const idxSimdRegDst = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegDst), 7544 7564 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ForFullWrite); 7545 uint8_t const idxSimdRegSrc = iemNativeSimdRegAllocTmpForGuestSimdReg(pReNative, &off, IEMNATIVEGSTSIMDREG_SIMD(iYRegSrc),7546 kIemNativeGstSimdRegLdStSz_256, kIemNativeGstRegUse_ReadOnly);7547 7565 7548 7566 off = iemNativeEmitSimdLoadVecRegFromVecRegU256(pReNative, off, idxSimdRegDst, idxSimdRegSrc); -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r103964 r103990 5594 5594 Assert(pReNative->Core.aHstSimdRegs[idxSimdReg].fGstRegShadows == 0); 5595 5595 Assert(!(pReNative->Core.bmHstSimdRegsWithGstShadow & RT_BIT_32(idxSimdReg))); 5596 5597 pReNative->Core.aHstSimdRegs[idxSimdReg].enmLoaded = kIemNativeGstSimdRegLdStSz_Invalid; 5596 5598 Log12(("iemNativeSimdRegAllocTmp: %s\n", g_apszIemNativeHstSimdRegNames[idxSimdReg])); 5597 5599 } … … 5647 5649 Assert(pReNative->Core.aHstSimdRegs[idxSimdReg].fGstRegShadows == 0); 5648 5650 Assert(!(pReNative->Core.bmHstSimdRegsWithGstShadow & RT_BIT_32(idxSimdReg))); 5651 5652 pReNative->Core.aHstSimdRegs[idxSimdReg].enmLoaded = kIemNativeGstSimdRegLdStSz_Invalid; 5649 5653 Log12(("iemNativeSimdRegAllocTmpEx: %s\n", g_apszIemNativeHstSimdRegNames[idxSimdReg])); 5650 5654 } … … 6436 6440 if (enmLoadSz == kIemNativeGstSimdRegLdStSz_Low128 || enmLoadSz == kIemNativeGstSimdRegLdStSz_256) 6437 6441 { 6438 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5);6442 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 6); 6439 6443 /* eor vectmp0, vectmp0, idxSimdReg */ 6440 6444 pu32CodeBuf[off++] = Armv8A64MkVecInstrEor(IEMNATIVE_SIMD_REG_FIXED_TMP0, IEMNATIVE_SIMD_REG_FIXED_TMP0, idxSimdReg); 6441 /* cnt vectmp0, vectmp0, #0*/6442 pu32CodeBuf[off++] = Armv8A64MkVecInstr Cnt(IEMNATIVE_SIMD_REG_FIXED_TMP0, IEMNATIVE_SIMD_REG_FIXED_TMP0);6443 /* umov tmp0, vectmp0. D[0] */6445 /* uaddlv vectmp0, vectmp0.16B */ 6446 pu32CodeBuf[off++] = Armv8A64MkVecInstrUAddLV(IEMNATIVE_SIMD_REG_FIXED_TMP0, IEMNATIVE_SIMD_REG_FIXED_TMP0, kArmv8InstrUAddLVSz_16B); 6447 /* umov tmp0, vectmp0.H[0] */ 6444 6448 pu32CodeBuf[off++] = Armv8A64MkVecInstrUmov(IEMNATIVE_REG_FIXED_TMP0, IEMNATIVE_SIMD_REG_FIXED_TMP0, 6445 0 /*idxElem*/, kArmv8InstrUmovInsSz_U 64);6449 0 /*idxElem*/, kArmv8InstrUmovInsSz_U16, false /*f64Bit*/); 6446 6450 /* cbz tmp0, +1 */ 6447 6451 pu32CodeBuf[off++] = Armv8A64MkInstrCbzCbnz(false /*fJmpIfNotZero*/, 2, IEMNATIVE_REG_FIXED_TMP0); … … 6452 6456 if (enmLoadSz == kIemNativeGstSimdRegLdStSz_High128 || enmLoadSz == kIemNativeGstSimdRegLdStSz_256) 6453 6457 { 6454 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 5);6458 uint32_t * const pu32CodeBuf = iemNativeInstrBufEnsure(pReNative, off, 6); 6455 6459 /* eor vectmp0 + 1, vectmp0 + 1, idxSimdReg */ 6456 6460 pu32CodeBuf[off++] = Armv8A64MkVecInstrEor(IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, idxSimdReg + 1); 6457 /* cnt vectmp0 + 1, vectmp0 + 1, #0*/6458 pu32CodeBuf[off++] = Armv8A64MkVecInstr Cnt(IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1);6459 /* umov tmp0, (vectmp0 + 1). D[0] */6461 /* uaddlv vectmp0 + 1, (vectmp0 + 1).16B */ 6462 pu32CodeBuf[off++] = Armv8A64MkVecInstrUAddLV(IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, kArmv8InstrUAddLVSz_16B); 6463 /* umov tmp0, (vectmp0 + 1).H[0] */ 6460 6464 pu32CodeBuf[off++] = Armv8A64MkVecInstrUmov(IEMNATIVE_REG_FIXED_TMP0, IEMNATIVE_SIMD_REG_FIXED_TMP0 + 1, 6461 0 /*idxElem*/, kArmv8InstrUmovInsSz_U 64);6465 0 /*idxElem*/, kArmv8InstrUmovInsSz_U16, false /*f64Bit*/); 6462 6466 /* cbz tmp0, +1 */ 6463 6467 pu32CodeBuf[off++] = Armv8A64MkInstrCbzCbnz(false /*fJmpIfNotZero*/, 2, IEMNATIVE_REG_FIXED_TMP0);
Note:
See TracChangeset
for help on using the changeset viewer.