VirtualBox

Changeset 104021 in vbox for trunk


Ignore:
Timestamp:
Mar 24, 2024 4:27:34 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162409
Message:

VMM/IEM: Implement native emitters for IEM_MC_CALL_AVX_AIMPL_2() and IEM_MC_CALL_AVX_AIMPL_3(), bugref:10614

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

Legend:

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

    r104019 r104021  
    29932993    'IEM_MC_CALL_AIMPL_3':                                       (McBlock.parseMcCallAImpl,         True,  True,  True,  ),
    29942994    'IEM_MC_CALL_AIMPL_4':                                       (McBlock.parseMcCallAImpl,         True,  True,  True,  ),
    2995     'IEM_MC_CALL_AVX_AIMPL_2':                                   (McBlock.parseMcCallAvxAImpl,      True,  True,  False, ),
    2996     'IEM_MC_CALL_AVX_AIMPL_3':                                   (McBlock.parseMcCallAvxAImpl,      True,  True,  False, ),
     2995    'IEM_MC_CALL_AVX_AIMPL_2':                                   (McBlock.parseMcCallAvxAImpl,      True,  True,  g_fNativeSimd),
     2996    'IEM_MC_CALL_AVX_AIMPL_3':                                   (McBlock.parseMcCallAvxAImpl,      True,  True,  g_fNativeSimd),
    29972997    'IEM_MC_CALL_CIMPL_0':                                       (McBlock.parseMcCallCImpl,         True,  True,  False, ),
    29982998    'IEM_MC_CALL_CIMPL_1':                                       (McBlock.parseMcCallCImpl,         True,  True,  False, ),
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8vePython.py

    r104019 r104021  
    388388                    #
    389389                    asCallParams = oStmt.asParams[oStmt.idxParams:];
    390                     if oStmt.sName.startswith('IEM_MC_CALL_AVX_AIMPL_'):
    391                         asCallParams.insert(0, 'pXState');
    392390                    for sParam in asCallParams:
    393391                        oVarInfo = dVars.get(sParam);
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs.h

    r104019 r104021  
    84648464    return iemNativeEmitCallSseAImplCommon(pReNative, off, pfnAImpl, 3);
    84658465}
     8466
     8467
     8468/*********************************************************************************************************************************
     8469*   Emitters for IEM_MC_CALL_AVX_AIMPL_XXX                                                                                       *
     8470*********************************************************************************************************************************/
     8471
     8472/**
     8473 * Common worker for IEM_MC_CALL_AVX_AIMPL_XXX.
     8474 */
     8475DECL_INLINE_THROW(uint32_t)
     8476iemNativeEmitCallAvxAImplCommon(PIEMRECOMPILERSTATE pReNative, uint32_t off, uintptr_t pfnAImpl, uint8_t cArgs)
     8477{
     8478    /*
     8479     * Need to do the FPU preparation.
     8480     */
     8481    off = iemNativeEmitPrepareFpuForUse(pReNative, off, true /*fForChange*/);
     8482
     8483    /*
     8484     * Do all the call setup and cleanup.
     8485     */
     8486    off = iemNativeEmitCallCommon(pReNative, off, cArgs + IEM_AVX_AIMPL_HIDDEN_ARGS, IEM_AVX_AIMPL_HIDDEN_ARGS);
     8487
     8488    /*
     8489     * Load the XState pointer.
     8490     */
     8491    off = iemNativeEmitLeaGprByGstRegRef(pReNative, off, IEMNATIVE_CALL_ARG0_GREG, kIemNativeGstRegRef_XState, 0 /*idxRegInClass*/);
     8492
     8493    /*
     8494     * Make the call.
     8495     */
     8496    off = iemNativeEmitCallImm(pReNative, off, pfnAImpl);
     8497
     8498    return off;
     8499}
     8500
     8501
     8502#define IEM_MC_CALL_AVX_AIMPL_2(a_pfnAImpl, a0, a1) \
     8503    off = iemNativeEmitCallAvxAImpl2(pReNative, off, (uintptr_t)(a_pfnAImpl), (a0), (a1))
     8504
     8505/** Emits code for IEM_MC_CALL_AVX_AIMPL_2. */
     8506DECL_INLINE_THROW(uint32_t)
     8507iemNativeEmitCallAvxAImpl2(PIEMRECOMPILERSTATE pReNative, uint32_t off, uintptr_t pfnAImpl, uint8_t idxArg0, uint8_t idxArg1)
     8508{
     8509    IEMNATIVE_ASSERT_ARG_VAR_IDX(pReNative, idxArg0, 0 + IEM_AVX_AIMPL_HIDDEN_ARGS);
     8510    IEMNATIVE_ASSERT_ARG_VAR_IDX(pReNative, idxArg1, 1 + IEM_AVX_AIMPL_HIDDEN_ARGS);
     8511    return iemNativeEmitCallAvxAImplCommon(pReNative, off, pfnAImpl, 2);
     8512}
     8513
     8514
     8515#define IEM_MC_CALL_AVX_AIMPL_3(a_pfnAImpl, a0, a1, a2) \
     8516    off = iemNativeEmitCallAvxAImpl3(pReNative, off, (uintptr_t)(a_pfnAImpl), (a0), (a1), (a2))
     8517
     8518/** Emits code for IEM_MC_CALL_AVX_AIMPL_3. */
     8519DECL_INLINE_THROW(uint32_t)
     8520iemNativeEmitCallAvxAImpl3(PIEMRECOMPILERSTATE pReNative, uint32_t off, uintptr_t pfnAImpl, uint8_t idxArg0, uint8_t idxArg1, uint8_t idxArg2)
     8521{
     8522    IEMNATIVE_ASSERT_ARG_VAR_IDX(pReNative, idxArg0, 0 + IEM_AVX_AIMPL_HIDDEN_ARGS);
     8523    IEMNATIVE_ASSERT_ARG_VAR_IDX(pReNative, idxArg1, 1 + IEM_AVX_AIMPL_HIDDEN_ARGS);
     8524    IEMNATIVE_ASSERT_ARG_VAR_IDX(pReNative, idxArg2, 2 + IEM_AVX_AIMPL_HIDDEN_ARGS);
     8525    return iemNativeEmitCallAvxAImplCommon(pReNative, off, pfnAImpl, 3);
     8526}
    84668527#endif /* IEMNATIVE_WITH_SIMD_REG_ALLOCATOR */
    84678528
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdPython.py

    r104019 r104021  
    19741974                    self.dsCImplFlags['IEM_CIMPL_F_CALLS_CIMPL'] = True;
    19751975                elif (   oStmt.sName.startswith('IEM_MC_CALL_VOID_AIMPL_')
    1976                       or oStmt.sName.startswith('IEM_MC_CALL_AIMPL_')
    1977                       or oStmt.sName.startswith('IEM_MC_CALL_AVX_AIMPL_')):
     1976                      or oStmt.sName.startswith('IEM_MC_CALL_AIMPL_')):
    19781977                    self.dsCImplFlags['IEM_CIMPL_F_CALLS_AIMPL'] = True;
    19791978                elif (   oStmt.sName.startswith('IEM_MC_CALL_SSE_AIMPL_')
  • trunk/src/VBox/VMM/include/IEMN8veRecompiler.h

    r104019 r104021  
    19431943/** Number of hidden arguments for SSE_AIMPL calls. */
    19441944# define IEM_SSE_AIMPL_HIDDEN_ARGS 1
     1945/** Number of hidden arguments for AVX_AIMPL calls. */
     1946# define IEM_AVX_AIMPL_HIDDEN_ARGS 1
    19451947#endif
    19461948
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette