Subject: Patch for config/mips/linux.h

From: "H . J . Lu" <[email-masked]>
Date: Wed, 6 Jun 2001 14:48:23 -0700

Linux/mips supports .type for functions. Here is a patch.

H.J.
---
2001-06-06  H.J. Lu  ([email-masked])

	* config/mips/linux.h (ASM_DECLARE_FUNCTION_NAME): Defined.
	(ASM_DECLARE_FUNCTION_SIZE): Likewise.
	(FUNCTION_NAME_ALREADY_DECLARED): Likewise.

--- gcc/config/mips/linux.h.type	Tue Jun  5 10:28:29 2001
+++ gcc/config/mips/linux.h	Tue Jun  5 10:29:08 2001
@@ -204,3 +204,36 @@ Boston, MA 02111-1307, USA.  */
 	fputc ('-', FILE);						\
 	assemble_name (FILE, LO);					\
   } while (0)
+
+#undef ASM_DECLARE_FUNCTION_NAME
+#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)			\
+  do {									\
+    if (!flag_inhibit_size_directive)					\
+      {									\
+	fputs ("\t.ent\t", STREAM);					\
+	assemble_name (STREAM, NAME);					\
+	putc ('\n', STREAM);						\
+      }									\
+    fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP);				\
+    assemble_name (STREAM, NAME);					\
+    putc (',', STREAM);							\
+    fprintf (STREAM, TYPE_OPERAND_FMT, "function");			\
+    putc ('\n', STREAM);						\
+    assemble_name (STREAM, NAME);					\
+    fputs (":\n", STREAM);						\
+  } while (0)
+
+#undef ASM_DECLARE_FUNCTION_SIZE
+#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL)			\
+  do {									\
+    if (!flag_inhibit_size_directive)					\
+      {									\
+	fputs ("\t.end\t", STREAM);					\
+	assemble_name (STREAM, NAME);					\
+	putc ('\n', STREAM);						\
+      }									\
+  } while (0)
+
+/* Tell function_prologue in mips.c that we have already output the .ent/.end
+   pseudo-ops.  */
+#define FUNCTION_NAME_ALREADY_DECLARED