[hackers] [scc] [cc2-qbe] Fast and dirty workaround to function type || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 15 Apr 2016 12:29:15 +0200 (CEST)

commit 505d9bd056b9f1a67c58cb0939364339d0812d67
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Apr 15 10:01:24 2016 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Apr 15 10:01:24 2016 +0200

    [cc2-qbe] Fast and dirty workaround to function type
    
    At this moment we cannot set the correct type in functions
    because we don't have this information, but we can mock it
    a bit and set all the functions as integer functions.

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 52e606e..50b0849 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -164,7 +164,7 @@ writeout(void)
 
         if (curfun->kind == GLOB)
                 fputs("export ", stdout);
- printf("function %s(", symname(curfun));
+ printf("function w %s(", symname(curfun));
 
         for (p = locals; p && p->type.flags & PARF; p = p->next)
                 printf("%s %s,", size2asm(&p->type), symname(p));
Received on Fri Apr 15 2016 - 12:29:15 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 15 2016 - 12:36:25 CEST