ia64.h (ASM_OUTPUT_DWARF_OFFSET): New.
authorRichard Henderson <rth@redhat.com>
Fri, 16 Mar 2001 05:21:42 +0000 (21:21 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 16 Mar 2001 05:21:42 +0000 (21:21 -0800)
        * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): New.
        (ASM_OUTPUT_DWARF_PCREL): New.
        * config/ia64/hpux.h (ASM_OUTPUT_DWARF_OFFSET): Remove.

From-SVN: r40537

gcc/ChangeLog
gcc/config/ia64/hpux.h
gcc/config/ia64/ia64.h

index 9f2ce55c114510841d7fd52a37c7203c8337d880..bbb6c585de94f7386a5ee92a3b701b21b7186709 100644 (file)
@@ -1,3 +1,9 @@
+2001-03-15  Richard Henderson  <rth@redhat.com>
+
+       * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): New.
+       (ASM_OUTPUT_DWARF_PCREL): New.
+       * config/ia64/hpux.h (ASM_OUTPUT_DWARF_OFFSET): Remove.
+
 2001-03-16  Alexandre Oliva  <aoliva@redhat.com>
 
        * cppfiles.c (stack_include_file): Use MAX of sysp.
index c08cd47154c97e34341d43459f75bad835a86405..7da303840f307affc475e0e549d6bfe116bfaf82 100644 (file)
@@ -77,16 +77,3 @@ Boston, MA 02111-1307, USA.  */
 
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_BIG_ENDIAN)
-
-/* We need this macro to output DWARF2 information correctly.  The macro
-   is defined in dwarf2out.c, but it will not do section relative offsets
-   which messes up our ability to debug using gdb.  */
-
-#undef ASM_OUTPUT_DWARF_OFFSET
-#define ASM_OUTPUT_DWARF_OFFSET(FILE,LABEL)                            \
- do {                                                                  \
-       fprintf ((FILE), "\t%s\t", UNALIGNED_OFFSET_ASM_OP);            \
-       fprintf ((FILE), "@secrel(");                                   \
-       assemble_name (FILE, LABEL);                                    \
-       fprintf ((FILE), ")");                                          \
-  } while (0)
index f0cd62e1a963e7de70f83a4556b55fc20a521c2f..a90c9fa490b4f47dd1c3e9bc32c89927184bd865 100644 (file)
@@ -2518,21 +2518,6 @@ do {                                                                     \
 /* An rtx used to mask the return address found via RETURN_ADDR_RTX, so that it
    does not contain any extraneous set bits in it.  */
 /* #define MASK_RETURN_ADDR */
-
-/* Define this macro to 0 if your target supports DWARF 2 frame unwind
-   information, but it does not yet work with exception handling.  Otherwise,
-   if your target supports this information (if it defines
-   `INCOMING_RETURN_ADDR_RTX' and either `UNALIGNED_INT_ASM_OP' or
-   `OBJECT_FORMAT_ELF'), GCC will provide a default definition of 1.
-
-   If this macro is defined to 1, the DWARF 2 unwinder will be the default
-   exception handling mechanism; otherwise, setjmp/longjmp will be used by
-   default.
-
-   If this macro is defined to anything, the DWARF 2 unwinder will be used
-   instead of inline unwinders and __unwind_function in the non-setjmp case.  */
-/* #define DWARF2_UNWIND_INFO */
-
 \f
 /* Assembler Commands for Alignment.  */
 
@@ -2632,12 +2617,31 @@ do {                                                                    \
    add brackets around the label.  */
 
 #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
-  do                                                   \
-    {                                                  \
-      fprintf (FILE, "[.%s%d:]\n", PREFIX, NUM);       \
-    }                                                  \
-  while (0)
+  fprintf (FILE, "[.%s%d:]\n", PREFIX, NUM)
 
+/* Use section-relative relocations for debugging offsets.  Unlike other
+   targets that fake this by putting the section VMA at 0, IA-64 has 
+   proper relocations for them.  */
+#define ASM_OUTPUT_DWARF_OFFSET(FILE, SIZE, LABEL)     \
+  do {                                                 \
+    fputs (((SIZE) == 4 ? UNALIGNED_INT_ASM_OP         \
+           : (SIZE) == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP \
+           : (abort (), "")), FILE);                   \
+    fputs ("@secrel(", FILE);                          \
+    assemble_name (FILE, LABEL);                       \
+    fputc (')', FILE);                                 \
+  } while (0)
+
+/* Emit a PC-relative relocation.  */
+#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL)      \
+  do {                                                 \
+    fputs (((SIZE) == 4 ? UNALIGNED_INT_ASM_OP         \
+           : (SIZE) == 8 ? UNALIGNED_DOUBLE_INT_ASM_OP \
+           : (abort (), "")), FILE);                   \
+    fputs ("@pcrel(", FILE);                           \
+    assemble_name (FILE, LABEL);                       \
+    fputc (')', FILE);                                 \
+  } while (0)
 \f
 /* Cross Compilation and Floating Point.  */