mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 07:50:59 +00:00
memory: Align MemoryRegionSections fields
MemoryRegionSection includes an Int128 'size' field; on some platforms the compiler causes an alignment of this to a 128bit boundary, leaving 8 bytes of dead space. This deadspace can be filled with junk. Move the size field to the top avoiding unnecessary alignment. Backports commit c0aca9352d51c102c55fe29ce5c1bf8e74a5183e from qemu
This commit is contained in:
parent
8264cb84fe
commit
3807ec09de
|
@ -262,10 +262,10 @@ FlatView *address_space_to_flatview(AddressSpace *as);
|
||||||
* @nonvolatile: this section is non-volatile
|
* @nonvolatile: this section is non-volatile
|
||||||
*/
|
*/
|
||||||
struct MemoryRegionSection {
|
struct MemoryRegionSection {
|
||||||
|
Int128 size;
|
||||||
MemoryRegion *mr;
|
MemoryRegion *mr;
|
||||||
FlatView *fv;
|
FlatView *fv;
|
||||||
hwaddr offset_within_region;
|
hwaddr offset_within_region;
|
||||||
Int128 size;
|
|
||||||
hwaddr offset_within_address_space;
|
hwaddr offset_within_address_space;
|
||||||
bool readonly;
|
bool readonly;
|
||||||
bool nonvolatile;
|
bool nonvolatile;
|
||||||
|
|
|
@ -1818,7 +1818,7 @@ bool memory_region_is_mapped(MemoryRegion *mr)
|
||||||
static MemoryRegionSection memory_region_find_rcu(MemoryRegion *mr,
|
static MemoryRegionSection memory_region_find_rcu(MemoryRegion *mr,
|
||||||
hwaddr addr, uint64_t size)
|
hwaddr addr, uint64_t size)
|
||||||
{
|
{
|
||||||
MemoryRegionSection ret = { NULL };
|
MemoryRegionSection ret = {};
|
||||||
MemoryRegion *root;
|
MemoryRegion *root;
|
||||||
AddressSpace *as;
|
AddressSpace *as;
|
||||||
AddrRange range;
|
AddrRange range;
|
||||||
|
|
Loading…
Reference in a new issue