This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Generate MIPS_STABS_ELF for Linux/mips.


Linux/mips has switched to MIPS_STABS_ELF. We need to generate the
right stabs.


H.J.
----
2001-07-20  H.J. Lu <hjl@gnu.org>

	* gcc/config/mips/linux.h (ASM_OUTPUT_SOURCE_LINE): Defined.

--- gcc/config/mips/linux.h.stabs	Fri Jul 20 09:38:53 2001
+++ gcc/config/mips/linux.h	Fri Jul 20 09:40:48 2001
@@ -174,6 +174,22 @@ Boston, MA 02111-1307, USA.  */
 #undef SET_ASM_OP
 #define SET_ASM_OP "\t.dummy\t"
 
+#undef  ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE)				\
+do									\
+  {									\
+    static int sym_lineno = 1;						\
+    fprintf (FILE, "%sLM%d:\n\t%s 68,0,%d,%sLM%d",			\
+	     LOCAL_LABEL_PREFIX, sym_lineno, ASM_STABN_OP,		\
+	     LINE, LOCAL_LABEL_PREFIX, sym_lineno);			\
+    putc ('-', FILE);							\
+    assemble_name (FILE,						\
+		   XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
+    putc ('\n', FILE);							\
+    sym_lineno++;							\
+  }									\
+while (0)
+
 /* This is how we tell the assembler that two symbols have the
    same value.  */
 #undef ASM_OUTPUT_DEF


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]