diff options
author | Lisa Hsu <hsul@eecs.umich.edu> | 2007-01-08 18:07:17 -0500 |
---|---|---|
committer | Lisa Hsu <hsul@eecs.umich.edu> | 2007-01-08 18:07:17 -0500 |
commit | b45219e7ae747619571dbb7245dd3409b96c473f (patch) | |
tree | df45a149c5bcb0d5de4699d59176dcadbc6e1794 /src/arch/sparc/miscregfile.hh | |
parent | a8b2d66661e4be7cf5d5856f75f3f0e7849c5a9f (diff) | |
download | gem5-b45219e7ae747619571dbb7245dd3409b96c473f.tar.xz |
some formatting changes, and update how I do bitfields for HPSTATE and PSTATE to avoid name confusion.
src/arch/sparc/faults.cc:
1) s/Resumeable/Resumable/gc
2) s/if(/if (/gc
3) keep variables lowercase
4) change the way fields are accessed - instead of hard coding bitvectors, use masks (like HPSTATE::hpriv).
src/arch/sparc/faults.hh:
s/Resumeable/Resumable/
src/arch/sparc/isa_traits.hh:
This is unused and unnecessary.
src/arch/sparc/miscregfile.hh:
add bitfield masks for some important ASRs (HPSTATE, PSTATE).
--HG--
extra : convert_revision : f0ffaf48de298758685266dfb90f43aff42e0a2c
Diffstat (limited to 'src/arch/sparc/miscregfile.hh')
-rw-r--r-- | src/arch/sparc/miscregfile.hh | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/arch/sparc/miscregfile.hh b/src/arch/sparc/miscregfile.hh index c879fd357..8a2e8e810 100644 --- a/src/arch/sparc/miscregfile.hh +++ b/src/arch/sparc/miscregfile.hh @@ -142,24 +142,26 @@ namespace SparcISA MISCREG_NUMMISCREGS }; - enum HPStateFields { - id = 0x800, // this impl. dependent (id) field must always be '1' for T1000 - ibe = 0x400, - red = 0x20, - hpriv = 0x4, - tlz = 0x1 + struct HPSTATE { + const static uint64_t id = 0x800; // this impl. dependent (id) field m + const static uint64_t ibe = 0x400; + const static uint64_t red = 0x20; + const static uint64_t hpriv = 0x4; + const static uint64_t tlz = 0x1; }; - enum PStateFields { - cle = 0x200, - tle = 0x100, - mm = 0xC0, - pef = 0x10, - am = 0x8, - priv = 0x4, - ie = 0x2 + + struct PSTATE { + const static int cle = 0x200; + const static int tle = 0x100; + const static int mm = 0xC0; + const static int pef = 0x10; + const static int am = 0x8; + const static int priv = 0x4; + const static int ie = 0x2; }; + const int NumMiscArchRegs = MISCREG_NUMMISCREGS; const int NumMiscRegs = MISCREG_NUMMISCREGS; |