diff options
author | Jayneel Gandhi <jayneel@cs.wisc.edu> | 2012-06-07 08:11:00 -0500 |
---|---|---|
committer | Jayneel Gandhi <jayneel@cs.wisc.edu> | 2012-06-07 08:11:00 -0500 |
commit | 7183c3fd56c4f0e8e4137795bb91dcaff312f591 (patch) | |
tree | b626e2cc4bb13cf4f4cc1974074c25d063e22b62 /src | |
parent | abb85a68f4f86d82e6c9514d6c60687d0a29ef94 (diff) | |
download | gem5-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')
-rw-r--r-- | src/arch/x86/tlb.cc | 3 |
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; |