From: Nilay Vaish Date: Sat, 11 Oct 2014 20:02:22 +0000 (-0500) Subject: base: addr range: slight change to validity check X-Git-Tag: stable_2014_12_14~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2816521f0d56ac6869454b7e8369971e0b6cc8d7;p=gem5.git 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. --- 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.