summaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2015-07-27 12:55:57 +0200
committerRichard Henderson <rth@twiddle.net>2015-07-27 07:25:40 -0700
commit7df69deadf2f25c19b3ac121404ee31f71dce845 (patch)
tree1639adba3688a8987a2ff3d536524bad980c2ece /tcg
parente40db4c6d391419c0039fe274c74df32a6ca1a28 (diff)
downloadqemu-7df69deadf2f25c19b3ac121404ee31f71dce845.tar.gz
qemu-7df69deadf2f25c19b3ac121404ee31f71dce845.tar.bz2
qemu-7df69deadf2f25c19b3ac121404ee31f71dce845.zip
tcg: correctly mark dead inputs for mov with a constant
When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark a temp as dead if the liveness analysis hints so. This fixes the following assert when configure with --enable-debug-tcg: qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type == TEMP_VAL_DEAD' failed. Cc: Richard Henderson <rth@twiddle.net> Reported-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Message-Id: <1437994568-7825-2-git-send-email-aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 7e088b1f28..9a2508b261 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1920,6 +1920,9 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
}
ots->val_type = TEMP_VAL_CONST;
ots->val = ts->val;
+ if (IS_DEAD_ARG(1)) {
+ temp_dead(s, args[1]);
+ }
} else {
/* The code in the first if block should have moved the
temp to a register. */