VirtualBox

Changeset 105214 in vbox


Ignore:
Timestamp:
Jul 9, 2024 8:27:57 AM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement vsubps instruction emulation, bugref:9898

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

Legend:

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

    r105212 r105214  
    1611516115
    1611616116/**
    16117  * SUBPS
    16118  */
    16119 #ifdef IEM_WITHOUT_ASSEMBLY
     16117 * [V]SUBPS
     16118 */
    1612016119static uint32_t iemAImpl_subps_u128_worker(PRTFLOAT32U pr32Res, uint32_t fMxcsr, PCRTFLOAT32U pr32Val1, PCRTFLOAT32U pr32Val2)
    1612116120{
     
    1613116130}
    1613216131
    16133 
     16132#ifdef IEM_WITHOUT_ASSEMBLY
    1613416133IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_subps_u128,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
    1613516134{
     
    1614016139}
    1614116140#endif
     16141
     16142
     16143IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vsubps_u128_fallback,(uint32_t uMxCsrIn, PX86XMMREG pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2))
     16144{
     16145    return   iemAImpl_subps_u128_worker(&pResult->ar32[0], uMxCsrIn, &puSrc1->ar32[0], &puSrc2->ar32[0])
     16146           | iemAImpl_subps_u128_worker(&pResult->ar32[1], uMxCsrIn, &puSrc1->ar32[1], &puSrc2->ar32[1])
     16147           | iemAImpl_subps_u128_worker(&pResult->ar32[2], uMxCsrIn, &puSrc1->ar32[2], &puSrc2->ar32[2])
     16148           | iemAImpl_subps_u128_worker(&pResult->ar32[3], uMxCsrIn, &puSrc1->ar32[3], &puSrc2->ar32[3]);
     16149}
     16150
     16151
     16152IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_vsubps_u256_fallback,(uint32_t uMxCsrIn, PX86YMMREG pResult, PCX86YMMREG puSrc1, PCX86YMMREG puSrc2))
     16153{
     16154    return   iemAImpl_subps_u128_worker(&pResult->ar32[0], uMxCsrIn, &puSrc1->ar32[0], &puSrc2->ar32[0])
     16155           | iemAImpl_subps_u128_worker(&pResult->ar32[1], uMxCsrIn, &puSrc1->ar32[1], &puSrc2->ar32[1])
     16156           | iemAImpl_subps_u128_worker(&pResult->ar32[2], uMxCsrIn, &puSrc1->ar32[2], &puSrc2->ar32[2])
     16157           | iemAImpl_subps_u128_worker(&pResult->ar32[3], uMxCsrIn, &puSrc1->ar32[3], &puSrc2->ar32[3])
     16158           | iemAImpl_subps_u128_worker(&pResult->ar32[4], uMxCsrIn, &puSrc1->ar32[4], &puSrc2->ar32[4])
     16159           | iemAImpl_subps_u128_worker(&pResult->ar32[5], uMxCsrIn, &puSrc1->ar32[5], &puSrc2->ar32[5])
     16160           | iemAImpl_subps_u128_worker(&pResult->ar32[6], uMxCsrIn, &puSrc1->ar32[6], &puSrc2->ar32[6])
     16161           | iemAImpl_subps_u128_worker(&pResult->ar32[7], uMxCsrIn, &puSrc1->ar32[7], &puSrc2->ar32[7]);
     16162}
    1614216163
    1614316164
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstVexMap1.cpp.h

    r105212 r105214  
    29492949/*  Opcode VEX.F2.0F 0x5b - invalid */
    29502950
     2951
    29512952/** Opcode VEX.0F 0x5c - vsubps Vps, Hps, Wps */
    2952 FNIEMOP_STUB(iemOp_vsubps_Vps_Hps_Wps);
     2953FNIEMOP_DEF(iemOp_vsubps_Vps_Hps_Wps)
     2954{
     2955    IEMOP_MNEMONIC3(VEX_RVM, VSUBPS, vsubps, Vps, Hps, Wps, DISOPTYPE_HARMLESS | DISOPTYPE_X86_AVX, 0);
     2956    IEMOPMEDIAF3_INIT_VARS(          vsubps);
     2957    return FNIEMOP_CALL_1(iemOpCommonAvxAvx2_Vx_Hx_Wx, IEM_SELECT_HOST_OR_FALLBACK(fAvx, &s_Host, &s_Fallback));
     2958}
     2959
     2960
    29532961/** Opcode VEX.66.0F 0x5c - vsubpd Vpd, Hpd, Wpd */
    29542962FNIEMOP_STUB(iemOp_vsubpd_Vpd_Hpd_Wpd);
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r105212 r105214  
    45594559FNIEMAIMPLFPAVXF3U128 iemAImpl_vmulps_u128, iemAImpl_vmulps_u128_fallback;
    45604560FNIEMAIMPLFPAVXF3U128 iemAImpl_vmulpd_u128, iemAImpl_vmulpd_u128_fallback;
    4561 FNIEMAIMPLFPAVXF3U128 iemAImpl_vsubps_u128, iemAImpl_vsubps_u128_fallback;
     4561FNIEMAIMPLMEDIAF3U128 iemAImpl_vsubps_u128, iemAImpl_vsubps_u128_fallback;
    45624562FNIEMAIMPLFPAVXF3U128 iemAImpl_vsubpd_u128, iemAImpl_vsubpd_u128_fallback;
    45634563FNIEMAIMPLFPAVXF3U128 iemAImpl_vminps_u128, iemAImpl_vminps_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