VirtualBox

Changeset 97785 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Dec 12, 2022 5:54:29 PM (2 years ago)
Author:
vboxsync
Message:

IEM: Fixed/added C implementation stubs for RSQRTxx/ROUNDxx.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r97782 r97785  
    1557315573
    1557415574
     15575#ifdef IEM_WITHOUT_ASSEMBLY
     15576/**
     15577 * RSQRTPS
     15578 */
     15579static uint32_t iemAImpl_rsqrt_worker(PRTFLOAT32U pr32Res, uint32_t fMxcsr, PCRTFLOAT32U pr32Val)
     15580{
     15581    RT_NOREF(pr32Res);
     15582    RT_NOREF(pr32Val);
     15583    AssertReleaseFailed();
     15584    return fMxcsr;
     15585}
     15586
     15587
     15588IEM_DECL_IMPL_DEF(void, iemAImpl_rsqrtps_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     15589{
     15590    RT_NOREF(puSrc1);
     15591
     15592    pResult->MXCSR  = iemAImpl_rsqrt_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, &puSrc2->ar32[0]);
     15593    pResult->MXCSR |= iemAImpl_rsqrt_worker(&pResult->uResult.ar32[1], pFpuState->MXCSR, &puSrc2->ar32[1]);
     15594    pResult->MXCSR |= iemAImpl_rsqrt_worker(&pResult->uResult.ar32[2], pFpuState->MXCSR, &puSrc2->ar32[2]);
     15595    pResult->MXCSR |= iemAImpl_rsqrt_worker(&pResult->uResult.ar32[3], pFpuState->MXCSR, &puSrc2->ar32[3]);
     15596}
     15597
     15598
     15599/**
     15600 * RSQRTSS
     15601 */
     15602IEM_DECL_IMPL_DEF(void, iemAImpl_rsqrtss_u128_r32,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2))
     15603{
     15604    pResult->MXCSR = iemAImpl_rsqrt_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, pr32Src2);
     15605    pResult->uResult.ar32[1] = puSrc1->ar32[1];
     15606    pResult->uResult.ar32[2] = puSrc1->ar32[2];
     15607    pResult->uResult.ar32[3] = puSrc1->ar32[3];
     15608}
     15609#endif
     15610
     15611
    1557515612/**
    1557615613 * ADDSUBPS
     
    1713517172
    1713617173
    17137 IEM_DECL_IMPL_DEF(void, iemAImpl_roundss_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))
     17174#ifdef IEM_WITHOUT_ASSEMBLY
     17175IEM_DECL_IMPL_DEF(void, iemAImpl_roundss_u128,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))
    1713817176{
    1713917177    puDst->ar32[0] = iemAImpl_round_worker_r32(pfMxcsr, &pSrc->uSrc2.ar32[0], bImm & 0x7);
     
    1714317181
    1714417182
    17145 IEM_DECL_IMPL_DEF(void, iemAImpl_roundsd_u128_fallback,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))
     17183IEM_DECL_IMPL_DEF(void, iemAImpl_roundsd_u128,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC pSrc, uint8_t bImm))
    1714617184{
    1714717185    puDst->ar64[0] = iemAImpl_round_worker_r64(pfMxcsr, &pSrc->uSrc2.ar64[0], bImm & 0x7);
    1714817186    puDst->au64[1] = pSrc->uSrc1.au64[1];
    1714917187}
     17188#endif
    1715017189
    1715117190
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette