mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
cpu: Move mem_io_{pc,vaddr} fields from CPU_COMMON to CPUState
Reset them. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
@@ -146,13 +146,6 @@ typedef struct CPUWatchpoint {
|
||||
#define CPU_TEMP_BUF_NLONGS 128
|
||||
#define CPU_COMMON \
|
||||
/* soft mmu support */ \
|
||||
/* in order to avoid passing too many arguments to the MMIO \
|
||||
helpers, we store some rarely used information in the CPU \
|
||||
context) */ \
|
||||
uintptr_t mem_io_pc; /* host pc at which the memory was \
|
||||
accessed */ \
|
||||
target_ulong mem_io_vaddr; /* target virtual addr at which the \
|
||||
memory was accessed */ \
|
||||
CPU_COMMON_TLB \
|
||||
struct TranslationBlock *tb_jmp_cache[TB_JMP_CACHE_SIZE]; \
|
||||
\
|
||||
|
||||
@@ -126,12 +126,12 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
|
||||
MemoryRegion *mr = iotlb_to_region(cpu->as, physaddr);
|
||||
|
||||
physaddr = (physaddr & TARGET_PAGE_MASK) + addr;
|
||||
env->mem_io_pc = retaddr;
|
||||
cpu->mem_io_pc = retaddr;
|
||||
if (mr != &io_mem_rom && mr != &io_mem_notdirty && !can_do_io(env)) {
|
||||
cpu_io_recompile(env, retaddr);
|
||||
}
|
||||
|
||||
env->mem_io_vaddr = addr;
|
||||
cpu->mem_io_vaddr = addr;
|
||||
io_mem_read(mr, physaddr, &val, 1 << SHIFT);
|
||||
return val;
|
||||
}
|
||||
@@ -337,8 +337,8 @@ static inline void glue(io_write, SUFFIX)(CPUArchState *env,
|
||||
cpu_io_recompile(env, retaddr);
|
||||
}
|
||||
|
||||
env->mem_io_vaddr = addr;
|
||||
env->mem_io_pc = retaddr;
|
||||
cpu->mem_io_vaddr = addr;
|
||||
cpu->mem_io_pc = retaddr;
|
||||
io_mem_write(mr, physaddr, val, 1 << SHIFT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user