ref: cb3da529f4c6597fe1ae18704a55b5fa201cac61
parent: 409d9be87d504193aeb05a217f691ab1590e4d1a
author: Roberto E. Vargas Caballero <[email protected]>
date: Mon Apr 4 13:32:25 EDT 2016
[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.
--- a/cc2/arch/amd64-sysv/code.c
+++ b/cc2/arch/amd64-sysv/code.c
@@ -187,3 +187,8 @@
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
--- a/cc2/arch/i386-sysv/code.c
+++ b/cc2/arch/i386-sysv/code.c
@@ -186,3 +186,8 @@
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
@@ -59,3 +59,8 @@
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
--- a/cc2/arch/z80/code.c
+++ b/cc2/arch/z80/code.c
@@ -183,3 +183,8 @@
writeout(void)
{
}
+
+void
+endinit(void)
+{
+}
--- a/cc2/cc2.h
+++ b/cc2/cc2.h
@@ -164,7 +164,7 @@
/* 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);
--- a/cc2/parser.c
+++ b/cc2/parser.c
@@ -441,6 +441,7 @@
einit(char *token, union tokenop u)
{
ininit = 0;
+ endinit();
}
static void