Changeset 105306 in vbox
- Timestamp:
- Jul 12, 2024 1:20:30 PM (5 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r105302 r105306 4950 4950 4951 4951 ;; 4952 ; VPERMQ instruction. 4953 ; 4954 ; @param A0 Pointer to the first media register size operand (output). 4955 ; @param A1 Pointer to the second media register size operand (input). 4956 ; @param A2 8-bit immediate for the round constant. 4957 ; 4958 BEGINPROC_FASTCALL iemAImpl_vpermq_u256, 16 4959 PROLOGUE_3_ARGS 4960 IEMIMPL_AVX_PROLOGUE 4961 4962 movzx A2, A2_8 ; must clear top bits 4963 vmovdqu ymm1, [A1] 4964 IEMIMPL_CALL_JUMP_TABLE_TARGET T1, A2, 8 4965 vmovdqu [A0], ymm0 4966 4967 IEMIMPL_AVX_EPILOGUE 4968 EPILOGUE_3_ARGS 4969 %assign bImm 0 4970 %rep 256 4971 .imm %+ bImm: 4972 IBT_ENDBRxx_WITHOUT_NOTRACK 4973 vpermq ymm0, ymm1, bImm 4974 ret 4975 int3 4976 %assign bImm bImm + 1 4977 %endrep 4978 .immEnd: 4979 ENDPROC iemAImpl_vpermq_u256 4980 4981 4982 ;; 4983 ; VPERMPD instruction. 4984 ; 4985 ; @param A0 Pointer to the first media register size operand (output). 4986 ; @param A1 Pointer to the second media register size operand (input). 4987 ; @param A2 8-bit immediate for the round constant. 4988 ; 4989 BEGINPROC_FASTCALL iemAImpl_vpermpd_u256, 16 4990 PROLOGUE_3_ARGS 4991 IEMIMPL_AVX_PROLOGUE 4992 4993 movzx A2, A2_8 ; must clear top bits 4994 vmovdqu ymm1, [A1] 4995 IEMIMPL_CALL_JUMP_TABLE_TARGET T1, A2, 8 4996 vmovdqu [A0], ymm0 4997 4998 IEMIMPL_AVX_EPILOGUE 4999 EPILOGUE_3_ARGS 5000 %assign bImm 0 5001 %rep 256 5002 .imm %+ bImm: 5003 IBT_ENDBRxx_WITHOUT_NOTRACK 5004 vpermpd ymm0, ymm1, bImm 5005 ret 5006 int3 5007 %assign bImm bImm + 1 5008 %endrep 5009 .immEnd: 5010 ENDPROC iemAImpl_vpermpd_u256 5011 5012 5013 ;; 4952 5014 ; Media instruction working on one full sized source register, one full sized destination 4953 5015 ; register, and one no-larger-than-XMM register (in the vps{ll,ra,rl}[dwq] instructions, -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r105302 r105306 20416 20416 return uMxCsrIn; 20417 20417 } 20418 20419 20420 /** 20421 * VPERMQ 20422 */ 20423 IEM_DECL_IMPL_DEF(void, iemAImpl_vpermq_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc, uint8_t bImm)) 20424 { 20425 puDst->au64[0] = puSrc->au64[bImm & 0x3]; 20426 puDst->au64[1] = puSrc->au64[(bImm >> 2) & 0x3]; 20427 puDst->au64[2] = puSrc->au64[(bImm >> 4) & 0x3]; 20428 puDst->au64[3] = puSrc->au64[(bImm >> 6) & 0x3]; 20429 } 20430 20431 20432 /** 20433 * VPERMPD 20434 */ 20435 IEM_DECL_IMPL_DEF(void, iemAImpl_vpermpd_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc, uint8_t bImm)) 20436 { 20437 puDst->au64[0] = puSrc->au64[bImm & 0x3]; 20438 puDst->au64[1] = puSrc->au64[(bImm >> 2) & 0x3]; 20439 puDst->au64[2] = puSrc->au64[(bImm >> 4) & 0x3]; 20440 puDst->au64[3] = puSrc->au64[(bImm >> 6) & 0x3]; 20441 } -
trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap3.cpp.h
r105302 r105306 483 483 484 484 /** Opcode VEX.66.0F3A 0x00. */ 485 FNIEMOP_STUB(iemOp_vpermq_Vqq_Wqq_Ib); 485 FNIEMOP_DEF(iemOp_vpermq_Vqq_Wqq_Ib) 486 { 487 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 488 if (IEM_IS_MODRM_REG_MODE(bRm)) 489 { 490 /* 491 * Register, register. 492 */ 493 uint8_t bImm; IEM_OPCODE_GET_NEXT_U8(&bImm); 494 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 495 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV_EX(fAvx2); 496 IEM_MC_LOCAL(RTUINT256U, uDst); 497 IEM_MC_LOCAL(RTUINT256U, uSrc); 498 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 499 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc, uSrc, 1); 500 IEM_MC_ARG_CONST(uint8_t, bImmArg, /*=*/ bImm, 2); 501 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 502 IEM_MC_PREPARE_AVX_USAGE(); 503 IEM_MC_FETCH_YREG_U256(uSrc, IEM_GET_MODRM_RM(pVCpu, bRm)); 504 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermq_u256, iemAImpl_vpermq_u256_fallback), 505 puDst, puSrc, bImmArg); 506 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 507 IEM_MC_ADVANCE_RIP_AND_FINISH(); 508 IEM_MC_END(); 509 } 510 else 511 { 512 /* 513 * Register, memory. 514 */ 515 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 516 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 517 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 518 uint8_t bImm; IEM_OPCODE_GET_NEXT_U8(&bImm); 519 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV_EX(fAvx2); 520 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 521 IEM_MC_PREPARE_AVX_USAGE(); 522 523 IEM_MC_LOCAL(RTUINT256U, uSrc); 524 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc, uSrc, 1); 525 IEM_MC_FETCH_MEM_U256_NO_AC(uSrc, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 526 IEM_MC_LOCAL(RTUINT256U, uDst); 527 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 528 IEM_MC_ARG_CONST(uint8_t, bImmArg, /*=*/ bImm, 2); 529 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermq_u256, iemAImpl_vpermq_u256_fallback), 530 puDst, puSrc, bImmArg); 531 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 532 IEM_MC_ADVANCE_RIP_AND_FINISH(); 533 IEM_MC_END(); 534 } 535 } 536 537 486 538 /** Opcode VEX.66.0F3A 0x01. */ 487 FNIEMOP_STUB(iemOp_vpermpd_Vqq_Wqq_Ib); 539 FNIEMOP_DEF(iemOp_vpermpd_Vqq_Wqq_Ib) 540 { 541 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 542 if (IEM_IS_MODRM_REG_MODE(bRm)) 543 { 544 /* 545 * Register, register. 546 */ 547 uint8_t bImm; IEM_OPCODE_GET_NEXT_U8(&bImm); 548 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 549 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV_EX(fAvx2); 550 IEM_MC_LOCAL(RTUINT256U, uDst); 551 IEM_MC_LOCAL(RTUINT256U, uSrc); 552 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 553 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc, uSrc, 1); 554 IEM_MC_ARG_CONST(uint8_t, bImmArg, /*=*/ bImm, 2); 555 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 556 IEM_MC_PREPARE_AVX_USAGE(); 557 IEM_MC_FETCH_YREG_U256(uSrc, IEM_GET_MODRM_RM(pVCpu, bRm)); 558 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermpd_u256, iemAImpl_vpermpd_u256_fallback), 559 puDst, puSrc, bImmArg); 560 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 561 IEM_MC_ADVANCE_RIP_AND_FINISH(); 562 IEM_MC_END(); 563 } 564 else 565 { 566 /* 567 * Register, memory. 568 */ 569 IEM_MC_BEGIN(IEM_MC_F_NOT_286_OR_OLDER, 0); 570 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 571 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 572 uint8_t bImm; IEM_OPCODE_GET_NEXT_U8(&bImm); 573 IEMOP_HLP_DONE_VEX_DECODING_L0_AND_NO_VVVV_EX(fAvx2); 574 IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT(); 575 IEM_MC_PREPARE_AVX_USAGE(); 576 577 IEM_MC_LOCAL(RTUINT256U, uSrc); 578 IEM_MC_ARG_LOCAL_REF(PCRTUINT256U, puSrc, uSrc, 1); 579 IEM_MC_FETCH_MEM_U256_NO_AC(uSrc, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 580 IEM_MC_LOCAL(RTUINT256U, uDst); 581 IEM_MC_ARG_LOCAL_REF(PRTUINT256U, puDst, uDst, 0); 582 IEM_MC_ARG_CONST(uint8_t, bImmArg, /*=*/ bImm, 2); 583 IEM_MC_CALL_VOID_AIMPL_3(IEM_SELECT_HOST_OR_FALLBACK(fAvx2, iemAImpl_vpermpd_u256, iemAImpl_vpermpd_u256_fallback), 584 puDst, puSrc, bImmArg); 585 IEM_MC_STORE_YREG_U256_ZX_VLMAX(IEM_GET_MODRM_REG(pVCpu, bRm), uDst); 586 IEM_MC_ADVANCE_RIP_AND_FINISH(); 587 IEM_MC_END(); 588 } 589 } 488 590 489 591 -
trunk/src/VBox/VMM/include/IEMInternal.h
r105302 r105306 4000 4000 IEM_DECL_IMPL_DEF(void, iemAImpl_sha256rnds2_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc, PCRTUINT128U puXmm0Constants)); 4001 4001 IEM_DECL_IMPL_DEF(void, iemAImpl_sha256rnds2_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc, PCRTUINT128U puXmm0Constants)); 4002 4003 FNIEMAIMPLMEDIAOPTF2U256IMM8 iemAImpl_vpermq_u256, iemAImpl_vpermq_u256_fallback; 4004 FNIEMAIMPLMEDIAOPTF2U256IMM8 iemAImpl_vpermpd_u256, iemAImpl_vpermpd_u256_fallback; 4002 4005 4003 4006 typedef struct IEMPCMPISTRXSRC
Note:
See TracChangeset
for help on using the changeset viewer.