]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dwarf2out.c (CIE_LENGTH_LABEL, [...]): New macros.
authorPhilippe De Muyter <phdm@macqel.be>
Wed, 19 Nov 1997 19:51:48 +0000 (20:51 +0100)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 19 Nov 1997 19:51:48 +0000 (14:51 -0500)
Wed Nov 19 12:03:04 1997  Philippe De Muyter  <phdm@macqel.be>

* dwarf2out.c (CIE_LENGTH_LABEL, FDE_LENGTH_LABEL): New macros.
(ASM_OUTPUT_DWARF_VALUE4): New macro.
(ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Define if SET_ASM_OP is
defined.
(output_call_frame_info): Do not output forward label differences
if ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL is defined.
* m68k/mot3300.h (SET_ASM_OP): Define when not using gas.

From-SVN: r16583

gcc/ChangeLog
gcc/config/m68k/mot3300.h
gcc/dwarf2out.c

index c11a34f8275c06451fa7eee12618df9b1a16bc90..3b0b8a4df6b6881a60eb2b5e0eb85bfb741dc412 100644 (file)
@@ -1,3 +1,13 @@
+Wed Nov 19 12:03:04 1997  Philippe De Muyter  <phdm@macqel.be>
+
+       * dwarf2out.c (CIE_LENGTH_LABEL, FDE_LENGTH_LABEL): New macros.
+       (ASM_OUTPUT_DWARF_VALUE4): New macro.
+       (ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL): Define if SET_ASM_OP is
+       defined.
+       (output_call_frame_info): Do not output forward label differences
+       if ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL is defined.
+       * m68k/mot3300.h (SET_ASM_OP): Define when not using gas.
+
 Tue Nov 18 22:50:24 1997  Jim Wilson  <wilson@cygnus.com>
 
        * mips/mips.c (save_restore_insns): If gp_offset or fp_offset are
index cc7c6c7589de804c8e9b170e3225bab7aaa50398..f7d35847b2624e50004a69d4f1b91e9ef783dc5d 100644 (file)
@@ -184,6 +184,9 @@ Boston, MA 02111-1307, USA.  */
 #undef ASCII_DATA_ASM_OP
 #define        ASCII_DATA_ASM_OP "byte"
 
+#undef SET_ASM_OP
+#define SET_ASM_OP "set"
+
 #endif /* USE_GAS */
 
 #ifdef USE_GLD
index af19699b2acaa4707178d9700600eb72b7ca1467..902dc94038856bbfe434a8882734e9579de9cde1 100644 (file)
@@ -247,8 +247,10 @@ static unsigned reg_number         PROTO((rtx));
 #endif
 #define CIE_AFTER_SIZE_LABEL   "LSCIE"
 #define CIE_END_LABEL          "LECIE"
+#define CIE_LENGTH_LABEL       "LLCIE"
 #define FDE_AFTER_SIZE_LABEL   "LSFDE"
 #define FDE_END_LABEL          "LEFDE"
+#define FDE_LENGTH_LABEL       "LLFDE"
 
 /* Definitions of defaults for various types of primitive assembly language
    output operations.  These may be overridden from within the tm.h file,
@@ -369,6 +371,11 @@ static unsigned reg_number         PROTO((rtx));
   } while (0)
 #endif
 
+#ifndef ASM_OUTPUT_DWARF_VALUE4
+#define ASM_OUTPUT_DWARF_VALUE4(FILE,LABEL) \
+  fprintf ((FILE), "\t%s\t%s", UNALIGNED_INT_ASM_OP, LABEL)
+#endif
+
 #else /* UNALIGNED_INT_ASM_OP */
 
 /* We don't have unaligned support, let's hope the normal output works for
@@ -404,10 +411,20 @@ static unsigned reg_number                PROTO((rtx));
 #define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \
   assemble_integer (GEN_INT (VALUE), 4, 1)
 
+#define ASM_OUTPUT_DWARF_VALUE4(FILE,LABEL) \
+  assemble_integer (gen_rtx (SYMBOL_REF, Pmode, LABEL), 4, 1)
+
 #endif /* UNALIGNED_INT_ASM_OP */
 
+#ifdef SET_ASM_OP
+#ifndef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO)    \
+   fprintf (FILE, "\t%s\t%s,%s-%s\n", SET_ASM_OP, SY, HI, LO)
+#endif
+#endif /* SET_ASM_OP */
+
 /* This is similar to the default ASM_OUTPUT_ASCII, except that no trailing
-   newline is produced.  When flag_debug_asm is asserted, we add commnetary
+   newline is produced.  When flag_debug_asm is asserted, we add commentary
    at the end of the line, so we must avoid output of a newline here.  */
 #ifndef ASM_OUTPUT_DWARF_STRING
 #define ASM_OUTPUT_DWARF_STRING(FILE,P) \
@@ -1505,6 +1522,9 @@ output_call_frame_info (for_eh)
   register dw_cfi_ref cfi;
   unsigned long fde_pad;
   char l1[20], l2[20];
+#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+  char ld[20];
+#endif
 
   /* Do we want to include a pointer to the exception table?  */
   int eh_ptr = for_eh && exception_table_p ();
@@ -1541,10 +1561,18 @@ output_call_frame_info (for_eh)
   /* Output the CIE. */
   ASM_GENERATE_INTERNAL_LABEL (l1, CIE_AFTER_SIZE_LABEL, for_eh);
   ASM_GENERATE_INTERNAL_LABEL (l2, CIE_END_LABEL, for_eh);
+#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+  ASM_GENERATE_INTERNAL_LABEL (ld, CIE_LENGTH_LABEL, for_eh);
+  if (for_eh)
+    ASM_OUTPUT_DWARF_VALUE4 (asm_out_file, ld);
+  else
+    ASM_OUTPUT_DWARF_OFFSET (asm_out_file, ld);
+#else
   if (for_eh)
     ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1);
   else
     ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1);
+#endif
   if (flag_debug_asm)
     fprintf (asm_out_file, "\t%s Length of Common Information Entry",
             ASM_COMMENT_START);
@@ -1627,6 +1655,9 @@ output_call_frame_info (for_eh)
   /* Pad the CIE out to an address sized boundary.  */
   ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
   ASM_OUTPUT_LABEL (asm_out_file, l2);
+#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+  ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL (asm_out_file, ld, l2, l1);
+#endif
 
   /* Loop through all of the FDE's.  */
   for (i = 0; i < fde_table_in_use; ++i)
@@ -1635,10 +1666,18 @@ output_call_frame_info (for_eh)
 
       ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i*2);
       ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i*2);
+#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+      ASM_GENERATE_INTERNAL_LABEL (ld, FDE_LENGTH_LABEL, for_eh + i*2);
+      if (for_eh)
+       ASM_OUTPUT_DWARF_VALUE4 (asm_out_file, ld);
+      else
+       ASM_OUTPUT_DWARF_OFFSET (asm_out_file, ld);
+#else
       if (for_eh)
        ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, l2, l1);
       else
        ASM_OUTPUT_DWARF_DELTA (asm_out_file, l2, l1);
+#endif
       if (flag_debug_asm)
        fprintf (asm_out_file, "\t%s FDE Length", ASM_COMMENT_START);
       fputc ('\n', asm_out_file);
@@ -1673,6 +1712,9 @@ output_call_frame_info (for_eh)
       /* Pad the FDE out to an address sized boundary.  */
       ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
       ASM_OUTPUT_LABEL (asm_out_file, l2);
+#ifdef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
+      ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL (asm_out_file, ld, l2, l1);
+#endif
     }
 #ifndef EH_FRAME_SECTION
   if (for_eh)