mirror of
https://github.com/mii443/qemu.git
synced 2025-08-30 19:09:35 +00:00
cpu: Turn cpu_unassigned_access() into a CPUState hook
Use it for all targets, but be careful not to pass invalid CPUState. cpu_single_env can be NULL, e.g. on Xen. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
@ -109,11 +109,15 @@ static void do_unaligned_access(CPUAlphaState *env, target_ulong addr,
|
||||
cpu_loop_exit(env);
|
||||
}
|
||||
|
||||
void cpu_unassigned_access(CPUAlphaState *env, hwaddr addr,
|
||||
int is_write, int is_exec, int unused, int size)
|
||||
void alpha_cpu_unassigned_access(CPUState *cs, hwaddr addr,
|
||||
bool is_write, bool is_exec, int unused,
|
||||
unsigned size)
|
||||
{
|
||||
AlphaCPU *cpu = ALPHA_CPU(cs);
|
||||
CPUAlphaState *env = &cpu->env;
|
||||
|
||||
env->trap_arg0 = addr;
|
||||
env->trap_arg1 = is_write;
|
||||
env->trap_arg1 = is_write ? 1 : 0;
|
||||
dynamic_excp(env, 0, EXCP_MCHK, 0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user