tcg: Synchronize with qemu

This commit is contained in:
Lioncash 2019-04-26 08:40:45 -04:00
parent 006a13026a
commit 3996153514
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -2159,11 +2159,15 @@ static void liveness_pass_1(TCGContext *s)
goto do_not_remove; goto do_not_remove;
} }
} }
goto do_remove;
}
goto do_not_remove;
do_remove: do_remove:
tcg_op_remove(s, op); tcg_op_remove(s, op);
} else { break;
do_not_remove: do_not_remove:
/* output args are dead */
for (i = 0; i < nb_oargs; i++) { for (i = 0; i < nb_oargs; i++) {
ts = arg_temp(op->args[i]); ts = arg_temp(op->args[i]);
@ -2182,7 +2186,9 @@ static void liveness_pass_1(TCGContext *s)
} }
/* If end of basic block, update. */ /* If end of basic block, update. */
if (def->flags & TCG_OPF_BB_END) { if (def->flags & TCG_OPF_BB_EXIT) {
la_func_end(s, nb_globals, nb_temps);
} else if (def->flags & TCG_OPF_BB_END) {
// Unicorn: do not optimize dead temps on brcond, // Unicorn: do not optimize dead temps on brcond,
// this causes problem because check_exit_request() inserts // this causes problem because check_exit_request() inserts
// brcond instruction in the middle of the TB, // brcond instruction in the middle of the TB,
@ -2211,6 +2217,7 @@ static void liveness_pass_1(TCGContext *s)
arg_life |= DEAD_ARG << i; arg_life |= DEAD_ARG << i;
} }
} }
/* Input arguments are live for preceding opcodes. */ /* Input arguments are live for preceding opcodes. */
for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) { for (i = nb_oargs; i < nb_oargs + nb_iargs; i++) {
ts = arg_temp(op->args[i]); ts = arg_temp(op->args[i]);
@ -2255,8 +2262,6 @@ static void liveness_pass_1(TCGContext *s)
*pset = set; *pset = set;
} }
break; break;
}
} }
break; break;
} }