OSDN Git Service

Wed Nov 19 12:03:04 1997 Philippe De Muyter <phdm@macqel.be>
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 1997 19:53:32 +0000 (19:53 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Nov 1997 19:53:32 +0000 (19:53 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16584 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 541c9c5..8e3e9d6 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 23:03:30 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
 
        * sh.md (attribute "type"): Add nil.
index cc7c6c7..f7d3584 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 db47275..1df25ce 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) \
@@ -1514,6 +1531,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 ();
@@ -1543,10 +1563,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);
@@ -1629,6 +1657,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)
@@ -1637,10 +1668,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);
@@ -1675,6 +1714,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)