2017-02-16 18:18:29 +00:00
|
|
|
/* This file is part of the dynarmic project.
|
|
|
|
* Copyright (c) 2016 MerryMage
|
|
|
|
* This software may be used and distributed according to the terms of the GNU
|
|
|
|
* General Public License version 2 or any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
2018-01-26 13:51:48 +00:00
|
|
|
namespace Dynarmic::Common {
|
2017-02-16 18:18:29 +00:00
|
|
|
|
2017-09-11 00:09:52 +01:00
|
|
|
struct AddressRange {
|
2017-02-16 18:18:29 +00:00
|
|
|
u32 start_address;
|
2017-09-11 00:09:52 +01:00
|
|
|
size_t length;
|
2017-02-16 18:18:29 +00:00
|
|
|
|
|
|
|
// Does this interval overlap with [from, to)?
|
|
|
|
bool Overlaps(u32 from, u32 to) const {
|
|
|
|
return start_address <= to && from <= start_address + length;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-01-26 13:51:48 +00:00
|
|
|
} // namespace Dynarmic::Common
|