Changeset 96382 in vbox
- Timestamp:
- Aug 20, 2022 7:52:07 PM (2 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r96379 r96382 4597 4597 IEMIMPL_FP_F2 maxps 4598 4598 IEMIMPL_FP_F2 maxpd 4599 IEMIMPL_FP_F2 haddps 4600 IEMIMPL_FP_F2 haddpd 4601 IEMIMPL_FP_F2 hsubps 4602 IEMIMPL_FP_F2 hsubpd 4599 4603 4600 4604 -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r96379 r96382 14759 14759 } 14760 14760 #endif 14761 14762 14763 /** 14764 * HADDPS 14765 */ 14766 #ifdef IEM_WITHOUT_ASSEMBLY 14767 IEM_DECL_IMPL_DEF(void, iemAImpl_haddps_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14768 { 14769 pResult->MXCSR = iemAImpl_addps_u128_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, &puSrc1->ar32[0], &puSrc1->ar32[1]); 14770 pResult->MXCSR |= iemAImpl_addps_u128_worker(&pResult->uResult.ar32[1], pFpuState->MXCSR, &puSrc1->ar32[2], &puSrc1->ar32[3]); 14771 pResult->MXCSR |= iemAImpl_addps_u128_worker(&pResult->uResult.ar32[2], pFpuState->MXCSR, &puSrc2->ar32[0], &puSrc2->ar32[1]); 14772 pResult->MXCSR |= iemAImpl_addps_u128_worker(&pResult->uResult.ar32[3], pFpuState->MXCSR, &puSrc2->ar32[2], &puSrc2->ar32[3]); 14773 } 14774 #endif 14775 14776 14777 /** 14778 * HADDPD 14779 */ 14780 #ifdef IEM_WITHOUT_ASSEMBLY 14781 IEM_DECL_IMPL_DEF(void, iemAImpl_haddpd_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14782 { 14783 pResult->MXCSR = iemAImpl_addpd_u128_worker(&pResult->uResult.ar64[0], pFpuState->MXCSR, &puSrc1->ar64[0], &puSrc1->ar64[1]); 14784 pResult->MXCSR |= iemAImpl_addpd_u128_worker(&pResult->uResult.ar64[1], pFpuState->MXCSR, &puSrc2->ar64[0], &puSrc2->ar64[1]); 14785 } 14786 #endif 14787 14788 14789 /** 14790 * HSUBPS 14791 */ 14792 #ifdef IEM_WITHOUT_ASSEMBLY 14793 IEM_DECL_IMPL_DEF(void, iemAImpl_hsubps_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14794 { 14795 pResult->MXCSR = iemAImpl_subps_u128_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, &puSrc1->ar32[0], &puSrc1->ar32[1]); 14796 pResult->MXCSR |= iemAImpl_subps_u128_worker(&pResult->uResult.ar32[1], pFpuState->MXCSR, &puSrc1->ar32[2], &puSrc1->ar32[3]); 14797 pResult->MXCSR |= iemAImpl_subps_u128_worker(&pResult->uResult.ar32[2], pFpuState->MXCSR, &puSrc2->ar32[0], &puSrc2->ar32[1]); 14798 pResult->MXCSR |= iemAImpl_subps_u128_worker(&pResult->uResult.ar32[3], pFpuState->MXCSR, &puSrc2->ar32[2], &puSrc2->ar32[3]); 14799 } 14800 #endif 14801 14802 14803 /** 14804 * HSUBPD 14805 */ 14806 #ifdef IEM_WITHOUT_ASSEMBLY 14807 IEM_DECL_IMPL_DEF(void, iemAImpl_hsubpd_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14808 { 14809 pResult->MXCSR = iemAImpl_subpd_u128_worker(&pResult->uResult.ar64[0], pFpuState->MXCSR, &puSrc1->ar64[0], &puSrc1->ar64[1]); 14810 pResult->MXCSR |= iemAImpl_subpd_u128_worker(&pResult->uResult.ar64[1], pFpuState->MXCSR, &puSrc2->ar64[0], &puSrc2->ar64[1]); 14811 } 14812 #endif -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r96379 r96382 1049 1049 IEM_MC_REF_XREG_U128(puDst, IEM_GET_MODRM_REG(pVCpu, bRm)); 1050 1050 IEM_MC_CALL_VOID_AIMPL_2(pfnU128, puDst, puSrc); 1051 1052 IEM_MC_ADVANCE_RIP(); 1053 IEM_MC_END(); 1054 } 1055 return VINF_SUCCESS; 1056 } 1057 1058 1059 /** 1060 * Common worker for SSE3 instructions on the forms: 1061 * hxxx xmm1, xmm2/mem128 1062 * 1063 * Proper alignment of the 128-bit operand is enforced. 1064 * Exceptions type 2. SSE3 cpuid checks. 1065 * 1066 * @sa iemOpCommonSse41_FullFull_To_Full, iemOpCommonSse2_FullFull_To_Full 1067 */ 1068 FNIEMOP_DEF_1(iemOpCommonSse3Fp_FullFull_To_Full, PFNIEMAIMPLFPSSEF2U128, pfnU128) 1069 { 1070 uint8_t bRm; IEM_OPCODE_GET_NEXT_U8(&bRm); 1071 if (IEM_IS_MODRM_REG_MODE(bRm)) 1072 { 1073 /* 1074 * Register, register. 1075 */ 1076 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1077 IEM_MC_BEGIN(3, 1); 1078 IEM_MC_LOCAL(IEMSSERESULT, SseRes); 1079 IEM_MC_ARG_LOCAL_REF(PIEMSSERESULT, pSseRes, SseRes, 0); 1080 IEM_MC_ARG(PCX86XMMREG, pSrc1, 1); 1081 IEM_MC_ARG(PCX86XMMREG, pSrc2, 2); 1082 IEM_MC_MAYBE_RAISE_SSE3_RELATED_XCPT(); 1083 IEM_MC_PREPARE_SSE_USAGE(); 1084 IEM_MC_REF_XREG_XMM_CONST(pSrc1, IEM_GET_MODRM_REG(pVCpu, bRm)); 1085 IEM_MC_REF_XREG_XMM_CONST(pSrc2, IEM_GET_MODRM_RM(pVCpu, bRm)); 1086 IEM_MC_CALL_SSE_AIMPL_3(pfnU128, pSseRes, pSrc1, pSrc2); 1087 IEM_MC_STORE_SSE_RESULT(SseRes, IEM_GET_MODRM_REG(pVCpu, bRm)); 1088 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 1089 1090 IEM_MC_ADVANCE_RIP(); 1091 IEM_MC_END(); 1092 } 1093 else 1094 { 1095 /* 1096 * Register, memory. 1097 */ 1098 IEM_MC_BEGIN(3, 2); 1099 IEM_MC_LOCAL(IEMSSERESULT, SseRes); 1100 IEM_MC_LOCAL(X86XMMREG, uSrc2); 1101 IEM_MC_ARG_LOCAL_REF(PIEMSSERESULT, pSseRes, SseRes, 0); 1102 IEM_MC_ARG(PCX86XMMREG, pSrc1, 1); 1103 IEM_MC_ARG_LOCAL_REF(PCX86XMMREG, pSrc2, uSrc2, 2); 1104 IEM_MC_LOCAL(RTGCPTR, GCPtrEffSrc); 1105 1106 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffSrc, bRm, 0); 1107 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); 1108 IEM_MC_MAYBE_RAISE_SSE3_RELATED_XCPT(); 1109 IEM_MC_FETCH_MEM_XMM_ALIGN_SSE(uSrc2, pVCpu->iem.s.iEffSeg, GCPtrEffSrc); 1110 1111 IEM_MC_PREPARE_SSE_USAGE(); 1112 IEM_MC_REF_XREG_XMM_CONST(pSrc1, IEM_GET_MODRM_REG(pVCpu, bRm)); 1113 IEM_MC_CALL_SSE_AIMPL_3(pfnU128, pSseRes, pSrc1, pSrc2); 1114 IEM_MC_STORE_SSE_RESULT(SseRes, IEM_GET_MODRM_REG(pVCpu, bRm)); 1115 IEM_MC_MAYBE_RAISE_SSE_AVX_SIMD_FP_OR_UD_XCPT(); 1051 1116 1052 1117 IEM_MC_ADVANCE_RIP(); … … 5626 5691 5627 5692 /* Opcode 0x0f 0x7c - invalid */ 5693 5694 5628 5695 /** Opcode 0x66 0x0f 0x7c - haddpd Vpd, Wpd */ 5629 FNIEMOP_STUB(iemOp_haddpd_Vpd_Wpd); 5696 FNIEMOP_DEF(iemOp_haddpd_Vpd_Wpd) 5697 { 5698 IEMOP_MNEMONIC2(RM, HADDPD, haddpd, Vpd, Wpd, DISOPTYPE_HARMLESS, 0); 5699 return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_haddpd_u128); 5700 } 5701 5702 5630 5703 /* Opcode 0xf3 0x0f 0x7c - invalid */ 5704 5705 5631 5706 /** Opcode 0xf2 0x0f 0x7c - haddps Vps, Wps */ 5632 FNIEMOP_STUB(iemOp_haddps_Vps_Wps); 5707 FNIEMOP_DEF(iemOp_haddps_Vps_Wps) 5708 { 5709 IEMOP_MNEMONIC2(RM, HADDPS, haddps, Vps, Wps, DISOPTYPE_HARMLESS, 0); 5710 return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_haddps_u128); 5711 } 5712 5633 5713 5634 5714 /* Opcode 0x0f 0x7d - invalid */ 5715 5716 5635 5717 /** Opcode 0x66 0x0f 0x7d - hsubpd Vpd, Wpd */ 5636 FNIEMOP_STUB(iemOp_hsubpd_Vpd_Wpd); 5718 FNIEMOP_DEF(iemOp_hsubpd_Vpd_Wpd) 5719 { 5720 IEMOP_MNEMONIC2(RM, HSUBPD, hsubpd, Vpd, Wpd, DISOPTYPE_HARMLESS, 0); 5721 return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_hsubpd_u128); 5722 } 5723 5724 5637 5725 /* Opcode 0xf3 0x0f 0x7d - invalid */ 5726 5727 5638 5728 /** Opcode 0xf2 0x0f 0x7d - hsubps Vps, Wps */ 5639 FNIEMOP_STUB(iemOp_hsubps_Vps_Wps); 5729 FNIEMOP_DEF(iemOp_hsubps_Vps_Wps) 5730 { 5731 IEMOP_MNEMONIC2(RM, HSUBPS, hsubps, Vps, Wps, DISOPTYPE_HARMLESS, 0); 5732 return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_hsubps_u128); 5733 } 5640 5734 5641 5735 -
trunk/src/VBox/VMM/include/IEMInternal.h
r96379 r96382 2438 2438 FNIEMAIMPLFPSSEF2U128 iemAImpl_maxps_u128; 2439 2439 FNIEMAIMPLFPSSEF2U128 iemAImpl_maxpd_u128; 2440 FNIEMAIMPLFPSSEF2U128 iemAImpl_haddps_u128; 2441 FNIEMAIMPLFPSSEF2U128 iemAImpl_haddpd_u128; 2442 FNIEMAIMPLFPSSEF2U128 iemAImpl_hsubps_u128; 2443 FNIEMAIMPLFPSSEF2U128 iemAImpl_hsubpd_u128; 2440 2444 2441 2445 FNIEMAIMPLFPSSEF2U128R32 iemAImpl_addss_u128_r32; … … 2466 2470 FNIEMAIMPLFPAVXF3U128 iemAImpl_vmaxps_u128, iemAImpl_vmaxps_u128_fallback; 2467 2471 FNIEMAIMPLFPAVXF3U128 iemAImpl_vmaxpd_u128, iemAImpl_vmaxpd_u128_fallback; 2472 FNIEMAIMPLFPAVXF3U128 iemAImpl_vhaddps_u128, iemAImpl_vhaddps_u128_fallback; 2473 FNIEMAIMPLFPAVXF3U128 iemAImpl_vhaddpd_u128, iemAImpl_vhaddpd_u128_fallback; 2474 FNIEMAIMPLFPAVXF3U128 iemAImpl_vhsubps_u128, iemAImpl_vhsubps_u128_fallback; 2475 FNIEMAIMPLFPAVXF3U128 iemAImpl_vhsubpd_u128, iemAImpl_vhsubpd_u128_fallback; 2468 2476 2469 2477 FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vaddss_u128_r32, iemAImpl_vaddss_u128_r32_fallback; … … 2492 2500 FNIEMAIMPLFPAVXF3U256 iemAImpl_vmaxps_u256, iemAImpl_vmaxps_u256_fallback; 2493 2501 FNIEMAIMPLFPAVXF3U256 iemAImpl_vmaxpd_u256, iemAImpl_vmaxpd_u256_fallback; 2502 FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddps_u256, iemAImpl_vhaddps_u256_fallback; 2503 FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddpd_u256, iemAImpl_vhaddpd_u256_fallback; 2504 FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubps_u256, iemAImpl_vhsubps_u256_fallback; 2505 FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubpd_u256, iemAImpl_vhsubpd_u256_fallback; 2494 2506 /** @} */ 2495 2507 -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r96379 r96382 474 474 #define iemAImpl_maxps_u128 NULL 475 475 #define iemAImpl_maxpd_u128 NULL 476 #define iemAImpl_haddps_u128 NULL 477 #define iemAImpl_haddpd_u128 NULL 478 #define iemAImpl_hsubps_u128 NULL 479 #define iemAImpl_hsubpd_u128 NULL 476 480 477 481 #define iemAImpl_addss_u128_r32 NULL
Note:
See TracChangeset
for help on using the changeset viewer.