xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
authorBob Wilson <bob.wilson@acm.org>
Fri, 7 Dec 2007 23:02:46 +0000 (23:02 +0000)
committerBob Wilson <bwilson@gcc.gnu.org>
Fri, 7 Dec 2007 23:02:46 +0000 (23:02 +0000)
* config/xtensa/xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
(ASM_OUTPUT_DWARF_PCREL): Define.

From-SVN: r130697

gcc/ChangeLog
gcc/config/xtensa/xtensa.h

index 65c56ba4838e01f32873125f461b030aa6b1530b..2e6479211de86a973b6f90f8cbb82ed702b91921 100644 (file)
@@ -1,3 +1,8 @@
+2007-12-07  Bob Wilson  <bob.wilson@acm.org>
+       
+       * config/xtensa/xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
+       (ASM_OUTPUT_DWARF_PCREL): Define.
+       
 2007-12-07  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/34382
index e2b94e102b262ee0555d7e3de37fe7403e1a96ff..79cd05f7fb251038760a976873397c1ecd3e9ca4 100644 (file)
@@ -1067,6 +1067,19 @@ typedef struct xtensa_args
 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (0)
 #define DWARF_FRAME_REGISTERS 16
 #define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) + 2 : INVALID_REGNUM)
+#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL)                     \
+  (flag_pic                                                            \
+   ? (((GLOBAL) ? DW_EH_PE_indirect : 0)                               \
+      | DW_EH_PE_pcrel | DW_EH_PE_sdata4)                              \
+   : DW_EH_PE_absptr)
+
+/* Emit a PC-relative relocation.  */
+#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL)                      \
+  do {                                                                 \
+    fputs (integer_asm_op (SIZE, FALSE), FILE);                                \
+    assemble_name (FILE, LABEL);                                       \
+    fputs ("@pcrel", FILE);                                            \
+  } while (0)
 
 /* Xtensa constant pool breaks the devices in crtstuff.c to control
    section in where code resides.  We have to write it as asm code.  Use