s390.c (s390_output_dwarf_dtprel): New.

* config/s390/s390.c (s390_output_dwarf_dtprel): New.
	* config/s390/s390-protos.h (s390_output_dwarf_dtprel): New proto.
	* config/s390/s390.h (ASM_OUTPUT_DWARF_DTPREL): Define.

	* config/ia64/ia64.c (ia64_output_dwarf_dtprel): New.
	* config/ia64/ia64-protos.h (ia64_output_dwarf_dtprel): New proto.
	* config/ia64/ia64.h (ASM_OUTPUT_DWARF_DTPREL): Define.

From-SVN: r64556
This commit is contained in:
Jakub Jelinek 2003-03-19 01:13:02 +01:00 committed by Jakub Jelinek
parent 5ba6918ee8
commit 6b2300b390
7 changed files with 66 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2003-03-18 Jakub Jelinek <jakub@redhat.com>
* config/s390/s390.c (s390_output_dwarf_dtprel): New.
* config/s390/s390-protos.h (s390_output_dwarf_dtprel): New proto.
* config/s390/s390.h (ASM_OUTPUT_DWARF_DTPREL): Define.
* config/ia64/ia64.c (ia64_output_dwarf_dtprel): New.
* config/ia64/ia64-protos.h (ia64_output_dwarf_dtprel): New proto.
* config/ia64/ia64.h (ASM_OUTPUT_DWARF_DTPREL): Define.
2003-03-18 Geoffrey Keating <geoffk@apple.com>
* Makefile.in (emit-rtl.o): Add gt-emit-rtl.h to dependencies.

View File

@ -98,6 +98,7 @@ extern void ia64_print_operand PARAMS((FILE *, rtx, int));
extern enum reg_class ia64_secondary_reload_class PARAMS((enum reg_class,
enum machine_mode,
rtx));
extern void ia64_output_dwarf_dtprel PARAMS ((FILE*, int, rtx));
extern void ia64_reorg PARAMS((rtx));
extern void process_for_unwind_directive PARAMS ((FILE *, rtx));
extern const char *get_bundle_name PARAMS ((int));

View File

@ -3797,6 +3797,22 @@ ia64_function_value (valtype, func)
}
}
/* This is called from dwarf2out.c via ASM_OUTPUT_DWARF_DTPREL.
We need to emit DTP-relative relocations. */
void
ia64_output_dwarf_dtprel (file, size, x)
FILE *file;
int size;
rtx x;
{
if (size != 8)
abort ();
fputs ("\tdata8.ua\t@dtprel(", file);
output_addr_const (file, x);
fputs (")", file);
}
/* Print a memory address as an operand to reference that memory location. */
/* ??? Do we need this? It gets used only for 'a' operands. We could perhaps

View File

@ -1994,6 +1994,13 @@ do { \
{ "loc79", LOC_REG (79) }, \
}
/* Emit a dtp-relative reference to a TLS variable. */
#ifdef HAVE_AS_TLS
#define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \
ia64_output_dwarf_dtprel (FILE, SIZE, X)
#endif
/* A C compound statement to output to stdio stream STREAM the assembler syntax
for an instruction operand X. X is an RTL expression. */

View File

@ -76,6 +76,7 @@ extern void s390_output_constant_pool PARAMS ((rtx, rtx));
extern void s390_trampoline_template PARAMS ((FILE *));
extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern rtx s390_gen_rtx_const_DI PARAMS ((int, int));
extern void s390_output_dwarf_dtprel PARAMS ((FILE*, int, rtx));
extern void s390_machine_dependent_reorg PARAMS ((rtx));
extern int s390_agen_dep_p PARAMS ((rtx, rtx));

View File

@ -3056,6 +3056,30 @@ s390_expand_cmpstr (target, op0, op1, len)
}
}
/* This is called from dwarf2out.c via ASM_OUTPUT_DWARF_DTPREL.
We need to emit DTP-relative relocations. */
void
s390_output_dwarf_dtprel (file, size, x)
FILE *file;
int size;
rtx x;
{
switch (size)
{
case 4:
fputs ("\t.long\t", file);
break;
case 8:
fputs ("\t.quad\t", file);
break;
default:
abort ();
}
output_addr_const (file, x);
fputs ("@DTPOFF", file);
}
/* In the name of slightly smaller debug output, and to cater to
general assembler losage, recognize various UNSPEC sequences
and turn them back into a direct symbol reference. */

View File

@ -921,6 +921,13 @@ extern int flag_pic;
"%ap", "%cc", "%fp" \
}
/* Emit a dtp-relative reference to a TLS variable. */
#ifdef HAVE_AS_TLS
#define ASM_OUTPUT_DWARF_DTPREL(FILE, SIZE, X) \
s390_output_dwarf_dtprel (FILE, SIZE, X)
#endif
/* Print operand X (an rtx) in assembler syntax to file FILE. */
#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
#define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)