scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 734448b3325cec5c59a3ecc611a524a9719c4c75
parent b054b416db6ea7150a34823cb898e45c42d5574c
Author: Roberto E. Vargas Caballero <roberto.vargas@igrid-td.com>
Date:   Mon, 11 Apr 2016 17:16:01 +0200

[cc2-qbe] Add skeleton for function code generation

This is only a stub that prints the name of the function,
although it still cannot print the type of the function
because we do not have this information in our IR,
although we can derive it from the code (from the return
statements)

Diffstat:
cc2/arch/qbe/code.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c @@ -144,6 +144,11 @@ data(Node *np) void writeout(void) { + if (curfun->kind == GLOB) + fputs("export ", stdout); + printf("function $%s(", symname(curfun)); + puts("){"); + puts("}"); } void