aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-01-17 22:05:48 -0800
committerRichard Henderson <richard.henderson@linaro.org>2025-04-28 13:40:17 -0700
commit1f049cc5fda405c46de94f9328f0e3f84c0c993b (patch)
tree875000cadf3027fc60df95bd9bbbee0c74aaa697
parent7a89deae635ceaf687973dd95e4714af27a3f9d2 (diff)
downloadqemu-1f049cc5fda405c46de94f9328f0e3f84c0c993b.zip
qemu-1f049cc5fda405c46de94f9328f0e3f84c0c993b.tar.gz
qemu-1f049cc5fda405c46de94f9328f0e3f84c0c993b.tar.bz2
tcg/i386: Honor carry_live in tcg_out_movi
Do not clobber flags if they're live. Required in order to perform register allocation on add/sub carry opcodes. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/i386/tcg-target.c.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 04e31ca..8e0ccbc 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1092,7 +1092,7 @@ static void tcg_out_movi_int(TCGContext *s, TCGType type,
{
tcg_target_long diff;
- if (arg == 0) {
+ if (arg == 0 && !s->carry_live) {
tgen_arithr(s, ARITH_XOR, ret, ret);
return;
}