aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/xtensa
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2007-12-07 23:02:46 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2007-12-07 23:02:46 +0000
commit24eaa34f8c45447dee6d56754e079c058a9ebaf3 (patch)
treef4f2c5b7a140a367cc1719e0fa810bd0c813d902 /gcc/config/xtensa
parent9d65173613e0fdd37041f4bd4156303ffde53f64 (diff)
downloadgcc-24eaa34f8c45447dee6d56754e079c058a9ebaf3.zip
gcc-24eaa34f8c45447dee6d56754e079c058a9ebaf3.tar.gz
gcc-24eaa34f8c45447dee6d56754e079c058a9ebaf3.tar.bz2
xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
* config/xtensa/xtensa.h (ASM_PREFERRED_EH_DATA_FORMAT): Define. (ASM_OUTPUT_DWARF_PCREL): Define. From-SVN: r130697
Diffstat (limited to 'gcc/config/xtensa')
-rw-r--r--gcc/config/xtensa/xtensa.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index e2b94e10..79cd05f 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -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