summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-03-19 06:35:04 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-03-19 06:35:04 -0400
commitadb862103138caf11191da50d34eb4c93295633a (patch)
tree92002abd45eed9456400eafaad7d6b757d1297b9 /src/sim
parenta444a6f8d666f7922460dc0fe75877680fd23546 (diff)
downloadgem5-adb862103138caf11191da50d34eb4c93295633a.tar.xz
clang: Fix recently introduced clang compilation errors
This patch makes the code compile with clang 2.9 and 3.0 again by making two very minor changes. Firt, it maintains a strict typing in the forward declaration of the BaseCPUParams. Second, it adds a FullSystemInt flag of the type unsigned int next to the boolean FullSystem flag. The FullSystemInt variable can be used in decode-statements (expands to switch statements) in the instruction decoder.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/full_system.hh12
-rw-r--r--src/sim/root.cc2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/sim/full_system.hh b/src/sim/full_system.hh
index e67fc11a9..18cf34d09 100644
--- a/src/sim/full_system.hh
+++ b/src/sim/full_system.hh
@@ -31,6 +31,18 @@
#ifndef __SIM_FULL_SYSTEM_HH__
#define __SIM_FULL_SYSTEM_HH__
+/**
+ * The FullSystem variable can be used to determine the current mode
+ * of simulation.
+ */
extern bool FullSystem;
+/**
+ * In addition to the boolean flag we make use of an unsigned int
+ * since the CPU instruction decoder makes use of the variable in
+ * switch statements. A value of 0 signifies syscall emulation, and
+ * any other value full system.
+ */
+extern unsigned int FullSystemInt;
+
#endif // __SIM_FULL_SYSTEM_HH__
diff --git a/src/sim/root.cc b/src/sim/root.cc
index c47ada30e..2d28499a7 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -125,6 +125,7 @@ Root::loadState(Checkpoint *cp)
}
bool FullSystem;
+unsigned int FullSystemInt;
Root *
RootParams::create()
@@ -136,6 +137,7 @@ RootParams::create()
created = true;
FullSystem = full_system;
+ FullSystemInt = full_system ? 1 : 0;
return new Root(this);
}