[hackers] [scc/qbe] [cc2-qbe] Move calls to tmpnode() to the call to code() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 17 Aug 2016 14:29:50 +0200 (CEST)

commit a9faecb3d9b2541461d0cb68bc5db78d86000e8c
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Wed Aug 17 13:19:19 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -115,8 +115,6 @@ load(Node *np, Node *new)
         Type *tp;
 
         tp = &np->type;
- tmpnode(new, tp);
-
         switch (tp->size) {
         case 1:
                 op = ASLDB;
_AT_@ -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;
 }
 
Received on Wed Aug 17 2016 - 14:29:50 CEST

This archive was generated by hypermail 2.3.0 : Wed Aug 17 2016 - 14:36:34 CEST