Changeset 98132 in vbox
- Timestamp:
- Jan 19, 2023 9:28:51 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155302
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r98103 r98132 14393 14393 } 14394 14394 14395 14396 #ifdef IEM_WITHOUT_ASSEMBLY14397 14395 /** 14398 14396 * Converts from the packed IPRT 32-bit (single precision) floating point format to … … 14790 14788 return false; 14791 14789 } 14792 #endif14793 14790 14794 14791 … … 17132 17129 static RTFLOAT32U iemAImpl_round_worker_r32(uint32_t *pfMxcsr, PCRTFLOAT32U pr32Src, uint8_t bImm) 17133 17130 { 17134 RTFLOAT32U r32Dst;17135 17136 AssertReleaseFailed();17137 17131 RT_NOREF(bImm); 17138 RT_NOREF(pfMxcsr); 17139 r32Dst = *pr32Src; 17132 RTFLOAT32U r32Src, r32Dst; 17133 float32_t f32Src; 17134 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(*pfMxcsr); 17135 17136 iemSsePrepareValueR32(&r32Src, *pfMxcsr, pr32Src); 17137 f32Src = f32_roundToInt(iemFpSoftF32FromIprt(&r32Src), SoftState.roundingMode, true/*exact*/, &SoftState); 17138 17139 iemFpSoftF32ToIprt(&r32Dst, f32Src); 17140 17140 return r32Dst; 17141 17141 } 17142 17142 17143 17144 17143 static RTFLOAT64U iemAImpl_round_worker_r64(uint32_t *pfMxcsr, PCRTFLOAT64U pr64Src, uint8_t bImm) 17145 17144 { 17146 RTFLOAT64U r64Dst;17147 17148 AssertReleaseFailed();17149 17145 RT_NOREF(bImm); 17150 RT_NOREF(pfMxcsr); 17151 r64Dst = *pr64Src; 17146 RTFLOAT64U r64Src, r64Dst; 17147 float64_t f64Src; 17148 softfloat_state_t SoftState = IEM_SOFTFLOAT_STATE_INITIALIZER_FROM_MXCSR(*pfMxcsr); 17149 17150 iemSsePrepareValueR64(&r64Src, *pfMxcsr, pr64Src); 17151 f64Src = f64_roundToInt(iemFpSoftF64FromIprt(&r64Src), SoftState.roundingMode, true/*exact*/, &SoftState); 17152 17153 iemFpSoftF64ToIprt(&r64Dst, f64Src); 17152 17154 return r64Dst; 17153 17155 } 17154 17155 17156 IEM_DECL_IMPL_DEF(void, iemAImpl_roundps_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))17157 {17158 for (uint8_t i = 0; i < RT_ELEMENTS(puDst->ar32); i++)17159 {17160 puDst->ar32[i] = iemAImpl_round_worker_r32(pfMxcsr, &pSrc->uSrc2.ar32[i], bImm & 0x7);17161 }17162 }17163 17164 17165 IEM_DECL_IMPL_DEF(void, iemAImpl_roundpd_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))17166 {17167 for (uint8_t i = 0; i < RT_ELEMENTS(puDst->ar64); i++)17168 {17169 puDst->ar64[i] = iemAImpl_round_worker_r64(pfMxcsr, &pSrc->uSrc2.ar64[i], bImm & 0x7);17170 }17171 }17172 17173 17156 17174 17157 #ifdef IEM_WITHOUT_ASSEMBLY … … 17188 17171 #endif 17189 17172 17173 IEM_DECL_IMPL_DEF(void, iemAImpl_roundps_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm)) 17174 { 17175 for (uint8_t i = 0; i < RT_ELEMENTS(puDst->ar32); i++) 17176 { 17177 puDst->ar32[i] = iemAImpl_round_worker_r32(pfMxcsr, &pSrc->uSrc2.ar32[i], bImm & 0x7); 17178 } 17179 } 17180 17181 17182 IEM_DECL_IMPL_DEF(void, iemAImpl_roundpd_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm)) 17183 { 17184 for (uint8_t i = 0; i < RT_ELEMENTS(puDst->ar64); i++) 17185 { 17186 puDst->ar64[i] = iemAImpl_round_worker_r64(pfMxcsr, &pSrc->uSrc2.ar64[i], bImm & 0x7); 17187 } 17188 } 17190 17189 17191 17190 /**
Note:
See TracChangeset
for help on using the changeset viewer.