commit 51d7f27d9dbda8d2dad833f985a6ef28bee4a939
parent 88ae3bed3e7c06774ab9a9a98db4a71534fea594
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 3 Jun 2016 12:54:37 +0200
[cc2-qbe] Allocate stack space only for automatic variables
We have different local variables, but we only have to allocate
space for automatic variables.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
@@ -330,7 +330,7 @@ writeout(void)
/* allocate stack space for local variables) */
for ( ; p && p->id != TMPSYM; p = p->next) {
- if (p->kind && p->kind != SLABEL)
+ if (p->kind == SAUTO)
alloc(p);
}
/* store formal parameters in parameters */