s390.c (s390_output_dwarf_dtprel): New.
authorJakub Jelinek <jakub@redhat.com>
Wed, 19 Mar 2003 00:13:02 +0000 (01:13 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 19 Mar 2003 00:13:02 +0000 (01:13 +0100)
* 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

gcc/ChangeLog
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h

index be8631f167882dd15beb617bc603124ddec1e7d7..cadc4f9474cacb5b1a1bcc24f15df0d18ed1233c 100644 (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.
index 23778fbac56f7cbb9023a93b040842e5dee89a6c..7cd696ef2cdf641919d522b3f1c8fb1571a3930d 100644 (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));
index cd855e1839a00d82463570b1714a4f41c7eaacd3..fe6fa37d744f61b6ba4f8d2c641b5ec784103997 100644 (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
index 3c71ea4839fb54705afae87062f2f66f5f960aad..d4fb75baa94435fc393045c5e6b15fc7da4f5f6c 100644 (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.  */
 
index cb3326c74cf5dee9c039039f8ecb73d6bb1b3768..12b2674cc364c3e1a2fee96b6a0ef2fbed78d304 100644 (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));
 
index 30e7918d1e3e6d95a08fdb86418146592cc1806d..13e4bf50802c843a33aa4d10843dfaad21eed6cf 100644 (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.  */
index dc8775704459b87d4ca5b89354c15f1a99359ce1..53e0d14cf4b6715eeefdc87b335bf17d9f905eb1 100644 (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)