diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-08 05:05:45 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-08 05:05:45 +0000 |
commit | 40af64cc998984ba36426f8dd329e27966ef01e7 (patch) | |
tree | d1ccb29c7e71fb530eaba0082fe695a30a47cf07 /gcc/dwarf2out.c | |
parent | 395fe6d2b71f6c5aa02bded2521c2a4b0b2fd364 (diff) | |
download | gcc-40af64cc998984ba36426f8dd329e27966ef01e7.tar.gz |
PR target/21889
* target.h (gcc_target) <asm_out>: New field output_dwarf_dtprel.
* target-def.h (TARGET_ASM_OUTPUT_DWARF_DTPREL): New macro.
(TARGET_ASM_OUT): Add it.
* doc/tm.texi (Debugging Info): Document it.
* dwarf2out.c (output_loc_operands) <INTERNAL_DW_OP_tls_addr>:
Test it instead of ASM_OUTPUT_DWARF_DTPREL.
(loc_descriptor_from_tree_1) <VAR_DECL>: Likewise.
* system.h: Poison ASM_OUTPUT_DWARF_DTPREL.
* config/frv/frv-protos.h (frv_output_dwarf_dtprel): Delete.
* config/frv/frv.c (frv_output_dwarf_dtprel): Make static and unused.
(gen_inlined_tls_plt): Remove unused variable MEM.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to frv_output_dwarf_dtprel.
* config/frv/frv.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config/i386/i386-protos.h (i386_output_dwarf_dtprel): Delete.
* config/i386/i386.c (i386_output_dwarf_dtprel): Make static and
unused.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to i386_output_dwarf_dtprel.
* config/i386/i386.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config/ia64/ia64-protos.h (ia64_output_dwarf_dtprel): Delete.
* config/ia64/ia64.c (ia64_output_dwarf_dtprel): Make static and
unused.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to ia64_output_dwarf_dtprel.
* config/ia64/ia64.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config/rs6000/rs6000-protos.h (rs6000_output_dwarf_dtprel): Delete.
* config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): Make static and
unused.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to rs6000_output_dwarf_dtprel
* config/rs6000/rs6000.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config/s390/s390-protos.h (s390_output_dwarf_dtprel): Delete.
* config/s390/s390.c (s390_output_dwarf_dtprel): Make static and
unused.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to s390_output_dwarf_dtprel.
* config/s390/s390.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config/sparc/sol2-gas.h (TARGET_SUN_TLS): Define to 0.
(TARGET_GNU_TLS): Define to 1.
* config/sparc/sparc-protos.h (sparc_output_dwarf_dtprel): Delete.
* config/sparc/sparc.c (sparc_output_dwarf_dtprel): Make static and
unused.
(TARGET_ASM_OUTPUT_DWARF_DTPREL): Define to sparc_output_dwarf_dtprel
if TARGET_GNU_TLS only.
* config/sparc/sparc.h (ASM_OUTPUT_DWARF_DTPREL): Delete.
* config.gcc (sparc64-*-solaris2*): Include tm-dwarf2.h last.
(sparc-*-solaris2*): Likewise on Solaris 7 and up.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100742 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e11cd806376..bbd2b32bc5a 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3284,13 +3284,15 @@ output_loc_operands (dw_loc_descr_ref loc) break; case INTERNAL_DW_OP_tls_addr: -#ifdef ASM_OUTPUT_DWARF_DTPREL - ASM_OUTPUT_DWARF_DTPREL (asm_out_file, DWARF2_ADDR_SIZE, - val1->v.val_addr); - fputc ('\n', asm_out_file); -#else - gcc_unreachable (); -#endif + if (targetm.asm_out.output_dwarf_dtprel) + { + targetm.asm_out.output_dwarf_dtprel (asm_out_file, + DWARF2_ADDR_SIZE, + val1->v.val_addr); + fputc ('\n', asm_out_file); + } + else + gcc_unreachable (); break; default: @@ -8954,10 +8956,9 @@ loc_descriptor_from_tree_1 (tree loc, int want_address) { rtx rtl; -#ifndef ASM_OUTPUT_DWARF_DTPREL /* If this is not defined, we have no way to emit the data. */ - return 0; -#endif + if (!targetm.asm_out.output_dwarf_dtprel) + return 0; /* The way DW_OP_GNU_push_tls_address is specified, we can only look up addresses of objects in the current module. */ |