From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Guenter Roeck <linux@roeck-us.net>,
qemu-stable@nongnu.org
Subject: [PULL 1/2] target/sh4: Mask restore of env->flags from tb->flags
Date: Sun, 18 Dec 2022 09:50:34 -0800 [thread overview]
Message-ID: <20221218175035.449904-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20221218175035.449904-1-richard.henderson@linaro.org>
From: Guenter Roeck <linux@roeck-us.net>
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>
---
target/sh4/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
--
2.34.1
next prev parent reply other threads:[~2022-12-18 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-18 17:50 [PULL 0/2] target sh4 and tricore patches Richard Henderson
2022-12-18 17:50 ` Richard Henderson [this message]
2022-12-18 17:50 ` [PULL 2/2] target/tricore: Fix gdbstub write to address registers Richard Henderson
2022-12-19 15:09 ` [PULL 0/2] target sh4 and tricore patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221218175035.449904-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=linux@roeck-us.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).