[hackers] [scc] [cc2] Add endinit() function || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Mon, 4 Apr 2016 17:49:45 +0200 (CEST)

commit ede4ae9184f24eaddeed177e0309e6f920c2d53f
Author: Roberto E. Vargas Caballero <roberto.vargas_AT_igrid-td.com>
AuthorDate: Mon Apr 4 17:32:25 2016 +0200
Commit: Roberto E. Vargas Caballero <roberto.vargas_AT_igrid-td.com>
CommitDate: Mon Apr 4 17:32:25 2016 +0200

    [cc2] Add endinit() function
    
    This function marks the end of an initializer, and it is
    needed because some assembler will need a mark of end
    of data.

diff --git a/cc2/arch/amd64-sysv/code.c b/cc2/arch/amd64-sysv/code.c
index 3d46270..e58b937 100644
--- a/cc2/arch/amd64-sysv/code.c
+++ b/cc2/arch/amd64-sysv/code.c
_AT_@ -187,3 +187,8 @@ void
 writeout(void)
 {
 }
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/arch/i386-sysv/code.c b/cc2/arch/i386-sysv/code.c
index 4e75be2..fddb672 100644
--- a/cc2/arch/i386-sysv/code.c
+++ b/cc2/arch/i386-sysv/code.c
_AT_@ -186,3 +186,8 @@ void
 writeout(void)
 {
 }
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index f030a00..73f698e 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -59,3 +59,8 @@ void
 writeout(void)
 {
 }
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/arch/z80/code.c b/cc2/arch/z80/code.c
index 7a3604f..49a4737 100644
--- a/cc2/arch/z80/code.c
+++ b/cc2/arch/z80/code.c
_AT_@ -183,3 +183,8 @@ void
 writeout(void)
 {
 }
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/cc2.h b/cc2/cc2.h
index b6257ed..4a91575 100644
--- a/cc2/cc2.h
+++ b/cc2/cc2.h
_AT_@ -164,7 +164,7 @@ extern void peephole(void);
 /* code.c */
 extern void data(Node *np);
 extern void defsym(Symbol *sym, int alloc);
-extern void writeout(void);
+extern void writeout(void), endinit(void);
 
 /* node.c */
 extern void cleannodes(void);
diff --git a/cc2/parser.c b/cc2/parser.c
index dbe6aa5..0657dc6 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -441,6 +441,7 @@ static void
 einit(char *token, union tokenop u)
 {
         ininit = 0;
+ endinit();
 }
 
 static void
Received on Mon Apr 04 2016 - 17:49:45 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 04 2016 - 18:00:23 CEST