Changeset 94612 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 15, 2022 1:10:57 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r94608 r94612 4830 4830 else 4831 4831 { 4832 iExponent += RTFLOAT80U_EXP_BIAS_ UNDERFLOW_ADJUST;4832 iExponent += RTFLOAT80U_EXP_BIAS_ADJUST; 4833 4833 fFsw |= X86_FSW_ES | X86_FSW_B; 4834 4834 } … … 4971 4971 4972 4972 4973 /** Worker for iemAImpl_fmul_r80_by_r80. */ 4974 static uint16_t iemAImpl_fmul_f80_r80_worker(PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2, PRTFLOAT80U pr80Result, 4975 uint16_t fFcw, uint16_t fFsw, PCRTFLOAT80U pr80Val1Org) 4976 { 4977 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_FCW(fFcw); 4978 extFloat80_t r80XResult = extF80_mul(iemFpuSoftF80FromIprt(pr80Val1), iemFpuSoftF80FromIprt(pr80Val2), &SoftState); 4979 return iemFpuSoftStateAndF80ToFswAndIprtResult(&SoftState, r80XResult, pr80Result, fFcw, fFsw, pr80Val1Org); 4980 } 4981 4982 4973 4983 IEM_DECL_IMPL_DEF(void, iemAImpl_fmul_r80_by_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, 4974 4984 PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2)) 4975 4985 { 4976 RT_NOREF(pFpuState, pFpuRes, pr80Val1, pr80Val2); 4977 AssertReleaseFailed(); 4986 uint16_t const fFcw = pFpuState->FCW; 4987 uint16_t fFsw = (pFpuState->FSW & (X86_FSW_C0 | X86_FSW_C2 | X86_FSW_C3)) | (6 << X86_FSW_TOP_SHIFT); 4988 4989 /* SoftFloat does not check for Pseudo-Infinity, Pseudo-Nan and Unnormals. */ 4990 if (RTFLOAT80U_IS_387_INVALID(pr80Val1) || RTFLOAT80U_IS_387_INVALID(pr80Val2)) 4991 { 4992 if (fFcw & X86_FCW_IM) 4993 pFpuRes->r80Result = g_r80Indefinite; 4994 else 4995 { 4996 pFpuRes->r80Result = *pr80Val1; 4997 fFsw |= X86_FSW_ES | X86_FSW_B; 4998 } 4999 fFsw |= X86_FSW_IE; 5000 } 5001 /* SoftFloat does not check for denormals and certainly not report them to us. NaNs trumps denormals. */ 5002 else if ( (RTFLOAT80U_IS_DENORMAL_OR_PSEUDO_DENORMAL(pr80Val1) && !RTFLOAT80U_IS_NAN(pr80Val2)) 5003 || (RTFLOAT80U_IS_DENORMAL_OR_PSEUDO_DENORMAL(pr80Val2) && !RTFLOAT80U_IS_NAN(pr80Val1)) ) 5004 { 5005 if (fFcw & X86_FCW_DM) 5006 { 5007 PCRTFLOAT80U const pr80Val1Org = pr80Val1; 5008 IEM_NORMALIZE_PSEUDO_DENORMAL(pr80Val1, r80Val1Normalized); 5009 IEM_NORMALIZE_PSEUDO_DENORMAL(pr80Val2, r80Val2Normalized); 5010 fFsw = iemAImpl_fmul_f80_r80_worker(pr80Val1, pr80Val2, &pFpuRes->r80Result, fFcw, fFsw, pr80Val1Org); 5011 } 5012 else 5013 { 5014 pFpuRes->r80Result = *pr80Val1; 5015 fFsw |= X86_FSW_ES | X86_FSW_B; 5016 } 5017 fFsw |= X86_FSW_DE; 5018 } 5019 /* SoftFloat can handle the rest: */ 5020 else 5021 fFsw = iemAImpl_fmul_f80_r80_worker(pr80Val1, pr80Val2, &pFpuRes->r80Result, fFcw, fFsw, pr80Val1); 5022 5023 pFpuRes->FSW = fFsw; 4978 5024 } 4979 5025 … … 5133 5179 5134 5180 5135 /** Worker for iemAImpl_fsub_r80_by_r80 . */5181 /** Worker for iemAImpl_fsub_r80_by_r80 and iemAImpl_fsubr_r80_by_r80. */ 5136 5182 static uint16_t iemAImpl_fsub_f80_r80_worker(PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2, PRTFLOAT80U pr80Result, 5137 5183 uint16_t fFcw, uint16_t fFsw, PCRTFLOAT80U pr80Val1Org)
Note:
See TracChangeset
for help on using the changeset viewer.