VirtualBox

Changeset 96392 in vbox


Ignore:
Timestamp:
Aug 22, 2022 8:01:49 AM (2 years ago)
Author:
vboxsync
Message:

VMM/IEM: Implement addsubps/addsubpd instructions, bugref:9898

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm

    r96384 r96392  
    46344634IEMIMPL_FP_F2 hsubps, 3
    46354635IEMIMPL_FP_F2 hsubpd, 3
     4636IEMIMPL_FP_F2 addsubps, 3
     4637IEMIMPL_FP_F2 addsubpd, 3
     4638
    46364639
    46374640;;
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r96384 r96392  
    1497514975}
    1497614976#endif
     14977
     14978
     14979/**
     14980 * ADDSUBPS
     14981 */
     14982#ifdef IEM_WITHOUT_ASSEMBLY
     14983IEM_DECL_IMPL_DEF(void, iemAImpl_addsubps_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     14984{
     14985    RT_NOREF(puSrc1);
     14986
     14987    pResult->MXCSR  = iemAImpl_subps_u128_worker(&pResult->uResult.ar32[0], pFpuState->MXCSR, &puSrc1->ar32[0], &puSrc2->ar32[0]);
     14988    pResult->MXCSR |= iemAImpl_addps_u128_worker(&pResult->uResult.ar32[1], pFpuState->MXCSR, &puSrc1->ar32[1], &puSrc2->ar32[1]);
     14989    pResult->MXCSR |= iemAImpl_subps_u128_worker(&pResult->uResult.ar32[2], pFpuState->MXCSR, &puSrc1->ar32[2], &puSrc2->ar32[2]);
     14990    pResult->MXCSR |= iemAImpl_addps_u128_worker(&pResult->uResult.ar32[3], pFpuState->MXCSR, &puSrc1->ar32[3], &puSrc2->ar32[3]);
     14991}
     14992#endif
     14993
     14994
     14995/**
     14996 * ADDSUBPD
     14997 */
     14998#ifdef IEM_WITHOUT_ASSEMBLY
     14999IEM_DECL_IMPL_DEF(void, iemAImpl_addsubpd_u128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     15000{
     15001    RT_NOREF(puSrc1);
     15002
     15003    pResult->MXCSR  = iemAImpl_subpd_u128_worker(&pResult->uResult.ar64[0], pFpuState->MXCSR, &puSrc1->ar64[0], &puSrc2->ar64[0]);
     15004    pResult->MXCSR |= iemAImpl_addpd_u128_worker(&pResult->uResult.ar64[1], pFpuState->MXCSR, &puSrc1->ar64[1], &puSrc2->ar64[1]);
     15005}
     15006#endif
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h

    r96384 r96392  
    1033910339
    1034010340/*  Opcode      0x0f 0xd0 - invalid */
     10341
     10342
    1034110343/** Opcode 0x66 0x0f 0xd0 - addsubpd Vpd, Wpd */
    10342 FNIEMOP_STUB(iemOp_addsubpd_Vpd_Wpd);
     10344FNIEMOP_DEF(iemOp_addsubpd_Vpd_Wpd)
     10345{
     10346    IEMOP_MNEMONIC2(RM, ADDSUBPD, addsubpd, Vpd, Wpd, DISOPTYPE_HARMLESS, 0);
     10347    return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_addsubpd_u128);
     10348}
     10349
     10350
    1034310351/*  Opcode 0xf3 0x0f 0xd0 - invalid */
     10352
     10353
    1034410354/** Opcode 0xf2 0x0f 0xd0 - addsubps Vps, Wps */
    10345 FNIEMOP_STUB(iemOp_addsubps_Vps_Wps);
     10355FNIEMOP_DEF(iemOp_addsubps_Vps_Wps)
     10356{
     10357    IEMOP_MNEMONIC2(RM, ADDSUBPS, addsubps, Vps, Wps, DISOPTYPE_HARMLESS, 0);
     10358    return FNIEMOP_CALL_1(iemOpCommonSse3Fp_FullFull_To_Full, iemAImpl_addsubps_u128);
     10359}
     10360
     10361
    1034610362
    1034710363/** Opcode      0x0f 0xd1 - psrlw Pq, Qq */
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r96384 r96392  
    24442444FNIEMAIMPLFPSSEF2U128 iemAImpl_sqrtps_u128;
    24452445FNIEMAIMPLFPSSEF2U128 iemAImpl_sqrtpd_u128;
     2446FNIEMAIMPLFPSSEF2U128 iemAImpl_addsubps_u128;
     2447FNIEMAIMPLFPSSEF2U128 iemAImpl_addsubpd_u128;
    24462448
    24472449FNIEMAIMPLFPSSEF2U128R32 iemAImpl_addss_u128_r32;
     
    24802482FNIEMAIMPLFPAVXF3U128 iemAImpl_vsqrtps_u128, iemAImpl_vsqrtps_u128_fallback;
    24812483FNIEMAIMPLFPAVXF3U128 iemAImpl_vsqrtpd_u128, iemAImpl_vsqrtpd_u128_fallback;
     2484FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddsubps_u128, iemAImpl_vaddsubps_u128_fallback;
     2485FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddsubpd_u128, iemAImpl_vaddsubpd_u128_fallback;
    24822486
    24832487FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vaddss_u128_r32, iemAImpl_vaddss_u128_r32_fallback;
     
    25122516FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubps_u256, iemAImpl_vhsubps_u256_fallback;
    25132517FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubpd_u256, iemAImpl_vhsubpd_u256_fallback;
     2518FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddsubps_u256, iemAImpl_vhaddsubps_u256_fallback;
     2519FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddsubpd_u256, iemAImpl_vhaddsubpd_u256_fallback;
    25142520/** @} */
    25152521
  • trunk/src/VBox/VMM/testcase/tstIEMCheckMc.cpp

    r96384 r96392  
    480480#define iemAImpl_sqrtps_u128            NULL
    481481#define iemAImpl_sqrtpd_u128            NULL
     482#define iemAImpl_addsubps_u128          NULL
     483#define iemAImpl_addsubpd_u128          NULL
    482484
    483485#define iemAImpl_addss_u128_r32         NULL
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