VirtualBox

Changeset 105253 in vbox


Ignore:
Timestamp:
Jul 10, 2024 8:29:28 AM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement instruction emulation for vrcpps, vrcpss, bugref:9898

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r105252 r105253  
    1722017220
    1722117221/**
    17222  * RCPPS
    17223  */
    17224 #ifdef IEM_WITHOUT_ASSEMBLY
     17222 * [V]RCPPS
     17223 */
    1722517224static uint32_t iemAImpl_rcp_worker(PRTFLOAT32U pr32Res, uint32_t fMxcsr, PCRTFLOAT32U pr32Val)
    1722617225{
     
    1724217241
    1724317242
     17243#ifdef IEM_WITHOUT_ASSEMBLY
    1724417244IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_rcpps_u128,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
    1724517245{
     
    1725117251           | iemAImpl_rcp_worker(&pResult->ar32[3], uMxCsrIn, &puSrc2->ar32[3]);
    1725217252}
     17253#endif
     17254
     17255
     17256IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vrcpps_u128_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc))
     17257{
     17258    return   iemAImpl_rcp_worker(&pResult->ar32[0], uMxCsrIn, &puSrc->ar32[0])
     17259           | iemAImpl_rcp_worker(&pResult->ar32[1], uMxCsrIn, &puSrc->ar32[1])
     17260           | iemAImpl_rcp_worker(&pResult->ar32[2], uMxCsrIn, &puSrc->ar32[2])
     17261           | iemAImpl_rcp_worker(&pResult->ar32[3], uMxCsrIn, &puSrc->ar32[3]);
     17262}
     17263
     17264
     17265IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vrcpps_u256_fallback,(uint32_t uMxCsrIn, PX86YMMREG pResult, PCX86YMMREG puSrc))
     17266{
     17267    return   iemAImpl_rcp_worker(&pResult->ar32[0], uMxCsrIn, &puSrc->ar32[0])
     17268           | iemAImpl_rcp_worker(&pResult->ar32[1], uMxCsrIn, &puSrc->ar32[1])
     17269           | iemAImpl_rcp_worker(&pResult->ar32[2], uMxCsrIn, &puSrc->ar32[2])
     17270           | iemAImpl_rcp_worker(&pResult->ar32[3], uMxCsrIn, &puSrc->ar32[3])
     17271           | iemAImpl_rcp_worker(&pResult->ar32[4], uMxCsrIn, &puSrc->ar32[4])
     17272           | iemAImpl_rcp_worker(&pResult->ar32[5], uMxCsrIn, &puSrc->ar32[5])
     17273           | iemAImpl_rcp_worker(&pResult->ar32[6], uMxCsrIn, &puSrc->ar32[6])
     17274           | iemAImpl_rcp_worker(&pResult->ar32[7], uMxCsrIn, &puSrc->ar32[7]);
     17275}
    1725317276
    1725417277
    1725517278/**
    17256  * RCPSS
    17257  */
     17279 * [V]RCPSS
     17280 */
     17281#ifdef IEM_WITHOUT_ASSEMBLY
    1725817282IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_rcpss_u128_r32,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2))
    1725917283{
     
    1726417288}
    1726517289#endif
     17290
     17291
     17292IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vrcpss_u128_r32_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2))
     17293{
     17294    pResult->ar32[1] = puSrc1->ar32[1];
     17295    pResult->ar32[2] = puSrc1->ar32[2];
     17296    pResult->ar32[3] = puSrc1->ar32[3];
     17297    return iemAImpl_rcp_worker(&pResult->ar32[0], uMxCsrIn, pr32Src2);
     17298}
    1726617299
    1726717300
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap1.cpp.h

    r105252 r105253  
    30093009/*  Opcode VEX.F2.0F 0x52 - invalid */
    30103010
     3011
    30113012/** Opcode VEX.0F 0x53 - vrcpps Vps, Wps */
    3012 FNIEMOP_STUB(iemOp_vrcpps_Vps_Wps);
     3013FNIEMOP_DEF(iemOp_vrcpps_Vps_Wps)
     3014{
     3015    IEMOP_MNEMONIC2(VEX_RM, VRCPPS, vrcpps, Vps, Wps, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3016    IEMOPMEDIAF2_INIT_VARS(         vrcpps);
     3017    return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Wx, IEM_SELECT_HOST_OR_FALLBACK(fAvx, &s_Host, &s_Fallback));
     3018}
     3019
     3020
    30133021/*  Opcode VEX.66.0F 0x53 - invalid */
     3022
     3023
    30143024/** Opcode VEX.F3.0F 0x53 - vrcpss Vss, Hss, Wss */
    3015 FNIEMOP_STUB(iemOp_vrcpss_Vss_Hss_Wss);
     3025FNIEMOP_DEF(iemOp_vrcpss_Vss_Hss_Wss)
     3026{
     3027    IEMOP_MNEMONIC3(VEX_RVM, VRCPSS, vrcpss, Vps, Hps, Wss, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3028    return FNIEMOP_CALL_1(iemOpCommonAvx_Vx_Hx_R32,
     3029                          IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vrcpss_u128_r32, iemAImpl_vrcpss_u128_r32_fallback));
     3030}
     3031
     3032
    30163033/*  Opcode VEX.F2.0F 0x53 - invalid */
    30173034
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r105252 r105253  
    46134613FNIEMAIMPLMEDIAF2U128 iemAImpl_vsqrtpd_u128, iemAImpl_vsqrtpd_u128_fallback;
    46144614FNIEMAIMPLMEDIAF2U128 iemAImpl_vrsqrtps_u128,  iemAImpl_vrsqrtps_u128_fallback;
     4615FNIEMAIMPLMEDIAF2U128 iemAImpl_vrcpps_u128,    iemAImpl_vrcpps_u128_fallback;
    46154616FNIEMAIMPLMEDIAF3U128 iemAImpl_vaddsubps_u128, iemAImpl_vaddsubps_u128_fallback;
    46164617FNIEMAIMPLMEDIAF3U128 iemAImpl_vaddsubpd_u128, iemAImpl_vaddsubpd_u128_fallback;
     
    46334634FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vsqrtsd_u128_r64, iemAImpl_vsqrtsd_u128_r64_fallback;
    46344635FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vrsqrtss_u128_r32, iemAImpl_vrsqrtss_u128_r32_fallback;
     4636FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vrcpss_u128_r32,   iemAImpl_vrcpss_u128_r32_fallback;
    46354637
    46364638FNIEMAIMPLFPAVXF3U256 iemAImpl_vaddps_u256, iemAImpl_vaddps_u256_fallback;
     
    46574659FNIEMAIMPLMEDIAF2U256 iemAImpl_vsqrtpd_u256, iemAImpl_vsqrtpd_u256_fallback;
    46584660FNIEMAIMPLMEDIAF2U256 iemAImpl_vrsqrtps_u256,  iemAImpl_vrsqrtps_u256_fallback;
     4661FNIEMAIMPLMEDIAF2U256 iemAImpl_vrcpps_u256,    iemAImpl_vrcpps_u256_fallback;
    46594662/** @} */
    46604663
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