aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/mem_helper.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-27 06:49:53 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-28 13:25:13 +0200
commitc658b94f6e8c206c59d02aa6fbac285b86b53d2c (patch)
tree100efd8e543a576daa8d7dc6684ce1154ea08245 /target-alpha/mem_helper.c
parentce927ed9e40e25008453eb8f130661514b633341 (diff)
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>
Diffstat (limited to 'target-alpha/mem_helper.c')
-rw-r--r--target-alpha/mem_helper.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c
index 3d2cd61358..7160a1cd4f 100644
--- a/target-alpha/mem_helper.c
+++ b/target-alpha/mem_helper.c
@@ -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);
}