diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-07-03 08:53:46 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-07-20 21:28:08 +0000 |
commit | b14ef7c9ab41ea824c3ccadb070ad95567cca84e (patch) | |
tree | 87d72668e2e096e80b8e60ddddd2ddd82c20a9e2 /target-alpha | |
parent | 21673cdecb9e9b5a22acaf0a44e47145beb1999e (diff) |
Fix unassigned memory access handling
cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory
access handling. Fix them by always passing CPUState to the handlers.
Reported-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-alpha')
-rw-r--r-- | target-alpha/cpu.h | 5 | ||||
-rw-r--r-- | target-alpha/op_helper.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index 78caa796b6..919be12a38 100644 --- a/target-alpha/cpu.h +++ b/target-alpha/cpu.h @@ -434,8 +434,9 @@ uint64_t cpu_alpha_load_fpcr (CPUState *env); void cpu_alpha_store_fpcr (CPUState *env, uint64_t val); #ifndef CONFIG_USER_ONLY void swap_shadow_regs(CPUState *env); -extern QEMU_NORETURN void do_unassigned_access(target_phys_addr_t addr, - int, int, int, int); +QEMU_NORETURN void cpu_unassigned_access(CPUState *env1, + target_phys_addr_t addr, int is_write, + int is_exec, int unused, int size); #endif /* Bits in TB->FLAGS that control how translation is processed. */ diff --git a/target-alpha/op_helper.c b/target-alpha/op_helper.c index 51d1bd7099..8f39154391 100644 --- a/target-alpha/op_helper.c +++ b/target-alpha/op_helper.c @@ -1301,9 +1301,11 @@ static void QEMU_NORETURN do_unaligned_access(target_ulong addr, int is_write, helper_excp(EXCP_UNALIGN, 0); } -void QEMU_NORETURN do_unassigned_access(target_phys_addr_t addr, int is_write, - int is_exec, int unused, int size) +void QEMU_NORETURN cpu_unassigned_access(CPUState *env1, + target_phys_addr_t addr, int is_write, + int is_exec, int unused, int size) { + env = env1; env->trap_arg0 = addr; env->trap_arg1 = is_write; dynamic_excp(EXCP_MCHK, 0); |