Changeset 100743 in vbox
- Timestamp:
- Jul 30, 2023 11:17:41 PM (16 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
- 3 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r100740 r100743 252 252 VBoxVMM_SOURCES += \ 253 253 VMMAll/IEMAllThrdRecompiler.cpp \ 254 VMMAll/IEMAllThrdTables.cpp \ 254 VMMAll/IEMAllThrdTables1.cpp \ 255 VMMAll/IEMAllThrdTables2.cpp \ 256 VMMAll/IEMAllThrdTables3.cpp \ 257 VMMAll/IEMAllThrdTables4.cpp \ 255 258 VMMAll/IEMAllThrdFuncs.cpp \ 256 259 VMMAll/IEMAllThrdFuncsBltIn.cpp … … 576 579 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \ 577 580 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h \ 578 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h: \ 581 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h \ 582 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h \ 583 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h \ 584 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h: \ 579 585 $(PATH_SUB_CURRENT)/VMMAll/IEMAllThrdPython.py \ 580 586 $(PATH_SUB_CURRENT)/VMMAll/IEMAllInstPython.py \ … … 599 605 --out-funcs-hdr "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts" \ 600 606 --out-funcs-cpp "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \ 601 --out-mod-input "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" 607 --out-mod-input1 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h.ts" \ 608 --out-mod-input2 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h.ts" \ 609 --out-mod-input3 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h.ts" \ 610 --out-mod-input4 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h.ts" 602 611 $(QUIET)$(CP) -v -f --changed -- \ 603 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" \ 604 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h" 612 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h.ts" \ 613 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h" 614 $(QUIET)$(CP) -v -f --changed -- \ 615 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h.ts" \ 616 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h" 617 $(QUIET)$(CP) -v -f --changed -- \ 618 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h.ts" \ 619 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h" 620 $(QUIET)$(CP) -v -f --changed -- \ 621 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h.ts" \ 622 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h" 605 623 $(QUIET)$(CP) -v -f --changed -- \ 606 624 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \ … … 610 628 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h" 611 629 $(QUIET)$(RM) -f -- \ 612 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" \ 630 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h.ts" \ 631 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h.ts" \ 632 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h.ts" \ 633 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h.ts" \ 613 634 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" 614 635 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py
r100734 r100743 5374 5374 return 0; 5375 5375 5376 ## List of all main instruction files and their default maps.5377 g_aa sAllInstrFilesAndDefaultMap= (5378 ( 'IEMAllInstCommon.cpp.h', 'one', ),5379 ( 'IEMAllInstOneByte.cpp.h', 'one', ),5380 ( 'IEMAllInst TwoByte0f.cpp.h', 'two0f',),5381 ( 'IEMAllInstT hree0f38.cpp.h', 'three0f38',),5382 ( 'IEMAllInstThree0f3 a.cpp.h', 'three0f3a',),5383 ( 'IEMAllInst VexMap1.cpp.h', 'vexmap1',),5384 ( 'IEMAllInstVexMap 2.cpp.h', 'vexmap2',),5385 ( 'IEMAllInstVexMap 3.cpp.h', 'vexmap3',),5386 ( 'IEMAllInst 3DNow.cpp.h', '3dnow',),5376 ## List of all main instruction files, their default maps and file sets (-1 means included it all sets). 5377 g_aaoAllInstrFilesAndDefaultMapAndSet = ( 5378 ( 'IEMAllInstCommon.cpp.h', 'one', -1, ), 5379 ( 'IEMAllInstOneByte.cpp.h', 'one', 1, ), 5380 ( 'IEMAllInst3DNow.cpp.h', '3dnow', 2, ), 5381 ( 'IEMAllInstTwoByte0f.cpp.h', 'two0f', 2, ), 5382 ( 'IEMAllInstThree0f38.cpp.h', 'three0f38', 3, ), 5383 ( 'IEMAllInstThree0f3a.cpp.h', 'three0f3a', 3, ), 5384 ( 'IEMAllInstVexMap1.cpp.h', 'vexmap1', 4, ), 5385 ( 'IEMAllInstVexMap2.cpp.h', 'vexmap2', 4, ), 5386 ( 'IEMAllInstVexMap3.cpp.h', 'vexmap3', 4, ), 5387 5387 ); 5388 5388 … … 5431 5431 sName = os.path.split(sFilename)[1].lower(); 5432 5432 sMap = None; 5433 for a sCur in g_aasAllInstrFilesAndDefaultMap:5434 if a sCur[0].lower() == sName:5435 sMap = a sCur[1];5433 for aoInfo in g_aaoAllInstrFilesAndDefaultMapAndSet: 5434 if aoInfo[0].lower() == sName: 5435 sMap = aoInfo[1]; 5436 5436 break; 5437 5437 if not sMap: … … 5449 5449 Raises exception on failure. 5450 5450 """ 5451 return __parseFilesWorker( g_aasAllInstrFilesAndDefaultMap);5451 return __parseFilesWorker([aoInfo[0:2] for aoInfo in g_aaoAllInstrFilesAndDefaultMapAndSet]); 5452 5452 5453 5453 -
trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables1.cpp
r100740 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - One 3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - One-Byte. 4 4 */ 5 5 -
trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables2.cpp
r100740 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Two byte & 3DNow!3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Two-Byte & 3DNow! 4 4 */ 5 5 -
trunk/src/VBox/VMM/VMMAll/IEMAllIntprTables3.cpp
r100740 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Three byte.3 * IEM - Instruction Decoding and Emulation - Interpreter Tables - Three-Byte. 4 4 */ 5 5 -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdPython.py
r100734 r100743 1186 1186 self.oOptions = None # type: argparse.Namespace 1187 1187 self.aoParsers = [] # type: list(IEMAllInstPython.SimpleParser) 1188 self.aidxFirstFunctions = [] # type: list(int) ##< Runs parallel to aoParser giving the index of the first function. 1188 1189 1189 1190 # … … 1215 1216 % (cCount, dRawParamCounts.get(cCount, 0), dMinParamCounts.get(cCount, 0)), 1216 1217 file = sys.stderr); 1218 1219 # Populate aidxFirstFunctions. This is ASSUMING that 1220 # g_aoMcBlocks/self.aoThreadedFuncs are in self.aoParsers order. 1221 iThreadedFunction = 0; 1222 oThreadedFunction = self.getThreadedFunctionByIndex(0); 1223 self.aidxFirstFunctions = []; 1224 for oParser in self.aoParsers: 1225 self.aidxFirstFunctions.append(iThreadedFunction); 1226 1227 while oThreadedFunction.oMcBlock.sSrcFile == oParser.sSrcFile: 1228 iThreadedFunction += 1; 1229 oThreadedFunction = self.getThreadedFunctionByIndex(iThreadedFunction); 1217 1230 1218 1231 return True; … … 1548 1561 return ThreadedFunction.dummyInstance(); 1549 1562 1550 def generateModifiedInput(self, oOut ):1563 def generateModifiedInput(self, oOut, idxFile): 1551 1564 """ 1552 1565 Generates the combined modified input source/header file. … … 1559 1572 1560 1573 # 1561 # ASSUMING that g_aoMcBlocks/self.aoThreadedFuncs are in self.aoParsers 1562 # order, we iterate aoThreadedFuncs in parallel to the lines from the 1563 # parsers and apply modifications where required. 1564 # 1565 iThreadedFunction = 0; 1566 oThreadedFunction = self.getThreadedFunctionByIndex(0); 1567 for oParser in self.aoParsers: # type: IEMAllInstPython.SimpleParser 1574 # Iterate all parsers (input files) and output the ones related to the 1575 # file set given by idxFile. 1576 # 1577 for idxParser, oParser in enumerate(self.aoParsers): # type: int, IEMAllInstPython.SimpleParser 1578 # Is this included in the file set? 1579 sSrcBaseFile = os.path.basename(oParser.sSrcFile).lower(); 1580 fInclude = -1; 1581 for aoInfo in iai.g_aaoAllInstrFilesAndDefaultMapAndSet: 1582 if sSrcBaseFile == aoInfo[0].lower(): 1583 fInclude = aoInfo[2] in (-1, idxFile); 1584 break; 1585 if fInclude is not True: 1586 assert fInclude is False; 1587 continue; 1588 1589 # Output it. 1568 1590 oOut.write("\n\n/* ****** BEGIN %s ******* */\n" % (oParser.sSrcFile,)); 1569 1591 1570 iLine = 0; 1592 iThreadedFunction = self.aidxFirstFunctions[idxParser]; 1593 oThreadedFunction = self.getThreadedFunctionByIndex(iThreadedFunction); 1594 iLine = 0; 1571 1595 while iLine < len(oParser.asLines): 1572 1596 sLine = oParser.asLines[iLine]; … … 1623 1647 return True; 1624 1648 1649 def generateModifiedInput1(self, oOut): 1650 """ 1651 Generates the combined modified input source/header file, part 1. 1652 Returns success indicator. 1653 """ 1654 return self.generateModifiedInput(oOut, 1); 1655 1656 def generateModifiedInput2(self, oOut): 1657 """ 1658 Generates the combined modified input source/header file, part 2. 1659 Returns success indicator. 1660 """ 1661 return self.generateModifiedInput(oOut, 2); 1662 1663 def generateModifiedInput3(self, oOut): 1664 """ 1665 Generates the combined modified input source/header file, part 3. 1666 Returns success indicator. 1667 """ 1668 return self.generateModifiedInput(oOut, 3); 1669 1670 def generateModifiedInput4(self, oOut): 1671 """ 1672 Generates the combined modified input source/header file, part 4. 1673 Returns success indicator. 1674 """ 1675 return self.generateModifiedInput(oOut, 4); 1676 1677 1625 1678 # 1626 1679 # Main … … 1639 1692 oParser = argparse.ArgumentParser(add_help = False); 1640 1693 oParser.add_argument('asInFiles', metavar = 'input.cpp.h', nargs = '*', 1641 default = [os.path.join(sScriptDir, asFM[0]) for asFM in iai.g_aasAllInstrFilesAndDefaultMap], 1694 default = [os.path.join(sScriptDir, aoInfo[0]) 1695 for aoInfo in iai.g_aaoAllInstrFilesAndDefaultMapAndSet], 1642 1696 help = "Selection of VMMAll/IEMAllInst*.cpp.h files to use as input."); 1643 1697 oParser.add_argument('--out-funcs-hdr', metavar = 'file-funcs.h', dest = 'sOutFileFuncsHdr', action = 'store', … … 1645 1699 oParser.add_argument('--out-funcs-cpp', metavar = 'file-funcs.cpp', dest = 'sOutFileFuncsCpp', action = 'store', 1646 1700 default = '-', help = 'The output C++ file for the functions.'); 1647 oParser.add_argument('--out-mod-input', metavar = 'file-instr.cpp.h', dest = 'sOutFileModInput', action = 'store', 1648 default = '-', help = 'The output C++/header file for the modified input instruction files.'); 1701 oParser.add_argument('--out-mod-input1', metavar = 'file-instr.cpp.h', dest = 'sOutFileModInput1', action = 'store', 1702 default = '-', help = 'The output C++/header file for modified input instruction files part 1.'); 1703 oParser.add_argument('--out-mod-input2', metavar = 'file-instr.cpp.h', dest = 'sOutFileModInput2', action = 'store', 1704 default = '-', help = 'The output C++/header file for modified input instruction files part 2.'); 1705 oParser.add_argument('--out-mod-input3', metavar = 'file-instr.cpp.h', dest = 'sOutFileModInput3', action = 'store', 1706 default = '-', help = 'The output C++/header file for modified input instruction files part 3.'); 1707 oParser.add_argument('--out-mod-input4', metavar = 'file-instr.cpp.h', dest = 'sOutFileModInput4', action = 'store', 1708 default = '-', help = 'The output C++/header file for modified input instruction files part 4.'); 1649 1709 oParser.add_argument('--help', '-h', '-?', action = 'help', help = 'Display help and exit.'); 1650 1710 oParser.add_argument('--version', '-V', action = 'version', … … 1663 1723 # 1664 1724 aaoOutputFiles = ( 1665 ( self.oOptions.sOutFileFuncsHdr, self.generateThreadedFunctionsHeader ), 1666 ( self.oOptions.sOutFileFuncsCpp, self.generateThreadedFunctionsSource ), 1667 ( self.oOptions.sOutFileModInput, self.generateModifiedInput ), 1725 ( self.oOptions.sOutFileFuncsHdr, self.generateThreadedFunctionsHeader ), 1726 ( self.oOptions.sOutFileFuncsCpp, self.generateThreadedFunctionsSource ), 1727 ( self.oOptions.sOutFileModInput1, self.generateModifiedInput1 ), 1728 ( self.oOptions.sOutFileModInput2, self.generateModifiedInput2 ), 1729 ( self.oOptions.sOutFileModInput3, self.generateModifiedInput3 ), 1730 ( self.oOptions.sOutFileModInput4, self.generateModifiedInput4 ), 1668 1731 ); 1669 1732 fRc = True; -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables1.cpp
r100742 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables .3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables - One-Byte. 4 4 */ 5 5 … … 32 32 */ 33 33 #define IEM_WITH_ONE_BYTE_TABLE 34 #define IEM_WITH_TWO_BYTE_TABLE 35 #define IEM_WITH_THREE_BYTE_TABLES 36 #define IEM_WITH_3DNOW_BYTE_TABLE 37 #define IEM_WITH_VEX_TABLES 38 #include "IEMThreadedInstructions.cpp.h" 34 #include "IEMThreadedInstructions1.cpp.h" 39 35 -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables2.cpp
r100742 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables .3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables - Two-Byte & 3DNow! 4 4 */ 5 5 … … 31 31 * Include the "annotated" IEMAllInst*.cpp.h files. 32 32 */ 33 #define IEM_WITH_ONE_BYTE_TABLE34 33 #define IEM_WITH_TWO_BYTE_TABLE 35 #define IEM_WITH_THREE_BYTE_TABLES36 34 #define IEM_WITH_3DNOW_BYTE_TABLE 37 #define IEM_WITH_VEX_TABLES 38 #include "IEMThreadedInstructions.cpp.h" 35 #include "IEMThreadedInstructions2.cpp.h" 39 36 -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables3.cpp
r100742 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables .3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables - Three-Byte. 4 4 */ 5 5 … … 31 31 * Include the "annotated" IEMAllInst*.cpp.h files. 32 32 */ 33 #define IEM_WITH_ONE_BYTE_TABLE34 #define IEM_WITH_TWO_BYTE_TABLE35 33 #define IEM_WITH_THREE_BYTE_TABLES 36 #define IEM_WITH_3DNOW_BYTE_TABLE 37 #define IEM_WITH_VEX_TABLES 38 #include "IEMThreadedInstructions.cpp.h" 34 #include "IEMThreadedInstructions3.cpp.h" 39 35 -
trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables4.cpp
r100742 r100743 1 1 /* $Id$ */ 2 2 /** @file 3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables .3 * IEM - Instruction Decoding and Threaded Recompilation, Instruction Tables - VEX. 4 4 */ 5 5 … … 31 31 * Include the "annotated" IEMAllInst*.cpp.h files. 32 32 */ 33 #define IEM_WITH_ONE_BYTE_TABLE34 #define IEM_WITH_TWO_BYTE_TABLE35 #define IEM_WITH_THREE_BYTE_TABLES36 #define IEM_WITH_3DNOW_BYTE_TABLE37 33 #define IEM_WITH_VEX_TABLES 38 #include "IEMThreadedInstructions .cpp.h"34 #include "IEMThreadedInstructions4.cpp.h" 39 35
Note:
See TracChangeset
for help on using the changeset viewer.