summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-02-27 17:29:58 -0800
committerNathan Binkert <nate@binkert.org>2009-02-27 17:29:58 -0800
commit4523741c1c72ef954410ccb0aa7782b28be3441b (patch)
tree95e91f2d27a3a5dedc9b8b901ee95087a427b5c2 /src
parentb69a9ad45a15e84a6422f308df5b6806da80e93a (diff)
downloadgem5-4523741c1c72ef954410ccb0aa7782b28be3441b.tar.xz
quell gcc 4.3 warning
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/tlb.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc
index 47a2eb37e..3fec4c7da 100644
--- a/src/arch/x86/tlb.cc
+++ b/src/arch/x86/tlb.cc
@@ -590,8 +590,8 @@ TLB::translate(RequestPtr req, ThreadContext *tc,
// address size is 64 bits, overridable to 32.
int size = 32;
bool sizeOverride = (flags & (AddrSizeFlagBit << FlagShift));
- if (csAttr.defaultSize && sizeOverride ||
- !csAttr.defaultSize && !sizeOverride)
+ if ((csAttr.defaultSize && sizeOverride) ||
+ (!csAttr.defaultSize && !sizeOverride))
size = 16;
Addr offset = bits(vaddr - base, size-1, 0);
Addr endOffset = offset + req->getSize() - 1;
@@ -647,8 +647,8 @@ TLB::translate(RequestPtr req, ThreadContext *tc,
// Do paging protection checks.
bool inUser = (csAttr.dpl == 3 &&
!(flags & (CPL0FlagBit << FlagShift)));
- if (inUser && !entry->user ||
- write && !entry->writable) {
+ if ((inUser && !entry->user) ||
+ (write && !entry->writable)) {
// The page must have been present to get into the TLB in
// the first place. We'll assume the reserved bits are
// fine even though we're not checking them.