From 6ef9691035623ba6945e237a41f0dca04db637bb Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Tue, 13 Dec 2011 11:49:27 -0800 Subject: gcc: fix unused variable warnings from GCC 4.6.1 --HG-- extra : rebase_source : f9e22de341493a25ac6106c16ac35c61c128a080 --- src/arch/arm/nativetrace.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/arch') diff --git a/src/arch/arm/nativetrace.cc b/src/arch/arm/nativetrace.cc index e276833e2..875ceae31 100644 --- a/src/arch/arm/nativetrace.cc +++ b/src/arch/arm/nativetrace.cc @@ -156,18 +156,23 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record) // 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 "\ @@ -190,6 +195,7 @@ Trace::ArmNativeTrace::check(NativeTraceRecord *record) nState.oldState[i], nState.newState[i], mState.oldState[i], mState.newState[i]); } +#endif } } if (errorFound) { -- cgit v1.2.3 From bd23a37198084e10ecd572c6332f71a749abb747 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 5 Jan 2012 11:00:32 -0600 Subject: X86 TLB: Move a DPRINTF to its correct place The DPRINTF for doing protection checks appears after the checks have been carried out. It is possible that the function returns while the checks are being carried, in which case the printf is missed out. This patch moves the DPRINTF before the checks. --HG-- extra : rebase_source : 172896057e593022444d882ea93323a5d9f77a89 --- src/arch/x86/tlb.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index 40c30637d..131909e50 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -328,6 +328,9 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation, DPRINTF(TLB, "Miss was serviced.\n"); #endif } + + DPRINTF(TLB, "Entry found with paddr %#x, " + "doing protection checks.\n", entry->paddr); // Do paging protection checks. bool inUser = (m5Reg.cpl == 3 && !(flags & (CPL0FlagBit << FlagShift))); @@ -345,9 +348,6 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation, return new PageFault(vaddr, true, Write, inUser, false); } - - DPRINTF(TLB, "Entry found with paddr %#x, " - "doing protection checks.\n", entry->paddr); Addr paddr = entry->paddr | (vaddr & (entry->size-1)); DPRINTF(TLB, "Translated %#x -> %#x.\n", vaddr, paddr); req->setPaddr(paddr); -- cgit v1.2.3