mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-05-04 19:52:07 +00:00
memory: reorder MemoryRegion fields
Order fields so that all fields accessed during a RAM read/write fit in the same cache line. Backports commit a676854f3447019c7c4b005ab6aece905fccfddd from qemu
This commit is contained in:
parent
52b3120995
commit
e6b25279f8
|
@ -149,26 +149,31 @@ struct MemoryRegionIOMMUOps {
|
||||||
|
|
||||||
struct MemoryRegion {
|
struct MemoryRegion {
|
||||||
Object parent_obj;
|
Object parent_obj;
|
||||||
|
|
||||||
/* All fields are private - violators will be prosecuted */
|
/* All fields are private - violators will be prosecuted */
|
||||||
const MemoryRegionOps *ops;
|
/* The following fields should fit in a cache line */
|
||||||
|
bool romd_mode;
|
||||||
|
bool ram;
|
||||||
|
bool subpage;
|
||||||
|
bool readonly; /* For RAM regions */
|
||||||
|
bool rom_device;
|
||||||
|
bool flush_coalesced_mmio;
|
||||||
|
bool global_locking;
|
||||||
|
uint8_t dirty_log_mask;
|
||||||
|
ram_addr_t ram_addr;
|
||||||
const MemoryRegionIOMMUOps *iommu_ops;
|
const MemoryRegionIOMMUOps *iommu_ops;
|
||||||
|
|
||||||
|
const MemoryRegionOps *ops;
|
||||||
void *opaque;
|
void *opaque;
|
||||||
MemoryRegion *container;
|
MemoryRegion *container;
|
||||||
Int128 size;
|
Int128 size;
|
||||||
hwaddr addr;
|
hwaddr addr;
|
||||||
void (*destructor)(MemoryRegion *mr);
|
void (*destructor)(MemoryRegion *mr);
|
||||||
ram_addr_t ram_addr;
|
|
||||||
uint64_t align;
|
uint64_t align;
|
||||||
bool subpage;
|
|
||||||
bool terminates;
|
bool terminates;
|
||||||
bool romd_mode;
|
|
||||||
bool ram;
|
|
||||||
bool skip_dump;
|
bool skip_dump;
|
||||||
bool readonly; /* For RAM regions */
|
|
||||||
bool enabled;
|
bool enabled;
|
||||||
bool rom_device;
|
|
||||||
bool warning_printed; /* For reservations */
|
bool warning_printed; /* For reservations */
|
||||||
bool global_locking;
|
|
||||||
MemoryRegion *alias;
|
MemoryRegion *alias;
|
||||||
hwaddr alias_offset;
|
hwaddr alias_offset;
|
||||||
int32_t priority;
|
int32_t priority;
|
||||||
|
@ -176,7 +181,6 @@ struct MemoryRegion {
|
||||||
QTAILQ_HEAD(subregions, MemoryRegion) subregions;
|
QTAILQ_HEAD(subregions, MemoryRegion) subregions;
|
||||||
QTAILQ_ENTRY(MemoryRegion) subregions_link;
|
QTAILQ_ENTRY(MemoryRegion) subregions_link;
|
||||||
const char *name;
|
const char *name;
|
||||||
uint8_t dirty_log_mask;
|
|
||||||
struct uc_struct *uc;
|
struct uc_struct *uc;
|
||||||
uint32_t perms; //all perms, partially redundant with readonly
|
uint32_t perms; //all perms, partially redundant with readonly
|
||||||
uint64_t end;
|
uint64_t end;
|
||||||
|
|
Loading…
Reference in a new issue