mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-10 21:35:27 +00:00
memory: Provide an equality function for MemoryRegionSections
Provide a comparison function that checks all the fields are the same. Backports commit 42b6571357a083f721a27daa6dfdc69e4bd516bd from qemu
This commit is contained in:
parent
3807ec09de
commit
0b8add4e6f
|
@ -271,6 +271,18 @@ struct MemoryRegionSection {
|
|||
bool nonvolatile;
|
||||
};
|
||||
|
||||
static inline bool MemoryRegionSection_eq(MemoryRegionSection *a,
|
||||
MemoryRegionSection *b)
|
||||
{
|
||||
return a->mr == b->mr &&
|
||||
a->fv == b->fv &&
|
||||
a->offset_within_region == b->offset_within_region &&
|
||||
a->offset_within_address_space == b->offset_within_address_space &&
|
||||
int128_eq(a->size, b->size) &&
|
||||
a->readonly == b->readonly &&
|
||||
a->nonvolatile == b->nonvolatile;
|
||||
}
|
||||
|
||||
static inline MemoryRegionSection MemoryRegionSection_make(MemoryRegion *mr, FlatView *fv,
|
||||
hwaddr offset_within_region, Int128 size, hwaddr offset_within_address_space, bool readonly)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue