[hackers] [scc] [cc2-qbe] Fix allocation of parameters || Roberto E. Vargas Caballero
commit e961b8c2e12cb80e69a698f14516601aca4cb016
Author: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
AuthorDate: Fri Apr 22 22:00:15 2016 +0200
Commit: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
CommitDate: Fri Apr 22 22:00:15 2016 +0200
[cc2-qbe] Fix allocation of parameters
The test was inverted and it meant that we were allocating
the temporaries instead of the parameters.
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 57170aa..502bfcd 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -313,7 +313,7 @@ writeout(void)
puts(")\n{");
/* allocate stack space for parameters */
- for (p = locals; p && (p->type.flags & PARF) == 0; p = p->next)
+ for (p = locals; p && (p->type.flags & PARF) != 0; p = p->next)
alloc(p);
/* allocate stack space for local variables) */
Received on Sat Apr 23 2016 - 19:05:56 CEST
This archive was generated by hypermail 2.3.0
: Sat Apr 23 2016 - 19:12:30 CEST