summaryrefslogtreecommitdiff
path: root/dev
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-08-18 13:29:40 -0400
committerNathan Binkert <binkertn@umich.edu>2005-08-18 13:29:40 -0400
commit4f53a4705e3b36e470a69dad981a81036dcbb0f2 (patch)
treef5dde0b6985e88d610f3f19ca465505872af680b /dev
parent568868d38ff141f5e7a009316ae3d36c60a33a0d (diff)
downloadgem5-4f53a4705e3b36e470a69dad981a81036dcbb0f2.tar.xz
Fix a couple of turbolaser problems that were introduced by the
new freebsd code. dev/ns_gige.cc: g++ doesn't like it when you declare a variable inside a case label. Pull the declaration outside. --HG-- extra : convert_revision : d39e84fc58f2dd5b09c5948eedb4b1d7848e9817
Diffstat (limited to 'dev')
-rw-r--r--dev/ns_gige.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc
index 304263695..f2fd610f9 100644
--- a/dev/ns_gige.cc
+++ b/dev/ns_gige.cc
@@ -593,6 +593,7 @@ NSGigE::read(MemReqPtr &req, uint8_t *data)
case sizeof(uint32_t):
{
uint32_t &reg = *(uint32_t *)data;
+ uint16_t rfaddr;
switch (daddr) {
case CR:
@@ -680,7 +681,7 @@ NSGigE::read(MemReqPtr &req, uint8_t *data)
break;
case RFDR:
- uint16_t rfaddr = (uint16_t)(regs.rfcr & RFCR_RFADDR);
+ rfaddr = (uint16_t)(regs.rfcr & RFCR_RFADDR);
switch (rfaddr) {
// Read from perfect match ROM octets
case 0x000:
@@ -710,8 +711,8 @@ NSGigE::read(MemReqPtr &req, uint8_t *data)
break;
}
- panic("reading RFDR for something other than pattern\
- matching or hashing! %#x\n", rfaddr);
+ panic("reading RFDR for something other than pattern"
+ " matching or hashing! %#x\n", rfaddr);
}
break;
@@ -804,6 +805,8 @@ NSGigE::write(MemReqPtr &req, const uint8_t *data)
if (req->size == sizeof(uint32_t)) {
uint32_t reg = *(uint32_t *)data;
+ uint16_t rfaddr;
+
DPRINTF(EthernetPIO, "write data=%d data=%#x\n", reg, reg);
switch (daddr) {
@@ -1086,7 +1089,7 @@ NSGigE::write(MemReqPtr &req, const uint8_t *data)
break;
case RFDR:
- uint16_t rfaddr = (uint16_t)(regs.rfcr & RFCR_RFADDR);
+ rfaddr = (uint16_t)(regs.rfcr & RFCR_RFADDR);
switch (rfaddr) {
case 0x000:
rom.perfectMatch[0] = (uint8_t)reg;