aboutsummaryrefslogtreecommitdiff
path: root/target/sh4/helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-08-28 18:58:20 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-10-04 12:33:05 -0700
commitab419fd8a035a65942de4e63effcd55ccbf1a9fe (patch)
tree55d0319dbdd6b945fce99fe70f06fd1694b32cbd /target/sh4/helper.c
parent20add588296a8a24374004e9dbf6219f28665d34 (diff)
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: 4da06fb3062 ("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>
Diffstat (limited to 'target/sh4/helper.c')
-rw-r--r--target/sh4/helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/sh4/helper.c b/target/sh4/helper.c
index 6a620e36fc..e02e7af607 100644
--- a/target/sh4/helper.c
+++ b/target/sh4/helper.c
@@ -147,11 +147,11 @@ void superh_cpu_do_interrupt(CPUState *cs)
env->sr |= (1u << SR_BL) | (1u << SR_MD) | (1u << SR_RB);
env->lock_addr = -1;
- if (env->flags & DELAY_SLOT_MASK) {
+ if (env->flags & TB_FLAG_DELAY_SLOT_MASK) {
/* Branch instruction should be executed again before delay slot. */
env->spc -= 2;
/* Clear flags for exception/interrupt routine. */
- env->flags &= ~DELAY_SLOT_MASK;
+ env->flags &= ~TB_FLAG_DELAY_SLOT_MASK;
}
if (do_exp) {
@@ -786,7 +786,7 @@ bool superh_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
CPUSH4State *env = &cpu->env;
/* Delay slots are indivisible, ignore interrupts */
- if (env->flags & DELAY_SLOT_MASK) {
+ if (env->flags & TB_FLAG_DELAY_SLOT_MASK) {
return false;
} else {
superh_cpu_do_interrupt(cs);