]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/i386: Honor carry_live in tcg_out_movi
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 18 Jan 2025 06:05:48 +0000 (22:05 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 28 Apr 2025 20:40:17 +0000 (13:40 -0700)
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>
tcg/i386/tcg-target.c.inc

index 04e31cae12df448686bf0b138e152813c2f73011..8e0ccbc7221aff82d6c8fa5ad1371408302ae6ba 100644 (file)
@@ -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;
     }