aboutsummaryrefslogtreecommitdiff
path: root/target/sh4
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2022-12-12 09:03:17 -0600
committerRichard Henderson <richard.henderson@linaro.org>2022-12-18 09:36:07 -0800
commitbc2331635ce18ff068d2bb1e493bc546e1f786e1 (patch)
tree6670d16aab7c6d2ea7c5d4affa8886d935d20f10 /target/sh4
parent562d4af32ec2213061f844b3838223fd7711b56a (diff)
target/sh4: Mask restore of env->flags from tb->flags
The values in env->flags are a subset of tb->flags. Restore only the bits that belong. Cc: qemu-stable@nongnu.org Fixes: ab419fd8a035 ("target/sh4: Fix TB_FLAG_UNALIGN") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Message-ID: <20221212011345.GA2235238@roeck-us.net> [rth: Reduce to only the the superh_cpu_synchronize_from_tb change] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/sh4')
-rw-r--r--target/sh4/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
index 951eb6b9c8..f0934b20fa 100644
--- a/target/sh4/cpu.c
+++ b/target/sh4/cpu.c
@@ -47,7 +47,7 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs,
SuperHCPU *cpu = SUPERH_CPU(cs);
cpu->env.pc = tb_pc(tb);
- cpu->env.flags = tb->flags;
+ cpu->env.flags = tb->flags & TB_FLAG_ENVFLAGS_MASK;
}
static void superh_restore_state_to_opc(CPUState *cs,