Changeset 98951 in vbox
- Timestamp:
- Mar 14, 2023 10:34:58 AM (19 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 1 added
- 2 edited
-
Makefile.kmk (modified) (6 diffs)
-
VMMAll/IEMAllThreadedPython.py (modified) (4 diffs)
-
VMMAll/IEMThreadedFunctions.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r98873 r98951 248 248 VBoxVMM_SOURCES += \ 249 249 VMMAll/IEMAllInstructionsThreadedRecompiler.cpp \ 250 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp250 VMMAll/IEMThreadedFunctions.cpp 251 251 endif 252 252 … … 400 400 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts \ 401 401 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \ 402 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp \402 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h \ 403 403 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h 404 404 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts) 405 405 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts \ 406 406 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \ 407 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp \407 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h \ 408 408 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h: \ 409 409 $(PATH_SUB_CURRENT)/VMMAll/IEMAllThreadedPython.py \ … … 422 422 $(QUIET)$(RM) -f -- \ 423 423 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" \ 424 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp. ts" \424 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \ 425 425 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts" 426 426 $(QUIET)$(MKDIR) -p -- "$(dir $@)" … … 428 428 $(REDIRECT) -0 /dev/null -- $(VBOX_BLD_PYTHON) $< $(filter %.cpp.h,$^) \ 429 429 --out-funcs-hdr "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts" \ 430 --out-funcs-cpp "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp. ts" \430 --out-funcs-cpp "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \ 431 431 --out-mod-input "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" 432 432 $(QUIET)$(CP) -v -f --changed -- \ … … 434 434 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h" 435 435 $(QUIET)$(CP) -v -f --changed -- \ 436 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp. ts" \437 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp "436 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \ 437 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h" 438 438 $(QUIET)$(CP) -v -f --changed -- \ 439 439 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts" \ … … 441 441 $(QUIET)$(RM) -f -- \ 442 442 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions.cpp.h.ts" \ 443 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp. ts"443 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" 444 444 445 445 foobared: $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts -
trunk/src/VBox/VMM/VMMAll/IEMAllThreadedPython.py
r98948 r98951 52 52 53 53 g_kdTypeInfo = { 54 # type name: (cBits, fSigned,) 55 'int8_t': ( 8, True, ), 56 'int16_t': ( 16, True, ), 57 'int32_t': ( 32, True, ), 58 'int64_t': ( 64, True, ), 59 'uint8_t': ( 8, False, ), 60 'uint16_t': ( 16, False, ), 61 'uint32_t': ( 32, False, ), 62 'uint64_t': ( 64, False, ), 63 'uintptr_t': ( 64, False, ), # ASSUMES 64-bit host pointer size. 64 'bool': ( 1, False, ), 65 'IEMMODE': ( 2, False, ), 54 # type name: (cBits, fSigned, C-type ) 55 'int8_t': ( 8, True, 'uint8_t', ), 56 'int16_t': ( 16, True, 'int16_t', ), 57 'int32_t': ( 32, True, 'int32_t', ), 58 'int64_t': ( 64, True, 'int64_t', ), 59 'uint4_t': ( 4, False, 'uint8_t', ), 60 'uint8_t': ( 8, False, 'uint8_t', ), 61 'uint16_t': ( 16, False, 'uint16_t', ), 62 'uint32_t': ( 32, False, 'uint32_t', ), 63 'uint64_t': ( 64, False, 'uint64_t', ), 64 'uintptr_t': ( 64, False, 'uintptr_t', ), # ASSUMES 64-bit host pointer size. 65 'bool': ( 1, False, 'bool', ), 66 'IEMMODE': ( 2, False, 'IEMMODE', ), 66 67 }; 67 68 … … 99 100 """ 100 101 101 def __init__(self, sOrgRef, sType, oStmt, iParam , offParam = 0):102 def __init__(self, sOrgRef, sType, oStmt, iParam = None, offParam = 0): 102 103 self.sOrgRef = sOrgRef; ##< The name / reference in the original code. 103 104 self.sStdRef = ''.join(sOrgRef.split()); ##< Normalized name to deal with spaces in macro invocations and such. 104 105 self.sType = sType; ##< The type (typically derived). 105 106 self.oStmt = oStmt; ##< The statement making the reference. 106 self.iParam = iParam; ##< The parameter containing the references. 107 self.iParam = iParam; ##< The parameter containing the references. None if implicit. 107 108 self.offParam = offParam; ##< The offset in the parameter of the reference. 108 109 … … 234 235 for iCurRef in range(iParamRef - 1, iParamRefFirst - 1, -1): 235 236 oCurRef = self.aoParamRefs[iCurRef]; 236 assert oCurRef.oStmt == oStmt; 237 #print('iCurRef=%s iParam=%s sOrgRef=%s' % (iCurRef, oCurRef.iParam, oCurRef.sOrgRef)); 238 sSrcParam = oNewStmt.asParams[oCurRef.iParam]; 239 assert sSrcParam[oCurRef.offParam : oCurRef.offParam + len(oCurRef.sOrgRef)] == oCurRef.sOrgRef, \ 240 'offParam=%s sOrgRef=%s sSrcParam=%s<eos>' % (oCurRef.offParam, oCurRef.sOrgRef, sSrcParam); 241 oNewStmt.asParams[oCurRef.iParam] = sSrcParam[0 : oCurRef.offParam] \ 242 + oCurRef.sNewName \ 243 + sSrcParam[oCurRef.offParam + len(oCurRef.sOrgRef) : ]; 237 if oCurRef.iParam is not None: 238 assert oCurRef.oStmt == oStmt; 239 #print('iCurRef=%s iParam=%s sOrgRef=%s' % (iCurRef, oCurRef.iParam, oCurRef.sOrgRef)); 240 sSrcParam = oNewStmt.asParams[oCurRef.iParam]; 241 assert sSrcParam[oCurRef.offParam : oCurRef.offParam + len(oCurRef.sOrgRef)] == oCurRef.sOrgRef, \ 242 'offParam=%s sOrgRef=%s sSrcParam=%s<eos>' % (oCurRef.offParam, oCurRef.sOrgRef, sSrcParam); 243 oNewStmt.asParams[oCurRef.iParam] = sSrcParam[0 : oCurRef.offParam] \ 244 + oCurRef.sNewName \ 245 + sSrcParam[oCurRef.offParam + len(oCurRef.sOrgRef) : ]; 244 246 245 247 # Process branches of conditionals recursively. … … 338 340 if isinstance(oStmt, (iai.McStmtVar, iai.McCppPreProc)): 339 341 continue; 342 if oStmt.isCppStmt() and oStmt.fDecode: 343 continue; 344 345 # Several statements have implicit parameters. 346 if oStmt.sName in ('IEM_MC_ADVANCE_RIP_AND_FINISH', 'IEM_MC_REL_JMP_S8_AND_FINISH', 'IEM_MC_REL_JMP_S16_AND_FINISH', 347 'IEM_MC_REL_JMP_S32_AND_FINISH', 'IEM_MC_CALL_CIMPL_0', 'IEM_MC_CALL_CIMPL_1', 348 'IEM_MC_CALL_CIMPL_2', 'IEM_MC_CALL_CIMPL_3', 'IEM_MC_CALL_CIMPL_4', 'IEM_MC_CALL_CIMPL_5'): 349 self.aoParamRefs.append(ThreadedParamRef('cbInstr', 'uint4_t', oStmt)); 350 351 # We can skip the rest for statements w/o parameters. 340 352 if not oStmt.asParams: 341 continue;342 if oStmt.isCppStmt() and oStmt.fDecode:343 353 continue; 344 354
Note:
See TracChangeset
for help on using the changeset viewer.

