summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa.hh
diff options
context:
space:
mode:
authorRekai Gonzalez Alberquilla <Rekai.GonzalezAlberquilla@arm.com>2015-10-09 14:50:54 -0500
committerRekai Gonzalez Alberquilla <Rekai.GonzalezAlberquilla@arm.com>2015-10-09 14:50:54 -0500
commitd3d159749a0a6c3b69a9181fab8db34b6ba0f7a1 (patch)
tree477a11d57b4428685247f1ad4bb5863b948f9c99 /src/arch/arm/isa.hh
parent7624fc1fb461f1dd127763521d85f63e81617d71 (diff)
downloadgem5-d3d159749a0a6c3b69a9181fab8db34b6ba0f7a1.tar.xz
isa: Add parameter to pick different decoder inside ISA
The decoder is responsible for splitting instructions in micro operations (uops). Given that different micro architectures may split operations differently, this patch allows to specify which micro architecture each isa implements, so different cores in the system can split instructions differently, also decoupling uop splitting (microArch) from ISA (Arch). This is done making the decodification calls templates that receive a type 'DecoderFlavour' that maps the name of the operation to the class that implements it. This way there is only one selection point (converting the command line enum to the appropriate DecodeFeatures object). In addition, there is no explicit code replication: template instantiation hides that, and the compiler should be able to resolve a number of things at compile-time.
Diffstat (limited to 'src/arch/arm/isa.hh')
-rw-r--r--src/arch/arm/isa.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh
index a07017c17..ab5c72e6a 100644
--- a/src/arch/arm/isa.hh
+++ b/src/arch/arm/isa.hh
@@ -50,6 +50,7 @@
#include "arch/arm/types.hh"
#include "debug/Checkpoint.hh"
#include "sim/sim_object.hh"
+#include "enums/DecoderFlavour.hh"
struct ArmISAParams;
struct DummyArmISADeviceParams;
@@ -132,6 +133,9 @@ namespace ArmISA
// Parent system
ArmSystem *system;
+ // Micro Architecture
+ const Enums::DecoderFlavour _decoderFlavour;
+
/** Dummy device for to handle non-existing ISA devices */
DummyISADevice dummyDevice;
@@ -429,6 +433,8 @@ namespace ArmISA
void startup(ThreadContext *tc) {}
+ Enums::DecoderFlavour decoderFlavour() const { return _decoderFlavour; }
+
/// Explicitly import the otherwise hidden startup
using SimObject::startup;