summaryrefslogtreecommitdiffstats
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-19 00:13:02 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2003-03-19 00:13:02 +0000
commit03c118d5963274af5cc707ab8e6bbbde652ee72f (patch)
tree8df5587636d3313a32b82daf3705e3d1f102a21b /gcc/config/s390
parentacfcaf8dca2db03789c8f32225724a48a546239e (diff)
downloadppe42-gcc-03c118d5963274af5cc707ab8e6bbbde652ee72f.tar.gz
ppe42-gcc-03c118d5963274af5cc707ab8e6bbbde652ee72f.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390-protos.h1
-rw-r--r--gcc/config/s390/s390.c24
-rw-r--r--gcc/config/s390/s390.h7
3 files changed, 32 insertions, 0 deletions
diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h
index cb3326c74cf..12b2674cc36 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 30e7918d1e3..13e4bf50802 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 dc877570445..53e0d14cf4b 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)
OpenPOWER on IntegriCloud