ref: 925689f19610ac8edb18a3a556896a4409a82677
parent: 51512afa27c440847be65034b0d9b333348006db
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Apr 22 18:00:15 EDT 2016
[cc2-qbe] Fix allocation of parameters The test was inverted and it meant that we were allocating the temporaries instead of the parameters.
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -313,7 +313,7 @@
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) */