From: Kaz Kojima Date: Sat, 18 Sep 2004 06:43:09 +0000 (+0000) Subject: linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4966f8cab51097ed966c792f117a23d13405fd0;p=gcc.git linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove. * config/sh/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove. * config/sh/sh.h (ASM_PREFERRED_EH_DATA_FORMAT): Use DW_EH_PE_sdata* for data. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. From-SVN: r87696 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1e3efe309d1..06a6e53a141 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-09-18 Kaz Kojima + + * config/sh/linux.h (ASM_PREFERRED_EH_DATA_FORMAT): Remove. + * config/sh/sh.h (ASM_PREFERRED_EH_DATA_FORMAT): Use + DW_EH_PE_sdata* for data. + (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. + 2004-09-17 Geoffrey Keating * tree-inline.c (copy_tree_r): Don't duplicate constants, they're diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index 1142b126946..87248542f49 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -41,13 +41,6 @@ Boston, MA 02111-1307, USA. */ #undef DWARF2_UNWIND_INFO #define DWARF2_UNWIND_INFO 1 -/* ??? Current SH linux linker has a problem for DW_EH_PE_textrel. */ -#undef ASM_PREFERRED_EH_DATA_FORMAT -#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) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "\ %{posix:-D_POSIX_SOURCE} \ diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 61fd9ca6f37..8184e81ffed 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -3521,19 +3521,19 @@ extern int rtx_equal_function_value_matters; #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, EH_RETURN_STACKADJ_REGNO) /* We have to distinguish between code and data, so that we apply - datalabel where and only where appropriate. Use textrel for code. */ + datalabel where and only where appropriate. Use sdataN for data. */ #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ((flag_pic && (GLOBAL) ? DW_EH_PE_indirect : 0) \ - | ((CODE) ? DW_EH_PE_textrel : flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr)) + | (flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr) \ + | ((CODE) ? 0 : (TARGET_SHMEDIA64 ? DW_EH_PE_sdata8 : DW_EH_PE_sdata4))) /* Handle special EH pointer encodings. Absolute, pc-relative, and indirect are handled automatically. */ #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \ do { \ - if (((ENCODING) & 0x70) == DW_EH_PE_textrel) \ + if (((ENCODING) & 0xf) != DW_EH_PE_sdata4 \ + && ((ENCODING) & 0xf) != DW_EH_PE_sdata8) \ { \ - encoding &= ~DW_EH_PE_textrel; \ - encoding |= flag_pic ? DW_EH_PE_pcrel : DW_EH_PE_absptr; \ if (GET_CODE (ADDR) != SYMBOL_REF) \ abort (); \ SYMBOL_REF_FLAGS (ADDR) |= SYMBOL_FLAG_FUNCTION; \