VirtualBox

Changeset 105224 in vbox


Ignore:
Timestamp:
Jul 9, 2024 9:48:25 AM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement vmin{ps,pd,ss,sd} instruction emulations, bugref:9898

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/vm.h

    r105177 r105224  
    159159        struct IEMCPU       s;
    160160#endif
    161         uint8_t             padding[  113600    /* The common base size. */
     161        uint8_t             padding[  129982    /* The common base size. */
    162162#ifdef RT_ARCH_AMD64
    163163                                    + 32768     /* For 256 entries per TLBs. */
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r105223 r105224  
    1631516315
    1631616316/**
    16317  * MINPS
    16318  */
    16319 #ifdef IEM_WITHOUT_ASSEMBLY
     16317 * [V]MINPS
     16318 */
    1632016319static uint32_t iemAImpl_minps_u128_worker(PRTFLOAT32U pr32Res, uint32_t fMxcsr, PCRTFLOAT32U pr32Val1, PCRTFLOAT32U pr32Val2)
    1632116320{
     
    1634616345
    1634716346
     16347#ifdef IEM_WITHOUT_ASSEMBLY
    1634816348IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_minps_u128,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
    1634916349{
     
    1635616356
    1635716357
     16358IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminps_u128_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     16359{
     16360    return   iemAImpl_minps_u128_worker(&pResult->ar32[0], uMxCsrIn, &puSrc1->ar32[0], &puSrc2->ar32[0])
     16361           | iemAImpl_minps_u128_worker(&pResult->ar32[1], uMxCsrIn, &puSrc1->ar32[1], &puSrc2->ar32[1])
     16362           | iemAImpl_minps_u128_worker(&pResult->ar32[2], uMxCsrIn, &puSrc1->ar32[2], &puSrc2->ar32[2])
     16363           | iemAImpl_minps_u128_worker(&pResult->ar32[3], uMxCsrIn, &puSrc1->ar32[3], &puSrc2->ar32[3]);
     16364}
     16365
     16366
     16367IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminps_u256_fallback,(uint32_t uMxCsrIn, PX86YMMREG pResult, PCX86YMMREG puSrc1, PCX86YMMREG puSrc2))
     16368{
     16369    return   iemAImpl_minps_u128_worker(&pResult->ar32[0], uMxCsrIn, &puSrc1->ar32[0], &puSrc2->ar32[0])
     16370           | iemAImpl_minps_u128_worker(&pResult->ar32[1], uMxCsrIn, &puSrc1->ar32[1], &puSrc2->ar32[1])
     16371           | iemAImpl_minps_u128_worker(&pResult->ar32[2], uMxCsrIn, &puSrc1->ar32[2], &puSrc2->ar32[2])
     16372           | iemAImpl_minps_u128_worker(&pResult->ar32[3], uMxCsrIn, &puSrc1->ar32[3], &puSrc2->ar32[3])
     16373           | iemAImpl_minps_u128_worker(&pResult->ar32[4], uMxCsrIn, &puSrc1->ar32[4], &puSrc2->ar32[4])
     16374           | iemAImpl_minps_u128_worker(&pResult->ar32[5], uMxCsrIn, &puSrc1->ar32[5], &puSrc2->ar32[5])
     16375           | iemAImpl_minps_u128_worker(&pResult->ar32[6], uMxCsrIn, &puSrc1->ar32[6], &puSrc2->ar32[6])
     16376           | iemAImpl_minps_u128_worker(&pResult->ar32[7], uMxCsrIn, &puSrc1->ar32[7], &puSrc2->ar32[7]);
     16377}
     16378
     16379
    1635816380/**
    16359  * MINSS
     16381 * [V]MINSS
    1636016382 */
    1636116383#ifdef IEM_WITHOUT_ASSEMBLY
     
    1637016392
    1637116393
     16394IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminss_u128_r32_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2))
     16395{
     16396    pResult->ar32[1] = puSrc1->ar32[1];
     16397    pResult->ar32[2] = puSrc1->ar32[2];
     16398    pResult->ar32[3] = puSrc1->ar32[3];
     16399    return iemAImpl_minps_u128_worker(&pResult->ar32[0], uMxCsrIn, &puSrc1->ar32[0], pr32Src2);
     16400}
     16401
     16402
    1637216403/**
    16373  * MINPD
    16374  */
    16375 #ifdef IEM_WITHOUT_ASSEMBLY
     16404 * [V]MINPD
     16405 */
    1637616406static uint32_t iemAImpl_minpd_u128_worker(PRTFLOAT64U pr64Res, uint32_t fMxcsr, PCRTFLOAT64U pr64Val1, PCRTFLOAT64U pr64Val2)
    1637716407{
     
    1640216432
    1640316433
     16434#ifdef IEM_WITHOUT_ASSEMBLY
    1640416435IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_minpd_u128,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
    1640516436{
     
    1641016441
    1641116442
     16443IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminpd_u128_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     16444{
     16445    return   iemAImpl_minpd_u128_worker(&pResult->ar64[0], uMxCsrIn, &puSrc1->ar64[0], &puSrc2->ar64[0])
     16446           | iemAImpl_minpd_u128_worker(&pResult->ar64[1], uMxCsrIn, &puSrc1->ar64[1], &puSrc2->ar64[1]);
     16447}
     16448
     16449
     16450IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminpd_u256_fallback,(uint32_t uMxCsrIn, PX86YMMREG pResult, PCX86YMMREG puSrc1, PCX86YMMREG puSrc2))
     16451{
     16452    return   iemAImpl_minpd_u128_worker(&pResult->ar64[0], uMxCsrIn, &puSrc1->ar64[0], &puSrc2->ar64[0])
     16453           | iemAImpl_minpd_u128_worker(&pResult->ar64[1], uMxCsrIn, &puSrc1->ar64[1], &puSrc2->ar64[1])
     16454           | iemAImpl_minpd_u128_worker(&pResult->ar64[2], uMxCsrIn, &puSrc1->ar64[2], &puSrc2->ar64[2])
     16455           | iemAImpl_minpd_u128_worker(&pResult->ar64[3], uMxCsrIn, &puSrc1->ar64[3], &puSrc2->ar64[3])
     16456           | iemAImpl_minpd_u128_worker(&pResult->ar64[4], uMxCsrIn, &puSrc1->ar64[4], &puSrc2->ar64[4])
     16457           | iemAImpl_minpd_u128_worker(&pResult->ar64[5], uMxCsrIn, &puSrc1->ar64[5], &puSrc2->ar64[5])
     16458           | iemAImpl_minpd_u128_worker(&pResult->ar64[6], uMxCsrIn, &puSrc1->ar64[6], &puSrc2->ar64[6])
     16459           | iemAImpl_minpd_u128_worker(&pResult->ar64[7], uMxCsrIn, &puSrc1->ar64[7], &puSrc2->ar64[7]);
     16460}
     16461
     16462
    1641216463/**
    16413  * MINSD
     16464 * [V]MINSD
    1641416465 */
    1641516466#ifdef IEM_WITHOUT_ASSEMBLY
     
    1642016471}
    1642116472#endif
     16473
     16474
     16475IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vminsd_u128_r64_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCRTFLOAT64U pr64Src2))
     16476{
     16477    pResult->ar64[1] = puSrc1->ar64[1];
     16478    return iemAImpl_minpd_u128_worker(&pResult->ar64[0], uMxCsrIn, &puSrc1->ar64[0], pr64Src2);
     16479}
    1642216480
    1642316481
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap1.cpp.h

    r105223 r105224  
    30853085
    30863086/** Opcode VEX.0F 0x5d - vminps Vps, Hps, Wps */
    3087 FNIEMOP_STUB(iemOp_vminps_Vps_Hps_Wps);
     3087FNIEMOP_DEF(iemOp_vminps_Vps_Hps_Wps)
     3088{
     3089    IEMOP_MNEMONIC3(VEX_RVM, VMINPS, vminps, Vps, Hps, Wps, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3090    IEMOPMEDIAF3_INIT_VARS(          vminps);
     3091    return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx, IEM_SELECT_HOST_OR_FALLBACK(fAvx, &s_Host, &s_Fallback));
     3092}
     3093
     3094
    30883095/** Opcode VEX.66.0F 0x5d - vminpd Vpd, Hpd, Wpd */
    3089 FNIEMOP_STUB(iemOp_vminpd_Vpd_Hpd_Wpd);
     3096FNIEMOP_DEF(iemOp_vminpd_Vpd_Hpd_Wpd)
     3097{
     3098    IEMOP_MNEMONIC3(VEX_RVM, VMINPD, vminpd, Vpd, Hpd, Wpd, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3099    IEMOPMEDIAF3_INIT_VARS(          vminpd);
     3100    return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx, IEM_SELECT_HOST_OR_FALLBACK(fAvx, &s_Host, &s_Fallback));
     3101}
     3102
     3103
    30903104/** Opcode VEX.F3.0F 0x5d - vminss Vss, Hss, Wss */
    3091 FNIEMOP_STUB(iemOp_vminss_Vss_Hss_Wss);
     3105FNIEMOP_DEF(iemOp_vminss_Vss_Hss_Wss)
     3106{
     3107    IEMOP_MNEMONIC3(VEX_RVM, VMINSS, vminss, Vps, Hps, Wss, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3108    return FNIEMOP_CALL_1(iemOpCommonAvx_Vx_Hx_R32,
     3109                          IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vminss_u128_r32, iemAImpl_vminss_u128_r32_fallback));
     3110}
     3111
     3112
    30923113/** Opcode VEX.F2.0F 0x5d - vminsd Vsd, Hsd, Wsd */
    3093 FNIEMOP_STUB(iemOp_vminsd_Vsd_Hsd_Wsd);
     3114FNIEMOP_DEF(iemOp_vminsd_Vsd_Hsd_Wsd)
     3115{
     3116    IEMOP_MNEMONIC3(VEX_RVM, VMINSD, vminsd, Vpd, Hpd, Wsd, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     3117    return FNIEMOP_CALL_1(iemOpCommonAvx_Vx_Hx_R64,
     3118                          IEM_SELECT_HOST_OR_FALLBACK(fAvx, iemAImpl_vminsd_u128_r64, iemAImpl_vminsd_u128_r64_fallback));
     3119}
     3120
    30943121
    30953122/** Opcode VEX.0F 0x5e - vdivps Vps, Hps, Wps */
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r105220 r105224  
    45614561FNIEMAIMPLMEDIAF3U128 iemAImpl_vsubps_u128, iemAImpl_vsubps_u128_fallback;
    45624562FNIEMAIMPLMEDIAF3U128 iemAImpl_vsubpd_u128, iemAImpl_vsubpd_u128_fallback;
    4563 FNIEMAIMPLFPAVXF3U128 iemAImpl_vminps_u128, iemAImpl_vminps_u128_fallback;
    4564 FNIEMAIMPLFPAVXF3U128 iemAImpl_vminpd_u128, iemAImpl_vminpd_u128_fallback;
     4563FNIEMAIMPLMEDIAF3U128 iemAImpl_vminps_u128, iemAImpl_vminps_u128_fallback;
     4564FNIEMAIMPLMEDIAF3U128 iemAImpl_vminpd_u128, iemAImpl_vminpd_u128_fallback;
    45654565FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivps_u128, iemAImpl_vdivps_u128_fallback;
    45664566FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivpd_u128, iemAImpl_vdivpd_u128_fallback;
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