From: Richard Henderson Date: Fri, 16 Mar 2001 05:21:42 +0000 (-0800) Subject: ia64.h (ASM_OUTPUT_DWARF_OFFSET): New. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7426e9a2184753165137e20fc3b354a1c5b5acad;p=gcc.git ia64.h (ASM_OUTPUT_DWARF_OFFSET): New. * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9f2ce55c114..bbb6c585de9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-03-15 Richard Henderson + + * 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 * cppfiles.c (stack_include_file): Use MAX of sysp. diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h index c08cd47154c..7da303840f3 100644 --- a/gcc/config/ia64/hpux.h +++ b/gcc/config/ia64/hpux.h @@ -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) diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index f0cd62e1a96..a90c9fa490b 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -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 */ - /* 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) /* Cross Compilation and Floating Point. */