rs6000-protos.h (rs6000_output_dwarf_dtprel): Add prototype.

* config/rs6000/rs6000-protos.h (rs6000_output_dwarf_dtprel): Add
	prototype.
	* config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): New.
	* config/rs6000/rs6000.h (ASM_OUTPUT_DWARF_DTPREL): Define.

From-SVN: r79408
This commit is contained in:
Jakub Jelinek 2004-03-12 22:52:13 +01:00 committed by Jakub Jelinek
parent ce7df2fd97
commit c973d557ba
4 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2004-03-12 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000-protos.h (rs6000_output_dwarf_dtprel): Add
prototype.
* config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): New.
* config/rs6000/rs6000.h (ASM_OUTPUT_DWARF_DTPREL): Define.
2003-03-12 Andrew Pinski <apinski@apple.com>
* config/rs6000/host-darwin.c (darwin_rs6000_gt_pch_use_address):

View File

@ -198,6 +198,7 @@ extern int rs6000_register_move_cost (enum machine_mode,
extern int rs6000_memory_move_cost (enum machine_mode, enum reg_class, int);
extern bool rs6000_tls_referenced_p (rtx);
extern int rs6000_tls_symbol_ref (rtx, enum machine_mode);
extern void rs6000_output_dwarf_dtprel (FILE*, int, rtx);
/* Declare functions in rs6000-c.c */

View File

@ -2787,6 +2787,27 @@ rs6000_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED,
return NULL_RTX;
}
/* This is called from dwarf2out.c via ASM_OUTPUT_DWARF_DTPREL.
We need to emit DTP-relative relocations. */
void
rs6000_output_dwarf_dtprel (FILE *file, int size, rtx x)
{
switch (size)
{
case 4:
fputs ("\t.long\t", file);
break;
case 8:
fputs (DOUBLE_INT_ASM_OP, file);
break;
default:
abort ();
}
output_addr_const (file, x);
fputs ("@dtprel+0x8000", file);
}
/* Construct the SYMBOL_REF for the tls_get_addr function. */
static GTY(()) rtx rs6000_tls_symbol;

View File

@ -232,6 +232,13 @@ extern int target_flags;
#define TARGET_UPDATE (! TARGET_NO_UPDATE)
#define TARGET_FUSED_MADD (! TARGET_NO_FUSED_MADD)
/* Emit a dtp-relative reference to a TLS variable. */
#ifdef HAVE_AS_TLS
#define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \
rs6000_output_dwarf_dtprel (FILE, SIZE, X)
#endif
#ifndef HAVE_AS_TLS
#define HAVE_AS_TLS 0
#endif