commit ede4ae9184f24eaddeed177e0309e6f920c2d53f
parent 669131252b1f35c13e32a47e22e84026ac69d1a8
Author: Roberto E. Vargas Caballero <roberto.vargas@igrid-td.com>
Date: Mon, 4 Apr 2016 17:32:25 +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.
Diffstat:
6 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/cc2/arch/amd64-sysv/code.c b/cc2/arch/amd64-sysv/code.c
@@ -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
@@ -186,3 +186,8 @@ void
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
@@ -59,3 +59,8 @@ void
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/arch/z80/code.c b/cc2/arch/z80/code.c
@@ -183,3 +183,8 @@ void
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
diff --git a/cc2/cc2.h b/cc2/cc2.h
@@ -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
@@ -441,6 +441,7 @@ static void
einit(char *token, union tokenop u)
{
ininit = 0;
+ endinit();
}
static void