Changeset 105307 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 12, 2024 1:39:37 PM (5 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r105306 r105307 5012 5012 5013 5013 ;; 5014 ; VPERMPS instruction. 5015 ; 5016 ; @param A0 Pointer to the first media register size operand (output). 5017 ; @param A1 Pointer to the second media register size operand (input). 5018 ; @param A2 Pointer to the third media register size operand (input). 5019 ; 5020 BEGINPROC_FASTCALL iemAImpl_vpermps_u256, 16 5021 PROLOGUE_3_ARGS 5022 IEMIMPL_AVX_PROLOGUE 5023 5024 vmovdqu ymm0, [A1] 5025 vmovdqu ymm1, [A2] 5026 vpermps ymm0, ymm0, ymm1 5027 vmovdqu [A0], ymm0 5028 5029 IEMIMPL_AVX_EPILOGUE 5030 EPILOGUE_3_ARGS 5031 ENDPROC iemAImpl_vpermps_u256 5032 5033 5034 ;; 5035 ; VPERMD instruction. 5036 ; 5037 ; @param A0 Pointer to the first media register size operand (output). 5038 ; @param A1 Pointer to the second media register size operand (input). 5039 ; @param A2 Pointer to the third media register size operand (input). 5040 ; 5041 BEGINPROC_FASTCALL iemAImpl_vpermd_u256, 16 5042 PROLOGUE_3_ARGS 5043 IEMIMPL_AVX_PROLOGUE 5044 5045 vmovdqu ymm0, [A1] 5046 vmovdqu ymm1, [A2] 5047 vpermd ymm0, ymm0, ymm1 5048 vmovdqu [A0], ymm0 5049 5050 IEMIMPL_AVX_EPILOGUE 5051 EPILOGUE_3_ARGS 5052 ENDPROC iemAImpl_vpermd_u256 5053 5054 5055 ;; 5014 5056 ; Media instruction working on one full sized source register, one full sized destination 5015 5057 ; register, and one no-larger-than-XMM register (in the vps{ll,ra,rl}[dwq] instructions, -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r105306 r105307 20440 20440 puDst->au64[3] = puSrc->au64[(bImm >> 6) & 0x3]; 20441 20441 } 20442 20443 20444 /** 20445 * VPERMD 20446 */ 20447 IEM_DECL_IMPL_DEF(void, iemAImpl_vpermd_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 20448 { 20449 puDst->au32[0] = puSrc2->au32[puSrc1->au32[0] & 0x3]; 20450 puDst->au32[1] = puSrc2->au32[puSrc1->au32[1] & 0x3]; 20451 puDst->au32[2] = puSrc2->au32[puSrc1->au32[2] & 0x3]; 20452 puDst->au32[3] = puSrc2->au32[puSrc1->au32[3] & 0x3]; 20453 puDst->au32[4] = puSrc2->au32[puSrc1->au32[4] & 0x3]; 20454 puDst->au32[5] = puSrc2->au32[puSrc1->au32[5] & 0x3]; 20455 puDst->au32[6] = puSrc2->au32[puSrc1->au32[6] & 0x3]; 20456 puDst->au32[7] = puSrc2->au32[puSrc1->au32[7] & 0x3]; 20457 } 20458 20459 20460 /** 20461 * VPERMPS 20462 */ 20463 IEM_DECL_IMPL_DEF(void, iemAImpl_vpermps_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 20464 { 20465 puDst->au32[0] = puSrc2->au32[puSrc1->au32[0] & 0x3]; 20466 puDst->au32[1] = puSrc2->au32[puSrc1->au32[1] & 0x3]; 20467 puDst->au32[2] = puSrc2->au32[puSrc1->au32[2] & 0x3]; 20468 puDst->au32[3] = puSrc2->au32[puSrc1->au32[3] & 0x3]; 20469 puDst->au32[4] = puSrc2->au32[puSrc1->au32[4] & 0x3]; 20470 puDst->au32[5] = puSrc2->au32[puSrc1->au32[5] & 0x3]; 20471 puDst->au32[6] = puSrc2->au32[puSrc1->au32[6] & 0x3]; 20472 puDst->au32[7] = puSrc2->au32[puSrc1->au32[7] & 0x3]; 20473 } -
trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap2.cpp.h
r105295 r105307 424 424 /* Opcode VEX.66.0F38 0x15 - invalid (legacy only). */ 425 425 /* Opcode VEX.0F38 0x16 - invalid */ 426 427 426 428 /** Opcode VEX.66.0F38 0x16. */ 427 FNIEMOP_STUB(iemOp_vpermps_Vqq_Hqq_Wqq); 429 FNIEMOP_DEF(iemOp_vpermps_Vqq_Hqq_Wqq) 430 { 431 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 432 if (IEM_IS_MODRM_REG_MODE(bRm)) 433 { 434 /* 435 * Register, register. 436 */ 437 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 438 IEMOP_HLP_DONE_VEX_DECODING_L1_EX(fAvx2); 439 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 440 IEM_MC_PREPARE_AVX_USAGE(); 441 IEM_MC_LOCAL(RTUINT256U, uSrc1); 442 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc1, uSrc1, 1); 443 IEM_MC_FETCH_YREG_U256(uSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 444 IEM_MC_LOCAL(RTUINT256U, uSrc2); 445 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc2, uSrc2, 2); 446 IEM_MC_FETCH_YREG_U256(uSrc2, IEM_GET_MODRM_RM(pVCpu, bRm)); 447 IEM_MC_LOCAL(RTUINT256U, uDst); 448 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 449 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermps_u256, iemAImpl_vpermps_u256_fallback), 450 puDst, puSrc1, puSrc2); 451 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 452 IEM_MC_ADVANCE_RIP_AND_FINISH(); 453 IEM_MC_END(); 454 } 455 else 456 { 457 /* 458 * Register, memory. 459 */ 460 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 461 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 462 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 463 IEMOP_HLP_DONE_VEX_DECODING_L1_EX(fAvx2); 464 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 465 IEM_MC_PREPARE_AVX_USAGE(); 466 IEM_MC_LOCAL(RTUINT256U, uSrc2); 467 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc2, uSrc2, 2); 468 IEM_MC_FETCH_MEM_U256_NO_AC(uSrc2, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 469 IEM_MC_LOCAL(RTUINT256U, uSrc1); 470 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc1, uSrc1, 1); 471 IEM_MC_FETCH_YREG_U256(uSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 472 IEM_MC_LOCAL(RTUINT256U, uDst); 473 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 474 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermps_u256, iemAImpl_vpermps_u256_fallback), 475 puDst, puSrc1, puSrc2); 476 IEM_MC_STORE_YREG_U256_ZX_VLMAX( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 477 IEM_MC_ADVANCE_RIP_AND_FINISH(); 478 IEM_MC_END(); 479 } 480 } 481 482 428 483 /* Opcode VEX.0F38 0x17 - invalid */ 429 484 … … 1307 1362 1308 1363 /* Opcode VEX.66.0F38 0x36. */ 1309 FNIEMOP_STUB(iemOp_vpermd_Vqq_Hqq_Wqq); 1364 FNIEMOP_DEF(iemOp_vpermd_Vqq_Hqq_Wqq) 1365 { 1366 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1367 if (IEM_IS_MODRM_REG_MODE(bRm)) 1368 { 1369 /* 1370 * Register, register. 1371 */ 1372 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 1373 IEMOP_HLP_DONE_VEX_DECODING_L1_EX(fAvx2); 1374 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1375 IEM_MC_PREPARE_AVX_USAGE(); 1376 IEM_MC_LOCAL(RTUINT256U, uSrc1); 1377 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc1, uSrc1, 1); 1378 IEM_MC_FETCH_YREG_U256(uSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 1379 IEM_MC_LOCAL(RTUINT256U, uSrc2); 1380 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc2, uSrc2, 2); 1381 IEM_MC_FETCH_YREG_U256(uSrc2, IEM_GET_MODRM_RM(pVCpu, bRm)); 1382 IEM_MC_LOCAL(RTUINT256U, uDst); 1383 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 1384 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermd_u256, iemAImpl_vpermd_u256_fallback), 1385 puDst, puSrc1, puSrc2); 1386 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 1387 IEM_MC_ADVANCE_RIP_AND_FINISH(); 1388 IEM_MC_END(); 1389 } 1390 else 1391 { 1392 /* 1393 * Register, memory. 1394 */ 1395 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 1396 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1397 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1398 IEMOP_HLP_DONE_VEX_DECODING_L1_EX(fAvx2); 1399 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 1400 IEM_MC_PREPARE_AVX_USAGE(); 1401 IEM_MC_LOCAL(RTUINT256U, uSrc2); 1402 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc2, uSrc2, 2); 1403 IEM_MC_FETCH_MEM_U256_NO_AC(uSrc2, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 1404 IEM_MC_LOCAL(RTUINT256U, uSrc1); 1405 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc1, uSrc1, 1); 1406 IEM_MC_FETCH_YREG_U256(uSrc1, IEM_GET_EFFECTIVE_VVVV(pVCpu)); 1407 IEM_MC_LOCAL(RTUINT256U, uDst); 1408 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 1409 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermd_u256, iemAImpl_vpermd_u256_fallback), 1410 puDst, puSrc1, puSrc2); 1411 IEM_MC_STORE_YREG_U256_ZX_VLMAX( IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 1412 IEM_MC_ADVANCE_RIP_AND_FINISH(); 1413 IEM_MC_END(); 1414 } 1415 } 1310 1416 1311 1417 -
trunk/src/VBox/VMM/include/IEMInternal.h
r105306 r105307 3728 3728 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsrlq_u256, iemAImpl_vpsrlq_u256_fallback; 3729 3729 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmaddwd_u256, iemAImpl_vpmaddwd_u256_fallback; 3730 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpermps_u256, iemAImpl_vpermps_u256_fallback; 3731 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpermd_u256, iemAImpl_vpermd_u256_fallback; 3730 3732 3731 3733 FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsb_u256, iemAImpl_vpabsb_u256_fallback;
Note:
See TracChangeset
for help on using the changeset viewer.