Commit dbdd0cf3 by Mark Mitchell Committed by Joseph Myers

sol2.h (ASM_OUTPUT_CALL): Use print_operand.

2004-11-15  Mark Mitchell <mark@codesourcery.com>

	* config/i386/sol2.h (ASM_OUTPUT_CALL): Use print_operand.
	* config/sparc/sol2.h (ASM_OUTPUT_CALL): Likewise.
	* config/sol2.c (solaris_output_init_fini): Update calls to
	ASM_OUTPUT_CALL.  Include "rtl.h".

From-SVN: r90674
parent 11559c75
2004-11-15 Mark Mitchell <mark@codesourcery.com> 2004-11-15 Mark Mitchell <mark@codesourcery.com>
* config/i386/sol2.h (ASM_OUTPUT_CALL): Use print_operand.
* config/sparc/sol2.h (ASM_OUTPUT_CALL): Likewise.
* config/sol2.c (solaris_output_init_fini): Update calls to
ASM_OUTPUT_CALL. Include "rtl.h".
2004-11-15 Mark Mitchell <mark@codesourcery.com>
* config/sol2-c.c (cmn_err_char_table): Add "p". * config/sol2-c.c (cmn_err_char_table): Add "p".
2004-11-15 Mark Mitchell <mark@codesourcery.com> 2004-11-15 Mark Mitchell <mark@codesourcery.com>
......
...@@ -87,5 +87,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -87,5 +87,11 @@ Boston, MA 02111-1307, USA. */
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE #define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
/* Output a simple call for .init/.fini. */ /* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, NAME) \ #define ASM_OUTPUT_CALL(FILE, FN) \
fprintf (FILE, "\tcall\t%s\n", NAME) do \
{ \
fprintf (FILE, "\tcall\t"); \
print_operand (FILE, XEXP (DECL_RTL (FN), 0), 'P'); \
fprintf (FILE, "\n"); \
} \
while (0)
...@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "coretypes.h" #include "coretypes.h"
#include "tree.h" #include "tree.h"
#include "tm.h" #include "tm.h"
#include "rtl.h"
#include "tm_p.h" #include "tm_p.h"
#include "toplev.h" #include "toplev.h"
#include "ggc.h" #include "ggc.h"
...@@ -105,14 +106,14 @@ solaris_output_init_fini (FILE *file, tree decl) ...@@ -105,14 +106,14 @@ solaris_output_init_fini (FILE *file, tree decl)
if (lookup_attribute ("init", DECL_ATTRIBUTES (decl))) if (lookup_attribute ("init", DECL_ATTRIBUTES (decl)))
{ {
fprintf (file, "\t.pushsection\t\".init\"\n"); fprintf (file, "\t.pushsection\t\".init\"\n");
ASM_OUTPUT_CALL (file, IDENTIFIER_POINTER (DECL_NAME (decl))); ASM_OUTPUT_CALL (file, decl);
fprintf (file, "\t.popsection\n"); fprintf (file, "\t.popsection\n");
} }
if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl))) if (lookup_attribute ("fini", DECL_ATTRIBUTES (decl)))
{ {
fprintf (file, "\t.pushsection\t\".fini\"\n"); fprintf (file, "\t.pushsection\t\".fini\"\n");
ASM_OUTPUT_CALL (file, IDENTIFIER_POINTER (DECL_NAME (decl))); ASM_OUTPUT_CALL (file, decl);
fprintf (file, "\t.popsection\n"); fprintf (file, "\t.popsection\n");
} }
} }
......
...@@ -163,5 +163,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -163,5 +163,11 @@ Boston, MA 02111-1307, USA. */
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE #define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
/* Output a simple call for .init/.fini. */ /* Output a simple call for .init/.fini. */
#define ASM_OUTPUT_CALL(FILE, NAME) \ #define ASM_OUTPUT_CALL(FILE, FN) \
fprintf (FILE, "\tcall\t%s\n\t nop\n", NAME) do \
{ \
fprintf (FILE, "\tcall\t"); \
print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0); \
fprintf (FILE, "\n\tnop\n"); \
} \
while (0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment