+2006-01-03 Jakub Jelinek <jakub@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ Merge from gomp-branch:
+ * varasm.c (assemble_variable): Handle thread-local COMMON data.
+ * defaults.h (ASM_OUTPUT_TLS_COMMON): Define.
+
2006-01-03 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/25578
#endif
#endif
+#if defined (HAVE_AS_TLS) && !defined (ASM_OUTPUT_TLS_COMMON)
+#define ASM_OUTPUT_TLS_COMMON(FILE, DECL, NAME, SIZE) \
+ do \
+ { \
+ fprintf ((FILE), "\t.tls_common\t"); \
+ assemble_name ((FILE), (NAME)); \
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
+ (SIZE), DECL_ALIGN (DECL) / BITS_PER_UNIT); \
+ } \
+ while (0)
+#endif
+
/* Decide whether to defer emitting the assembler output for an equate
of two values. The default is to not defer output. */
#ifndef TARGET_DEFERRED_OUTPUT_DEFS
isn't common, and shouldn't be handled as such. */
if (DECL_SECTION_NAME (decl) || dont_output_data)
;
- /* We don't implement common thread-local data at present. */
else if (DECL_THREAD_LOCAL_P (decl))
{
if (DECL_COMMON (decl))
- sorry ("thread-local COMMON data not implemented");
+ {
+#ifdef ASM_OUTPUT_TLS_COMMON
+ unsigned HOST_WIDE_INT size;
+
+ size = tree_low_cst (DECL_SIZE_UNIT (decl), 1);
+ ASM_OUTPUT_TLS_COMMON (asm_out_file, decl, name, size);
+ return;
+#else
+ sorry ("thread-local COMMON data not implemented");
+#endif
+ }
}
else if (DECL_INITIAL (decl) == 0
|| DECL_INITIAL (decl) == error_mark_node