diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-03-19 01:13:02 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-03-19 01:13:02 +0100 |
commit | 6b2300b390d106266a01778ba792075c3b6c7e7b (patch) | |
tree | 8df5587636d3313a32b82daf3705e3d1f102a21b | |
parent | 5ba6918ee8902e201afea501752ee53dca9f5271 (diff) | |
download | gcc-6b2300b390d106266a01778ba792075c3b6c7e7b.zip gcc-6b2300b390d106266a01778ba792075c3b6c7e7b.tar.gz gcc-6b2300b390d106266a01778ba792075c3b6c7e7b.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/ia64/ia64-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 16 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.h | 7 | ||||
-rw-r--r-- | gcc/config/s390/s390-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/s390/s390.c | 24 | ||||
-rw-r--r-- | gcc/config/s390/s390.h | 7 |
7 files changed, 66 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be8631f..cadc4f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 23778fb..7cd696e 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -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)); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index cd855e1..fe6fa37 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -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 diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index 3c71ea4..d4fb75b 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -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. */ diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h index cb3326c..12b2674 100644 --- a/gcc/config/s390/s390-protos.h +++ b/gcc/config/s390/s390-protos.h @@ -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)); diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 30e7918..13e4bf5 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -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. */ diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index dc87757..53e0d14 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -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) |