commit cb298cbc11907baaac115e312d8a875420f2ecbf Author: Roberto E. Vargas Caballero <k...@shike2.com> AuthorDate: Tue Jun 7 09:36:31 2016 +0200 Commit: Roberto E. Vargas Caballero <k...@shike2.com> CommitDate: Tue Jun 7 09:36:31 2016 +0200
[cc2-qbe] Improve ternary() in cgen.c There was a bit of garbage from previous changes. diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c index acca4e8..77ec71e 100644 --- a/cc2/arch/qbe/cgen.c +++ b/cc2/arch/qbe/cgen.c @@ -319,7 +319,7 @@ static Node * ternary(Node *np) { Symbol *yes, *no, *phi; - Node *ifyes, *ifno, *phinode, *yesval, *colon; + Node *ifyes, *ifno, *phinode, *colon; tmpnode(np); phi = newlabel(); @@ -332,8 +332,7 @@ ternary(Node *np) colon = np->right; cgen(np->left); - load(np, LOADL); - code(ASBRANCH, np->left, ifyes, ifno); + code(ASBRANCH, load(np, LOADL), ifyes, ifno); setlabel(yes); cgen(colon->left);