commit 88ae3bed3e7c06774ab9a9a98db4a71534fea594
parent dd21e6a1c3601821e00992066fd65b5fe24c0e3f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 3 Jun 2016 12:53:51 +0200
[cc2-qbe] Convert register variables into automatic variables
Qbe ignores register variables, and this change makes easier
for qbe backend to handle automatic and register variables.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
@@ -282,6 +282,8 @@ defpar(Symbol *sym)
void
defvar(Symbol *sym)
{
+ if (sym->kind == SREG)
+ sym->kind = SAUTO;
}
void