commit 94e71f2cb3b9711c6efe033882d4b5e43043a915
Author: Quentin Carbonneaux <[email protected]>
AuthorDate: Sat Feb 18 10:51:34 2017 -0500
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Feb 18 17:53:27 2017 +0100
[cc2-qbe] fix sign/zero extensions
diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index c30ae8d..e27c776 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -189,7 +189,7 @@ cast(Type *td, Node *ns, Node *nd)
* unsigned version of operations are always +1 the
* signed version
*/
- op += (td->flags & SIGNF) == 0;
+ op += (ts->flags & SIGNF) == 0;
} else if (d_isint) {
/* conversion from float to int */
switch (ts->size) {