|
|
|
@ -147,7 +147,7 @@ public: |
|
|
|
|
|
|
|
// template for functions that store an aligned value to memory
|
|
|
|
#define store_func(type, prefix, xlate_flags) \ |
|
|
|
void prefix##_##type(reg_t addr, type##_t val) { \ |
|
|
|
void prefix##_##type(reg_t addr, type##_t val, bool actually_store=true) { \ |
|
|
|
if (unlikely(addr & (sizeof(type##_t)-1))) \ |
|
|
|
return misaligned_store(addr, val, sizeof(type##_t), xlate_flags); \ |
|
|
|
reg_t vpn = addr >> PGSHIFT; \ |
|
|
|
@ -167,7 +167,7 @@ public: |
|
|
|
} \ |
|
|
|
else { \ |
|
|
|
target_endian<type##_t> target_val = to_target(val); \ |
|
|
|
store_slow_path(addr, sizeof(type##_t), (const uint8_t*)&target_val, (xlate_flags)); \ |
|
|
|
store_slow_path(addr, sizeof(type##_t), (const uint8_t*)&target_val, (xlate_flags), actually_store); \ |
|
|
|
if (proc) WRITE_MEM(addr, val, size); \ |
|
|
|
} \ |
|
|
|
} |
|
|
|
@ -438,7 +438,7 @@ private: |
|
|
|
// handle uncommon cases: TLB misses, page faults, MMIO
|
|
|
|
tlb_entry_t fetch_slow_path(reg_t addr); |
|
|
|
void load_slow_path(reg_t addr, reg_t len, uint8_t* bytes, uint32_t xlate_flags); |
|
|
|
void store_slow_path(reg_t addr, reg_t len, const uint8_t* bytes, uint32_t xlate_flags); |
|
|
|
void store_slow_path(reg_t addr, reg_t len, const uint8_t* bytes, uint32_t xlate_flags, bool actually_store); |
|
|
|
bool mmio_load(reg_t addr, size_t len, uint8_t* bytes); |
|
|
|
bool mmio_store(reg_t addr, size_t len, const uint8_t* bytes); |
|
|
|
bool mmio_ok(reg_t addr, access_type type); |
|
|
|
|