VirtualBox

Changeset 105797 in vbox


Ignore:
Timestamp:
Aug 21, 2024 8:17:30 PM (5 months ago)
Author:
vboxsync
Message:

VMM/IEM: Split up IEMAllN8veLiveness.cpp into 6 parts to speed up compilation. Increased the number of parts for IEMAllN8veRecompFuncs*.cpp from 4 to 6 as well so the two can benefit from the same source size tweaks. bugref:10372

Location:
trunk/src/VBox/VMM
Files:
2 edited
7 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/Makefile.kmk

    r105687 r105797  
    268268        VMMAll/IEMAllN8veRecompFuncs3.cpp \
    269269        VMMAll/IEMAllN8veRecompFuncs4.cpp \
     270        VMMAll/IEMAllN8veRecompFuncs5.cpp \
     271        VMMAll/IEMAllN8veRecompFuncs6.cpp \
    270272        VMMAll/IEMAllN8veRecompBltIn.cpp \
    271         VMMAll/IEMAllN8veLiveness.cpp
     273        VMMAll/IEMAllN8veLiveness1.cpp \
     274        VMMAll/IEMAllN8veLiveness2.cpp \
     275        VMMAll/IEMAllN8veLiveness3.cpp \
     276        VMMAll/IEMAllN8veLiveness4.cpp \
     277        VMMAll/IEMAllN8veLiveness5.cpp \
     278        VMMAll/IEMAllN8veLiveness6.cpp
    272279  VBoxVMM_SOURCES.amd64 += \
    273280        VMMAll/IEMAllN8veHlpA.asm
     
    280287  endif
    281288  VMMAll/IEMAllN8veRecompiler.cpp_CXXFLAGS.win := -bigobj
    282   VMMAll/IEMAllN8veLiveness.cpp_CXXFLAGS.win   := -bigobj
    283289 endif
    284290 VMMAll/IEMAllThrdFuncs.cpp_CXXFLAGS.win       := -bigobj
     
    537543 # Note! Dependency order matters!
    538544 #
     545 VBOX_IEM_NATIVE_GEN_SRC_PARTS := 1 2 3 4 5 6
    539546 VBoxVMM_INTERMEDIATES += \
    540547        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \
    541         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h \
    542         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h \
    543         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h \
    544         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h
     548        $(foreach x, 1 2 3 4, $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions${x}.cpp.h)
    545549 ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER
    546550  VBoxVMM_INTERMEDIATES += \
    547551        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h \
    548         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h \
    549         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h \
    550         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h \
    551         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h \
    552         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h
     552        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h \
     553        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h) \
     554        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h)
    553555 endif
    554556 VBoxVMM_CLEAN         += \
     
    556558        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \
    557559        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h \
    558         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h \
    559         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h \
    560         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h \
    561         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h \
     560        $(foreach x, 1 2 3 4, $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions${x}.cpp.h) \
    562561        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h \
    563         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h \
    564         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h \
    565         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h \
    566         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h \
    567         $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h
     562        $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h \
     563        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h) \
     564        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h)
    568565 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts)
    569566 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts \
    570567 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h \
    571568 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h \
     569 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h,) \
    572570 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h,) \
    573571 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h,) \
     
    575573 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h,) \
    576574 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h,) \
    577  +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h,) \
     575 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions5.cpp.h,) \
     576 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions6.cpp.h,) \
     577 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness1.cpp.h,) \
     578 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness2.cpp.h,) \
     579 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness3.cpp.h,) \
     580 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness4.cpp.h,) \
     581 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness5.cpp.h,) \
     582 +| $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness6.cpp.h,) \
    578583 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h \
    579584 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h \
     
    596601        $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,VMMAll/IEMAllInst*.cpp.h)
    597602        $(QUIET)$(RM) -f -- \
    598                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h.ts" \
    599                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h.ts" \
    600                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h.ts" \
    601                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h.ts" \
     603                $(foreach x, 1 2 3 4,"$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions${x}.cpp.h.ts") \
    602604                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \
    603605                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h.ts" \
    604                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h.ts" \
    605                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h.ts" \
    606                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h.ts" \
    607                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h.ts" \
    608                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h.ts"
     606                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h.ts" \
     607                $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS),"$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h.ts") \
     608                $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS),"$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h.ts")
    609609        $(QUIET)$(MKDIR) -p -- "$(dir $@)"
    610610        $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
     
    619619                $(if-expr defined(VBOX_WITH_IEM_NATIVE_RECOMPILER), \
    620620                        --native \
    621                         --out-n8ve-funcs-hdr    "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h.ts" \
    622                         --out-n8ve-funcs-cpp1   "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h.ts" \
    623                         --out-n8ve-funcs-cpp2   "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h.ts" \
    624                         --out-n8ve-funcs-cpp3   "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h.ts" \
    625                         --out-n8ve-funcs-cpp4   "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h.ts" \
    626                         --out-n8ve-liveness-cpp "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h.ts" \
     621                        --out-n8ve-funcs-hdr         "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h.ts" \
     622                        --out-n8ve-liveness-hdr      "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h.ts" \
     623                       $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS) \
     624                       ,--out-n8ve-funcs-cpp${x}    "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h.ts") \
     625                       $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS) \
     626                       ,--out-n8ve-liveness-cpp${x} "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h.ts") \
    627627                ,)
    628         $(QUIET)$(CP) -v -f --changed -- \
    629                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h.ts" \
    630                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions1.cpp.h"
    631         $(QUIET)$(CP) -v -f --changed -- \
    632                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h.ts" \
    633                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions2.cpp.h"
    634         $(QUIET)$(CP) -v -f --changed -- \
    635                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h.ts" \
    636                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions3.cpp.h"
    637         $(QUIET)$(CP) -v -f --changed -- \
    638                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h.ts" \
    639                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions4.cpp.h"
     628        $(foreach x, 1 2 3 4, $(NLTAB)$(QUIET)$(CP) -v -f --changed -- \
     629                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions${x}.cpp.h.ts" \
     630                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedInstructions${x}.cpp.h")
    640631        $(QUIET)$(CP) -v -f --changed -- \
    641632                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \
     
    649640                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h"
    650641        $(QUIET)$(CP) -v -f --changed -- \
    651                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h.ts" \
    652                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h"
    653         $(QUIET)$(CP) -v -f --changed -- \
    654                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h.ts" \
    655                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h"
    656         $(QUIET)$(CP) -v -f --changed -- \
    657                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h.ts" \
    658                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h"
    659         $(QUIET)$(CP) -v -f --changed -- \
    660                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h.ts" \
    661                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h"
    662         $(QUIET)$(CP) -v -f --changed -- \
    663                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h.ts" \
    664                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h"
     642                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h.ts" \
     643                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h"
     644        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(NLTAB)$(QUIET)$(CP) -v -f --changed -- \
     645                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h.ts" \
     646                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h")
     647        $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS), $(NLTAB)$(QUIET)$(CP) -v -f --changed -- \
     648                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h.ts" \
     649                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h")
    665650 endif
    666651        $(QUIET)$(RM) -f -- \
     
    671656                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.cpp.h.ts" \
    672657                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions.h.ts" \
    673                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions1.cpp.h.ts" \
    674                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions2.cpp.h.ts" \
    675                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions3.cpp.h.ts" \
    676                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions4.cpp.h.ts" \
    677                 "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.cpp.h.ts"
     658                "$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness.h.ts" \
     659                $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS),"$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeFunctions${x}.cpp.h.ts") \
     660               $(foreach x, $(VBOX_IEM_NATIVE_GEN_SRC_PARTS),"$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMNativeLiveness${x}.cpp.h.ts") \
    678661
    679662 foobared: $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMThreadedFunctions.h.ts
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness1.cpp

    r105796 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 1.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness1.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness2.cpp

    r105770 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 2.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness2.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness3.cpp

    r105770 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 3.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness3.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness4.cpp

    r105770 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 4.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness4.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness5.cpp

    r105770 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 5.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness5.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veLiveness6.cpp

    r105770 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompiler, Liveness Analysis.
     3 * IEM - Native Recompiler, Liveness Analysis, Part 6.
    44 */
    55
     
    2727
    2828
     29/* Common header with all the IEM_MC_XXX defines and whatnot. */
    2930#include "IEMAllN8veLiveness.h"
    30 #include "IEMNativeLiveness.cpp.h"
    3131
     32/* Include the generated headers: */
     33#include "IEMNativeLiveness.h"
     34#include "IEMNativeLiveness6.cpp.h"
     35
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs5.cpp

    r105756 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompilation of Threaded Function, Part 4.
     3 * IEM - Native Recompilation of Threaded Function, Part 5.
    44 */
    55
     
    3131 * Include the recompilation functions.
    3232 */
    33 #include "IEMNativeFunctions4.cpp.h"
     33#include "IEMNativeFunctions5.cpp.h"
    3434
  • trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompFuncs6.cpp

    r105756 r105797  
    11/* $Id$ */
    22/** @file
    3  * IEM - Native Recompilation of Threaded Function, Part 4.
     3 * IEM - Native Recompilation of Threaded Function, Part 6.
    44 */
    55
     
    3131 * Include the recompilation functions.
    3232 */
    33 #include "IEMNativeFunctions4.cpp.h"
     33#include "IEMNativeFunctions6.cpp.h"
    3434
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdPython.py

    r105768 r105797  
    405405        ksVariation_32_NoJmp,
    406406        ksVariation_32f_NoJmp,
     407        ksVariation_32_Addr16,
     408        ksVariation_32f_Addr16,
    407409        ksVariation_16,
    408410        ksVariation_16f,
     
    419421        ksVariation_16_Pre386_NoJmp,
    420422        ksVariation_16f_Pre386_NoJmp,
    421         ksVariation_32_Addr16,
    422         ksVariation_32f_Addr16,
    423423        ksVariation_64_Addr32,
    424424        ksVariation_64f_Addr32,
     
    23932393        #
    23942394        dByVari = self.dVariations;
    2395         fDbg = self.oMcBlock.sFunction == 'iemOp_jnl_Jv';
     2395        #fDbg  = self.oMcBlock.sFunction == 'iemOp_jnl_Jv';
    23962396        class Case:
    23972397            def __init__(self, sCond, sVarNm = None, sIntraPgVarNm = None, sIntraPgDispVariable = None):
     
    24402440            def isSameBody(aoThisBody, sThisIndexName, aoThatBody, sThatIndexName, sBody = ''):
    24412441                if len(aoThisBody) != len(aoThatBody):
    2442                     if fDbg: print('dbg: %sbody len diff: %s vs %s' % (sBody, len(aoThisBody), len(aoThatBody),));
     2442                    #if fDbg: print('dbg: %sbody len diff: %s vs %s' % (sBody, len(aoThisBody), len(aoThatBody),));
    24432443                    return False;
    24442444                for iStmt, oStmt in enumerate(aoThisBody):
     
    24492449                        return False;
    24502450                    if oStmt.sName != oThatStmt.sName:
    2451                         if fDbg: print('dbg: %sstmt #%s name: %s vs %s' % (sBody, iStmt, oStmt.sName, oThatStmt.sName,));
     2451                        #if fDbg: print('dbg: %sstmt #%s name: %s vs %s' % (sBody, iStmt, oStmt.sName, oThatStmt.sName,));
    24522452                        return False;
    24532453                    if len(oStmt.asParams) != len(oThatStmt.asParams):
    2454                         if fDbg: print('dbg: %sstmt #%s param count: %s vs %s'
    2455                                        % (sBody, iStmt, len(oStmt.asParams), len(oThatStmt.asParams),));
     2454                        #if fDbg: print('dbg: %sstmt #%s param count: %s vs %s'
     2455                        #               % (sBody, iStmt, len(oStmt.asParams), len(oThatStmt.asParams),));
    24562456                        return False;
    24572457                    for iParam, sParam in enumerate(oStmt.asParams):
     
    24622462                                 or sParam != sThisIndexName
    24632463                                 or oThatStmt.asParams[iParam] != sThatIndexName )):
    2464                             if fDbg: print('dbg: %sstmt #%s, param #%s: %s vs %s'
    2465                                            % (sBody, iStmt, iParam, sParam, oThatStmt.asParams[iParam],));
     2464                            #if fDbg: print('dbg: %sstmt #%s, param #%s: %s vs %s'
     2465                            #               % (sBody, iStmt, iParam, sParam, oThatStmt.asParams[iParam],));
    24662466                            return False;
    24672467                return True;
     
    26622662        for iCase in range(iFirstCaseWithBody + 1, len(aoCases)):
    26632663            fAllSameCases = fAllSameCases and aoCases[iCase].isSame(aoCases[iFirstCaseWithBody]);
    2664         if fDbg: print('fAllSameCases=%s %s' % (fAllSameCases, self.oMcBlock.sFunction,));
     2664        #if fDbg: print('fAllSameCases=%s %s' % (fAllSameCases, self.oMcBlock.sFunction,));
    26652665        if fAllSameCases:
    26662666            aoStmts = [
     
    33593359        return True;
    33603360
     3361    # This applies to both generateNativeFunctionsSource and generateNativeLivenessSource.
     3362    kcNativeSourceParts = 6;
     3363
    33613364    def generateNativeFunctionsSource(self, oOut, idxPart):
    33623365        """
     
    33643367        Returns success indicator.
    33653368        """
    3366         cParts = 4;
    3367         assert(idxPart in range(cParts));
     3369        assert(idxPart in range(self.kcNativeSourceParts));
    33683370        if not self.oOptions.fNativeRecompilerEnabled:
    33693371            return True;
     
    33823384        # have fewer instructions).
    33833385        #
    3384         cVariationsPerFile = len(ThreadedFunctionVariation.kasVariationsEmitOrder) // cParts;
     3386        cVariationsPerFile = len(ThreadedFunctionVariation.kasVariationsEmitOrder) // self.kcNativeSourceParts;
    33853387        idxFirstVar        = idxPart * cVariationsPerFile;
    33863388        idxEndVar          = idxFirstVar + cVariationsPerFile;
    3387         if idxPart + 1 >= cParts:
     3389        if idxPart + 1 >= self.kcNativeSourceParts:
    33883390            idxEndVar      = len(ThreadedFunctionVariation.kasVariationsEmitOrder);
    33893391        for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder[idxFirstVar:idxEndVar]:
     
    34273429
    34283430        #
    3429         # Output the function table if this is the first file.
    3430         #
    3431         if idxPart == 0:
     3431        # Output the function table in the smallest file (currently the last).
     3432        #
     3433        if idxPart + 1 == self.kcNativeSourceParts:
    34323434            oOut.write(   '\n'
    34333435                        + '\n'
     
    34703472        return True;
    34713473
    3472     def generateNativeLivenessSource(self, oOut, _):
     3474    def generateNativeLivenessHeader(self, oOut, _):
     3475        """
     3476        Generates the internal native recompiler liveness header file.
     3477        Returns success indicator.
     3478        """
     3479        if not self.oOptions.fNativeRecompilerEnabled:
     3480            return True;
     3481
     3482        oOut.write('\n'.join(self.generateLicenseHeader()));
     3483        oOut.write(   '\n'
     3484                   + '/*\n'
     3485                   + ' * Liveness analysis function prototypes.\n'
     3486                   + ' */\n');
     3487
     3488        # Emit prototypes for the liveness table functions.
     3489        for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder:
     3490            sVarName = ThreadedFunctionVariation.kdVariationNames[sVariation];
     3491            oOut.write('/*   Variation: ' + sVarName + ' */\n');
     3492            for oThreadedFunction in self.aoThreadedFuncs:
     3493                oVariation = oThreadedFunction.dVariations.get(sVariation, None) # type: ThreadedFunctionVariation
     3494                if oVariation and oVariation.oNativeRecomp and oVariation.oNativeRecomp.isRecompilable():
     3495                    oOut.write('IEM_DECL_IEMNATIVELIVENESSFUNC_PROTO(' + oVariation.getLivenessFunctionName() + ');\n');
     3496
     3497        oOut.write('\n');
     3498        return True;
     3499
     3500
     3501    def generateNativeLivenessSource(self, oOut, idxPart):
    34733502        """
    34743503        Generates the native recompiler liveness analysis functions source file.
    34753504        Returns success indicator.
    34763505        """
     3506        assert(idxPart in range(self.kcNativeSourceParts));
    34773507        if not self.oOptions.fNativeRecompilerEnabled:
    34783508            return True;
     
    34863516        # Emit the functions.
    34873517        #
    3488         for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder:
     3518        # The files are split up by threaded variation as that's the simplest way to
     3519        # do it, even if the distribution isn't entirely even (ksVariation_Default
     3520        # only has the defer to cimpl bits and the pre-386 variants will naturally
     3521        # have fewer instructions).
     3522        #
     3523        cVariationsPerFile = len(ThreadedFunctionVariation.kasVariationsEmitOrder) // self.kcNativeSourceParts;
     3524        idxFirstVar        = idxPart * cVariationsPerFile;
     3525        idxEndVar          = idxFirstVar + cVariationsPerFile;
     3526        if idxPart + 1 >= self.kcNativeSourceParts:
     3527            idxEndVar      = len(ThreadedFunctionVariation.kasVariationsEmitOrder);
     3528        for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder[idxFirstVar:idxEndVar]:
    34893529            sVarName = ThreadedFunctionVariation.kdVariationNames[sVariation];
    34903530            oOut.write(  '\n'
     
    35103550                                     ' (macro expansion)' if oMcBlock.iBeginLine == oMcBlock.iEndLine else '')
    35113551                               + ' */\n'
    3512                                + 'static IEM_DECL_IEMNATIVELIVENESSFUNC_DEF(' + oVariation.getLivenessFunctionName() + ')\n'
     3552                               + 'IEM_DECL_IEMNATIVELIVENESSFUNC_DEF(' + oVariation.getLivenessFunctionName() + ')\n'
    35133553                               + '{\n');
    35143554
     
    35263566
    35273567        #
    3528         # Output the function table.
    3529         #
    3530         oOut.write(   '\n'
    3531                     + '\n'
    3532                     + '/*\n'
    3533                     + ' * Liveness analysis function table running parallel to g_apfnIemThreadedFunctions and friends.\n'
    3534                     + ' */\n'
    3535                     + 'const PFNIEMNATIVELIVENESSFUNC g_apfnIemNativeLivenessFunctions[kIemThreadedFunc_End] =\n'
    3536                     + '{\n'
    3537                     + '    /*Invalid*/ NULL,'
    3538                     + '\n'
    3539                     + '    /*\n'
    3540                     + '     * Predefined.\n'
    3541                     + '     */\n'
    3542                     );
    3543         for sFuncNm, _, fHaveRecompFunc in self.katBltIns:
    3544             if fHaveRecompFunc:
    3545                 oOut.write('    iemNativeLivenessFunc_BltIn_%s,\n' % (sFuncNm,))
    3546             else:
    3547                 oOut.write('    NULL, /*BltIn_%s*/\n' % (sFuncNm,))
    3548 
    3549         iThreadedFunction = 1 + len(self.katBltIns);
    3550         for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder:
    3551             oOut.write(  '    /*\n'
    3552                        + '     * Variation: ' + ThreadedFunctionVariation.kdVariationNames[sVariation] + '\n'
    3553                        + '     */\n');
    3554             for oThreadedFunction in self.aoThreadedFuncs:
    3555                 oVariation = oThreadedFunction.dVariations.get(sVariation, None);
    3556                 if oVariation:
    3557                     iThreadedFunction += 1;
    3558                     assert oVariation.iEnumValue == iThreadedFunction;
    3559                     sName = oVariation.getLivenessFunctionName();
    3560                     if oVariation.oNativeRecomp and oVariation.oNativeRecomp.isRecompilable():
    3561                         oOut.write('    /*%4u*/ %s,\n' % (iThreadedFunction, sName,));
    3562                     else:
    3563                         oOut.write('    /*%4u*/ NULL /*%s*/,\n' % (iThreadedFunction, sName,));
    3564 
    3565         oOut.write(  '};\n'
    3566                    + '\n');
     3568        # Output the function table in the smallest file (currently the last).
     3569        #
     3570        if idxPart + 1 == self.kcNativeSourceParts:
     3571            oOut.write(   '\n'
     3572                        + '\n'
     3573                        + '\n'
     3574                        + '/*\n'
     3575                        + ' * Liveness analysis function table running parallel to g_apfnIemThreadedFunctions and friends.\n'
     3576                        + ' */\n'
     3577                        + 'const PFNIEMNATIVELIVENESSFUNC g_apfnIemNativeLivenessFunctions[kIemThreadedFunc_End] =\n'
     3578                        + '{\n'
     3579                        + '    /*Invalid*/ NULL,'
     3580                        + '\n'
     3581                        + '    /*\n'
     3582                        + '     * Predefined.\n'
     3583                        + '     */\n'
     3584                        );
     3585            for sFuncNm, _, fHaveRecompFunc in self.katBltIns:
     3586                if fHaveRecompFunc:
     3587                    oOut.write('    iemNativeLivenessFunc_BltIn_%s,\n' % (sFuncNm,))
     3588                else:
     3589                    oOut.write('    NULL, /*BltIn_%s*/\n' % (sFuncNm,))
     3590
     3591            iThreadedFunction = 1 + len(self.katBltIns);
     3592            for sVariation in ThreadedFunctionVariation.kasVariationsEmitOrder:
     3593                oOut.write(  '    /*\n'
     3594                           + '     * Variation: ' + ThreadedFunctionVariation.kdVariationNames[sVariation] + '\n'
     3595                           + '     */\n');
     3596                for oThreadedFunction in self.aoThreadedFuncs:
     3597                    oVariation = oThreadedFunction.dVariations.get(sVariation, None);
     3598                    if oVariation:
     3599                        iThreadedFunction += 1;
     3600                        assert oVariation.iEnumValue == iThreadedFunction;
     3601                        sName = oVariation.getLivenessFunctionName();
     3602                        if oVariation.oNativeRecomp and oVariation.oNativeRecomp.isRecompilable():
     3603                            oOut.write('    /*%4u*/ %s,\n' % (iThreadedFunction, sName,));
     3604                        else:
     3605                            oOut.write('    /*%4u*/ NULL /*%s*/,\n' % (iThreadedFunction, sName,));
     3606
     3607            oOut.write(  '};\n'
     3608                       + '\n');
    35673609        return True;
    35683610
     
    37153757                             default = '-',
    37163758                             help    = 'The output header file for the native recompiler functions.');
    3717         oParser.add_argument('--out-n8ve-funcs-cpp1',
    3718                              metavar = 'file-n8tv-funcs1.cpp',
    3719                              dest    = 'sOutFileN8veFuncsCpp1',
     3759        for iFile in range(1, self.kcNativeSourceParts + 1):
     3760            oParser.add_argument('--out-n8ve-funcs-cpp%u' % (iFile,),
     3761                                 metavar = 'file-n8tv-funcs%u.cpp' % (iFile,),
     3762                                 dest    = 'sOutFileN8veFuncsCpp%u' % (iFile,),
     3763                                 action  = 'store',
     3764                                 default = '-',
     3765                                 help    = 'The output C++ file for the native recompiler functions part %u.' % (iFile,));
     3766        oParser.add_argument('--out-n8ve-liveness-hdr',
     3767                             metavar = 'file-n8ve-liveness.h',
     3768                             dest    = 'sOutFileN8veLivenessHdr',
    37203769                             action  = 'store',
    37213770                             default = '-',
    3722                              help    = 'The output C++ file for the native recompiler functions part 1.');
    3723         oParser.add_argument('--out-n8ve-funcs-cpp2',
    3724                              metavar = 'file-n8ve-funcs2.cpp',
    3725                              dest    = 'sOutFileN8veFuncsCpp2',
    3726                              action  = 'store',
    3727                              default = '-',
    3728                              help    = 'The output C++ file for the native recompiler functions part 2.');
    3729         oParser.add_argument('--out-n8ve-funcs-cpp3',
    3730                              metavar = 'file-n8ve-funcs3.cpp',
    3731                              dest    = 'sOutFileN8veFuncsCpp3',
    3732                              action  = 'store',
    3733                              default = '-',
    3734                              help    = 'The output C++ file for the native recompiler functions part 3.');
    3735         oParser.add_argument('--out-n8ve-funcs-cpp4',
    3736                              metavar = 'file-n8ve-funcs4.cpp',
    3737                              dest    = 'sOutFileN8veFuncsCpp4',
    3738                              action  = 'store',
    3739                              default = '-',
    3740                              help    = 'The output C++ file for the native recompiler functions part 4.');
    3741         oParser.add_argument('--out-n8ve-liveness-cpp',
    3742                              metavar = 'file-n8ve-liveness.cpp',
    3743                              dest    = 'sOutFileN8veLivenessCpp',
    3744                              action  = 'store',
    3745                              default = '-',
    3746                              help    = 'The output C++ file for the native recompiler liveness analysis functions.');
     3771                             help    = 'The output header file for the native recompiler liveness analysis functions.');
     3772        for iFile in range(1, self.kcNativeSourceParts + 1):
     3773            oParser.add_argument('--out-n8ve-liveness-cpp%u' % (iFile,),
     3774                                 metavar = 'file-n8ve-liveness%u.cpp' % (iFile,),
     3775                                 dest    = 'sOutFileN8veLivenessCpp%u' % (iFile,),
     3776                                 action  = 'store',
     3777                                 default = '-',
     3778                                 help    = 'The output C++ file for the native recompiler liveness analysis functions part %u.'
     3779                                            % (iFile,));
    37473780        oParser.add_argument('--native',
    37483781                             dest    = 'fNativeRecompilerEnabled',
     
    37963829            # Generate the output files.
    37973830            #
    3798             aaoOutputFiles = (
     3831            aaoOutputFiles = [
    37993832                 ( self.oOptions.sOutFileThrdFuncsHdr,      self.generateThreadedFunctionsHeader, 0, ),
    38003833                 ( self.oOptions.sOutFileThrdFuncsCpp,      self.generateThreadedFunctionsSource, 0, ),
    38013834                 ( self.oOptions.sOutFileN8veFuncsHdr,      self.generateNativeFunctionsHeader,   0, ),
    3802                  ( self.oOptions.sOutFileN8veFuncsCpp1,     self.generateNativeFunctionsSource,   0, ),
    3803                  ( self.oOptions.sOutFileN8veFuncsCpp2,     self.generateNativeFunctionsSource,   1, ),
    3804                  ( self.oOptions.sOutFileN8veFuncsCpp3,     self.generateNativeFunctionsSource,   2, ),
    3805                  ( self.oOptions.sOutFileN8veFuncsCpp4,     self.generateNativeFunctionsSource,   3, ),
    3806                  ( self.oOptions.sOutFileN8veLivenessCpp,   self.generateNativeLivenessSource,    0, ),
     3835                 ( self.oOptions.sOutFileN8veLivenessHdr,   self.generateNativeLivenessHeader,    0, ),
    38073836                 ( self.oOptions.sOutFileModInput1,         self.generateModifiedInput,           1, ),
    38083837                 ( self.oOptions.sOutFileModInput2,         self.generateModifiedInput,           2, ),
    38093838                 ( self.oOptions.sOutFileModInput3,         self.generateModifiedInput,           3, ),
    38103839                 ( self.oOptions.sOutFileModInput4,         self.generateModifiedInput,           4, ),
    3811             );
     3840            ];
     3841            for iFile in range(self.kcNativeSourceParts):
     3842                aaoOutputFiles.extend([
     3843                    ( getattr(self.oOptions, 'sOutFileN8veFuncsCpp%u' % (iFile + 1)),
     3844                      self.generateNativeFunctionsSource, iFile, ),
     3845                    ( getattr(self.oOptions, 'sOutFileN8veLivenessCpp%u' % (iFile + 1)),
     3846                      self.generateNativeLivenessSource, iFile, ),
     3847                ]);
    38123848            fRc = True;
    38133849            for sOutFile, fnGenMethod, iPartNo in aaoOutputFiles:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette