On 8/19/21 5:46 AM, Peter Maydell wrote:
On Wed, 18 Aug 2021 at 20:26, Richard Henderson
<richard.hender...@linaro.org> wrote:
Cc: Yoshinori Sato <ys...@users.sourceforge.jp>
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
linux-user/sh4/cpu_loop.c | 8 ++++++++
target/sh4/cpu.c | 2 +-
target/sh4/op_helper.c | 3 ---
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/linux-user/sh4/cpu_loop.c b/linux-user/sh4/cpu_loop.c
index 222ed1c670..21d97250a8 100644
--- a/linux-user/sh4/cpu_loop.c
+++ b/linux-user/sh4/cpu_loop.c
@@ -71,6 +71,14 @@ void cpu_loop(CPUSH4State *env)
info._sifields._sigfault._addr = env->tea;
queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
break;
+ case 0xe0:
+ case 0x100:
+ info.si_signo = TARGET_SIGBUS;
+ info.si_errno = 0;
+ info.si_code = TARGET_BUS_ADRALN;
+ info._sifields._sigfault._addr = env->tea;
+ queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
+ break;
case EXCP_ATOMIC:
cpu_exec_step_atomic(cs);
arch_interrupt = false;
Doesn't this have to wait until after the later patches in the
series that implement the "actually don't worry about alignment
on most sh4 load/stores" ?
Hmm. I don't think that helps. The only thing that delaying this patch would do is hit
the assert in cpu_unaligned_access() due to an alignment fault occurring but not having
the do_unaligned_access hook set.
I think the real requirement is that the tcg/i386 patch that enforces the alignment is
delayed until after all of the prctl patches.
r~