gem5: Fix a number of incorrect case statements
authorAli Saidi <Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Thu, 10 May 2012 23:04:26 +0000 (18:04 -0500)
src/arch/arm/miscregs.cc
src/dev/arm/rv_ctrl.cc
src/mem/cache/mshr.cc

index 73f92cabb9362fc40ab881437442c5f2434a5a58..a8abbf6929958ff298cd5a03a43c69e84c2c7a88 100644 (file)
@@ -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;
             }
index eceba81f127ca31129781a15d735f75955e2c5d9..56d270feafb20210faca29222b5ad8837f07bf88 100644 (file)
@@ -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);
index 6da77953835ef4eaad3e3a50c2440ed8cca7a971..ab891296fc18961cc49fde45010babd394bdd8e8 100644 (file)
@@ -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, "");