summaryrefslogtreecommitdiff
path: root/tcg/optimize.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-06-19 23:18:10 -0700
committerRichard Henderson <richard.henderson@linaro.org>2017-10-24 21:43:36 +0200
commit434391390ba99996af1591b427a73b3f5c05065e (patch)
tree042c37636cf3b826e923b9c53cadc06c42261f0e /tcg/optimize.c
parentdd186292017641d5b31fc13225a420677e1d20d3 (diff)
downloadqemu-434391390ba99996af1591b427a73b3f5c05065e.tar.gz
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>
Diffstat (limited to 'tcg/optimize.c')
-rw-r--r--tcg/optimize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 1a1c6fb90c..d8c3a7ed56 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -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;