Changeset 79092 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 11, 2019 3:26:40 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131252
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsPython.py
r76553 r79092 621 621 self.sSelector = sSelector; ##< The member selector, see kdSelectors. 622 622 self.sEncoding = sEncoding; ##< The encoding, see kdSelectors. 623 self.aoInstructions = [] ;# type: Instruction623 self.aoInstructions = [] # type: Instruction 624 624 self.sDisParse = sDisParse; ##< IDX_ParseXXX. 625 625 … … 1278 1278 1279 1279 def __init__(self, oInstr): # type: (InstructionTest, Instruction) 1280 self.oInstr = oInstr ;# type: InstructionTest1281 self.aoInputs = [] ;# type: list(TestInOut)1282 self.aoOutputs = [] ;# type: list(TestInOut)1283 self.aoSelectors = [] ;# type: list(TestSelector)1280 self.oInstr = oInstr # type: InstructionTest 1281 self.aoInputs = [] # type: list(TestInOut) 1282 self.aoOutputs = [] # type: list(TestInOut) 1283 self.aoSelectors = [] # type: list(TestSelector) 1284 1284 1285 1285 def toString(self, fRepr = False): … … 1340 1340 self.sMnemonic = None; 1341 1341 self.sBrief = None; 1342 self.asDescSections = [] ;# type: list(str)1343 self.aoMaps = [] ;# type: list(InstructionMap)1344 self.aoOperands = [] ;# type: list(Operand)1342 self.asDescSections = [] # type: list(str) 1343 self.aoMaps = [] # type: list(InstructionMap) 1344 self.aoOperands = [] # type: list(Operand) 1345 1345 self.sPrefix = None; ##< Single prefix: None, 'none', 0x66, 0xf3, 0xf2 1346 self.sOpcode = None ;# type: str1347 self.sSubOpcode = None ;# type: str1346 self.sOpcode = None # type: str 1347 self.sSubOpcode = None # type: str 1348 1348 self.sEncoding = None; 1349 1349 self.asFlTest = None; … … 1356 1356 self.asCpuIds = []; ##< The CPUID feature bit names for this instruction. If multiple, assume AND. 1357 1357 self.asReqFeatures = []; ##< Which features are required to be enabled to run this instruction. 1358 self.aoTests = [] ;# type: list(InstructionTest)1358 self.aoTests = [] # type: list(InstructionTest) 1359 1359 self.sMinCpu = None; ##< Indicates the minimum CPU required for the instruction. Not set when oCpuExpr is. 1360 1360 self.oCpuExpr = None; ##< Some CPU restriction expression... … … 1426 1426 sRet = '<' if fRepr else ''; 1427 1427 for sField, sValue in aasFields: 1428 if sValue !=None:1428 if sValue is not None: 1429 1429 if len(sRet) > 1: 1430 1430 sRet += '; '; … … 1516 1516 1517 1517 ## All the instructions. 1518 g_aoAllInstructions = [] ;# type: list(Instruction)1518 g_aoAllInstructions = [] # type: list(Instruction) 1519 1519 1520 1520 ## All the instructions indexed by statistics name (opstat). 1521 g_dAllInstructionsByStat = {} ;# type: dict(Instruction)1521 g_dAllInstructionsByStat = {} # type: dict(Instruction) 1522 1522 1523 1523 ## All the instructions indexed by function name (opfunction). 1524 g_dAllInstructionsByFunction = {} ;# type: dict(list(Instruction))1524 g_dAllInstructionsByFunction = {} # type: dict(list(Instruction)) 1525 1525 1526 1526 ## Instructions tagged by oponlytest 1527 g_aoOnlyTestInstructions = [] ;# type: list(Instruction)1527 g_aoOnlyTestInstructions = [] # type: list(Instruction) 1528 1528 1529 1529 ## Instruction maps. … … 1976 1976 return self.errorComment(iTagLine, '%s: value too long (max 180 chars): %s' % (sTag, sBrief)); 1977 1977 offDot = sBrief.find('.'); 1978 while offDot >= 0 andoffDot < len(sBrief) - 1 and sBrief[offDot + 1] != ' ':1978 while 0 <= offDot < len(sBrief) - 1 and sBrief[offDot + 1] != ' ': 1979 1979 offDot = sBrief.find('.', offDot + 1); 1980 1980 if offDot >= 0 and offDot != len(sBrief) - 1: … … 2042 2042 oInstr = self.ensureInstructionForOpTag(iTagLine); 2043 2043 idxOp = int(sTag[-1]) - 1; 2044 assert idxOp >= 0 andidxOp < 4;2044 assert 0 <= idxOp < 4; 2045 2045 2046 2046 # flatten, split up, and validate the "where:type" value. … … 2584 2584 self.errorComment(iTagLine, '%s: invalid %s field "%s" in "%s"\nvalid fields: %s' 2585 2585 % ( sTag, sDesc, sField, sItem, 2586 ', '.join([sKey for sKey in TestInOut.kdFields .keys()2586 ', '.join([sKey for sKey in TestInOut.kdFields 2587 2587 if TestInOut.kdFields[sKey][1] in asValidFieldKinds]),)); 2588 2588 break; … … 2927 2927 elif ch == chQuote: 2928 2928 chQuote = None; 2929 elif ch == '"' or ch == '\'':2929 elif ch in ('"', '\'',): 2930 2930 chQuote = ch; 2931 elif ch == ',' or ch == ')':2931 elif ch in (',', ')',): 2932 2932 if cDepth == 1: 2933 2933 asRet.append(sInvocation[offStart:off].strip()); … … 3319 3319 except ParserException as oXcpt: 3320 3320 print(str(oXcpt)); 3321 raise;3322 except Exception as oXcpt:3323 3321 raise; 3324 3322
Note:
See TracChangeset
for help on using the changeset viewer.