mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/sh4: Fix TB_FLAG_UNALIGN
The value previously chosen overlaps GUSA_MASK.
Rename all DELAY_SLOT_* and GUSA_* defines to emphasize
that they are included in TB_FLAGs. Add aliases for the
FPSCR and SR bits that are included in TB_FLAGS, so that
we don't accidentally reassign those bits.
Fixes: 4da06fb306
("target/sh4: Implement prctl_unalign_sigbus")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/856
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
20add58829
commit
ab419fd8a0
5 changed files with 88 additions and 76 deletions
|
@ -161,7 +161,7 @@ static void restore_sigcontext(CPUSH4State *regs, struct target_sigcontext *sc)
|
|||
__get_user(regs->fpul, &sc->sc_fpul);
|
||||
|
||||
regs->tra = -1; /* disable syscall checks */
|
||||
regs->flags &= ~(DELAY_SLOT_MASK | GUSA_MASK);
|
||||
regs->flags = 0;
|
||||
}
|
||||
|
||||
void setup_frame(int sig, struct target_sigaction *ka,
|
||||
|
@ -199,7 +199,7 @@ void setup_frame(int sig, struct target_sigaction *ka,
|
|||
regs->gregs[5] = 0;
|
||||
regs->gregs[6] = frame_addr += offsetof(typeof(*frame), sc);
|
||||
regs->pc = (unsigned long) ka->_sa_handler;
|
||||
regs->flags &= ~(DELAY_SLOT_MASK | GUSA_MASK);
|
||||
regs->flags &= ~(TB_FLAG_DELAY_SLOT_MASK | TB_FLAG_GUSA_MASK);
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 1);
|
||||
return;
|
||||
|
@ -251,7 +251,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
|
|||
regs->gregs[5] = frame_addr + offsetof(typeof(*frame), info);
|
||||
regs->gregs[6] = frame_addr + offsetof(typeof(*frame), uc);
|
||||
regs->pc = (unsigned long) ka->_sa_handler;
|
||||
regs->flags &= ~(DELAY_SLOT_MASK | GUSA_MASK);
|
||||
regs->flags &= ~(TB_FLAG_DELAY_SLOT_MASK | TB_FLAG_GUSA_MASK);
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 1);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue