Changeset 103542 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
- Timestamp:
- Feb 23, 2024 12:26:32 AM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161888
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r103256 r103542 1505 1505 ## @} 1506 1506 1507 ## All the MC blocks associated with this instruction. 1508 self.aoMcBlocks = [] # type: List[McBlock] 1509 1507 1510 def toString(self, fRepr = False): 1508 1511 """ Turn object into a string. """ … … 1867 1870 return oHit; 1868 1871 return None; 1872 1873 @staticmethod 1874 def countStmtsByName(aoStmts, dNames, dRet): 1875 """ 1876 Searches the given list of statements for the names in the dictionary, 1877 adding each found to dRet with an occurnece count. 1878 1879 return total number of hits; 1880 """ 1881 cHits = 0; 1882 for oStmt in aoStmts: 1883 if oStmt.sName in dNames: 1884 dRet[oStmt.sName] = dRet.get(oStmt.sName, 0) + 1; 1885 cHits += 1; 1886 if isinstance(oStmt, McStmtCond): 1887 cHits += McStmt.countStmtsByName(oStmt.aoIfBranch, dNames, dRet); 1888 cHits += McStmt.countStmtsByName(oStmt.aoElseBranch, dNames, dRet); 1889 return cHits; 1869 1890 1870 1891 def isCppStmt(self): … … 5364 5385 self.raiseError(oXcpt.args[0]); 5365 5386 5387 if self.oCurMcBlock.oInstruction: 5388 self.oCurMcBlock.oInstruction.aoMcBlocks.append(self.oCurMcBlock); 5366 5389 self.iMcBlockInFunc += 1; 5367 5390 return True; … … 5528 5551 5529 5552 g_aoMcBlocks.append(oMcBlock); 5553 if oMcBlock.oInstruction: 5554 oMcBlock.oInstruction.aoMcBlocks.append(oMcBlock); 5530 5555 self.cTotalMcBlocks += 1; 5531 5556 self.iMcBlockInFunc += 1; … … 6061 6086 6062 6087 # Some sanity checking. 6063 for sClass, dLists in SimpleParser.kdEFlagsClasses.items(): 6064 for sAttrib, asFlags in dLists.items(): 6065 for sFlag in asFlags: 6066 assert sFlag in g_kdEFlagsMnemonics, 'sClass=%s sAttrib=%s sFlag=%s' % (sClass, sAttrib, sFlag,); 6088 def __sanityCheckEFlagsClasses(): 6089 for sClass, dLists in SimpleParser.kdEFlagsClasses.items(): 6090 for sAttrib, asFlags in dLists.items(): 6091 for sFlag in asFlags: 6092 assert sFlag in g_kdEFlagsMnemonics, 'sClass=%s sAttrib=%s sFlag=%s' % (sClass, sAttrib, sFlag,); 6093 __sanityCheckEFlagsClasses(); 6067 6094 6068 6095 ## The parsed content of IEMAllInstCommonBodyMacros.h.
Note:
See TracChangeset
for help on using the changeset viewer.