VirtualBox

Changeset 100778 in vbox for trunk


Ignore:
Timestamp:
Aug 2, 2023 8:03:13 AM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158657
Message:

VMM/IEM: Corrections for 8-bit register number calculations for 64-bit mode. bugref:10369

File:
1 edited

Legend:

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

    r100761 r100778  
    386386
    387387        sRegRef = oStmt.asParams[idxReg];
    388         if sRegRef.startswith('IEM_GET_MODRM_RM') >= 0:
    389             sOrgExpr = 'IEM_GET_MODRM_RM_EX8(pVCpu, %s)' % (sRegRef,);
    390         elif sRegRef.startswith('IEM_GET_MODRM_REG') >= 0:
    391             sOrgExpr = 'IEM_GET_MODRM_REG_EX8(pVCpu, %s)' % (sRegRef,);
     388        if sRegRef.startswith('IEM_GET_MODRM_RM') or sRegRef.startswith('IEM_GET_MODRM_REG'):
     389            asBits = [sBit.strip() for sBit in sRegRef.replace('(', ',').replace(')', '').split(',')];
     390            if len(asBits) != 3 or asBits[1] != 'pVCpu' or (asBits[0] != 'IEM_GET_MODRM_RM' and asBits[0] != 'IEM_GET_MODRM_REG'):
     391                self.raiseProblem('Unexpected reference: %s (asBits=%s)' % (sRegRef, asBits));
     392            sOrgExpr = asBits[0] + '_EX8(pVCpu, ' + asBits[2] + ')';
    392393        else:
    393394            sOrgExpr = '((%s) < 4 || (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_REX) ? (%s) : (%s) + 12)' % (sRegRef, sRegRef, sRegRef);
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