commit a9faecb3d9b2541461d0cb68bc5db78d86000e8c
parent a4b3b284742d4f7f3cd2fd53a00acff7a8c6a0cf
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Wed, 17 Aug 2016 13:19:19 +0200
[cc2-qbe] Move calls to tmpnode() to the call to code()
This makes the code more consice and it avoids to have
non sequential identifiers for temporary variables.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
@@ -115,8 +115,6 @@ load(Node *np, Node *new)
Type *tp;
tp = &np->type;
- tmpnode(new, tp);
-
switch (tp->size) {
case 1:
op = ASLDB;
@@ -133,7 +131,8 @@ load(Node *np, Node *new)
default:
abort();
}
- code(op, new, np, NULL);
+ code(op, tmpnode(new, tp), np, NULL);
+
return new;
}