diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2009-08-01 22:50:13 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2009-08-01 22:50:13 -0700 |
commit | 1c2800465480993040e3058ef94ce30efbe982ec (patch) | |
tree | 2b4236747ceab2b009c46aa78ab8fe059d18c89e /src/mem | |
parent | c0755e60852893fdaf86ee6c5581f7af6557ae7c (diff) | |
download | gem5-1c2800465480993040e3058ef94ce30efbe982ec.tar.xz |
Clean up some inconsistencies with Request flags.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/request.hh | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/mem/request.hh b/src/mem/request.hh index 8ca6a59a7..c8c31ffcd 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -347,6 +347,10 @@ class Request : public FastAlloc return _flags; } + /** Note that unlike other accessors, this function sets *specific + flags* (ORs them in); it does not assign its argument to the + _flags field. Thus this method should rightly be called + setFlags() and not just flags(). */ void setFlags(Flags flags) { @@ -378,21 +382,6 @@ class Request : public FastAlloc return _flags & ASI_BITS; } - /** Accessor function for MMAPED_IPR flag. */ - bool - isMmapedIpr() - { - assert(privateFlags.isSet(VALID_PADDR)); - return _flags.isSet(MMAPED_IPR); - } - - void - setMmapedIpr(bool r) - { - assert(VALID_VADDR); - _flags.set(MMAPED_IPR); - } - /** Accessor function to check if sc result is valid. */ bool extraDataValid() @@ -452,7 +441,8 @@ class Request : public FastAlloc return _pc; } - /** Accessor Function to Check Cacheability. */ + /** Accessor functions for flags. Note that these are for testing + only; setting flags should be done via setFlags(). */ bool isUncacheable() const { return _flags.isSet(UNCACHEABLE); } bool isInstFetch() const { return _flags.isSet(INST_FETCH); } bool isPrefetch() const { return _flags.isSet(PREFETCH); } @@ -460,6 +450,7 @@ class Request : public FastAlloc bool isLocked() const { return _flags.isSet(LOCKED); } bool isSwap() const { return _flags.isSet(MEM_SWAP|MEM_SWAP_COND); } bool isCondSwap() const { return _flags.isSet(MEM_SWAP_COND); } + bool isMmapedIpr() const { return _flags.isSet(MMAPED_IPR); } bool isMisaligned() const |