e59f01a55e9801d24a6d9659f9919b74f39b6b5e
This makes RegIds and the RegClass-es associated with them responsible for their own flattening. If they don't need to be flattened (a common case) then they just mark themselves as already flat and that step can be skipped. This will also make it possible to get rid of the (get|set)RegFlat APIs, since if you want to use flattened registers, you'll either have or create a flattened RegId and pass it into the same (get|set)Reg method. By making flattening work on RegIds instead of RegIndexes, this will also make it possible for registers to start out in one RegClass and move into another one. This would be useful if, for instance, there were multiple groups of integer registers which had different indexing semantics, but which should all end up in the same pool for renaming. For instance, on x86, there are three distinct classes of FP registers. They are the MMX registers, the pairs of registers which back the XMM registers, and the X87 registers. Only the last of these needs flattening. These could all be treated as different RegClass-es pre-flattening, and could converge on the underlying floating point register file post-flattening. Another example in x86 is that some registers can encode that they should refer to either the first byte of one register, or the second byte of another register. This only applies to some registers though, and so only those would need to go through the flattening step. Another major advantage is that this removes the need for flattening functions on the ISA object. Having those, and treating the ISA object as a TheISA::ISA instead of the more generic BaseISA, was done to make the flattening functions inline, and to make them fold away in cases where flattening is not necessary. This new scheme isn't *quite* as streamline as that, since you'll actually need to check if something is already flattened. You won't, however, need to check what type the register is and then look up the right flattening function, so that will likely compensate. Change-Id: I3c648cc8c0776b0e1020504113445b7d033e665f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51227 Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This is the gem5 simulator. The main website can be found at http://www.gem5.org A good starting point is http://www.gem5.org/about, and for more information about building the simulator and getting started please see http://www.gem5.org/documentation and http://www.gem5.org/documentation/learning_gem5/introduction. To build gem5, you will need the following software: g++ or clang, Python (gem5 links in the Python interpreter), SCons, zlib, m4, and lastly protobuf if you want trace capture and playback support. Please see http://www.gem5.org/documentation/general_docs/building for more details concerning the minimum versions of these tools. Once you have all dependencies resolved, type 'scons build/<CONFIG>/gem5.opt' where CONFIG is one of the options in build_opts like ARM, NULL, MIPS, POWER, SPARC, X86, Garnet_standalone, etc. This will build an optimized version of the gem5 binary (gem5.opt) with the the specified configuration. See http://www.gem5.org/documentation/general_docs/building for more details and options. The main source tree includes these subdirectories: - build_opts: pre-made default configurations for gem5 - build_tools: tools used internally by gem5's build process. - configs: example simulation configuration scripts - ext: less-common external packages needed to build gem5 - include: include files for use in other programs - site_scons: modular components of the build system - src: source code of the gem5 simulator - system: source for some optional system software for simulated systems - tests: regression tests - util: useful utility programs and files To run full-system simulations, you may need compiled system firmware, kernel binaries and one or more disk images, depending on gem5's configuration and what type of workload you're trying to run. Many of those resources can be downloaded from http://resources.gem5.org, and/or from the git repository here: https://gem5.googlesource.com/public/gem5-resources/ If you have questions, please send mail to gem5-users@gem5.org Enjoy using gem5 and please share your modifications and extensions.
Description