scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 2c5658c7d684eef9de76ff7715f7da6debb69d8f
parent f69acd24b277d282010482c659f286050f05a926
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 25 Mar 2014 13:15:32 +0100

Add forgotten file code.c

This file is needed in order to can compile

Diffstat:
Acode.c | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/code.c b/code.c @@ -0,0 +1,21 @@ + +#include <stdint.h> +#include <stdio.h> + +#include "symbol.h" + +void +emitsym(struct symbol *sym) +{ + char c; + + if (sym->s.isglobal) + c = 'G'; + else if (sym->s.isstatic) + c = 'T'; + else if (sym->s.isregister) + c = 'R'; + else + c = 'A'; + printf("\t%c%d", c, sym->id); +} +\ No newline at end of file