Changeset 96049 in vbox
- Timestamp:
- Aug 5, 2022 10:17:21 AM (2 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r96046 r96049 3654 3654 IEMIMPL_MEDIA_F2 phaddw, 1 3655 3655 IEMIMPL_MEDIA_F2 phaddd, 1 3656 IEMIMPL_MEDIA_F2 phsubw, 1 3657 IEMIMPL_MEDIA_F2 phsubd, 1 3656 3658 3657 3659 … … 4195 4197 IEMIMPL_MEDIA_OPT_F3 vphaddw 4196 4198 IEMIMPL_MEDIA_OPT_F3 vphaddd 4199 IEMIMPL_MEDIA_OPT_F3 vphsubw 4200 IEMIMPL_MEDIA_OPT_F3 vphsubd 4197 4201 4198 4202 -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r96048 r96049 12555 12555 12556 12556 /* 12557 * PHSUBW / VPHSUBW / PHSUBD / VPHSUBD 12558 */ 12559 IEM_DECL_IMPL_DEF(void, iemAImpl_phsubw_u64_fallback,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc)) 12560 { 12561 RTUINT64U uSrc1 = { *puDst }; 12562 RTUINT64U uSrc2 = { *puSrc }; 12563 RTUINT64U uDst = { 0 }; /* Shut up MSVC. */ 12564 12565 uDst.ai16[0] = uSrc1.ai16[0] - uSrc1.ai16[1]; 12566 uDst.ai16[1] = uSrc1.ai16[2] - uSrc1.ai16[3]; 12567 uDst.ai16[2] = uSrc2.ai16[0] - uSrc2.ai16[1]; 12568 uDst.ai16[3] = uSrc2.ai16[2] - uSrc2.ai16[3]; 12569 *puDst = uDst.u; 12570 RT_NOREF(pFpuState); 12571 } 12572 12573 12574 IEM_DECL_IMPL_DEF(void, iemAImpl_phsubw_u128_fallback,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc)) 12575 { 12576 RTUINT128U uSrc1 = *puDst; 12577 12578 puDst->ai16[0] = uSrc1.ai16[0] - uSrc1.ai16[1]; 12579 puDst->ai16[1] = uSrc1.ai16[2] - uSrc1.ai16[3]; 12580 puDst->ai16[2] = uSrc1.ai16[4] - uSrc1.ai16[5]; 12581 puDst->ai16[3] = uSrc1.ai16[6] - uSrc1.ai16[7]; 12582 12583 puDst->ai16[4] = puSrc->ai16[0] - puSrc->ai16[1]; 12584 puDst->ai16[5] = puSrc->ai16[2] - puSrc->ai16[3]; 12585 puDst->ai16[6] = puSrc->ai16[4] - puSrc->ai16[5]; 12586 puDst->ai16[7] = puSrc->ai16[6] - puSrc->ai16[7]; 12587 RT_NOREF(pFpuState); 12588 } 12589 12590 12591 IEM_DECL_IMPL_DEF(void, iemAImpl_phsubd_u64_fallback,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc)) 12592 { 12593 RTUINT64U uSrc1 = { *puDst }; 12594 RTUINT64U uSrc2 = { *puSrc }; 12595 RTUINT64U uDst = { 0 }; /* Shut up MSVC. */ 12596 12597 uDst.ai32[0] = uSrc1.ai32[0] - uSrc1.ai32[1]; 12598 uDst.ai32[1] = uSrc2.ai32[0] - uSrc2.ai32[1]; 12599 *puDst = uDst.u; 12600 RT_NOREF(pFpuState); 12601 } 12602 12603 12604 IEM_DECL_IMPL_DEF(void, iemAImpl_phsubd_u128_fallback,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc)) 12605 { 12606 RTUINT128U uSrc1 = *puDst; 12607 12608 puDst->ai32[0] = uSrc1.ai32[0] - uSrc1.ai32[1]; 12609 puDst->ai32[1] = uSrc1.ai32[2] - uSrc1.ai32[3]; 12610 12611 puDst->ai32[2] = puSrc->ai32[0] - puSrc->ai32[1]; 12612 puDst->ai32[3] = puSrc->ai32[2] - puSrc->ai32[3]; 12613 RT_NOREF(pFpuState); 12614 } 12615 12616 12617 IEM_DECL_IMPL_DEF(void, iemAImpl_vphsubw_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2)) 12618 { 12619 RTUINT128U uDst; /* puDst can be the same as one of the source operands. */ 12620 12621 uDst.ai16[0] = puSrc1->ai16[0] - puSrc1->ai16[1]; 12622 uDst.ai16[1] = puSrc1->ai16[2] - puSrc1->ai16[3]; 12623 uDst.ai16[2] = puSrc1->ai16[4] - puSrc1->ai16[5]; 12624 uDst.ai16[3] = puSrc1->ai16[6] - puSrc1->ai16[7]; 12625 12626 uDst.ai16[4] = puSrc2->ai16[0] - puSrc2->ai16[1]; 12627 uDst.ai16[5] = puSrc2->ai16[2] - puSrc2->ai16[3]; 12628 uDst.ai16[6] = puSrc2->ai16[4] - puSrc2->ai16[5]; 12629 uDst.ai16[7] = puSrc2->ai16[6] - puSrc2->ai16[7]; 12630 12631 puDst->au64[0] = uDst.au64[0]; 12632 puDst->au64[1] = uDst.au64[1]; 12633 } 12634 12635 12636 IEM_DECL_IMPL_DEF(void, iemAImpl_vphsubw_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 12637 { 12638 RTUINT256U uDst; /* puDst can be the same as one of the source operands. */ 12639 12640 uDst.ai16[ 0] = puSrc1->ai16[ 0] - puSrc1->ai16[ 1]; 12641 uDst.ai16[ 1] = puSrc1->ai16[ 2] - puSrc1->ai16[ 3]; 12642 uDst.ai16[ 2] = puSrc1->ai16[ 4] - puSrc1->ai16[ 5]; 12643 uDst.ai16[ 3] = puSrc1->ai16[ 6] - puSrc1->ai16[ 7]; 12644 uDst.ai16[ 4] = puSrc2->ai16[ 0] - puSrc2->ai16[ 1]; 12645 uDst.ai16[ 5] = puSrc2->ai16[ 2] - puSrc2->ai16[ 3]; 12646 uDst.ai16[ 6] = puSrc2->ai16[ 4] - puSrc2->ai16[ 5]; 12647 uDst.ai16[ 7] = puSrc2->ai16[ 6] - puSrc2->ai16[ 7]; 12648 12649 uDst.ai16[ 8] = puSrc1->ai16[ 8] - puSrc1->ai16[ 9]; 12650 uDst.ai16[ 9] = puSrc1->ai16[10] - puSrc1->ai16[11]; 12651 uDst.ai16[10] = puSrc1->ai16[12] - puSrc1->ai16[13]; 12652 uDst.ai16[11] = puSrc1->ai16[14] - puSrc1->ai16[15]; 12653 uDst.ai16[12] = puSrc2->ai16[ 8] - puSrc2->ai16[ 9]; 12654 uDst.ai16[13] = puSrc2->ai16[10] - puSrc2->ai16[11]; 12655 uDst.ai16[14] = puSrc2->ai16[12] - puSrc2->ai16[13]; 12656 uDst.ai16[15] = puSrc2->ai16[14] - puSrc2->ai16[15]; 12657 12658 puDst->au64[0] = uDst.au64[0]; 12659 puDst->au64[1] = uDst.au64[1]; 12660 puDst->au64[2] = uDst.au64[2]; 12661 puDst->au64[3] = uDst.au64[3]; 12662 } 12663 12664 12665 IEM_DECL_IMPL_DEF(void, iemAImpl_vphsubd_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2)) 12666 { 12667 RTUINT128U uDst; /* puDst can be the same as one of the source operands. */ 12668 12669 uDst.ai32[0] = puSrc1->ai32[0] - puSrc1->ai32[1]; 12670 uDst.ai32[1] = puSrc1->ai32[2] - puSrc1->ai32[3]; 12671 12672 uDst.ai32[2] = puSrc2->ai32[0] - puSrc2->ai32[1]; 12673 uDst.ai32[3] = puSrc2->ai32[2] - puSrc2->ai32[3]; 12674 12675 puDst->au64[0] = uDst.au64[0]; 12676 puDst->au64[1] = uDst.au64[1]; 12677 } 12678 12679 12680 IEM_DECL_IMPL_DEF(void, iemAImpl_vphsubd_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2)) 12681 { 12682 RTUINT256U uDst; /* puDst can be the same as one of the source operands. */ 12683 12684 uDst.ai32[0] = puSrc1->ai32[ 0] - puSrc1->ai32[ 1]; 12685 uDst.ai32[1] = puSrc1->ai32[ 2] - puSrc1->ai32[ 3]; 12686 uDst.ai32[2] = puSrc2->ai32[ 0] - puSrc2->ai32[ 1]; 12687 uDst.ai32[3] = puSrc2->ai32[ 2] - puSrc2->ai32[ 3]; 12688 12689 uDst.ai32[4] = puSrc1->ai32[ 4] - puSrc1->ai32[ 5]; 12690 uDst.ai32[5] = puSrc1->ai32[ 6] - puSrc1->ai32[ 7]; 12691 uDst.ai32[6] = puSrc2->ai32[ 4] - puSrc2->ai32[ 5]; 12692 uDst.ai32[7] = puSrc2->ai32[ 6] - puSrc2->ai32[ 7]; 12693 12694 puDst->au64[0] = uDst.au64[0]; 12695 puDst->au64[1] = uDst.au64[1]; 12696 puDst->au64[2] = uDst.au64[2]; 12697 puDst->au64[3] = uDst.au64[3]; 12698 } 12699 12700 12701 /* 12557 12702 * CRC32 (SEE 4.2). 12558 12703 */ -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsThree0f38.cpp.h
r96046 r96049 325 325 /** Opcode 0x66 0x0f 0x38 0x04. */ 326 326 FNIEMOP_STUB(iemOp_pmaddubsw_Vx_Wx); 327 328 327 329 /** Opcode 0x0f 0x38 0x05. */ 328 FNIEMOP_STUB(iemOp_phsubw_Pq_Qq); 330 FNIEMOP_DEF(iemOp_phsubw_Pq_Qq) 331 { 332 IEMOP_MNEMONIC2(RM, PHSUBW, phsubw, Pq, Qq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 333 return FNIEMOP_CALL_2(iemOpCommonMmx_FullFull_To_Full_Ex, 334 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_phsubw_u64,&iemAImpl_phsubw_u64_fallback), 335 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSsse3); 336 } 337 338 329 339 /** Opcode 0x66 0x0f 0x38 0x05. */ 330 FNIEMOP_STUB(iemOp_phsubw_Vx_Wx); 340 FNIEMOP_DEF(iemOp_phsubw_Vx_Wx) 341 { 342 IEMOP_MNEMONIC2(RM, PHSUBW, phsubw, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 343 return FNIEMOP_CALL_1(iemOpCommonSsse3_FullFull_To_Full, 344 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_phsubw_u128, iemAImpl_phsubw_u128_fallback)); 345 346 } 347 348 331 349 /** Opcode 0x0f 0x38 0x06. */ 332 FNIEMOP_STUB(iemOp_phsubd_Pq_Qq); 350 FNIEMOP_DEF(iemOp_phsubd_Pq_Qq) 351 { 352 IEMOP_MNEMONIC2(RM, PHSUBD, phsubd, Pq, Qq, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 353 return FNIEMOP_CALL_2(iemOpCommonMmx_FullFull_To_Full_Ex, 354 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_phsubd_u64,&iemAImpl_phsubd_u64_fallback), 355 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSsse3); 356 } 357 358 359 333 360 /** Opcode 0x66 0x0f 0x38 0x06. */ 334 FNIEMOP_STUB(iemOp_phsubdq_Vx_Wx); 361 FNIEMOP_DEF(iemOp_phsubd_Vx_Wx) 362 { 363 IEMOP_MNEMONIC2(RM, PHSUBD, phsubd, Vx, Wx, DISOPTYPE_HARMLESS, IEMOPHINT_IGNORES_OP_SIZES); 364 return FNIEMOP_CALL_1(iemOpCommonSsse3_FullFull_To_Full, 365 IEM_SELECT_HOST_OR_FALLBACK(fSsse3, iemAImpl_phsubd_u128, iemAImpl_phsubd_u128_fallback)); 366 367 } 368 369 335 370 /** Opcode 0x0f 0x38 0x07. */ 336 371 FNIEMOP_STUB(iemOp_phsubsw_Pq_Qq); … … 1369 1404 /* 0x04 */ iemOp_pmaddubsw_Pq_Qq, iemOp_pmaddubsw_Vx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1370 1405 /* 0x05 */ iemOp_phsubw_Pq_Qq, iemOp_phsubw_Vx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1371 /* 0x06 */ iemOp_phsubd_Pq_Qq, iemOp_phsubd q_Vx_Wx,iemOp_InvalidNeedRM, iemOp_InvalidNeedRM,1406 /* 0x06 */ iemOp_phsubd_Pq_Qq, iemOp_phsubd_Vx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1372 1407 /* 0x07 */ iemOp_phsubsw_Pq_Qq, iemOp_phsubsw_Vx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1373 1408 /* 0x08 */ iemOp_psignb_Pq_Qq, iemOp_psignb_Vx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsVexMap2.cpp.h
r96046 r96049 67 67 FNIEMOP_STUB(iemOp_vpmaddubsw_Vx_Hx_Wx); 68 68 /* Opcode VEX.0F38 0x05 - invalid. */ 69 70 69 71 /** Opcode VEX.66.0F38 0x05. */ 70 FNIEMOP_STUB(iemOp_vphsubw_Vx_Hx_Wx); 72 FNIEMOP_DEF(iemOp_vphsubw_Vx_Hx_Wx) 73 { 74 IEMOP_MNEMONIC3(VEX_RVM, VPHSUBW, vphsubw, Vx, Hx, Wx, DISOPTYPE_HARMLESS, 0); 75 IEMOPMEDIAOPTF3_INIT_VARS(vphsubw); 76 return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx_Opt, IEM_SELECT_HOST_OR_FALLBACK(fAvx2, &s_Host, &s_Fallback)); 77 } 78 79 71 80 /* Opcode VEX.0F38 0x06 - invalid. */ 81 82 72 83 /** Opcode VEX.66.0F38 0x06. */ 73 FNIEMOP_STUB(iemOp_vphsubdq_Vx_Hx_Wx); 84 FNIEMOP_DEF(iemOp_vphsubd_Vx_Hx_Wx) 85 { 86 IEMOP_MNEMONIC3(VEX_RVM, VPHSUBD, vphsubd, Vx, Hx, Wx, DISOPTYPE_HARMLESS, 0); 87 IEMOPMEDIAOPTF3_INIT_VARS(vphsubd); 88 return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx_Opt, IEM_SELECT_HOST_OR_FALLBACK(fAvx2, &s_Host, &s_Fallback)); 89 } 90 91 74 92 /* Opcode VEX.0F38 0x07 - invalid. */ 75 93 /** Opcode VEX.66.0F38 0x07. */ … … 1544 1562 /* 0x04 */ iemOp_InvalidNeedRM, iemOp_vpmaddubsw_Vx_Hx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1545 1563 /* 0x05 */ iemOp_InvalidNeedRM, iemOp_vphsubw_Vx_Hx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1546 /* 0x06 */ iemOp_InvalidNeedRM, iemOp_vphsubd q_Vx_Hx_Wx,iemOp_InvalidNeedRM, iemOp_InvalidNeedRM,1564 /* 0x06 */ iemOp_InvalidNeedRM, iemOp_vphsubd_Vx_Hx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1547 1565 /* 0x07 */ iemOp_InvalidNeedRM, iemOp_vphsubsw_Vx_Hx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, 1548 1566 /* 0x08 */ iemOp_InvalidNeedRM, iemOp_vpsignb_Vx_Hx_Wx, iemOp_InvalidNeedRM, iemOp_InvalidNeedRM, -
trunk/src/VBox/VMM/include/IEMInternal.h
r96046 r96049 1789 1789 FNIEMAIMPLMEDIAF2U64 iemAImpl_phaddw_u64, iemAImpl_phaddw_u64_fallback; 1790 1790 FNIEMAIMPLMEDIAF2U64 iemAImpl_phaddd_u64, iemAImpl_phaddd_u64_fallback; 1791 FNIEMAIMPLMEDIAF2U64 iemAImpl_phsubw_u64, iemAImpl_phsubw_u64_fallback; 1792 FNIEMAIMPLMEDIAF2U64 iemAImpl_phsubd_u64, iemAImpl_phsubd_u64_fallback; 1791 1793 FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_psllw_u64, iemAImpl_psrlw_u64, iemAImpl_psraw_u64; 1792 1794 FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_pslld_u64, iemAImpl_psrld_u64, iemAImpl_psrad_u64; … … 1835 1837 FNIEMAIMPLMEDIAF2U128 iemAImpl_phaddw_u128, iemAImpl_phaddw_u128_fallback; 1836 1838 FNIEMAIMPLMEDIAF2U128 iemAImpl_phaddd_u128, iemAImpl_phaddd_u128_fallback; 1839 FNIEMAIMPLMEDIAF2U128 iemAImpl_phsubw_u128, iemAImpl_phsubw_u128_fallback; 1840 FNIEMAIMPLMEDIAF2U128 iemAImpl_phsubd_u128, iemAImpl_phsubd_u128_fallback; 1837 1841 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packsswb_u128, iemAImpl_packuswb_u128; 1838 1842 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packssdw_u128, iemAImpl_packusdw_u128; … … 1891 1895 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphaddw_u128, iemAImpl_vphaddw_u128_fallback; 1892 1896 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphaddd_u128, iemAImpl_vphaddd_u128_fallback; 1897 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphsubw_u128, iemAImpl_vphsubw_u128_fallback; 1898 FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphsubd_u128, iemAImpl_vphsubd_u128_fallback; 1893 1899 1894 1900 FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vpabsb_u128, iemAImpl_vpabsb_u128_fallback; … … 1944 1950 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphaddw_u256, iemAImpl_vphaddw_u256_fallback; 1945 1951 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphaddd_u256, iemAImpl_vphaddd_u256_fallback; 1952 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphsubw_u256, iemAImpl_vphsubw_u256_fallback; 1953 FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphsubd_u256, iemAImpl_vphsubd_u256_fallback; 1946 1954 1947 1955 FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsb_u256, iemAImpl_vpabsb_u256_fallback;
Note:
See TracChangeset
for help on using the changeset viewer.