summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2004-10-25 16:23:22 -0400
committerNathan Binkert <binkertn@umich.edu>2004-10-25 16:23:22 -0400
commitd55eb90fc73e27d26e64daa4c69efc3beee00429 (patch)
treeb04de355418ecfb4632d37e4a5e9a7e7a790c755 /arch
parente377f63c8629a98a0954d661dbbb21d2e1ceb5d0 (diff)
downloadgem5-d55eb90fc73e27d26e64daa4c69efc3beee00429.tar.xz
Don't use magic numbers.
arch/alpha/isa_traits.hh: Move defines to non full system code section so they can be used elsewhere cpu/simple_cpu/simple_cpu.cc: Don't use magic numbers cpu/simple_cpu/simple_cpu.hh: simple format nit --HG-- extra : convert_revision : b8d492218340d41ab9420c6ad1e81a197db1c132
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/isa_traits.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/alpha/isa_traits.hh b/arch/alpha/isa_traits.hh
index c73e79024..b22b2fa29 100644
--- a/arch/alpha/isa_traits.hh
+++ b/arch/alpha/isa_traits.hh
@@ -121,6 +121,11 @@ class AlphaISA
Addr lock_addr; // lock address for LL/SC
} MiscRegFile;
+static const Addr PageShift = 13;
+static const Addr PageBytes = ULL(1) << PageShift;
+static const Addr PageMask = ~(PageBytes - 1);
+static const Addr PageOffset = PageBytes - 1;
+
#ifdef FULL_SYSTEM
typedef uint64_t InternalProcReg;