* 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
+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.
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));
}
}
+/* 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
{ "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. */
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));
}
}
+/* 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. */
"%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)