aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-09-20 13:08:32 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-09-20 13:08:32 -0700
commit5619cc87d3d51997d943672bb159a6523355f60a (patch)
treec9b6428b59e55e20bc50ad3834d110ad2a32a608 /gcc
parentb696ee6b889c9c2c385cc759fe86019850f522ab (diff)
downloadgcc-5619cc87d3d51997d943672bb159a6523355f60a.zip
gcc-5619cc87d3d51997d943672bb159a6523355f60a.tar.gz
gcc-5619cc87d3d51997d943672bb159a6523355f60a.tar.bz2
(mips_output_external): Use ASM_OUTPUT_UNDEF_FUNCTION.
(mips_output_external_libcall): New function. (mips_asm_file_end): Handle ASM_OUTPUT_UNDEF_FUNCTION. From-SVN: r8101
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mips/mips.c53
1 files changed, 46 insertions, 7 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 222cde5..cd5450b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3778,8 +3778,38 @@ mips_output_external (file, decl, name)
p->size = len;
extern_head = p;
}
+
+#ifdef ASM_OUTPUT_UNDEF_FUNCTION
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ {
+ p = (struct extern_list *)permalloc ((long) sizeof (struct extern_list));
+ p->next = extern_head;
+ p->name = name;
+ p->size = -1;
+ extern_head = p;
+ }
+#endif
+
+ return 0;
+}
+
+#ifdef ASM_OUTPUT_UNDEF_FUNCTION
+int
+mips_output_external_libcall (file, name)
+ FILE *file;
+ char *name;
+{
+ register struct extern_list *p;
+
+ p = (struct extern_list *)permalloc ((long) sizeof (struct extern_list));
+ p->next = extern_head;
+ p->name = name;
+ p->size = -1;
+ extern_head = p;
+
return 0;
}
+#endif
/* Compute a string to use as a temporary file name. */
@@ -4049,10 +4079,9 @@ mips_asm_file_end (file)
if (HALF_PIC_P ())
HALF_PIC_FINISH (file);
- if (TARGET_GP_OPT)
+ if (extern_head)
{
- if (extern_head)
- fputs ("\n", file);
+ fputs ("\n", file);
for (p = extern_head; p != 0; p = p->next)
{
@@ -4062,12 +4091,22 @@ mips_asm_file_end (file)
if (! TREE_ASM_WRITTEN (name_tree))
{
TREE_ASM_WRITTEN (name_tree) = 1;
- fputs ("\t.extern\t", file);
- assemble_name (file, p->name);
- fprintf (file, ", %d\n", p->size);
+#ifdef ASM_OUTPUT_UNDEF_FUNCTION
+ if (p->size == -1)
+ ASM_OUTPUT_UNDEF_FUNCTION (file, p->name);
+ else
+#endif
+ {
+ fputs ("\t.extern\t", file);
+ assemble_name (file, p->name);
+ fprintf (file, ", %d\n", p->size);
+ }
}
}
-
+ }
+
+ if (TARGET_GP_OPT)
+ {
fprintf (file, "\n\t.text\n");
rewind (asm_out_text_file);
if (ferror (asm_out_text_file))