* config/xtensa/xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
authorbwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Dec 2007 23:02:46 +0000 (23:02 +0000)
committerbwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Dec 2007 23:02:46 +0000 (23:02 +0000)
(ASM_OUTPUT_DWARF_PCREL): Define.

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

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

index 65c56ba..2e64792 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 e2b94e1..79cd05f 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