diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-10-31 17:50:57 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-10-31 17:50:57 -0500 |
commit | fb5ba85abbf3791498faab3328a73b3725dfc839 (patch) | |
tree | 130a82a434042a60ebbc65e260a90f7076fe4a2c /src/arch/alpha/ipr.hh | |
parent | 312a4710d7b73ad7517965dd83f182d2a3a0b7f6 (diff) | |
download | gem5-fb5ba85abbf3791498faab3328a73b3725dfc839.tar.xz |
Make two simple utility functions to determine if a MiscReg index corresponding to an IPR is readable or writable.
--HG--
extra : convert_revision : 89eebba5eec01e629213997d24c734a6acad0ecb
Diffstat (limited to 'src/arch/alpha/ipr.hh')
-rw-r--r-- | src/arch/alpha/ipr.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/alpha/ipr.hh b/src/arch/alpha/ipr.hh index 17518c0fe..51c1489b8 100644 --- a/src/arch/alpha/ipr.hh +++ b/src/arch/alpha/ipr.hh @@ -218,6 +218,15 @@ namespace AlphaISA NumInternalProcRegs // number of IPR registers }; + inline bool IprIsWritable(int index) + { + return index < minReadOnlyIpr || index > maxReadOnlyIpr; + } + + inline bool IprIsReadable(int index) + { + return index < minWriteOnlyIpr || index > maxWriteOnlyIpr; + } extern md_ipr_names MiscRegIndexToIpr[NumInternalProcRegs]; extern int IprToMiscRegIndex[MaxInternalProcRegs]; |