aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorKirill Batuzov <batuzovk@ispras.ru>2012-11-07 15:26:38 +0400
committerAurelien Jarno <aurelien@aurel32.net>2012-11-11 16:06:46 +0100
commit3c5645fab3c4b65d0cffbe1aaafc787e4be63d0f (patch)
treecd7ea54106e5db7baced89064bfc551aa0969216 /tcg
parent7c2c3ea3fd9e108a1c174a5db021ac1d33b1a22d (diff)
tcg: properly check that op's output needs to be synced to memory
Fix typo introduced in b3a1be87bac3a6aaa59bb88c1410f170dc9b22d5. Reported-by: Ruslan Savchenko <ruslan.savchenko@gmail.com> Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 42052dba7b..35fba50c7f 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1337,8 +1337,8 @@ static void tcg_liveness_analysis(TCGContext *s)
the low part. The result can be optimized to a simple
add or sub. This happens often for x86_64 guest when the
cpu mode is set to 32 bit. */
- if (dead_temps[args[1]] && !mem_temps[1]) {
- if (dead_temps[args[0]] && !mem_temps[0]) {
+ if (dead_temps[args[1]] && !mem_temps[args[1]]) {
+ if (dead_temps[args[0]] && !mem_temps[args[0]]) {
goto do_remove;
}
/* Create the single operation plus nop. */
@@ -1363,8 +1363,8 @@ static void tcg_liveness_analysis(TCGContext *s)
nb_iargs = 2;
nb_oargs = 2;
/* Likewise, test for the high part of the operation dead. */
- if (dead_temps[args[1]] && !mem_temps[1]) {
- if (dead_temps[args[0]] && !mem_temps[0]) {
+ if (dead_temps[args[1]] && !mem_temps[args[1]]) {
+ if (dead_temps[args[0]] && !mem_temps[args[0]]) {
goto do_remove;
}
gen_opc_buf[op_index] = op = INDEX_op_mul_i32;