// Regular int regs
for (int i = 0; i < STATE_NUMVALS; i++) {
if (nState.changed[i] || mState.changed[i]) {
- const char *vergence = " ";
bool oldMatch = (mState.oldState[i] == nState.oldState[i]);
bool newMatch = (mState.newState[i] == nState.newState[i]);
if (oldMatch && newMatch) {
// The more things change, the more they stay the same.
continue;
- } else if (oldMatch && !newMatch) {
+ }
+
+ errorFound = true;
+
+#ifndef NDEBUG
+ const char *vergence = " ";
+ if (oldMatch && !newMatch) {
vergence = "<>";
} else if (!oldMatch && newMatch) {
vergence = "><";
}
- errorFound = true;
+
if (!nState.changed[i]) {
DPRINTF(ExecRegDelta, "%s [%5s] "\
"Native: %#010x "\
nState.oldState[i], nState.newState[i],
mState.oldState[i], mState.newState[i]);
}
+#endif
}
}
if (errorFound) {
bufferSize = gdbregs.bytes() * 2 + 256;
buffer = (char*)malloc(bufferSize);
- TheISA::PCState pc = context->pcState();
- DPRINTF(GDBMisc, "trap: PC=%s\n", pc);
+ DPRINTF(GDBMisc, "trap: PC=%s\n", context->pcState());
clearSingleStep();
if (fetchStatus[tid] != Squashing) {
- TheISA::PCState nextPC = fromDecode->decodeInfo[tid].nextPC;
- DPRINTF(Fetch, "Squashing from decode with PC = %s\n", nextPC);
+ DPRINTF(Fetch, "Squashing from decode with PC = %s\n",
+ fromDecode->decodeInfo[tid].nextPC);
// Squash unless we're already squashing
squashFromDecode(fromDecode->decodeInfo[tid].nextPC,
fromDecode->decodeInfo[tid].squashInst,
// iteration we'll get the rest of the data
if (txPacket && txDescCache.packetAvailable()
&& !txDescCache.packetMultiDesc() && txPacket->length) {
- bool success;
-
anQ("TXS", "TX FIFO Q");
DPRINTF(EthernetSM, "TXS: packet placed in TX FIFO\n");
- success = txFifo.push(txPacket);
+#ifndef NDEBUG
+ bool success =
+#endif
+ txFifo.push(txPacket);
txFifoTick = true && !drainEvent;
assert(success);
txPacket = NULL;
panic("IDE controller access to invalid address: %#x\n", addr);
}
+#ifndef NDEBUG
uint32_t data;
if (pkt->getSize() == 1)
data = pkt->get<uint8_t>();
data = pkt->get<uint32_t>();
DPRINTF(IdeCtrl, "%s from offset: %#x size: %#x data: %#x\n",
read ? "Read" : "Write", pkt->getAddr(), pkt->getSize(), data);
+#endif
pkt->makeAtomicResponse();
}
#include <string>
#include "arch/vtophys.hh"
+#include "base/compiler.hh"
#include "base/debug.hh"
#include "base/inet.hh"
#include "base/types.hh"
prepareRead(cpu, index);
- uint64_t value = 0;
+ uint64_t value M5_VAR_USED = 0;
if (pkt->getSize() == 4) {
uint32_t reg = regData32(raddr);
pkt->set(reg);
VirtualReg *vn = &virtualRegs[i];
bool busy = Regs::get_RxDone_Busy(vn->RxDone);
if (vn->rxIndex != end) {
+#ifndef NDEBUG
bool dirty = vn->rxPacketOffset > 0;
const char *status;
i, status, vn->rxUnique,
rxFifo.countPacketsBefore(vn->rxIndex),
vn->rxIndex->slack);
+#endif
} else if (busy) {
DPRINTF(EthernetSM, "vnic %d unmapped (rxunique %d)\n",
i, vn->rxUnique);
{
Addr accessAddr;
off_t sector;
- off_t bytes_read;
uint16_t d16;
uint32_t d32;
uint64_t d64;
if (sector != curSector) {
if (dirty) {
- bytes_read = image->write(diskData, curSector);
- assert(bytes_read == SectorSize);
+#ifndef NDEBUG
+ off_t bytes_written =
+#endif
+ image->write(diskData, curSector);
+ assert(bytes_written == SectorSize);
}
- bytes_read = image->read(diskData, sector);
+#ifndef NDEBUG
+ off_t bytes_read =
+#endif
+ image->read(diskData, sector);
assert(bytes_read == SectorSize);
curSector = sector;
}
{
Addr accessAddr;
off_t sector;
- off_t bytes_read;
uint16_t d16;
uint32_t d32;
uint64_t d64;
if (sector != curSector) {
if (dirty) {
- bytes_read = image->write(diskData, curSector);
- assert(bytes_read == SectorSize);
+#ifndef NDEBUG
+ off_t bytes_written =
+#endif
+ image->write(diskData, curSector);
+ assert(bytes_written == SectorSize);
}
- bytes_read = image->read(diskData, sector);
+#ifndef NDEBUG
+ off_t bytes_read =
+#endif
+ image->read(diskData, sector);
assert(bytes_read == SectorSize);
curSector = sector;
}
{
// just write any dirty changes to the cow layer it will take care of
// serialization
- int bytes_read;
if (dirty) {
- bytes_read = image->write(diskData, curSector);
+#ifndef NDEBUG
+ int bytes_read =
+#endif
+ image->write(diskData, curSector);
assert(bytes_read == SectorSize);
}
}
uint8_t
Terminal::in()
{
- bool empty;
uint8_t c;
- empty = rxbuf.empty();
- assert(!empty);
+ assert(!rxbuf.empty());
rxbuf.read((char *)&c, 1);
- empty = rxbuf.empty();
-
DPRINTF(TerminalVerbose, "in: \'%c\' %#02x more: %d\n",
- isprint(c) ? c : ' ', c, !empty);
+ isprint(c) ? c : ' ', c, !rxbuf.empty());
return c;
}
new_vaddr, size);
for (; size > 0; size -= pageSize, vaddr += pageSize, new_vaddr += pageSize) {
- PTableItr iter = pTable.find(vaddr);
-
- assert(iter != pTable.end());
+ assert(pTable.find(vaddr) != pTable.end());
pTable[new_vaddr] = pTable[vaddr];
pTable.erase(vaddr);
DPRINTF(MMU, "Unmapping page: %#x-%#x\n", vaddr, vaddr+ size);
for (; size > 0; size -= pageSize, vaddr += pageSize) {
- PTableItr iter = pTable.find(vaddr);
-
- assert(iter != pTable.end());
+ assert(pTable.find(vaddr) != pTable.end());
pTable.erase(vaddr);
}
Source('MemoryNode.cc')
Source('PersistentTable.cc')
Source('RubyPort.cc')
-Source('Sequencer.cc', Werror=False)
+Source('Sequencer.cc')
Source('System.cc')
Source('TimerTable.cc')
RequestStatus
Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type)
{
- int total_outstanding =
- m_writeRequestTable.size() + m_readRequestTable.size();
-
- assert(m_outstanding_count == total_outstanding);
+ assert(m_outstanding_count ==
+ (m_writeRequestTable.size() + m_readRequestTable.size()));
// See if we should schedule a deadlock check
if (deadlockCheckEvent.scheduled() == false) {
}
g_system_ptr->getProfiler()->sequencerRequests(m_outstanding_count);
- total_outstanding = m_writeRequestTable.size() + m_readRequestTable.size();
- assert(m_outstanding_count == total_outstanding);
+ assert(m_outstanding_count ==
+ (m_writeRequestTable.size() + m_readRequestTable.size()));
return RequestStatus_Ready;
}
code('''
{
// Declare message
- const $mtid* in_msg_ptr;
+ const $mtid* in_msg_ptr M5_VAR_USED;
in_msg_ptr = dynamic_cast<const $mtid *>(($qcode).${{self.method}}());
assert(in_msg_ptr != NULL); // Check the cast result
''')
#include <sstream>
#include <string>
+#include "base/compiler.hh"
#include "base/cprintf.hh"
#include "debug/RubyGenerated.hh"
#include "debug/RubySlicc.hh"