commit a9faecb3d9b2541461d0cb68bc5db78d86000e8c
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Wed Aug 17 13:19:19 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Wed Aug 17 13:35:59 2016 +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.

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 57e0c68..096089e 100644
--- 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;
 }
 

Reply via email to