Changeset 96333 in vbox
- Timestamp:
- Aug 19, 2022 11:37:07 AM (2 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r96331 r96333 4593 4593 IEMIMPL_FP_F2 minps 4594 4594 IEMIMPL_FP_F2 minpd 4595 IEMIMPL_FP_F2 divps 4596 IEMIMPL_FP_F2 divpd -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r96331 r96333 453 453 extern const RTFLOAT80U g_ar80One[]; 454 454 extern const RTFLOAT80U g_r80Indefinite; 455 extern const RTFLOAT32U g_ar32Infinity[]; 456 extern const RTFLOAT64U g_ar64Infinity[]; 455 457 extern const RTFLOAT80U g_ar80Infinity[]; 456 458 extern const RTFLOAT128U g_r128Ln2; … … 458 460 extern const RTUINT128U g_u128Ln2MantissaIntel; 459 461 extern const RTFLOAT128U g_ar128F2xm1HornerConsts[]; 462 extern const RTFLOAT32U g_ar32QNaN[]; 463 extern const RTFLOAT64U g_ar64QNaN[]; 460 464 461 465 /** Zero values (indexed by fSign). */ … … 472 476 473 477 /** Infinities (indexed by fSign). */ 478 RTFLOAT32U const g_ar32Infinity[] = { RTFLOAT32U_INIT_INF(0), RTFLOAT32U_INIT_INF(1) }; 479 RTFLOAT64U const g_ar64Infinity[] = { RTFLOAT64U_INIT_INF(0), RTFLOAT64U_INIT_INF(1) }; 474 480 RTFLOAT80U const g_ar80Infinity[] = { RTFLOAT80U_INIT_INF(0), RTFLOAT80U_INIT_INF(1) }; 481 482 /** Default QNaNs (indexed by fSign). */ 483 RTFLOAT32U const g_ar32QNaN[] = { RTFLOAT32U_INIT_QNAN(0), RTFLOAT32U_INIT_QNAN(1) }; 484 RTFLOAT64U const g_ar64QNaN[] = { RTFLOAT64U_INIT_QNAN(0), RTFLOAT64U_INIT_QNAN(1) }; 485 475 486 476 487 #if 0 … … 14384 14395 } 14385 14396 #endif 14397 14398 14399 /** 14400 * DIVPS 14401 */ 14402 #ifdef IEM_WITHOUT_ASSEMBLY 14403 static uint32_t iemAImpl_divps_u128_worker(PRTFLOAT32U pr32Res, uint32_t fMxcsr, PCRTFLOAT32U pr32Val1, PCRTFLOAT32U pr32Val2) 14404 { 14405 if (iemSseBinaryValIsNaNR32(pr32Res, pr32Val1, pr32Val2, &fMxcsr)) 14406 return fMxcsr; 14407 14408 RTFLOAT32U r32Src1, r32Src2; 14409 iemSsePrepareValueR32(&r32Src1, fMxcsr, pr32Val1); 14410 iemSsePrepareValueR32(&r32Src2, fMxcsr, pr32Val2); 14411 14412 if (RTFLOAT32U_IS_ZERO(&r32Src2)) 14413 { 14414 if ( RTFLOAT32U_IS_ZERO(&r32Src1) 14415 || RTFLOAT32U_IS_QUIET_NAN(&r32Src1)) 14416 { 14417 *pr32Res = g_ar32QNaN[1]; 14418 return fMxcsr | X86_MXCSR_IE; 14419 } 14420 else if (RTFLOAT32U_IS_INF(&r32Src1)) 14421 { 14422 *pr32Res = g_ar32Infinity[r32Src1.s.fSign != r32Src2.s.fSign]; 14423 return fMxcsr; 14424 } 14425 else 14426 { 14427 *pr32Res = g_ar32Infinity[r32Src1.s.fSign != r32Src2.s.fSign]; 14428 return fMxcsr | X86_MXCSR_ZE; 14429 } 14430 } 14431 14432 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(fMxcsr); 14433 float32_t r32Result = f32_div(iemFpSoftF32FromIprt(&r32Src1), iemFpSoftF32FromIprt(&r32Src2), &SoftState); 14434 return iemSseSoftStateAndR32ToMxcsrAndIprtResult(&SoftState, r32Result, pr32Res, fMxcsr, &r32Src1, &r32Src2); 14435 } 14436 14437 14438 IEM_DECL_IMPL_DEF(void, iemAImpl_divps_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14439 { 14440 pResult->MXCSR |= iemAImpl_divps_u128_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, &puSrc1->ar32[0], &puSrc2->ar32[0]); 14441 pResult->MXCSR |= iemAImpl_divps_u128_worker(&pResult->uResult.ar32[1], pFpuState->MXCSR, &puSrc1->ar32[1], &puSrc2->ar32[1]); 14442 pResult->MXCSR |= iemAImpl_divps_u128_worker(&pResult->uResult.ar32[2], pFpuState->MXCSR, &puSrc1->ar32[2], &puSrc2->ar32[2]); 14443 pResult->MXCSR |= iemAImpl_divps_u128_worker(&pResult->uResult.ar32[3], pFpuState->MXCSR, &puSrc1->ar32[3], &puSrc2->ar32[3]); 14444 } 14445 #endif 14446 14447 14448 /** 14449 * DIVPD 14450 */ 14451 #ifdef IEM_WITHOUT_ASSEMBLY 14452 static uint32_t iemAImpl_divpd_u128_worker(PRTFLOAT64U pr64Res, uint32_t fMxcsr, PCRTFLOAT64U pr64Val1, PCRTFLOAT64U pr64Val2) 14453 { 14454 if (iemSseBinaryValIsNaNR64(pr64Res, pr64Val1, pr64Val2, &fMxcsr)) 14455 return fMxcsr; 14456 14457 RTFLOAT64U r64Src1, r64Src2; 14458 iemSsePrepareValueR64(&r64Src1, fMxcsr, pr64Val1); 14459 iemSsePrepareValueR64(&r64Src2, fMxcsr, pr64Val2); 14460 14461 if (RTFLOAT64U_IS_ZERO(&r64Src2)) 14462 { 14463 if ( RTFLOAT64U_IS_ZERO(&r64Src1) 14464 || RTFLOAT64U_IS_QUIET_NAN(&r64Src1)) 14465 { 14466 *pr64Res = g_ar64QNaN[1]; 14467 return fMxcsr | X86_MXCSR_IE; 14468 } 14469 else if (RTFLOAT64U_IS_INF(&r64Src1)) 14470 { 14471 *pr64Res = g_ar64Infinity[r64Src1.s.fSign != r64Src2.s.fSign]; 14472 return fMxcsr; 14473 } 14474 else 14475 { 14476 *pr64Res = g_ar64Infinity[r64Src1.s.fSign != r64Src2.s.fSign]; 14477 return fMxcsr | X86_MXCSR_ZE; 14478 } 14479 } 14480 14481 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(fMxcsr); 14482 float64_t r64Result = f64_div(iemFpSoftF64FromIprt(&r64Src1), iemFpSoftF64FromIprt(&r64Src2), &SoftState); 14483 return iemSseSoftStateAndR64ToMxcsrAndIprtResult(&SoftState, r64Result, pr64Res, fMxcsr, &r64Src1, &r64Src2); 14484 } 14485 14486 14487 IEM_DECL_IMPL_DEF(void, iemAImpl_divpd_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2)) 14488 { 14489 pResult->MXCSR |= iemAImpl_divpd_u128_worker(&pResult->uResult.ar64[0], pFpuState->MXCSR, &puSrc1->ar64[0], &puSrc2->ar64[0]); 14490 pResult->MXCSR |= iemAImpl_divpd_u128_worker(&pResult->uResult.ar64[1], pFpuState->MXCSR, &puSrc1->ar64[1], &puSrc2->ar64[1]); 14491 } 14492 #endif -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r96331 r96333 4027 4027 FNIEMOP_STUB(iemOp_minsd_Vsd_Wsd); 4028 4028 4029 4029 4030 /** Opcode 0x0f 0x5e - divps Vps, Wps */ 4030 FNIEMOP_STUB(iemOp_divps_Vps_Wps); 4031 FNIEMOP_DEF(iemOp_divps_Vps_Wps) 4032 { 4033 IEMOP_MNEMONIC2(RM, DIVPS, divps, Vps, Wps, DISOPTYPE_HARMLESS, 0); 4034 return FNIEMOP_CALL_1(iemOpCommonSseFp_FullFull_To_Full, iemAImpl_divps_u128); 4035 } 4036 4037 4031 4038 /** Opcode 0x66 0x0f 0x5e - divpd Vpd, Wpd */ 4032 FNIEMOP_STUB(iemOp_divpd_Vpd_Wpd); 4039 FNIEMOP_DEF(iemOp_divpd_Vpd_Wpd) 4040 { 4041 IEMOP_MNEMONIC2(RM, DIVPD, divpd, Vpd, Wpd, DISOPTYPE_HARMLESS, 0); 4042 return FNIEMOP_CALL_1(iemOpCommonSse2Fp_FullFull_To_Full, iemAImpl_divpd_u128); 4043 } 4044 4045 4033 4046 /** Opcode 0xf3 0x0f 0x5e - divss Vss, Wss */ 4034 4047 FNIEMOP_STUB(iemOp_divss_Vss_Wss); -
trunk/src/VBox/VMM/include/IEMInternal.h
r96331 r96333 2424 2424 FNIEMAIMPLFPSSEF2U128 iemAImpl_minps_u128; 2425 2425 FNIEMAIMPLFPSSEF2U128 iemAImpl_minpd_u128; 2426 FNIEMAIMPLFPSSEF2U128 iemAImpl_divps_u128; 2427 FNIEMAIMPLFPSSEF2U128 iemAImpl_divpd_u128; 2426 2428 2427 2429 FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddps_u128, iemAImpl_vaddps_u128_fallback; … … 2433 2435 FNIEMAIMPLFPAVXF3U128 iemAImpl_vminps_u128, iemAImpl_vminps_u128_fallback; 2434 2436 FNIEMAIMPLFPAVXF3U128 iemAImpl_vminpd_u128, iemAImpl_vminpd_u128_fallback; 2437 FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivps_u128, iemAImpl_vdivps_u128_fallback; 2438 FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivpd_u128, iemAImpl_vdivpd_u128_fallback; 2435 2439 2436 2440 FNIEMAIMPLFPAVXF3U256 iemAImpl_vaddps_u256, iemAImpl_vaddps_u256_fallback; … … 2442 2446 FNIEMAIMPLFPAVXF3U256 iemAImpl_vminps_u256, iemAImpl_vminps_u256_fallback; 2443 2447 FNIEMAIMPLFPAVXF3U256 iemAImpl_vminpd_u256, iemAImpl_vminpd_u256_fallback; 2448 FNIEMAIMPLFPAVXF3U256 iemAImpl_vdivps_u256, iemAImpl_vdivps_u256_fallback; 2449 FNIEMAIMPLFPAVXF3U256 iemAImpl_vdivpd_u256, iemAImpl_vdivpd_u256_fallback; 2444 2450 /** @} */ 2445 2451 -
trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp
r96331 r96333 470 470 #define iemAImpl_minps_u128 NULL 471 471 #define iemAImpl_minpd_u128 NULL 472 #define iemAImpl_divps_u128 NULL 473 #define iemAImpl_divpd_u128 NULL 472 474 473 475 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.