[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 13/55] target/sh4: Set fault address in superh_cpu_do_unaligne
From: |
Richard Henderson |
Subject: |
[PATCH v2 13/55] target/sh4: Set fault address in superh_cpu_do_unaligned_access |
Date: |
Mon, 2 Aug 2021 18:14:01 -1000 |
We ought to have been recording the virtual address for reporting
to the guest trap handler.
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sh4/op_helper.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index c0cbb95382..d6d70c339f 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -29,6 +29,9 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
MMUAccessType access_type,
int mmu_idx, uintptr_t retaddr)
{
+ CPUSH4State *env = cs->env_ptr;
+
+ env->tea = addr;
switch (access_type) {
case MMU_INST_FETCH:
case MMU_DATA_LOAD:
@@ -37,6 +40,8 @@ void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
case MMU_DATA_STORE:
cs->exception_index = 0x100;
break;
+ default:
+ g_assert_not_reached();
}
cpu_loop_exit_restore(cs, retaddr);
}
--
2.25.1
- [PATCH v2 05/55] target/hppa: Implement do_unaligned_access for user-only, (continued)
- [PATCH v2 05/55] target/hppa: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 06/55] target/microblaze: Do not set MO_ALIGN for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 07/55] target/mips: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 08/55] target/ppc: Move SPR_DSISR setting to powerpc_excp, Richard Henderson, 2021/08/03
- [PATCH v2 10/55] target/ppc: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 11/55] target/riscv: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 09/55] target/ppc: Set fault address in ppc_cpu_do_unaligned_access, Richard Henderson, 2021/08/03
- [PATCH v2 13/55] target/sh4: Set fault address in superh_cpu_do_unaligned_access,
Richard Henderson <=
- [PATCH v2 14/55] target/sh4: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 16/55] target/sparc: Split out build_sfsr, Richard Henderson, 2021/08/03
- [PATCH v2 12/55] target/s390x: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03
- [PATCH v2 15/55] target/sparc: Remove DEBUG_UNALIGNED, Richard Henderson, 2021/08/03
- [PATCH v2 17/55] target/sparc: Set fault address in sparc_cpu_do_unaligned_access, Richard Henderson, 2021/08/03
- [PATCH v2 18/55] target/sparc: Implement do_unaligned_access for user-only, Richard Henderson, 2021/08/03