VirtualBox

Changeset 99359 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 9, 2023 1:22:06 AM (22 months ago)
Author:
vboxsync
Message:

VMM/IEM: Eliminate some unused parameters/references in the threaded functions in the two cases where we outright modify references. bugref:10369

File:
1 edited

Legend:

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

    r99308 r99359  
    348348                            assert (   sSrcParam[oCurRef.offParam : oCurRef.offParam + len(oCurRef.sOrgRef)] == oCurRef.sOrgRef
    349349                                    or oCurRef.fCustomRef), \
    350                                    'offParam=%s sOrgRef=%s sSrcParam=%s<eos>' % (oCurRef.offParam, oCurRef.sOrgRef, sSrcParam);
     350                                   'offParam=%s sOrgRef=%s iParam=%s oStmt.sName=%s sSrcParam=%s<eos>' \
     351                                   % (oCurRef.offParam, oCurRef.sOrgRef, oCurRef.iParam, oStmt.sName, sSrcParam);
    351352                            oNewStmt.asParams[oCurRef.iParam] = sSrcParam[0 : oCurRef.offParam] \
    352353                                                              + oCurRef.sNewName \
     
    504505                aiSkipParams = {};
    505506
    506             # Several statements have implicit parameters.
     507            # Several statements have implicit parameters and some have different parameters.
    507508            if oStmt.sName in ('IEM_MC_ADVANCE_RIP_AND_FINISH', 'IEM_MC_REL_JMP_S8_AND_FINISH', 'IEM_MC_REL_JMP_S16_AND_FINISH',
    508509                               'IEM_MC_REL_JMP_S32_AND_FINISH', 'IEM_MC_CALL_CIMPL_0', 'IEM_MC_CALL_CIMPL_1',
     
    528529                    self.aoParamRefs.append(ThreadedParamRef('u32Disp', 'uint32_t', oStmt));
    529530                    self.aoParamRefs.append(ThreadedParamRef('cbInstr', 'uint4_t',  oStmt));
     531                    assert len(oStmt.asParams) == 3;
     532                    assert oStmt.asParams[1].startswith('bRm');
     533                    aiSkipParams[1] = True; # Skip the bRm parameter
    530534
    531535            # 8-bit register accesses needs to have their index argument reworked to take REX into account.
    532                 # ... and IEM_MC_*_GREG_U8 into *_THREADED w/ reworked index taking REX into account
    533536            if oStmt.sName.startswith('IEM_MC_') and oStmt.sName.find('_GREG_U8') > 0:
    534537                (idxReg, sOrgRef, sStdRef) = self.analyze8BitGRegStmt(oStmt);
    535538                self.aoParamRefs.append(ThreadedParamRef(sOrgRef, 'uint4_t', oStmt, idxReg, sStdRef = sStdRef));
     539                aiSkipParams[idxReg] = True; # Skip the parameter below.
    536540
    537541            # Inspect the target of calls to see if we need to pass down a
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