mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
exec: Make stb_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
5ce5944dc0
commit
db3be60deb
11 changed files with 34 additions and 26 deletions
6
exec.c
6
exec.c
|
@ -1625,7 +1625,7 @@ static void watch_mem_write(void *opaque, hwaddr addr,
|
|||
check_watchpoint(addr & ~TARGET_PAGE_MASK, ~(size - 1), BP_MEM_WRITE);
|
||||
switch (size) {
|
||||
case 1:
|
||||
stb_phys(addr, val);
|
||||
stb_phys(&address_space_memory, addr, val);
|
||||
break;
|
||||
case 2:
|
||||
stw_phys(&address_space_memory, addr, val);
|
||||
|
@ -2621,10 +2621,10 @@ void stl_be_phys(AddressSpace *as, hwaddr addr, uint32_t val)
|
|||
}
|
||||
|
||||
/* XXX: optimize */
|
||||
void stb_phys(hwaddr addr, uint32_t val)
|
||||
void stb_phys(AddressSpace *as, hwaddr addr, uint32_t val)
|
||||
{
|
||||
uint8_t v = val;
|
||||
cpu_physical_memory_write(addr, &v, 1);
|
||||
address_space_rw(as, addr, &v, 1, 1);
|
||||
}
|
||||
|
||||
/* warning: addr must be aligned */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue