diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2014-01-24 15:29:30 -0600 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2014-01-24 15:29:30 -0600 |
commit | 7d0344704a9ecc566d82ad43ec44b4becbaf4d77 (patch) | |
tree | 4281e9fe0ff9480698ed697027e411da73e78d47 /src/arch/mips | |
parent | 3436de0c2ad467c65066e48969a7c12bdbbb3d26 (diff) | |
download | gem5-7d0344704a9ecc566d82ad43ec44b4becbaf4d77.tar.xz |
arch, cpu: Add support for flattening misc register indexes.
With ARMv8 support the same misc register id results in accessing different
registers depending on the current mode of the processor. This patch adds
the same orthogonality to the misc register file as the others (int, float, cc).
For all the othre ISAs this is currently a null-implementation.
Additionally, a system variable is added to all the ISA objects.
Diffstat (limited to 'src/arch/mips')
-rw-r--r-- | src/arch/mips/MipsISA.py | 3 | ||||
-rw-r--r-- | src/arch/mips/isa.cc | 3 | ||||
-rw-r--r-- | src/arch/mips/isa.hh | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/arch/mips/MipsISA.py b/src/arch/mips/MipsISA.py index bc969a906..22602ff0c 100644 --- a/src/arch/mips/MipsISA.py +++ b/src/arch/mips/MipsISA.py @@ -37,11 +37,14 @@ from m5.SimObject import SimObject from m5.params import * +from m5.proxy import * class MipsISA(SimObject): type = 'MipsISA' cxx_class = 'MipsISA::ISA' cxx_header = "arch/mips/isa.hh" + system = Param.System(Parent.any, "System this ISA object belongs to") + num_threads = Param.UInt8(1, "Maximum number this ISA can handle") num_vpes = Param.UInt8(1, "Maximum number of vpes this ISA can handle") diff --git a/src/arch/mips/isa.cc b/src/arch/mips/isa.cc index 891ed5e2f..164f10d5d 100644 --- a/src/arch/mips/isa.cc +++ b/src/arch/mips/isa.cc @@ -89,8 +89,7 @@ ISA::miscRegNames[NumMiscRegs] = }; ISA::ISA(Params *p) - : SimObject(p), - numThreads(p->num_threads), numVpes(p->num_vpes) + : SimObject(p), numThreads(p->num_threads), numVpes(p->num_vpes) { miscRegFile.resize(NumMiscRegs); bankType.resize(NumMiscRegs); diff --git a/src/arch/mips/isa.hh b/src/arch/mips/isa.hh index c601cfc1e..eddf75272 100644 --- a/src/arch/mips/isa.hh +++ b/src/arch/mips/isa.hh @@ -184,6 +184,13 @@ namespace MipsISA { return reg; } + + int + flattenMiscIndex(int reg) + { + return reg; + } + }; } |