VirtualBox

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


Ignore:
Timestamp:
Mar 15, 2024 11:56:15 AM (9 months ago)
Author:
vboxsync
Message:

VMM/IEM: Implement native emitter for IEM_MC_CALL_SSE_AIMPL_2()/IEM_MC_CALL_SSE_AIMPL_3(), bugref:10614

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py

    r103863 r103865  
    29872987    'IEM_MC_CALL_MMX_AIMPL_2':                                   (McBlock.parseMcCallMmxAImpl,      True,  True,  False, ),
    29882988    'IEM_MC_CALL_MMX_AIMPL_3':                                   (McBlock.parseMcCallMmxAImpl,      True,  True,  False, ),
    2989     'IEM_MC_CALL_SSE_AIMPL_2':                                   (McBlock.parseMcCallSseAImpl,      True,  True,  False, ),
    2990     'IEM_MC_CALL_SSE_AIMPL_3':                                   (McBlock.parseMcCallSseAImpl,      True,  True,  False, ),
     2989    'IEM_MC_CALL_SSE_AIMPL_2':                                   (McBlock.parseMcCallSseAImpl,      True,  True,  g_fNativeSimd),
     2990    'IEM_MC_CALL_SSE_AIMPL_3':                                   (McBlock.parseMcCallSseAImpl,      True,  True,  g_fNativeSimd),
    29912991    'IEM_MC_CALL_VOID_AIMPL_0':                                  (McBlock.parseMcCallVoidAImpl,     True,  True,  True,  ),
    29922992    'IEM_MC_CALL_VOID_AIMPL_1':                                  (McBlock.parseMcCallVoidAImpl,     True,  True,  True,  ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h

    r103861 r103865  
    74787478}
    74797479
     7480
     7481
     7482/*********************************************************************************************************************************
     7483*   Emitters for IEM_MC_CALL_SSE_AIMPL_XXX                                                                                       *
     7484*********************************************************************************************************************************/
     7485
     7486/**
     7487 * Common worker for IEM_MC_CALL_SSE_AIMPL_XXX.
     7488 */
     7489DECL_INLINE_THROW(uint32_t)
     7490iemNativeEmitCallSseAImplCommon(PIEMRECOMPILERSTATE pReNative, uint32_t off, uintptr_t pfnAImpl, uint8_t cArgs)
     7491{
     7492    /*
     7493     * Need to do the FPU preparation.
     7494     */
     7495    off = iemNativeEmitPrepareFpuForUse(pReNative, off, true /*fForChange*/);
     7496
     7497    /*
     7498     * Do all the call setup and cleanup.
     7499     */
     7500    off = iemNativeEmitCallCommon(pReNative, off, cArgs + IEM_SSE_AIMPL_HIDDEN_ARGS, IEM_SSE_AIMPL_HIDDEN_ARGS);
     7501
     7502    /*
     7503     * Load the XState::x87 pointer.
     7504     */
     7505    off = iemNativeEmitLeaGprByGstRegRef(pReNative, off, IEMNATIVE_CALL_ARG0_GREG, kIemNativeGstRegRef_X87, 0 /*idxRegInClass*/);
     7506
     7507    /*
     7508     * Make the call.
     7509     */
     7510    off = iemNativeEmitCallImm(pReNative, off, pfnAImpl);
     7511
     7512    return off;
     7513}
     7514
     7515
     7516
     7517#define IEM_MC_CALL_SSE_AIMPL_2(a_pfnAImpl, a0, a1) \
     7518    off = iemNativeEmitCallSseAImplCommon(pReNative, off, (uintptr_t)(a_pfnAImpl), 2)
     7519
     7520#define IEM_MC_CALL_SSE_AIMPL_3(a_pfnAImpl, a0, a1, a3) \
     7521    off = iemNativeEmitCallSseAImplCommon(pReNative, off, (uintptr_t)(a_pfnAImpl), 3)
    74807522#endif /* IEMNATIVE_WITH_SIMD_REG_ALLOCATOR */
    74817523
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp

    r103860 r103865  
    33563356    AssertStmt(   enmType != kIemNativeFixupType_RelImm14At5
    33573357               || pReNative->paLabels[idxLabel].enmType >= kIemNativeLabelType_FirstWithMultipleInstances
    3358                || pReNative->paLabels[idxLabel].off != UINT32_MAX,
     3358               || pReNative->paLabels[idxLabel].off == UINT32_MAX,
    33593359               IEMNATIVE_DO_LONGJMP(pReNative, VERR_IEM_FIXUP_SHORT_JMP_TO_TAIL_LABEL));
    33603360#endif
     
    76927692 * Emits code to load a reference to the given guest register into @a idxGprDst.
    76937693  */
    7694 DECL_INLINE_THROW(uint32_t)
     7694DECL_HIDDEN_THROW(uint32_t)
    76957695iemNativeEmitLeaGprByGstRegRef(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxGprDst,
    76967696                               IEMNATIVEGSTREGREF enmClass, uint8_t idxRegInClass)
     
    77417741            Assert(idxRegInClass < 16);
    77427742            offCpumCtx = RT_UOFFSETOF_DYN(CPUMCTX, XState.x87.aXMM[idxRegInClass]);
     7743            break;
     7744
     7745        case kIemNativeGstRegRef_X87: /* Not a register actually but we would just duplicate code otherwise. */
     7746            Assert(idxRegInClass == 0);
     7747            offCpumCtx = RT_UOFFSETOF(CPUMCTX, XState.x87);
     7748            break;
     7749
     7750        case kIemNativeGstRegRef_XState: /* Not a register actually but we would just duplicate code otherwise. */
     7751            Assert(idxRegInClass == 0);
     7752            offCpumCtx = RT_UOFFSETOF(CPUMCTX, XState);
    77437753            break;
    77447754
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