Changeset 103750 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 10, 2024 8:12:55 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r103739 r103750 5745 5745 case kIemNativeGstSimdRegLdStSz_256: 5746 5746 off = iemNativeEmitSimdLoadVecRegFromVecRegU256(pReNative, off, idxHstSimdRegDst, idxHstSimdRegSrc); 5747 break; 5747 5748 case kIemNativeGstSimdRegLdStSz_Low128: 5748 5749 off = iemNativeEmitSimdLoadVecRegFromVecRegU128(pReNative, off, idxHstSimdRegDst, idxHstSimdRegSrc); 5750 break; 5749 5751 case kIemNativeGstSimdRegLdStSz_High128: 5750 5752 off = iemNativeEmitSimdLoadVecRegFromVecRegU128(pReNative, off, idxHstSimdRegDst + 1, idxHstSimdRegSrc + 1); 5753 break; 5751 5754 default: 5752 5755 AssertFailedStmt(IEMNATIVE_DO_LONGJMP(pReNative, VERR_IPE_NOT_REACHED_DEFAULT_CASE)); … … 5977 5980 5978 5981 #ifdef RT_ARCH_AMD64 5979 # error "Port me" 5982 if (IEMNATIVE_SIMD_REG_STATE_IS_DIRTY_LO_U128(pReNative, idxGstSimdReg)) 5983 { 5984 Assert( pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_256 5985 || pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_Low128); 5986 off = iemNativeEmitSimdStoreVecRegToVCpuU128(pReNative, off, idxHstSimdReg, g_aGstSimdShadowInfo[idxGstSimdReg].offXmm); 5987 } 5988 5989 if (IEMNATIVE_SIMD_REG_STATE_IS_DIRTY_HI_U128(pReNative, idxGstSimdReg)) 5990 { 5991 Assert( pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_256 5992 || pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_High128); 5993 AssertReleaseFailed(); 5994 //off = iemNativeEmitSimdStoreVecRegToVCpuU128(pReNative, off, idxHstSimdReg, g_aGstSimdShadowInfo[idxGstSimdReg].offYmm); 5995 } 5980 5996 #elif defined(RT_ARCH_ARM64) 5981 5997 /* ASSUMING there are two consecutive host registers to store the potential 256-bit guest register. */ … … 5991 6007 { 5992 6008 Assert( pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_256 5993 || pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_ Low128);6009 || pReNative->Core.aHstSimdRegs[idxHstSimdReg].enmLoaded == kIemNativeGstSimdRegLdStSz_High128); 5994 6010 off = iemNativeEmitSimdStoreVecRegToVCpuU128(pReNative, off, idxHstSimdReg + 1, g_aGstSimdShadowInfo[idxGstSimdReg].offYmm); 5995 6011 } … … 6394 6410 { 6395 6411 # ifdef RT_ARCH_AMD64 6396 # error "Port me!" 6412 Assert(enmLoadSz == kIemNativeGstSimdRegLdStSz_Low128); /** @todo 256-bit variant. */ 6413 6414 /* movdqa vectmp0, idxSimdReg */ 6415 off = iemNativeEmitSimdLoadVecRegFromVecRegU128(pReNative, off, IEMNATIVE_SIMD_REG_FIXED_TMP0, idxSimdReg); 6416 6417 uint8_t * const pbCodeBuf = iemNativeInstrBufEnsure(pReNative, off, 44); 6418 6419 /* pcmpeqq vectmp0, [gstreg] (ASSUMES SSE4.1) */ 6420 pbCodeBuf[off++] = X86_OP_PRF_SIZE_OP; 6421 if (idxSimdReg >= 8) 6422 pbCodeBuf[off++] = X86_OP_REX_R; 6423 pbCodeBuf[off++] = 0x0f; 6424 pbCodeBuf[off++] = 0x38; 6425 pbCodeBuf[off++] = 0x29; 6426 off = iemNativeEmitGprByVCpuDisp(pbCodeBuf, off, idxSimdReg, g_aGstSimdShadowInfo[enmGstSimdReg].offXmm); 6427 6428 /* pextrq tmp0, vectmp0, #0 (ASSUMES SSE4.1). */ 6429 pbCodeBuf[off++] = X86_OP_PRF_SIZE_OP; 6430 pbCodeBuf[off++] = X86_OP_REX_W 6431 | (IEMNATIVE_SIMD_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_R) 6432 | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B); 6433 pbCodeBuf[off++] = 0x0f; 6434 pbCodeBuf[off++] = 0x3a; 6435 pbCodeBuf[off++] = 0x16; 6436 pbCodeBuf[off++] = 0xeb; 6437 pbCodeBuf[off++] = 0x00; 6438 6439 /* test tmp0, 0xffffffff. */ 6440 pbCodeBuf[off++] = X86_OP_REX_W | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B); 6441 pbCodeBuf[off++] = 0xf7; 6442 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, IEMNATIVE_REG_FIXED_TMP0 & 7); 6443 pbCodeBuf[off++] = 0xff; 6444 pbCodeBuf[off++] = 0xff; 6445 pbCodeBuf[off++] = 0xff; 6446 pbCodeBuf[off++] = 0xff; 6447 6448 /* je/jz +1 */ 6449 pbCodeBuf[off++] = 0x74; 6450 pbCodeBuf[off++] = 0x01; 6451 6452 /* int3 */ 6453 pbCodeBuf[off++] = 0xcc; 6454 6455 /* pextrq tmp0, vectmp0, #1 (ASSUMES SSE4.1). */ 6456 pbCodeBuf[off++] = X86_OP_PRF_SIZE_OP; 6457 pbCodeBuf[off++] = X86_OP_REX_W 6458 | (IEMNATIVE_SIMD_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_R) 6459 | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B); 6460 pbCodeBuf[off++] = 0x0f; 6461 pbCodeBuf[off++] = 0x3a; 6462 pbCodeBuf[off++] = 0x16; 6463 pbCodeBuf[off++] = 0xeb; 6464 pbCodeBuf[off++] = 0x01; 6465 6466 /* test tmp0, 0xffffffff. */ 6467 pbCodeBuf[off++] = X86_OP_REX_W | (IEMNATIVE_REG_FIXED_TMP0 < 8 ? 0 : X86_OP_REX_B); 6468 pbCodeBuf[off++] = 0xf7; 6469 pbCodeBuf[off++] = X86_MODRM_MAKE(X86_MOD_REG, 0, IEMNATIVE_REG_FIXED_TMP0 & 7); 6470 pbCodeBuf[off++] = 0xff; 6471 pbCodeBuf[off++] = 0xff; 6472 pbCodeBuf[off++] = 0xff; 6473 pbCodeBuf[off++] = 0xff; 6474 6475 /* je/jz +1 */ 6476 pbCodeBuf[off++] = 0x74; 6477 pbCodeBuf[off++] = 0x01; 6478 6479 /* int3 */ 6480 pbCodeBuf[off++] = 0xcc; 6481 6397 6482 # elif defined(RT_ARCH_ARM64) 6398 6483 /* mov vectmp0, [gstreg] */ … … 6413 6498 /* brk #0x1000+enmGstReg */ 6414 6499 pu32CodeBuf[off++] = Armv8A64MkInstrBrk((uint32_t)enmGstSimdReg | UINT32_C(0x1000)); 6415 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);6416 6500 } 6417 6501 … … 6430 6514 /* brk #0x1000+enmGstReg */ 6431 6515 pu32CodeBuf[off++] = Armv8A64MkInstrBrk((uint32_t)enmGstSimdReg | UINT32_C(0x1000)); 6432 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off);6433 6516 } 6434 6517 … … 6436 6519 # error "Port me!" 6437 6520 # endif 6521 6522 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 6438 6523 return off; 6439 6524 } … … 8169 8254 uint8_t const idxLabelRaiseNm = iemNativeLabelCreate(pReNative, kIemNativeLabelType_RaiseNm); 8170 8255 uint8_t const idxLabelRaiseUd = iemNativeLabelCreate(pReNative, kIemNativeLabelType_RaiseUd); 8171 8172 #if 18173 off = iemNativeEmitBrk(pReNative, off, 0x4223); /** @todo Test this when AVX gets actually available. */8174 #endif8175 8256 8176 8257 /** @todo r=aeichner Optimize this more later to have less compares and branches,
Note:
See TracChangeset
for help on using the changeset viewer.