summaryrefslogtreecommitdiff
path: root/src/base/addr_range.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-10-11 15:02:22 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-10-11 15:02:22 -0500
commit2816521f0d56ac6869454b7e8369971e0b6cc8d7 (patch)
tree440f2db35ff81010d255618040c092b068283597 /src/base/addr_range.hh
parenta9bfea5a356645b8e7e54df01af5cf3a707bf546 (diff)
downloadgem5-2816521f0d56ac6869454b7e8369971e0b6cc8d7.tar.xz
base: addr range: slight change to validity check
The validity check is being changed from < to <= since the end of the range is considered to be a part of it.
Diffstat (limited to 'src/base/addr_range.hh')
-rw-r--r--src/base/addr_range.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh
index 7f275e5a9..df4afab9e 100644
--- a/src/base/addr_range.hh
+++ b/src/base/addr_range.hh
@@ -58,6 +58,7 @@ class AddrRange
private:
/// Private fields for the start and end of the range
+ /// Both _start and _end are part of the range.
Addr _start;
Addr _end;
@@ -166,7 +167,7 @@ class AddrRange
/**
* Determine if the range is valid.
*/
- bool valid() const { return _start < _end; }
+ bool valid() const { return _start <= _end; }
/**
* Get the start address of the range.