[hackers] [scc] [cc2-qbe] Fix default case in bool() || Roberto E. Vargas Caballero
commit c72e4d06d0b6510f3dbb0ea05a15e83b0696262b
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Sep 27 17:06:46 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Sep 27 17:06:46 2016 +0200
[cc2-qbe] Fix default case in bool()
We were generating code for the left child of the parameter,
but we had to generate the code for the node itself.
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 3df8a8f..1c7b8fb 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -362,7 +362,7 @@ bool(Node *np, Symbol *true, Symbol *false)
default:
label2node(&ifyes, true);
label2node(&ifno, false);
- code(ASBRANCH, rhs(l, &ret), &ifyes, &ifno);
+ code(ASBRANCH, rhs(np, &ret), &ifyes, &ifno);
break;
}
}
Received on Tue Sep 27 2016 - 17:07:54 CEST
This archive was generated by hypermail 2.3.0
: Tue Sep 27 2016 - 17:12:18 CEST