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]

ia64 @secrel for dwarf2


Goes along with the dwarf2asm.c patch earlier.


r~


        * config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): New.
        (ASM_OUTPUT_DWARF_PCREL): New.
        * config/ia64/hpux.h (ASM_OUTPUT_DWARF_OFFSET): Remove.

Index: hpux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/hpux.h,v
retrieving revision 1.1
diff -c -p -d -r1.1 hpux.h
*** hpux.h	2001/03/16 04:39:20	1.1
--- hpux.h	2001/03/16 05:20:23
*************** Boston, MA 02111-1307, USA.  */
*** 77,92 ****
  
  #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)
--- 77,79 ----
Index: ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.60
diff -c -p -d -r1.60 ia64.h
*** ia64.h	2001/01/24 04:30:47	1.60
--- ia64.h	2001/03/16 05:20:23
*************** do {									\
*** 2632,2643 ****
     add brackets around the label.  */
  
  #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
!   do							\
!     {							\
!       fprintf (FILE, "[.%s%d:]\n", PREFIX, NUM);	\
!     }							\
!   while (0)
  
  
  /* Cross Compilation and Floating Point.  */
  
--- 2617,2647 ----
     add brackets around the label.  */
  
  #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \
!   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.  */
  


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