summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorJayneel Gandhi <jayneel@cs.wisc.edu>2012-06-07 08:11:00 -0500
committerJayneel Gandhi <jayneel@cs.wisc.edu>2012-06-07 08:11:00 -0500
commit7183c3fd56c4f0e8e4137795bb91dcaff312f591 (patch)
treeb626e2cc4bb13cf4f4cc1974074c25d063e22b62 /src/arch/x86
parentabb85a68f4f86d82e6c9514d6c60687d0a29ef94 (diff)
downloadgem5-7183c3fd56c4f0e8e4137795bb91dcaff312f591.tar.xz
X86 TLB: Fix for gcc 4.4.3
Due to recent changes to X86 TLB, gem5 stopped compiling on gcc version 4.4.3. This patch provides the fix for that problem. The patch is tested on gcc 4.4.3. The change is not required for more recent versions of gcc (like on 4.6.3).
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/tlb.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc
index 4923752ef..623e1871d 100644
--- a/src/arch/x86/tlb.cc
+++ b/src/arch/x86/tlb.cc
@@ -270,7 +270,8 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
Addr base = tc->readMiscRegNoEffect(MISCREG_SEG_BASE(seg));
Addr limit = tc->readMiscRegNoEffect(MISCREG_SEG_LIMIT(seg));
bool sizeOverride = (flags & (AddrSizeFlagBit << FlagShift));
- int logSize = sizeOverride ? m5Reg.altAddr : m5Reg.defAddr;
+ unsigned logSize = sizeOverride ? (unsigned)m5Reg.altAddr
+ : (unsigned)m5Reg.defAddr;
int size = (1 << logSize) * 8;
Addr offset = bits(vaddr - base, size - 1, 0);
Addr endOffset = offset + req->getSize() - 1;