[hackers] [scc] [cc2-qbe] Allocate stack space only for automatic variables || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 3 Jun 2016 12:56:07 +0200 (CEST)

commit 51d7f27d9dbda8d2dad833f985a6ef28bee4a939
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jun 3 12:54:37 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jun 3 12:54:37 2016 +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.

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index c637ced..949aa32 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -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 */
Received on Fri Jun 03 2016 - 12:56:07 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 03 2016 - 13:00:24 CEST