hillclimber 0.1.6__cp313-cp313-macosx_15_0_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hillclimber/__init__.py +41 -0
- hillclimber/actions.py +53 -0
- hillclimber/analysis.py +590 -0
- hillclimber/biases.py +293 -0
- hillclimber/calc.py +22 -0
- hillclimber/cvs.py +1070 -0
- hillclimber/interfaces.py +133 -0
- hillclimber/metadynamics.py +416 -0
- hillclimber/nodes.py +6 -0
- hillclimber/opes.py +359 -0
- hillclimber/pycv.py +362 -0
- hillclimber/selectors.py +230 -0
- hillclimber/virtual_atoms.py +341 -0
- hillclimber-0.1.6.dist-info/METADATA +325 -0
- hillclimber-0.1.6.dist-info/RECORD +468 -0
- hillclimber-0.1.6.dist-info/WHEEL +6 -0
- hillclimber-0.1.6.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.6.dist-info/licenses/LICENSE +165 -0
- plumed/__init__.py +104 -0
- plumed/_lib/bin/plumed +0 -0
- plumed/_lib/bin/plumed-config +9 -0
- plumed/_lib/bin/plumed-patch +9 -0
- plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
- plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
- plumed/_lib/include/plumed/asmjit/arch.h +228 -0
- plumed/_lib/include/plumed/asmjit/arm.h +43 -0
- plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
- plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
- plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
- plumed/_lib/include/plumed/asmjit/base.h +56 -0
- plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
- plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
- plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
- plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
- plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
- plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
- plumed/_lib/include/plumed/asmjit/func.h +1327 -0
- plumed/_lib/include/plumed/asmjit/globals.h +370 -0
- plumed/_lib/include/plumed/asmjit/inst.h +137 -0
- plumed/_lib/include/plumed/asmjit/logging.h +317 -0
- plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
- plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
- plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
- plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
- plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
- plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
- plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
- plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
- plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
- plumed/_lib/include/plumed/asmjit/x86.h +45 -0
- plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
- plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
- plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
- plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
- plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
- plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
- plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
- plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
- plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
- plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
- plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
- plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
- plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
- plumed/_lib/include/plumed/bias/Bias.h +82 -0
- plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
- plumed/_lib/include/plumed/blas/blas.h +253 -0
- plumed/_lib/include/plumed/blas/def_external.h +61 -0
- plumed/_lib/include/plumed/blas/def_internal.h +97 -0
- plumed/_lib/include/plumed/blas/real.h +49 -0
- plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
- plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
- plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
- plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
- plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
- plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
- plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
- plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
- plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
- plumed/_lib/include/plumed/config/Config.h +118 -0
- plumed/_lib/include/plumed/config/version.h +9 -0
- plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
- plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
- plumed/_lib/include/plumed/contour/FindContour.h +67 -0
- plumed/_lib/include/plumed/core/Action.h +540 -0
- plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
- plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
- plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
- plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
- plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
- plumed/_lib/include/plumed/core/ActionSet.h +163 -0
- plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
- plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
- plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
- plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
- plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
- plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
- plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
- plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
- plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
- plumed/_lib/include/plumed/core/CLTool.h +177 -0
- plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
- plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
- plumed/_lib/include/plumed/core/Colvar.h +115 -0
- plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
- plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
- plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
- plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
- plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
- plumed/_lib/include/plumed/core/GREX.h +61 -0
- plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
- plumed/_lib/include/plumed/core/Group.h +41 -0
- plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
- plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
- plumed/_lib/include/plumed/core/PbcAction.h +61 -0
- plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
- plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
- plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
- plumed/_lib/include/plumed/core/TargetDist.h +48 -0
- plumed/_lib/include/plumed/core/Value.h +547 -0
- plumed/_lib/include/plumed/core/WithCmd.h +93 -0
- plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
- plumed/_lib/include/plumed/drr/DRR.h +383 -0
- plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
- plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
- plumed/_lib/include/plumed/function/Custom.h +54 -0
- plumed/_lib/include/plumed/function/Function.h +85 -0
- plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
- plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
- plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
- plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
- plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
- plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
- plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
- plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
- plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
- plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
- plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
- plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
- plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
- plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
- plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
- plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
- plumed/_lib/include/plumed/lapack/def_external.h +207 -0
- plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
- plumed/_lib/include/plumed/lapack/lapack.h +899 -0
- plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
- plumed/_lib/include/plumed/lapack/real.h +50 -0
- plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
- plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
- plumed/_lib/include/plumed/lepton/Exception.h +93 -0
- plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
- plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
- plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
- plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
- plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
- plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
- plumed/_lib/include/plumed/lepton/Parser.h +111 -0
- plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
- plumed/_lib/include/plumed/mapping/Path.h +44 -0
- plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
- plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
- plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
- plumed/_lib/include/plumed/maze/Core.h +65 -0
- plumed/_lib/include/plumed/maze/Loss.h +86 -0
- plumed/_lib/include/plumed/maze/Member.h +66 -0
- plumed/_lib/include/plumed/maze/Memetic.h +799 -0
- plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
- plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
- plumed/_lib/include/plumed/maze/Tools.h +183 -0
- plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
- plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
- plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
- plumed/_lib/include/plumed/molfile/fastio.h +683 -0
- plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
- plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
- plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
- plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
- plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
- plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
- plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
- plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
- plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
- plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
- plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
- plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
- plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
- plumed/_lib/include/plumed/tools/Angle.h +52 -0
- plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
- plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
- plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
- plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
- plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
- plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
- plumed/_lib/include/plumed/tools/Citations.h +74 -0
- plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
- plumed/_lib/include/plumed/tools/Communicator.h +316 -0
- plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
- plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
- plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
- plumed/_lib/include/plumed/tools/Exception.h +406 -0
- plumed/_lib/include/plumed/tools/File.h +28 -0
- plumed/_lib/include/plumed/tools/FileBase.h +153 -0
- plumed/_lib/include/plumed/tools/FileTools.h +37 -0
- plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
- plumed/_lib/include/plumed/tools/Grid.h +638 -0
- plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
- plumed/_lib/include/plumed/tools/IFile.h +117 -0
- plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
- plumed/_lib/include/plumed/tools/Keywords.h +380 -0
- plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
- plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
- plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
- plumed/_lib/include/plumed/tools/Log.h +41 -0
- plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
- plumed/_lib/include/plumed/tools/Matrix.h +721 -0
- plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
- plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
- plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
- plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
- plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
- plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
- plumed/_lib/include/plumed/tools/OFile.h +286 -0
- plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
- plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
- plumed/_lib/include/plumed/tools/PDB.h +154 -0
- plumed/_lib/include/plumed/tools/Pbc.h +139 -0
- plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
- plumed/_lib/include/plumed/tools/RMSD.h +493 -0
- plumed/_lib/include/plumed/tools/Random.h +80 -0
- plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
- plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
- plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
- plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
- plumed/_lib/include/plumed/tools/Tensor.h +724 -0
- plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
- plumed/_lib/include/plumed/tools/Tools.h +638 -0
- plumed/_lib/include/plumed/tools/Torsion.h +55 -0
- plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
- plumed/_lib/include/plumed/tools/Tree.h +61 -0
- plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
- plumed/_lib/include/plumed/tools/Units.h +167 -0
- plumed/_lib/include/plumed/tools/Vector.h +433 -0
- plumed/_lib/include/plumed/tools/View.h +296 -0
- plumed/_lib/include/plumed/tools/View2D.h +100 -0
- plumed/_lib/include/plumed/tools/h36.h +39 -0
- plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
- plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
- plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
- plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
- plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
- plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
- plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
- plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
- plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
- plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
- plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
- plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
- plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
- plumed/_lib/include/plumed/ves/VesBias.h +545 -0
- plumed/_lib/include/plumed/ves/VesTools.h +142 -0
- plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
- plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
- plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
- plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
- plumed/_lib/lib/PythonCVInterface.dylib +0 -0
- plumed/_lib/lib/libplumed.dylib +0 -0
- plumed/_lib/lib/libplumedKernel.dylib +0 -0
- plumed/_lib/lib/libplumedWrapper.a +0 -0
- plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
- plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
- plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
- plumed/_lib/lib/plumed/modulefile +69 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
- plumed/_lib/lib/plumed/patches/patch.sh +500 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
- plumed/_lib/lib/plumed/plumed-config +9 -0
- plumed/_lib/lib/plumed/plumed-mklib +9 -0
- plumed/_lib/lib/plumed/plumed-newcv +9 -0
- plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
- plumed/_lib/lib/plumed/plumed-patch +9 -0
- plumed/_lib/lib/plumed/plumed-runtime +0 -0
- plumed/_lib/lib/plumed/plumed-selector +9 -0
- plumed/_lib/lib/plumed/plumed-vim2html +9 -0
- plumed/_lib/lib/plumed/scripts/config.sh +126 -0
- plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
- plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
- plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
- plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
- plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
- plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
- plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
- plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
- plumed/_lib/lib/plumed/src/config/config.txt +181 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +3 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +3 -0
- plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
- plumed/_plumed_core.cpython-311-darwin.so +0 -0
- plumed/_plumed_core.cpython-312-darwin.so +0 -0
- plumed/_plumed_core.cpython-313-darwin.so +0 -0
- plumedCommunications.cpython-311-darwin.so +0 -0
- plumedCommunications.cpython-312-darwin.so +0 -0
- plumedCommunications.cpython-313-darwin.so +0 -0
- plumedCommunications.pyi +431 -0
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2008-2017, Petr Kobalicek
|
|
3
|
+
|
|
4
|
+
This software is provided 'as-is', without any express or implied
|
|
5
|
+
warranty. In no event will the authors be held liable for any damages
|
|
6
|
+
arising from the use of this software.
|
|
7
|
+
|
|
8
|
+
Permission is granted to anyone to use this software for any purpose,
|
|
9
|
+
including commercial applications, and to alter it and redistribute it
|
|
10
|
+
freely, subject to the following restrictions:
|
|
11
|
+
|
|
12
|
+
1. The origin of this software must not be misrepresented; you must not
|
|
13
|
+
claim that you wrote the original software. If you use this software
|
|
14
|
+
in a product, an acknowledgment in the product documentation would be
|
|
15
|
+
appreciated but is not required.
|
|
16
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
|
17
|
+
misrepresented as being the original software.
|
|
18
|
+
3. This notice may not be removed or altered from any source distribution.
|
|
19
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
20
|
+
#ifndef __PLUMED_asmjit_x86regalloc_p_h
|
|
21
|
+
#define __PLUMED_asmjit_x86regalloc_p_h
|
|
22
|
+
#ifdef __PLUMED_HAS_ASMJIT
|
|
23
|
+
#pragma GCC diagnostic push
|
|
24
|
+
#pragma GCC diagnostic ignored "-Wpedantic"
|
|
25
|
+
// [AsmJit]
|
|
26
|
+
// Complete x86/x64 JIT and Remote Assembler for C++.
|
|
27
|
+
//
|
|
28
|
+
// [License]
|
|
29
|
+
// Zlib - See LICENSE.md file in the package.
|
|
30
|
+
|
|
31
|
+
// [Guard]
|
|
32
|
+
#ifndef _ASMJIT_X86_X86REGALLOC_P_H
|
|
33
|
+
#define _ASMJIT_X86_X86REGALLOC_P_H
|
|
34
|
+
|
|
35
|
+
#include "./asmjit_build.h"
|
|
36
|
+
#if !defined(ASMJIT_DISABLE_COMPILER)
|
|
37
|
+
|
|
38
|
+
// [Dependencies]
|
|
39
|
+
#include "./codecompiler.h"
|
|
40
|
+
#include "./regalloc_p.h"
|
|
41
|
+
#include "./utils.h"
|
|
42
|
+
#include "./x86assembler.h"
|
|
43
|
+
#include "./x86compiler.h"
|
|
44
|
+
#include "./x86misc.h"
|
|
45
|
+
|
|
46
|
+
// [Api-Begin]
|
|
47
|
+
#include "./asmjit_apibegin.h"
|
|
48
|
+
|
|
49
|
+
namespace PLMD {
|
|
50
|
+
namespace asmjit {
|
|
51
|
+
|
|
52
|
+
//! \addtogroup asmjit_x86
|
|
53
|
+
//! \{
|
|
54
|
+
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// [asmjit::X86RAData]
|
|
57
|
+
// ============================================================================
|
|
58
|
+
|
|
59
|
+
struct X86RAData : public RAData {
|
|
60
|
+
ASMJIT_INLINE X86RAData(uint32_t tiedTotal) noexcept : RAData(tiedTotal) {
|
|
61
|
+
inRegs.reset();
|
|
62
|
+
outRegs.reset();
|
|
63
|
+
clobberedRegs.reset();
|
|
64
|
+
tiedIndex.reset();
|
|
65
|
+
tiedCount.reset();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// --------------------------------------------------------------------------
|
|
69
|
+
// [Accessors]
|
|
70
|
+
// --------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
//! Get TiedReg array.
|
|
73
|
+
ASMJIT_INLINE TiedReg* getTiedArray() const noexcept {
|
|
74
|
+
return const_cast<TiedReg*>(tiedArray);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//! Get TiedReg array for a given register `kind`.
|
|
78
|
+
ASMJIT_INLINE TiedReg* getTiedArrayByKind(uint32_t kind) const noexcept {
|
|
79
|
+
return const_cast<TiedReg*>(tiedArray) + tiedIndex.get(kind);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//! Get TiedReg index for a given register `kind`.
|
|
83
|
+
ASMJIT_INLINE uint32_t getTiedStart(uint32_t kind) const noexcept {
|
|
84
|
+
return tiedIndex.get(kind);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//! Get TiedReg count for a given register `kind`.
|
|
88
|
+
ASMJIT_INLINE uint32_t getTiedCountByKind(uint32_t kind) const noexcept {
|
|
89
|
+
return tiedCount.get(kind);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//! Get TiedReg at the specified `index`.
|
|
93
|
+
ASMJIT_INLINE TiedReg* getTiedAt(uint32_t index) const noexcept {
|
|
94
|
+
ASMJIT_ASSERT(index < tiedTotal);
|
|
95
|
+
return getTiedArray() + index;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
//! Get TiedReg at the specified index for a given register `kind`.
|
|
99
|
+
ASMJIT_INLINE TiedReg* getTiedAtByKind(uint32_t kind, uint32_t index) const noexcept {
|
|
100
|
+
ASMJIT_ASSERT(index < tiedCount._regs[kind]);
|
|
101
|
+
return getTiedArrayByKind(kind) + index;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
ASMJIT_INLINE void setTiedAt(uint32_t index, TiedReg& tied) noexcept {
|
|
105
|
+
ASMJIT_ASSERT(index < tiedTotal);
|
|
106
|
+
tiedArray[index] = tied;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// --------------------------------------------------------------------------
|
|
110
|
+
// [Utils]
|
|
111
|
+
// --------------------------------------------------------------------------
|
|
112
|
+
|
|
113
|
+
//! Find TiedReg.
|
|
114
|
+
ASMJIT_INLINE TiedReg* findTied(VirtReg* vreg) const noexcept {
|
|
115
|
+
TiedReg* tiedArray = getTiedArray();
|
|
116
|
+
uint32_t tiedCount = tiedTotal;
|
|
117
|
+
|
|
118
|
+
for (uint32_t i = 0; i < tiedCount; i++)
|
|
119
|
+
if (tiedArray[i].vreg == vreg)
|
|
120
|
+
return &tiedArray[i];
|
|
121
|
+
|
|
122
|
+
return nullptr;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
//! Find TiedReg (by class).
|
|
126
|
+
ASMJIT_INLINE TiedReg* findTiedByKind(uint32_t kind, VirtReg* vreg) const noexcept {
|
|
127
|
+
TiedReg* tiedArray = getTiedArrayByKind(kind);
|
|
128
|
+
uint32_t tiedCount = getTiedCountByKind(kind);
|
|
129
|
+
|
|
130
|
+
for (uint32_t i = 0; i < tiedCount; i++)
|
|
131
|
+
if (tiedArray[i].vreg == vreg)
|
|
132
|
+
return &tiedArray[i];
|
|
133
|
+
|
|
134
|
+
return nullptr;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// --------------------------------------------------------------------------
|
|
138
|
+
// [Members]
|
|
139
|
+
// --------------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
//! Special registers on input.
|
|
142
|
+
//!
|
|
143
|
+
//! Special register(s) restricted to one or more physical register. If there
|
|
144
|
+
//! is more than one special register it means that we have to duplicate the
|
|
145
|
+
//! variable content to all of them (it means that the same variable was used
|
|
146
|
+
//! by two or more operands). We forget about duplicates after the register
|
|
147
|
+
//! allocation finishes and marks all duplicates as non-assigned.
|
|
148
|
+
X86RegMask inRegs;
|
|
149
|
+
|
|
150
|
+
//! Special registers on output.
|
|
151
|
+
//!
|
|
152
|
+
//! Special register(s) used on output. Each variable can have only one
|
|
153
|
+
//! special register on the output, 'X86RAData' contains all registers from
|
|
154
|
+
//! all 'TiedReg's.
|
|
155
|
+
X86RegMask outRegs;
|
|
156
|
+
|
|
157
|
+
//! Clobbered registers (by a function call).
|
|
158
|
+
X86RegMask clobberedRegs;
|
|
159
|
+
|
|
160
|
+
//! Start indexes of `TiedReg`s per register kind.
|
|
161
|
+
X86RegCount tiedIndex;
|
|
162
|
+
//! Count of variables per register kind.
|
|
163
|
+
X86RegCount tiedCount;
|
|
164
|
+
|
|
165
|
+
//! Linked registers.
|
|
166
|
+
TiedReg tiedArray[1];
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
// ============================================================================
|
|
170
|
+
// [asmjit::X86StateCell]
|
|
171
|
+
// ============================================================================
|
|
172
|
+
|
|
173
|
+
//! X86/X64 state-cell.
|
|
174
|
+
union X86StateCell {
|
|
175
|
+
// --------------------------------------------------------------------------
|
|
176
|
+
// [Accessors]
|
|
177
|
+
// --------------------------------------------------------------------------
|
|
178
|
+
|
|
179
|
+
ASMJIT_INLINE uint32_t getState() const noexcept { return _state; }
|
|
180
|
+
ASMJIT_INLINE void setState(uint32_t state) noexcept { _state = static_cast<uint8_t>(state); }
|
|
181
|
+
|
|
182
|
+
// --------------------------------------------------------------------------
|
|
183
|
+
// [Reset]
|
|
184
|
+
// --------------------------------------------------------------------------
|
|
185
|
+
|
|
186
|
+
ASMJIT_INLINE void reset() noexcept { _packed = 0; }
|
|
187
|
+
|
|
188
|
+
// --------------------------------------------------------------------------
|
|
189
|
+
// [Members]
|
|
190
|
+
// --------------------------------------------------------------------------
|
|
191
|
+
|
|
192
|
+
uint8_t _packed;
|
|
193
|
+
|
|
194
|
+
struct {
|
|
195
|
+
uint8_t _state : 2;
|
|
196
|
+
uint8_t _unused : 6;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// [asmjit::X86RAState]
|
|
202
|
+
// ============================================================================
|
|
203
|
+
|
|
204
|
+
//! X86/X64 state.
|
|
205
|
+
struct X86RAState : RAState {
|
|
206
|
+
enum {
|
|
207
|
+
//! Base index of GP registers.
|
|
208
|
+
kGpIndex = 0,
|
|
209
|
+
//! Count of GP registers.
|
|
210
|
+
kGpCount = 16,
|
|
211
|
+
|
|
212
|
+
//! Base index of MMX registers.
|
|
213
|
+
kMmIndex = kGpIndex + kGpCount,
|
|
214
|
+
//! Count of Mm registers.
|
|
215
|
+
kMmCount = 8,
|
|
216
|
+
|
|
217
|
+
//! Base index of XMM registers.
|
|
218
|
+
kXmmIndex = kMmIndex + kMmCount,
|
|
219
|
+
//! Count of XMM registers.
|
|
220
|
+
kXmmCount = 16,
|
|
221
|
+
|
|
222
|
+
//! Count of all registers in `X86RAState`.
|
|
223
|
+
kAllCount = kXmmIndex + kXmmCount
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// --------------------------------------------------------------------------
|
|
227
|
+
// [Accessors]
|
|
228
|
+
// --------------------------------------------------------------------------
|
|
229
|
+
|
|
230
|
+
ASMJIT_INLINE VirtReg** getList() {
|
|
231
|
+
return _list;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
ASMJIT_INLINE VirtReg** getListByKind(uint32_t kind) {
|
|
235
|
+
switch (kind) {
|
|
236
|
+
case X86Reg::kKindGp : return _listGp;
|
|
237
|
+
case X86Reg::kKindMm : return _listMm;
|
|
238
|
+
case X86Reg::kKindVec: return _listXmm;
|
|
239
|
+
|
|
240
|
+
default:
|
|
241
|
+
return nullptr;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// --------------------------------------------------------------------------
|
|
246
|
+
// [Clear]
|
|
247
|
+
// --------------------------------------------------------------------------
|
|
248
|
+
|
|
249
|
+
ASMJIT_INLINE void reset(size_t numCells) {
|
|
250
|
+
::memset(this, 0, kAllCount * sizeof(VirtReg*) +
|
|
251
|
+
2 * sizeof(X86RegMask) +
|
|
252
|
+
numCells * sizeof(X86StateCell));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// --------------------------------------------------------------------------
|
|
256
|
+
// [Members]
|
|
257
|
+
// --------------------------------------------------------------------------
|
|
258
|
+
|
|
259
|
+
union {
|
|
260
|
+
//! List of all allocated variables in one array.
|
|
261
|
+
VirtReg* _list[kAllCount];
|
|
262
|
+
|
|
263
|
+
struct {
|
|
264
|
+
//! Allocated GP registers.
|
|
265
|
+
VirtReg* _listGp[kGpCount];
|
|
266
|
+
//! Allocated MMX registers.
|
|
267
|
+
VirtReg* _listMm[kMmCount];
|
|
268
|
+
//! Allocated XMM registers.
|
|
269
|
+
VirtReg* _listXmm[kXmmCount];
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
//! Occupied registers (mask).
|
|
274
|
+
X86RegMask _occupied;
|
|
275
|
+
//! Modified registers (mask).
|
|
276
|
+
X86RegMask _modified;
|
|
277
|
+
|
|
278
|
+
//! Variables data, the length is stored in `X86RAPass`.
|
|
279
|
+
X86StateCell _cells[1];
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// ============================================================================
|
|
283
|
+
// [asmjit::X86RAPass]
|
|
284
|
+
// ============================================================================
|
|
285
|
+
|
|
286
|
+
#if defined(ASMJIT_DEBUG)
|
|
287
|
+
# define ASMJIT_X86_CHECK_STATE _checkState();
|
|
288
|
+
#else
|
|
289
|
+
# define ASMJIT_X86_CHECK_STATE
|
|
290
|
+
#endif // ASMJIT_DEBUG
|
|
291
|
+
|
|
292
|
+
//! \internal
|
|
293
|
+
//!
|
|
294
|
+
//! X86 register allocator pipeline.
|
|
295
|
+
//!
|
|
296
|
+
//! Takes care of generating function prologs and epilogs, and also performs
|
|
297
|
+
//! register allocation.
|
|
298
|
+
class X86RAPass : public RAPass {
|
|
299
|
+
public:
|
|
300
|
+
ASMJIT_NONCOPYABLE(X86RAPass)
|
|
301
|
+
typedef RAPass Base;
|
|
302
|
+
|
|
303
|
+
enum RegOp {
|
|
304
|
+
kRegOpMove,
|
|
305
|
+
kRegOpLoad,
|
|
306
|
+
kRegOpSave
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
// --------------------------------------------------------------------------
|
|
310
|
+
// [Construction / Destruction]
|
|
311
|
+
// --------------------------------------------------------------------------
|
|
312
|
+
|
|
313
|
+
X86RAPass() noexcept;
|
|
314
|
+
virtual ~X86RAPass() noexcept;
|
|
315
|
+
|
|
316
|
+
// --------------------------------------------------------------------------
|
|
317
|
+
// [Interface]
|
|
318
|
+
// --------------------------------------------------------------------------
|
|
319
|
+
|
|
320
|
+
virtual Error process(Zone* zone) noexcept override;
|
|
321
|
+
virtual Error prepare(CCFunc* func) noexcept override;
|
|
322
|
+
|
|
323
|
+
// --------------------------------------------------------------------------
|
|
324
|
+
// [ArchInfo]
|
|
325
|
+
// --------------------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
ASMJIT_INLINE uint32_t getGpSize() const noexcept { return _zsp.getSize(); }
|
|
328
|
+
|
|
329
|
+
// --------------------------------------------------------------------------
|
|
330
|
+
// [Accessors]
|
|
331
|
+
// --------------------------------------------------------------------------
|
|
332
|
+
|
|
333
|
+
//! Get compiler as `X86Compiler`.
|
|
334
|
+
ASMJIT_INLINE X86Compiler* cc() const noexcept { return static_cast<X86Compiler*>(_cb); }
|
|
335
|
+
//! Get clobbered registers (global).
|
|
336
|
+
ASMJIT_INLINE uint32_t getClobberedRegs(uint32_t kind) noexcept { return _clobberedRegs.get(kind); }
|
|
337
|
+
|
|
338
|
+
// --------------------------------------------------------------------------
|
|
339
|
+
// [Helpers]
|
|
340
|
+
// --------------------------------------------------------------------------
|
|
341
|
+
|
|
342
|
+
ASMJIT_INLINE X86RAData* newRAData(uint32_t tiedTotal) noexcept {
|
|
343
|
+
return new(_zone->alloc(sizeof(X86RAData) + tiedTotal * sizeof(TiedReg))) X86RAData(tiedTotal);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// --------------------------------------------------------------------------
|
|
347
|
+
// [Emit]
|
|
348
|
+
// --------------------------------------------------------------------------
|
|
349
|
+
|
|
350
|
+
// Tiny wrappers that call `X86Internal::emit...()`.
|
|
351
|
+
Error emitMove(VirtReg* vreg, uint32_t dstId, uint32_t srcId, const char* reason);
|
|
352
|
+
Error emitLoad(VirtReg* vreg, uint32_t id, const char* reason);
|
|
353
|
+
Error emitSave(VirtReg* vreg, uint32_t id, const char* reason);
|
|
354
|
+
Error emitSwapGp(VirtReg* aVReg, VirtReg* bVReg, uint32_t aId, uint32_t bId, const char* reason) noexcept;
|
|
355
|
+
|
|
356
|
+
Error emitImmToReg(uint32_t dstTypeId, uint32_t dstPhysId, const Imm* src) noexcept;
|
|
357
|
+
Error emitImmToStack(uint32_t dstTypeId, const X86Mem* dst, const Imm* src) noexcept;
|
|
358
|
+
Error emitRegToStack(uint32_t dstTypeId, const X86Mem* dst, uint32_t srcTypeId, uint32_t srcPhysId) noexcept;
|
|
359
|
+
|
|
360
|
+
// --------------------------------------------------------------------------
|
|
361
|
+
// [Register Management]
|
|
362
|
+
// --------------------------------------------------------------------------
|
|
363
|
+
|
|
364
|
+
void _checkState();
|
|
365
|
+
|
|
366
|
+
// --------------------------------------------------------------------------
|
|
367
|
+
// [Attach / Detach]
|
|
368
|
+
// --------------------------------------------------------------------------
|
|
369
|
+
|
|
370
|
+
//! Attach.
|
|
371
|
+
//!
|
|
372
|
+
//! Attach a register to the 'VirtReg', changing 'VirtReg' members to show
|
|
373
|
+
//! that the variable is currently alive and linking variable with the
|
|
374
|
+
//! current 'X86RAState'.
|
|
375
|
+
template<int C>
|
|
376
|
+
ASMJIT_INLINE void attach(VirtReg* vreg, uint32_t physId, bool modified) {
|
|
377
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
378
|
+
ASMJIT_ASSERT(physId != Globals::kInvalidRegId);
|
|
379
|
+
|
|
380
|
+
// Prevent Esp allocation if C==Gp.
|
|
381
|
+
ASMJIT_ASSERT(C != X86Reg::kKindGp || physId != X86Gp::kIdSp);
|
|
382
|
+
|
|
383
|
+
uint32_t regMask = Utils::mask(physId);
|
|
384
|
+
|
|
385
|
+
vreg->setState(VirtReg::kStateReg);
|
|
386
|
+
vreg->setModified(modified);
|
|
387
|
+
vreg->setPhysId(physId);
|
|
388
|
+
vreg->addHomeId(physId);
|
|
389
|
+
|
|
390
|
+
_x86State.getListByKind(C)[physId] = vreg;
|
|
391
|
+
_x86State._occupied.or_(C, regMask);
|
|
392
|
+
_x86State._modified.or_(C, static_cast<uint32_t>(modified) << physId);
|
|
393
|
+
|
|
394
|
+
ASMJIT_X86_CHECK_STATE
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
//! Detach.
|
|
398
|
+
//!
|
|
399
|
+
//! The opposite of 'Attach'. Detach resets the members in 'VirtReg'
|
|
400
|
+
//! (physId, state and changed flags) and unlinks the variable with the
|
|
401
|
+
//! current 'X86RAState'.
|
|
402
|
+
template<int C>
|
|
403
|
+
ASMJIT_INLINE void detach(VirtReg* vreg, uint32_t physId, uint32_t vState) {
|
|
404
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
405
|
+
ASMJIT_ASSERT(vreg->getPhysId() == physId);
|
|
406
|
+
ASMJIT_ASSERT(vState != VirtReg::kStateReg);
|
|
407
|
+
|
|
408
|
+
uint32_t regMask = Utils::mask(physId);
|
|
409
|
+
|
|
410
|
+
vreg->setState(vState);
|
|
411
|
+
vreg->resetPhysId();
|
|
412
|
+
vreg->setModified(false);
|
|
413
|
+
|
|
414
|
+
_x86State.getListByKind(C)[physId] = nullptr;
|
|
415
|
+
_x86State._occupied.andNot(C, regMask);
|
|
416
|
+
_x86State._modified.andNot(C, regMask);
|
|
417
|
+
|
|
418
|
+
ASMJIT_X86_CHECK_STATE
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// --------------------------------------------------------------------------
|
|
422
|
+
// [Rebase]
|
|
423
|
+
// --------------------------------------------------------------------------
|
|
424
|
+
|
|
425
|
+
//! Rebase.
|
|
426
|
+
//!
|
|
427
|
+
//! Change the register of the 'VirtReg' changing also the current 'X86RAState'.
|
|
428
|
+
//! Rebase is nearly identical to 'Detach' and 'Attach' sequence, but doesn't
|
|
429
|
+
//! change the `VirtReg`s modified flag.
|
|
430
|
+
template<int C>
|
|
431
|
+
ASMJIT_INLINE void rebase(VirtReg* vreg, uint32_t newPhysId, uint32_t oldPhysId) {
|
|
432
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
433
|
+
|
|
434
|
+
uint32_t newRegMask = Utils::mask(newPhysId);
|
|
435
|
+
uint32_t oldRegMask = Utils::mask(oldPhysId);
|
|
436
|
+
uint32_t bothRegMask = newRegMask ^ oldRegMask;
|
|
437
|
+
|
|
438
|
+
vreg->setPhysId(newPhysId);
|
|
439
|
+
|
|
440
|
+
_x86State.getListByKind(C)[oldPhysId] = nullptr;
|
|
441
|
+
_x86State.getListByKind(C)[newPhysId] = vreg;
|
|
442
|
+
|
|
443
|
+
_x86State._occupied.xor_(C, bothRegMask);
|
|
444
|
+
_x86State._modified.xor_(C, bothRegMask & -static_cast<int32_t>(vreg->isModified()));
|
|
445
|
+
|
|
446
|
+
ASMJIT_X86_CHECK_STATE
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// --------------------------------------------------------------------------
|
|
450
|
+
// [Load / Save]
|
|
451
|
+
// --------------------------------------------------------------------------
|
|
452
|
+
|
|
453
|
+
//! Load.
|
|
454
|
+
//!
|
|
455
|
+
//! Load variable from its memory slot to a register, emitting 'Load'
|
|
456
|
+
//! instruction and changing the variable state to allocated.
|
|
457
|
+
template<int C>
|
|
458
|
+
ASMJIT_INLINE void load(VirtReg* vreg, uint32_t physId) {
|
|
459
|
+
// Can be only called if variable is not allocated.
|
|
460
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
461
|
+
ASMJIT_ASSERT(vreg->getState() != VirtReg::kStateReg);
|
|
462
|
+
ASMJIT_ASSERT(vreg->getPhysId() == Globals::kInvalidRegId);
|
|
463
|
+
|
|
464
|
+
emitLoad(vreg, physId, "Load");
|
|
465
|
+
attach<C>(vreg, physId, false);
|
|
466
|
+
|
|
467
|
+
ASMJIT_X86_CHECK_STATE
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
//! Save.
|
|
471
|
+
//!
|
|
472
|
+
//! Save the variable into its home location, but keep it as allocated.
|
|
473
|
+
template<int C>
|
|
474
|
+
ASMJIT_INLINE void save(VirtReg* vreg) {
|
|
475
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
476
|
+
ASMJIT_ASSERT(vreg->getState() == VirtReg::kStateReg);
|
|
477
|
+
ASMJIT_ASSERT(vreg->getPhysId() != Globals::kInvalidRegId);
|
|
478
|
+
|
|
479
|
+
uint32_t physId = vreg->getPhysId();
|
|
480
|
+
uint32_t regMask = Utils::mask(physId);
|
|
481
|
+
|
|
482
|
+
emitSave(vreg, physId, "Save");
|
|
483
|
+
vreg->setModified(false);
|
|
484
|
+
_x86State._modified.andNot(C, regMask);
|
|
485
|
+
|
|
486
|
+
ASMJIT_X86_CHECK_STATE
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// --------------------------------------------------------------------------
|
|
490
|
+
// [Move / Swap]
|
|
491
|
+
// --------------------------------------------------------------------------
|
|
492
|
+
|
|
493
|
+
//! Move a register.
|
|
494
|
+
//!
|
|
495
|
+
//! Move register from one index to another, emitting 'Move' if needed. This
|
|
496
|
+
//! function does nothing if register is already at the given index.
|
|
497
|
+
template<int C>
|
|
498
|
+
ASMJIT_INLINE void move(VirtReg* vreg, uint32_t newPhysId) {
|
|
499
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
500
|
+
ASMJIT_ASSERT(vreg->getState() == VirtReg::kStateReg);
|
|
501
|
+
ASMJIT_ASSERT(vreg->getPhysId() != Globals::kInvalidRegId);
|
|
502
|
+
|
|
503
|
+
uint32_t oldPhysId = vreg->getPhysId();
|
|
504
|
+
if (newPhysId != oldPhysId) {
|
|
505
|
+
emitMove(vreg, newPhysId, oldPhysId, "Move");
|
|
506
|
+
rebase<C>(vreg, newPhysId, oldPhysId);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
ASMJIT_X86_CHECK_STATE
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
//! Swap two registers
|
|
513
|
+
//!
|
|
514
|
+
//! It's only possible to swap Gp registers.
|
|
515
|
+
ASMJIT_INLINE void swapGp(VirtReg* aVReg, VirtReg* bVReg) {
|
|
516
|
+
ASMJIT_ASSERT(aVReg != bVReg);
|
|
517
|
+
|
|
518
|
+
ASMJIT_ASSERT(aVReg->getKind() == X86Reg::kKindGp);
|
|
519
|
+
ASMJIT_ASSERT(aVReg->getState() == VirtReg::kStateReg);
|
|
520
|
+
ASMJIT_ASSERT(aVReg->getPhysId() != Globals::kInvalidRegId);
|
|
521
|
+
|
|
522
|
+
ASMJIT_ASSERT(bVReg->getKind() == X86Reg::kKindGp);
|
|
523
|
+
ASMJIT_ASSERT(bVReg->getState() == VirtReg::kStateReg);
|
|
524
|
+
ASMJIT_ASSERT(bVReg->getPhysId() != Globals::kInvalidRegId);
|
|
525
|
+
|
|
526
|
+
uint32_t aIndex = aVReg->getPhysId();
|
|
527
|
+
uint32_t bIndex = bVReg->getPhysId();
|
|
528
|
+
|
|
529
|
+
emitSwapGp(aVReg, bVReg, aIndex, bIndex, "Swap");
|
|
530
|
+
|
|
531
|
+
aVReg->setPhysId(bIndex);
|
|
532
|
+
bVReg->setPhysId(aIndex);
|
|
533
|
+
|
|
534
|
+
_x86State.getListByKind(X86Reg::kKindGp)[aIndex] = bVReg;
|
|
535
|
+
_x86State.getListByKind(X86Reg::kKindGp)[bIndex] = aVReg;
|
|
536
|
+
|
|
537
|
+
uint32_t m = aVReg->isModified() ^ bVReg->isModified();
|
|
538
|
+
_x86State._modified.xor_(X86Reg::kKindGp, (m << aIndex) | (m << bIndex));
|
|
539
|
+
|
|
540
|
+
ASMJIT_X86_CHECK_STATE
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// --------------------------------------------------------------------------
|
|
544
|
+
// [Alloc / Spill]
|
|
545
|
+
// --------------------------------------------------------------------------
|
|
546
|
+
|
|
547
|
+
//! Alloc.
|
|
548
|
+
template<int C>
|
|
549
|
+
ASMJIT_INLINE void alloc(VirtReg* vreg, uint32_t physId) {
|
|
550
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
551
|
+
ASMJIT_ASSERT(physId != Globals::kInvalidRegId);
|
|
552
|
+
|
|
553
|
+
uint32_t oldPhysId = vreg->getPhysId();
|
|
554
|
+
uint32_t oldState = vreg->getState();
|
|
555
|
+
uint32_t regMask = Utils::mask(physId);
|
|
556
|
+
|
|
557
|
+
ASMJIT_ASSERT(_x86State.getListByKind(C)[physId] == nullptr || physId == oldPhysId);
|
|
558
|
+
|
|
559
|
+
if (oldState != VirtReg::kStateReg) {
|
|
560
|
+
if (oldState == VirtReg::kStateMem)
|
|
561
|
+
emitLoad(vreg, physId, "Alloc");
|
|
562
|
+
vreg->setModified(false);
|
|
563
|
+
}
|
|
564
|
+
else if (oldPhysId != physId) {
|
|
565
|
+
emitMove(vreg, physId, oldPhysId, "Alloc");
|
|
566
|
+
|
|
567
|
+
_x86State.getListByKind(C)[oldPhysId] = nullptr;
|
|
568
|
+
regMask ^= Utils::mask(oldPhysId);
|
|
569
|
+
}
|
|
570
|
+
else {
|
|
571
|
+
ASMJIT_X86_CHECK_STATE
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
vreg->setState(VirtReg::kStateReg);
|
|
576
|
+
vreg->setPhysId(physId);
|
|
577
|
+
vreg->addHomeId(physId);
|
|
578
|
+
|
|
579
|
+
_x86State.getListByKind(C)[physId] = vreg;
|
|
580
|
+
_x86State._occupied.xor_(C, regMask);
|
|
581
|
+
_x86State._modified.xor_(C, regMask & -static_cast<int32_t>(vreg->isModified()));
|
|
582
|
+
|
|
583
|
+
ASMJIT_X86_CHECK_STATE
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
//! Spill.
|
|
587
|
+
//!
|
|
588
|
+
//! Spill variable/register, saves the content to the memory-home if modified.
|
|
589
|
+
template<int C>
|
|
590
|
+
ASMJIT_INLINE void spill(VirtReg* vreg) {
|
|
591
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
592
|
+
|
|
593
|
+
if (vreg->getState() != VirtReg::kStateReg) {
|
|
594
|
+
ASMJIT_X86_CHECK_STATE
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
uint32_t physId = vreg->getPhysId();
|
|
599
|
+
ASMJIT_ASSERT(physId != Globals::kInvalidRegId);
|
|
600
|
+
ASMJIT_ASSERT(_x86State.getListByKind(C)[physId] == vreg);
|
|
601
|
+
|
|
602
|
+
if (vreg->isModified())
|
|
603
|
+
emitSave(vreg, physId, "Spill");
|
|
604
|
+
detach<C>(vreg, physId, VirtReg::kStateMem);
|
|
605
|
+
|
|
606
|
+
ASMJIT_X86_CHECK_STATE
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// --------------------------------------------------------------------------
|
|
610
|
+
// [Modify]
|
|
611
|
+
// --------------------------------------------------------------------------
|
|
612
|
+
|
|
613
|
+
template<int C>
|
|
614
|
+
ASMJIT_INLINE void modify(VirtReg* vreg) {
|
|
615
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
616
|
+
|
|
617
|
+
uint32_t physId = vreg->getPhysId();
|
|
618
|
+
uint32_t regMask = Utils::mask(physId);
|
|
619
|
+
|
|
620
|
+
vreg->setModified(true);
|
|
621
|
+
_x86State._modified.or_(C, regMask);
|
|
622
|
+
|
|
623
|
+
ASMJIT_X86_CHECK_STATE
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
// --------------------------------------------------------------------------
|
|
627
|
+
// [Unuse]
|
|
628
|
+
// --------------------------------------------------------------------------
|
|
629
|
+
|
|
630
|
+
//! Unuse.
|
|
631
|
+
//!
|
|
632
|
+
//! Unuse variable, it will be detached it if it's allocated then its state
|
|
633
|
+
//! will be changed to VirtReg::kStateNone.
|
|
634
|
+
template<int C>
|
|
635
|
+
ASMJIT_INLINE void unuse(VirtReg* vreg, uint32_t vState = VirtReg::kStateNone) {
|
|
636
|
+
ASMJIT_ASSERT(vreg->getKind() == C);
|
|
637
|
+
ASMJIT_ASSERT(vState != VirtReg::kStateReg);
|
|
638
|
+
|
|
639
|
+
uint32_t physId = vreg->getPhysId();
|
|
640
|
+
if (physId != Globals::kInvalidRegId)
|
|
641
|
+
detach<C>(vreg, physId, vState);
|
|
642
|
+
else
|
|
643
|
+
vreg->setState(vState);
|
|
644
|
+
|
|
645
|
+
ASMJIT_X86_CHECK_STATE
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// --------------------------------------------------------------------------
|
|
649
|
+
// [State]
|
|
650
|
+
// --------------------------------------------------------------------------
|
|
651
|
+
|
|
652
|
+
//! Get state as `X86RAState`.
|
|
653
|
+
ASMJIT_INLINE X86RAState* getState() const { return const_cast<X86RAState*>(&_x86State); }
|
|
654
|
+
|
|
655
|
+
virtual void loadState(RAState* src) override;
|
|
656
|
+
virtual RAState* saveState() override;
|
|
657
|
+
|
|
658
|
+
virtual void switchState(RAState* src) override;
|
|
659
|
+
virtual void intersectStates(RAState* a, RAState* b) override;
|
|
660
|
+
|
|
661
|
+
// --------------------------------------------------------------------------
|
|
662
|
+
// [Memory]
|
|
663
|
+
// --------------------------------------------------------------------------
|
|
664
|
+
|
|
665
|
+
ASMJIT_INLINE X86Mem getVarMem(VirtReg* vreg) {
|
|
666
|
+
(void)getVarCell(vreg);
|
|
667
|
+
return X86Mem(Init,
|
|
668
|
+
cc()->_nativeGpReg.getType(), vreg->getId(),
|
|
669
|
+
Reg::kRegNone, kInvalidValue,
|
|
670
|
+
0, 0, Mem::kSignatureMemRegHomeFlag);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// --------------------------------------------------------------------------
|
|
674
|
+
// [Fetch]
|
|
675
|
+
// --------------------------------------------------------------------------
|
|
676
|
+
|
|
677
|
+
virtual Error fetch() override;
|
|
678
|
+
|
|
679
|
+
// --------------------------------------------------------------------------
|
|
680
|
+
// [Annotate]
|
|
681
|
+
// --------------------------------------------------------------------------
|
|
682
|
+
|
|
683
|
+
virtual Error annotate() override;
|
|
684
|
+
|
|
685
|
+
// --------------------------------------------------------------------------
|
|
686
|
+
// [Translate]
|
|
687
|
+
// --------------------------------------------------------------------------
|
|
688
|
+
|
|
689
|
+
virtual Error translate() override;
|
|
690
|
+
|
|
691
|
+
// --------------------------------------------------------------------------
|
|
692
|
+
// [Members]
|
|
693
|
+
// --------------------------------------------------------------------------
|
|
694
|
+
|
|
695
|
+
//! Count of X86/X64 registers.
|
|
696
|
+
X86RegCount _regCount;
|
|
697
|
+
//! X86/X64 stack-pointer (esp or rsp).
|
|
698
|
+
X86Gp _zsp;
|
|
699
|
+
//! X86/X64 frame-pointer (ebp or rbp).
|
|
700
|
+
X86Gp _zbp;
|
|
701
|
+
|
|
702
|
+
//! X86/X64 specific compiler state, linked to `_state`.
|
|
703
|
+
X86RAState _x86State;
|
|
704
|
+
//! Clobbered registers (for the whole function).
|
|
705
|
+
X86RegMask _clobberedRegs;
|
|
706
|
+
|
|
707
|
+
//! Global allocable registers mask.
|
|
708
|
+
uint32_t _gaRegs[Globals::kMaxVRegKinds];
|
|
709
|
+
|
|
710
|
+
bool _avxEnabled;
|
|
711
|
+
|
|
712
|
+
//! Function variables base pointer (register).
|
|
713
|
+
uint8_t _varBaseRegId;
|
|
714
|
+
//! Function variables base offset.
|
|
715
|
+
int32_t _varBaseOffset;
|
|
716
|
+
|
|
717
|
+
//! Temporary string builder used for logging.
|
|
718
|
+
StringBuilderTmp<256> _stringBuilder;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
//! \}
|
|
722
|
+
|
|
723
|
+
} // asmjit namespace
|
|
724
|
+
} // namespace PLMD
|
|
725
|
+
|
|
726
|
+
// [Api-End]
|
|
727
|
+
#include "./asmjit_apiend.h"
|
|
728
|
+
|
|
729
|
+
// [Guard]
|
|
730
|
+
#endif // !ASMJIT_DISABLE_COMPILER
|
|
731
|
+
#endif // _ASMJIT_X86_X86REGALLOC_P_H
|
|
732
|
+
#pragma GCC diagnostic pop
|
|
733
|
+
#endif // __PLUMED_HAS_ASMJIT
|
|
734
|
+
#endif
|