Changeset 101722 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
- Timestamp:
- Nov 3, 2023 12:36:45 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r101694 r101722 1973 1973 'IEM_CIMPL_F_XCPT': ('IEM_CIMPL_F_BRANCH_INDIRECT', 'IEM_CIMPL_F_BRANCH_FAR', 1974 1974 'IEM_CIMPL_F_MODE', 'IEM_CIMPL_F_RFLAGS', 'IEM_CIMPL_F_VMEXIT', ), 1975 'IEM_CIMPL_F_CALLS_CIMPL': (), 1976 'IEM_CIMPL_F_CALLS_AIMPL': (), 1977 'IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE': (), 1975 1978 }; 1976 1979 class McBlock(object): … … 1978 1981 Microcode block (IEM_MC_BEGIN ... IEM_MC_END, IEM_MC_DEFER_TO_CIMPL_x_RET). 1979 1982 """ 1983 1984 ## @name Macro expansion types. 1985 ## @{ 1986 kMacroExp_None = 0; 1987 kMacroExp_Entire = 1; ##< Entire block (iBeginLine == iEndLine), original line may contain multiple blocks. 1988 kMacroExp_Partial = 2; ##< Partial/mixed (cmpxchg16b), safe to assume single block. 1989 ## @} 1980 1990 1981 1991 def __init__(self, sSrcFile, iBeginLine, offBeginLine, oFunction, iInFunction, cchIndent = None): … … 2001 2011 ##< The raw lines the block is made up of. 2002 2012 self.asLines = [] # type: List[str] 2013 ## Indicates whether the block includes macro expansion parts (kMacroExp_None, 2014 ## kMacroExp_Entrie, kMacroExp_Partial). 2015 self.iMacroExp = self.kMacroExp_None; 2003 2016 ## IEM_MC_BEGIN: Argument count. 2004 2017 self.cArgs = -1; … … 4870 4883 4871 4884 # 4872 # HACK ALERT! For blocks or ginating from macro expansion the start and4885 # HACK ALERT! For blocks originating from macro expansion the start and 4873 4886 # end line will be the same, but the line has multiple 4874 4887 # newlines inside it. So, we have to do some extra tricks … … 4880 4893 if not asLines[0].strip().startswith('IEM_MC_BEGIN'): 4881 4894 self.raiseError('IEM_MC_BEGIN is not the first word on the line'); 4895 4896 # Hack alert! Detect mixed tail/head macros a la cmpxchg16b and split up the lines 4897 # so we can deal correctly with IEM_MC_END below and everything else. 4898 for sLine in asLines: 4899 cNewLines = sLine.count('\n'); 4900 assert cNewLines > 0; 4901 if cNewLines > 1: 4902 asLines = self.extractLinesFromMacroExpansionLine(''.join(asLines), 4903 self.oCurMcBlock.offBeginLine, 4904 offEndStatementInLine 4905 + sum(len(s) for s in asLines) 4906 - len(asLines[-1])); 4907 self.oCurMcBlock.iMacroExp = McBlock.kMacroExp_Partial; 4908 break; 4882 4909 else: 4910 self.oCurMcBlock.iMacroExp = McBlock.kMacroExp_Entire; 4883 4911 asLines = self.extractLinesFromMacroExpansionLine(self.asLines[self.iLine - 1], 4884 4912 self.oCurMcBlock.offBeginLine, offEndStatementInLine); … … 5207 5235 # nested macro expansion, just to avoid lots of extra work. 5208 5236 # 5237 # There is only limited support for macros expanding to partial MC blocks. 5238 # 5209 5239 # Note! IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX and other macros someone making 5210 5240 # use of IEMOP_RAISE_INVALID_LOCK_PREFIX_RET() will be ignored here and … … 5214 5244 # Also, this way we don't produce lots of unnecessary threaded functions. 5215 5245 # 5216 if sBody.find("IEM_MC_BEGIN") < 0 :5246 if sBody.find("IEM_MC_BEGIN") < 0 and sBody.find("IEM_MC_END") < 0: 5217 5247 #self.debug('workerPreProcessDefine: irrelevant (%s: %s)' % (sName, sBody)); 5218 5248 return True;
Note:
See TracChangeset
for help on using the changeset viewer.