mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 09:34:46 +02:00
target: Use cpu_pointer_wrap_notreached for strict align targets
Alpha, HPPA, and SH4 always use aligned addresses, and therefore never produce accesses that cross pages. Cc: Helge Deller <deller@gmx.de> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -2933,3 +2933,16 @@ uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr,
|
||||
{
|
||||
return do_ld8_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH);
|
||||
}
|
||||
|
||||
/*
|
||||
* Common pointer_wrap implementations.
|
||||
*/
|
||||
|
||||
/*
|
||||
* To be used for strict alignment targets.
|
||||
* Because no accesses are unaligned, no accesses wrap either.
|
||||
*/
|
||||
vaddr cpu_pointer_wrap_notreached(CPUState *cs, int idx, vaddr res, vaddr base)
|
||||
{
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
@@ -322,6 +322,11 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
|
||||
*/
|
||||
int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len);
|
||||
|
||||
/*
|
||||
* Common pointer_wrap implementations.
|
||||
*/
|
||||
vaddr cpu_pointer_wrap_notreached(CPUState *, int, vaddr, vaddr);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* TCG_CPU_OPS_H */
|
||||
|
||||
@@ -261,6 +261,7 @@ static const TCGCPUOps alpha_tcg_ops = {
|
||||
.record_sigbus = alpha_cpu_record_sigbus,
|
||||
#else
|
||||
.tlb_fill = alpha_cpu_tlb_fill,
|
||||
.pointer_wrap = cpu_pointer_wrap_notreached,
|
||||
.cpu_exec_interrupt = alpha_cpu_exec_interrupt,
|
||||
.cpu_exec_halt = alpha_cpu_has_work,
|
||||
.cpu_exec_reset = cpu_reset,
|
||||
|
||||
@@ -269,6 +269,7 @@ static const TCGCPUOps hppa_tcg_ops = {
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
.tlb_fill_align = hppa_cpu_tlb_fill_align,
|
||||
.pointer_wrap = cpu_pointer_wrap_notreached,
|
||||
.cpu_exec_interrupt = hppa_cpu_exec_interrupt,
|
||||
.cpu_exec_halt = hppa_cpu_has_work,
|
||||
.cpu_exec_reset = cpu_reset,
|
||||
|
||||
@@ -296,6 +296,7 @@ static const TCGCPUOps superh_tcg_ops = {
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
.tlb_fill = superh_cpu_tlb_fill,
|
||||
.pointer_wrap = cpu_pointer_wrap_notreached,
|
||||
.cpu_exec_interrupt = superh_cpu_exec_interrupt,
|
||||
.cpu_exec_halt = superh_cpu_has_work,
|
||||
.cpu_exec_reset = cpu_reset,
|
||||
|
||||
Reference in New Issue
Block a user