[hackers] [scc] [cc2-qbe] fix sign/zero extensions || Quentin Carbonneaux

From: <git_AT_suckless.org>
Date: Sat, 18 Feb 2017 17:55:14 +0100 (CET)

commit 94e71f2cb3b9711c6efe033882d4b5e43043a915
Author: Quentin Carbonneaux <quentin_AT_c9x.me>
AuthorDate: Sat Feb 18 10:51:34 2017 -0500
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
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
_AT_@ -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) {
Received on Sat Feb 18 2017 - 17:55:14 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 18 2017 - 18:00:20 CET