mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-26 20:25:07 +00:00
cpu: move endian-dependent load/store functions to cpu-all.h
Disentangle cpu-common.h and memory.h from NEED_CPU_H. Prototypes are not defined for !NEED_CPU_H, so remove them from poison.h too. Only macros need poisoning. Backports commit a7d6039cb35592683ecc56d2b37817da2d2f8b00 from qemu
This commit is contained in:
parent
9c0e31ed3a
commit
78fd1aab94
|
@ -206,6 +206,31 @@ extern unsigned long reserved_va;
|
||||||
|
|
||||||
#define GUEST_ADDR_MAX (RESERVED_VA ? RESERVED_VA : \
|
#define GUEST_ADDR_MAX (RESERVED_VA ? RESERVED_VA : \
|
||||||
(1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
|
(1ul << TARGET_VIRT_ADDR_SPACE_BITS) - 1)
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include "exec/hwaddr.h"
|
||||||
|
uint32_t lduw_phys(AddressSpace *as, hwaddr addr);
|
||||||
|
uint32_t ldl_phys(AddressSpace *as, hwaddr addr);
|
||||||
|
uint64_t ldq_phys(AddressSpace *as, hwaddr addr);
|
||||||
|
void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val);
|
||||||
|
void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val);
|
||||||
|
void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val);
|
||||||
|
void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
||||||
|
|
||||||
|
uint32_t address_space_lduw(AddressSpace *as, hwaddr addr,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
uint32_t address_space_ldl(AddressSpace *as, hwaddr addr,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
uint64_t address_space_ldq(AddressSpace *as, hwaddr addr,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val,
|
||||||
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* page related stuff */
|
/* page related stuff */
|
||||||
|
|
|
@ -99,16 +99,6 @@ void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t val);
|
||||||
void stq_le_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
void stq_le_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
||||||
void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
void stq_be_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
||||||
|
|
||||||
#ifdef NEED_CPU_H
|
|
||||||
uint32_t lduw_phys(AddressSpace *as, hwaddr addr);
|
|
||||||
uint32_t ldl_phys(AddressSpace *as, hwaddr addr);
|
|
||||||
uint64_t ldq_phys(AddressSpace *as, hwaddr addr);
|
|
||||||
void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val);
|
|
||||||
void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val);
|
|
||||||
void stl_phys(AddressSpace *as, hwaddr addr, uint32_t val);
|
|
||||||
void stq_phys(AddressSpace *as, hwaddr addr, uint64_t val);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr,
|
void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr,
|
||||||
const uint8_t *buf, int len);
|
const uint8_t *buf, int len);
|
||||||
void cpu_flush_icache_range(AddressSpace *as, hwaddr start, int len);
|
void cpu_flush_icache_range(AddressSpace *as, hwaddr start, int len);
|
||||||
|
|
|
@ -1016,23 +1016,6 @@ void address_space_stq_le(AddressSpace *as, hwaddr addr, uint64_t val,
|
||||||
void address_space_stq_be(AddressSpace *as, hwaddr addr, uint64_t val,
|
void address_space_stq_be(AddressSpace *as, hwaddr addr, uint64_t val,
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
MemTxAttrs attrs, MemTxResult *result);
|
||||||
|
|
||||||
#ifdef NEED_CPU_H
|
|
||||||
uint32_t address_space_lduw(AddressSpace *as, hwaddr addr,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
uint32_t address_space_ldl(AddressSpace *as, hwaddr addr,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
uint64_t address_space_ldq(AddressSpace *as, hwaddr addr,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
void address_space_stl_notdirty(AddressSpace *as, hwaddr addr, uint32_t val,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
void address_space_stw(AddressSpace *as, hwaddr addr, uint32_t val,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
void address_space_stl(AddressSpace *as, hwaddr addr, uint32_t val,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
void address_space_stq(AddressSpace *as, hwaddr addr, uint64_t val,
|
|
||||||
MemTxAttrs attrs, MemTxResult *result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* address_space_translate: translate an address range into an address space
|
/* address_space_translate: translate an address range into an address space
|
||||||
* into a MemoryRegion and an address range into that section
|
* into a MemoryRegion and an address range into that section
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue