summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:26 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2012-05-10 18:04:26 -0500
commit8cee4dacc83bdea41563272449442bd322ca786f (patch)
treec369d8bb5338c687c1abbd764f19faddabb9500b
parent798403b6896ba55c55ef3238f61c7bff962dc439 (diff)
downloadgem5-8cee4dacc83bdea41563272449442bd322ca786f.tar.xz
gem5: Fix a number of incorrect case statements
-rw-r--r--src/arch/arm/miscregs.cc4
-rw-r--r--src/dev/arm/rv_ctrl.cc1
-rw-r--r--src/mem/cache/mshr.cc16
3 files changed, 17 insertions, 4 deletions
diff --git a/src/arch/arm/miscregs.cc b/src/arch/arm/miscregs.cc
index 73f92cabb..a8abbf692 100644
--- a/src/arch/arm/miscregs.cc
+++ b/src/arch/arm/miscregs.cc
@@ -392,6 +392,7 @@ decodeCP15Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2)
case 7:
return MISCREG_PMCEID1;
}
+ break;
case 13:
switch (opc2) {
case 0:
@@ -401,6 +402,7 @@ decodeCP15Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2)
case 2:
return MISCREG_PMXEVCNTR;
}
+ break;
case 14:
switch (opc2) {
case 0:
@@ -410,6 +412,7 @@ decodeCP15Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2)
case 2:
return MISCREG_PMINTENCLR;
}
+ break;
}
} else if (opc1 == 1) {
switch (crm) {
@@ -422,6 +425,7 @@ decodeCP15Reg(unsigned crn, unsigned opc1, unsigned crm, unsigned opc2)
crn,crm, opc1,opc2);
break;
}
+ break;
default:
return MISCREG_L2LATENCY;
}
diff --git a/src/dev/arm/rv_ctrl.cc b/src/dev/arm/rv_ctrl.cc
index eceba81f1..56d270fea 100644
--- a/src/dev/arm/rv_ctrl.cc
+++ b/src/dev/arm/rv_ctrl.cc
@@ -105,6 +105,7 @@ RealViewCtrl::read(PacketPtr pkt)
break;
case CfgStat:
pkt->set<uint32_t>(1);
+ break;
default:
warn("Tried to read RealView I/O at offset %#x that doesn't exist\n",
daddr);
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 6da779538..ab891296f 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -161,10 +161,18 @@ print(std::ostream &os, int verbosity, const std::string &prefix) const
for (ConstIterator i = begin(); i != end_i; ++i) {
const char *s;
switch (i->source) {
- case Target::FromCPU: s = "FromCPU";
- case Target::FromSnoop: s = "FromSnoop";
- case Target::FromPrefetcher: s = "FromPrefetcher";
- default: s = "";
+ case Target::FromCPU:
+ s = "FromCPU";
+ break;
+ case Target::FromSnoop:
+ s = "FromSnoop";
+ break;
+ case Target::FromPrefetcher:
+ s = "FromPrefetcher";
+ break;
+ default:
+ s = "";
+ break;
}
ccprintf(os, "%s%s: ", prefix, s);
i->pkt->print(os, verbosity, "");