tcg: Introduce arg_temp

Reviewed-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2017-06-19 23:18:10 -07:00 committed by Richard Henderson
parent dd18629201
commit 434391390b
3 changed files with 32 additions and 28 deletions

View file

@ -133,7 +133,7 @@ static TCGArg find_better_copy(TCGContext *s, TCGArg temp)
}
/* If it is a temp, search for a temp local. */
if (!s->temps[temp].temp_local) {
if (!arg_temp(temp)->temp_local) {
for (i = temps[temp].next_copy ; i != temp ; i = temps[i].next_copy) {
if (s->temps[i].temp_local) {
return i;
@ -207,7 +207,7 @@ static void tcg_opt_gen_mov(TCGContext *s, TCGOp *op, TCGArg dst, TCGArg src)
}
temps[dst].mask = mask;
if (s->temps[src].type == s->temps[dst].type) {
if (arg_temp(src)->type == arg_temp(dst)->type) {
temps[dst].next_copy = temps[src].next_copy;
temps[dst].prev_copy = src;
temps[temps[dst].next_copy].prev_copy = dst;