VirtualBox

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


Ignore:
Timestamp:
Apr 5, 2023 1:04:00 AM (21 months ago)
Author:
vboxsync
Message:

VMM/IEM: More work on processing MC blocks and generating threaded functions from them. bugref:10369

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

Legend:

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

    r99290 r99291  
    340340                elif oNewStmt.sName in ('IEM_MC_ADVANCE_RIP_AND_FINISH', 'IEM_MC_REL_JMP_S8_AND_FINISH',
    341341                                        'IEM_MC_REL_JMP_S16_AND_FINISH', 'IEM_MC_REL_JMP_S32_AND_FINISH'):
     342                    oNewStmt.asParams.append(self.dParamRefs['cbInstr'][0].sNewName);
     343                    if oNewStmt.sName in ('IEM_MC_REL_JMP_S8_AND_FINISH',  'IEM_MC_REL_JMP_S32_AND_FINISH'):
     344                        oNewStmt.asParams.append(self.dParamRefs['pVCpu->iem.s.enmEffOpSize'][0].sNewName);
    342345                    oNewStmt.sName += '_THREADED';
    343                     oNewStmt.asParams.append(self.dParamRefs['cbInstr'][0].sNewName);
     346
    344347                # ... and IEM_MC_CALL_CIMPL_[0-5] into *_THREADED ...
    345348                elif oNewStmt.sName.startswith('IEM_MC_CALL_CIMPL_'):
     
    461464                               'IEM_MC_CALL_CIMPL_2', 'IEM_MC_CALL_CIMPL_3', 'IEM_MC_CALL_CIMPL_4', 'IEM_MC_CALL_CIMPL_5', ):
    462465                self.aoParamRefs.append(ThreadedParamRef('cbInstr', 'uint4_t', oStmt));
     466
     467            if oStmt.sName in ('IEM_MC_REL_JMP_S8_AND_FINISH',  'IEM_MC_REL_JMP_S32_AND_FINISH'):
     468                self.aoParamRefs.append(ThreadedParamRef('pVCpu->iem.s.enmEffOpSize', 'IEMMODE', oStmt));
    463469
    464470            if oStmt.sName == 'IEM_MC_CALC_RM_EFF_ADDR':
  • trunk/src/VBox/VMM/VMMAll/IEMThreadedFunctions.cpp

    r99286 r99291  
    8383
    8484/** Variant of IEM_MC_REL_JMP_S8_AND_FINISH with instruction length as param. */
    85 #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED(a_i8, a_cbInstr) \
    86     return iemRegRipRelativeJumpS8AndFinishClearingRF(pVCpu, a_cbInstr, (a_i8), pVCpu->iem.s.enmEffOpSize)
     85#define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED(a_i8, a_cbInstr, a_enmEffOpSize) \
     86    return iemRegRipRelativeJumpS8AndFinishClearingRF(pVCpu, a_cbInstr, (a_i8), a_enmEffOpSize)
    8787#undef IEM_MC_REL_JMP_S8_AND_FINISH
    8888
     
    9393
    9494/** Variant of IEM_MC_REL_JMP_S32_AND_FINISH with instruction length as param. */
    95 #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED(a_i32, a_cbInstr) \
    96     return iemRegRipRelativeJumpS32AndFinishClearingRF(pVCpu, a_cbInstr, (a_i32), pVCpu->iem.s.enmEffOpSize)
     95#define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED(a_i32, a_cbInstr, a_enmEffOpSize) \
     96    return iemRegRipRelativeJumpS32AndFinishClearingRF(pVCpu, a_cbInstr, (a_i32), a_enmEffOpSize)
    9797#undef IEM_MC_REL_JMP_S32_AND_FINISH
    9898
     
    116116# define IEM_MC_CALC_RM_EFF_ADDR_THREADED_ADDR6432(a_GCPtrEff, a_bRmEx, a_bSib, a_u32Disp, a_cbImm) \
    117117    (a_GCPtrEff) = (uint32_t)iemOpHlpCalcRmEffAddrThreadedAddr64(pVCpu, a_bRmEx, a_bSib, a_u32Disp, a_cbImm)
     118
     119/** Variant of IEM_MC_CALL_CIMPL_1 with explicit instruction length parameter. */
     120# define IEM_MC_CALL_CIMPL_1_THREADED(a_cbInstr, a_pfnCImpl, a0) \
     121    return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0)
     122
     123/** Variant of IEM_MC_CALL_CIMPL_2 with explicit instruction length parameter. */
     124# define IEM_MC_CALL_CIMPL_2_THREADED(a_cbInstr, a_pfnCImpl, a0, a1) \
     125    return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0, a1)
     126
     127/** Variant of IEM_MC_CALL_CIMPL_3 with explicit instruction length parameter. */
     128# define IEM_MC_CALL_CIMPL_3_THREADED(a_cbInstr, a_pfnCImpl, a0, a1, a2) \
     129    return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0, a1, a2)
     130
     131/** Variant of IEM_MC_CALL_CIMPL_4 with explicit instruction length parameter. */
     132# define IEM_MC_CALL_CIMPL_4_THREADED(a_cbInstr, a_pfnCImpl, a0, a1, a2, a3) \
     133    return (a_pfnCImpl)(pVCpu, (a_cbInstr), a0, a1, a2, a3)
     134
    118135
    119136/**
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