addr_range.hh (10676:f6c168692b20) addr_range.hh (10678:d95e81d44e36)
1/*
2 * Copyright (c) 2012, 2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 213 unchanged lines hidden (view full) ---

222 bool valid() const { return _start <= _end; }
223
224 /**
225 * Get the start address of the range.
226 */
227 Addr start() const { return _start; }
228
229 /**
1/*
2 * Copyright (c) 2012, 2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 213 unchanged lines hidden (view full) ---

222 bool valid() const { return _start <= _end; }
223
224 /**
225 * Get the start address of the range.
226 */
227 Addr start() const { return _start; }
228
229 /**
230 * Get the end address of the range.
231 */
232 Addr end() const { return _end; }
233
234 /**
230 * Get a string representation of the range. This could
231 * alternatively be implemented as a operator<<, but at the moment
232 * that seems like overkill.
233 */
234 std::string to_string() const
235 {
236 if (interleaved()) {
237 if (hashed()) {

--- 120 unchanged lines hidden (view full) ---

358 if (_start != r._start)
359 return _start < r._start;
360 else
361 // for now assume that the end is also the same, and that
362 // we are looking at the same interleaving bits
363 return intlvMatch < r.intlvMatch;
364 }
365
235 * Get a string representation of the range. This could
236 * alternatively be implemented as a operator<<, but at the moment
237 * that seems like overkill.
238 */
239 std::string to_string() const
240 {
241 if (interleaved()) {
242 if (hashed()) {

--- 120 unchanged lines hidden (view full) ---

363 if (_start != r._start)
364 return _start < r._start;
365 else
366 // for now assume that the end is also the same, and that
367 // we are looking at the same interleaving bits
368 return intlvMatch < r.intlvMatch;
369 }
370
371 bool operator==(const AddrRange& r) const
372 {
373 if (_start != r._start) return false;
374 if (_end != r._end) return false;
375 if (intlvBits != r.intlvBits) return false;
376 if (intlvBits != 0) {
377 if (intlvHighBit != r.intlvHighBit) return false;
378 if (intlvMatch != r.intlvMatch) return false;
379 }
380 return true;
381 }
382
383 bool operator!=(const AddrRange& r) const
384 {
385 return !(*this == r);
386 }
366#endif // SWIG
367};
368
369/**
370 * Convenience typedef for a collection of address ranges
371 */
372typedef std::list<AddrRange> AddrRangeList;
373

--- 13 unchanged lines hidden ---
387#endif // SWIG
388};
389
390/**
391 * Convenience typedef for a collection of address ranges
392 */
393typedef std::list<AddrRange> AddrRangeList;
394

--- 13 unchanged lines hidden ---