[hackers] [scc] [cc2-qbe] Improve ternary() in cgen.c || Roberto E. Vargas Caballero
commit cb298cbc11907baaac115e312d8a875420f2ecbf
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jun 7 09:36:31 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_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
_AT_@ -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();
_AT_@ -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);
Received on Tue Jun 07 2016 - 09:37:23 CEST
This archive was generated by hypermail 2.3.0
: Tue Jun 07 2016 - 09:48:13 CEST