[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#586060: marked as done (m68k: TLS support backport)



Your message dated Fri, 25 Jun 2010 13:33:28 +0000
with message-id <E1OS928-00084k-PO@ries.debian.org>
and subject line Bug#586060: fixed in gcc-4.4 4.4.4-6
has caused the Debian Bug report #586060,
regarding m68k: TLS support backport
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
586060: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586060
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: gcc
Version: 4.4
Tags: patch, upstream, fixed-upstream

As discussed in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586005 
TLS/NPTL support has become available for m68k.

In order to revive and test the m68k toolchain, and to build the squeeze 
archive and prepare for sid, I have backported the TLS patch from gcc 4.5 
to 4.4. (The author of the patch, Maxim Kuvyrkov, submitted the it against 
gcc mainline prior to gcc 4.5 release.)

The attached patch is based upon this commit:
http://git.infradead.org/gcc.git/commitdiff_plain/888c30d77dc1f47cea8339119f7322832fe7575a
See also:
http://gcc.gnu.org/viewcvs?view=revision&revision=147654

I've tested the patched Debian gcc-4.4 (in the form of a cross compiler) 
by building several packages, including Linux, eglibc and several others.

I've not yet run the test suite and there are some known issues. Further 
patches may need to be cherry-picked, but this is a start.

Regarding both gcc 4.4 and 4.5, Debian source packages carry the patch 
"m68k-allow-gnu99.diff". This patch needs to be dropped from both 4.4 and 
4.5 since it is unnecessary (and insufficient) for building the current 
libc and it deviates from documented gcc behaviour.
http://patch-tracker.debian.org/patch/series/view/gcc-4.4/4.4.4-5/m68k-allow-gnu99.diff
http://patch-tracker.debian.org/patch/series/view/gcc-4.5/4.5.0-5/m68k-allow-gnu99.diff

Regards,

Finn Thain
This is not the original patch from the repo -- it has been backported to gcc-4.4 and the ChangeLog updates commented out. Compare with:
http://git.infradead.org/gcc.git/commitdiff_plain/888c30d77dc1f47cea8339119f7322832fe7575a

See also:
http://gcc.gnu.org/viewcvs?view=revision&revision=147654

The calls.c changes in Maxim's submission to the gcc-patches mailing list have not yet been committed.

From: mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 18 May 2009 07:54:44 +0000 (+0000)
Subject: 	M68K TLS support.
X-Git-Url: http://git.infradead.org/gcc.git/commitdiff_plain/888c30d77dc1f47cea8339119f7322832fe7575a

	M68K TLS support.
	* configure.ac (m68k-*-*): Check if binutils support TLS.
	* configure: Regenerate.
	* config/m68k/predicates.md (symbolic_operand): Extend comment.
	* config/m68k/constraints.md (Cu): New constraint.
	* config/m68k/m68k.md (UNSPEC_GOTOFF): Remove.
	(UNSPEC_RELOC16, UNSPEC_RELOC32): New constants.
	(movsi): Handle TLS symbols.
	(addsi3_5200): Handle XTLS symbols, indent.
	* config/m68k/m68k-protos.h (m68k_legitimize_tls_address): Declare.
	(m68k_tls_reference_p): Declare.
	(m68k_legitimize_address): Declare.
	(m68k_unwrap_symbol): Declare.
	* config/m68k/m68k.opt (mxtls): New option.
	* config/m68k/m68k.c (ggc.h): Include.
	(m68k_output_dwarf_dtprel): Implement hook.
	(TARGET_HAVE_TLS, TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.
	(m68k_expand_prologue): Load GOT pointer when function needs it.
	(m68k_illegitimate_symbolic_constant_p): Handle TLS symbols.
	(m68k_legitimate_constant_address_p): Same.
	(m68k_decompose_address): Handle TLS references.
	(m68k_get_gp): New static function.
	(enum m68k_reloc): New contants.
	(TLS_RELOC_P): New macro.
	(m68k_wrap_symbol): New static function.
	(m68k_unwrap_symbol): New function.
	(m68k_final_prescan_insn_1): New static function.
	(m68k_final_prescan_insn): New function.
	(m68k_move_to_reg, m68k_wrap_symbol_into_got_ref): New static
	functions.
	(legitimize_pic_address): Handle TLS references..
	(m68k_tls_get_addr, m68k_get_tls_get_addr)
	(m68k_libcall_value_in_a0_p)
	(m68k_call_tls_get_addr, m68k_read_tp, m68k_get_m68k_read_tp)
	(m68k_call_m68k_read_tp): Helper variables and functions for ...
	(m68k_legitimize_tls_address): Handle TLS references.
	(m68k_tls_symbol_p, m68k_tls_reference_p_1, m68k_tls_reference_p):
	New functions.
	(m68k_legitimize_address): Handle TLS symbols.
	(m68k_get_reloc_decoration): New static function.
	(m68k_output_addr_const_extra): Handle UNSPEC_RELOC16 and
	UNSPEC_RELOC32.
	(m68k_output_dwarf_dtprel): Implement hook.
	(print_operand_address): Handle UNSPEC_RELOC16 adn UNSPEC_RELOC32.
	(m68k_libcall_value): Return result in A0 instead of D0 when asked by
	m68k_call_* routines.
	(sched_attr_op_type): Handle TLS symbols.
	(gt-m68k.h): Include.
	* config/m68k/m68k.h (FINAL_PRESCAN_INSN): Define.
	(LEGITIMATE_PIC_OPERAND_P): Support TLS.

	* gcc.target/m68k/tls-ie.c: New test.
	* gcc.target/m68k/tls-le.c: New test.
	* gcc.target/m68k/tls-gd.c: New test.
	* gcc.target/m68k/tls-ld.c: New test.
	* gcc.target/m68k/tls-ie-xgot.c: New test.
	* gcc.target/m68k/tls-le-xtls.c: New test.
	* gcc.target/m68k/tls-gd-xgot.c: New test.
	* gcc.target/m68k/tls-ld-xgot.c: New test.
	* gcc.target/m68k/tls-ld-xtls.c: New test.
	* gcc.target/m68k/tls-ld-xgot-xtls.c: New test.


git-svn-id: svn://gcc.gnu.org/svn/gcc/trunk@147654 138bc75d-0d04-0410-961f-82ee72b054a4
---

#diff --git a/gcc/ChangeLog b/gcc/ChangeLog
#index 1aa8d01..372df6b 100644
#--- a/gcc/ChangeLog
#+++ b/gcc/ChangeLog
#@@ -1,3 +1,56 @@
#+2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
#+
#+	M68K TLS support.
#+	* configure.ac (m68k-*-*): Check if binutils support TLS.
#+	* configure: Regenerate.
#+	* config/m68k/predicates.md (symbolic_operand): Extend comment.
#+	* config/m68k/constraints.md (Cu): New constraint.
#+	* config/m68k/m68k.md (UNSPEC_GOTOFF): Remove.
#+	(UNSPEC_RELOC16, UNSPEC_RELOC32): New constants.
#+	(movsi): Handle TLS symbols.
#+	(addsi3_5200): Handle XTLS symbols, indent.
#+	* config/m68k/m68k-protos.h (m68k_legitimize_tls_address): Declare.
#+	(m68k_tls_reference_p): Declare.
#+	(m68k_legitimize_address): Declare.
#+	(m68k_unwrap_symbol): Declare.
#+	* config/m68k/m68k.opt (mxtls): New option.
#+	* config/m68k/m68k.c (ggc.h): Include.
#+	(m68k_output_dwarf_dtprel): Implement hook.
#+	(TARGET_HAVE_TLS, TARGET_ASM_OUTPUT_DWARF_DTPREL): Define.
#+	(m68k_expand_prologue): Load GOT pointer when function needs it.
#+	(m68k_illegitimate_symbolic_constant_p): Handle TLS symbols.
#+	(m68k_legitimate_constant_address_p): Same.
#+	(m68k_decompose_address): Handle TLS references.
#+	(m68k_get_gp): New static function.
#+	(enum m68k_reloc): New contants.
#+	(TLS_RELOC_P): New macro.
#+	(m68k_wrap_symbol): New static function.
#+	(m68k_unwrap_symbol): New function.
#+	(m68k_final_prescan_insn_1): New static function.
#+	(m68k_final_prescan_insn): New function.
#+	(m68k_move_to_reg, m68k_wrap_symbol_into_got_ref): New static
#+	functions.
#+	(legitimize_pic_address): Handle TLS references..
#+	(m68k_tls_get_addr, m68k_get_tls_get_addr)
#+	(m68k_libcall_value_in_a0_p)
#+	(m68k_call_tls_get_addr, m68k_read_tp, m68k_get_m68k_read_tp)
#+	(m68k_call_m68k_read_tp): Helper variables and functions for ...
#+	(m68k_legitimize_tls_address): Handle TLS references.
#+	(m68k_tls_symbol_p, m68k_tls_reference_p_1, m68k_tls_reference_p):
#+	New functions.
#+	(m68k_legitimize_address): Handle TLS symbols.
#+	(m68k_get_reloc_decoration): New static function.
#+	(m68k_output_addr_const_extra): Handle UNSPEC_RELOC16 and
#+	UNSPEC_RELOC32.
#+	(m68k_output_dwarf_dtprel): Implement hook.
#+	(print_operand_address): Handle UNSPEC_RELOC16 adn UNSPEC_RELOC32.
#+	(m68k_libcall_value): Return result in A0 instead of D0 when asked by
#+	m68k_call_* routines.
#+	(sched_attr_op_type): Handle TLS symbols.
#+	(gt-m68k.h): Include.
#+	* config/m68k/m68k.h (FINAL_PRESCAN_INSN): Define.
#+	(LEGITIMATE_PIC_OPERAND_P): Support TLS.
#+
# 2009-05-18  Martin Jambor  <mjambor@suse.cz>
# 
# 	* ipa-prop.c (ipa_check_stmt_modifications): Removed.
diff --git a/gcc/config/m68k/constraints.md b/gcc/config/m68k/constraints.md
index 8be4237..a4885cd 100644
--- a/gcc/config/m68k/constraints.md
+++ b/gcc/config/m68k/constraints.md
@@ -129,6 +129,11 @@
   (and (match_code "const_int")
        (match_test "ival < -0x8000 || ival > 0x7FFF")))
 
+(define_constraint "Cu"
+  "16-bit offset for wrapped symbols"
+  (and (match_code "const")
+       (match_test "m68k_unwrap_symbol (op, false) != op")))
+
 (define_constraint "CQ"
   "Integers valid for mvq."
   (and (match_code "const_int")
diff --git a/gcc/config/m68k/m68k-protos.h b/gcc/config/m68k/m68k-protos.h
index 1b91709..08f8a91 100644
--- a/gcc/config/m68k/m68k-protos.h
+++ b/gcc/config/m68k/m68k-protos.h
@@ -59,13 +59,20 @@ extern bool m68k_illegitimate_symbolic_constant_p (rtx);
 extern bool m68k_matches_q_p (rtx);
 extern bool m68k_matches_u_p (rtx);
 extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx);
+extern rtx m68k_legitimize_tls_address (rtx);
+extern bool m68k_tls_reference_p (rtx, bool);
 extern int valid_dbcc_comparison_p_2 (rtx, enum machine_mode);
 extern rtx m68k_libcall_value (enum machine_mode);
 extern rtx m68k_function_value (const_tree, const_tree);
 extern int emit_move_sequence (rtx *, enum machine_mode, rtx);
 extern bool m68k_movem_pattern_p (rtx, rtx, HOST_WIDE_INT, bool);
 extern const char *m68k_output_movem (rtx *, rtx, HOST_WIDE_INT, bool);
+extern void m68k_final_prescan_insn (rtx, rtx *, int);
 
+/* Functions from m68k.c used in constraints.md.  */
+extern rtx m68k_unwrap_symbol (rtx, bool);
+
+/* Functions from m68k.c used in genattrtab.  */
 #ifdef HAVE_ATTR_cpu
 extern enum attr_cpu m68k_sched_cpu;
 extern enum attr_mac m68k_sched_mac;
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 3e46302..c5a668a 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 /* ??? Need to add a dependency between m68k.o and sched-int.h.  */
 #include "sched-int.h"
 #include "insn-codes.h"
+#include "ggc.h"
 
 enum reg_class regno_reg_class[] =
 {
@@ -144,6 +145,7 @@ static tree m68k_handle_fndecl_attribute (tree *node, tree name,
 #if M68K_HONOR_TARGET_STRICT_ALIGNMENT
 static bool m68k_return_in_memory (const_tree, const_tree);
 #endif
+static void m68k_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
 
 
 /* Specify the identification number of the library being built */
@@ -249,5 +252,13 @@ const char *m68k_library_id_string = "_current_shared_library_a5_offset_";
 #define TARGET_RETURN_IN_MEMORY m68k_return_in_memory
 #endif
+
+#ifdef HAVE_AS_TLS
+#undef TARGET_HAVE_TLS
+#define TARGET_HAVE_TLS (true)
+
+#undef TARGET_ASM_OUTPUT_DWARF_DTPREL
+#define TARGET_ASM_OUTPUT_DWARF_DTPREL m68k_output_dwarf_dtprel
+#endif
 
 static const struct attribute_spec m68k_attribute_table[] =
 {
@@ -1149,8 +1160,7 @@ m68k_expand_prologue (void)
 			    current_frame.reg_mask, true, true));
     }
 
-  if (flag_pic
-      && !TARGET_SEP_DATA
+  if (!TARGET_SEP_DATA
       && crtl->uses_pic_offset_table)
     insn = emit_insn (gen_load_got (pic_offset_table_rtx));
 }
@@ -1853,7 +1866,7 @@ m68k_illegitimate_symbolic_constant_p (rtx x)
 	  && !offset_within_block_p (base, INTVAL (offset)))
 	return true;
     }
-  return false;
+  return m68k_tls_reference_p (x, false);
 }
 
 /* Return true if X is a legitimate constant address that can reach
@@ -1881,7 +1894,7 @@ m68k_legitimate_constant_address_p (rtx x, unsigned int reach, bool strict_p)
 	return false;
     }
 
-  return true;
+  return !m68k_tls_reference_p (x, false);
 }
 
 /* Return true if X is a LABEL_REF for a jump table.  Assume that unplaced
@@ -1948,15 +1961,17 @@ m68k_decompose_address (enum machine_mode mode, rtx x,
   /* Check for GOT loads.  These are (bd,An,Xn) addresses if
      TARGET_68020 && flag_pic == 2, otherwise they are (d16,An)
      addresses.  */
-  if (flag_pic
-      && GET_CODE (x) == PLUS
-      && XEXP (x, 0) == pic_offset_table_rtx
-      && (GET_CODE (XEXP (x, 1)) == SYMBOL_REF
-	  || GET_CODE (XEXP (x, 1)) == LABEL_REF))
+  if (GET_CODE (x) == PLUS
+      && XEXP (x, 0) == pic_offset_table_rtx)
     {
-      address->base = XEXP (x, 0);
-      address->offset = XEXP (x, 1);
-      return true;
+      /* As we are processing a PLUS, do not unwrap RELOC32 symbols --
+	 they are invalid in this context.  */
+      if (m68k_unwrap_symbol (XEXP (x, 1), false) != XEXP (x, 1))
+	{
+	  address->base = XEXP (x, 0);
+	  address->offset = XEXP (x, 1);
+	  return true;
+	}
     }
 
   /* The ColdFire FPU only accepts addressing modes 2-5.  */
@@ -2101,6 +2116,243 @@ m68k_matches_u_p (rtx x)
 	  && !address.index);
 }
 
+/* Return GOT pointer.  */
+
+static rtx
+m68k_get_gp (void)
+{
+  if (pic_offset_table_rtx == NULL_RTX)
+    pic_offset_table_rtx = gen_rtx_REG (Pmode, PIC_REG);
+
+  crtl->uses_pic_offset_table = 1;
+
+  return pic_offset_table_rtx;
+}
+
+/* M68K relocations, used to distinguish GOT and TLS relocations in UNSPEC
+   wrappers.  */
+enum m68k_reloc { RELOC_GOT, RELOC_TLSGD, RELOC_TLSLDM, RELOC_TLSLDO,
+		  RELOC_TLSIE, RELOC_TLSLE };
+
+#define TLS_RELOC_P(RELOC) ((RELOC) != RELOC_GOT)
+
+/* Wrap symbol X into unspec representing relocation RELOC.
+   BASE_REG - register that should be added to the result.
+   TEMP_REG - if non-null, temporary register.  */
+
+static rtx
+m68k_wrap_symbol (rtx x, enum m68k_reloc reloc, rtx base_reg, rtx temp_reg)
+{
+  bool use_x_p;
+
+  use_x_p = (base_reg == pic_offset_table_rtx) ? TARGET_XGOT : TARGET_XTLS;
+
+  if (TARGET_COLDFIRE && use_x_p)
+    /* When compiling with -mx{got, tls} switch the code will look like this:
+
+       move.l <X>@<RELOC>,<TEMP_REG>
+       add.l <BASE_REG>,<TEMP_REG>  */
+    {
+      /* Wrap X in UNSPEC_??? to tip m68k_output_addr_const_extra
+	 to put @RELOC after reference.  */
+      x = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, x, GEN_INT (reloc)),
+			  UNSPEC_RELOC32);
+      x = gen_rtx_CONST (Pmode, x);
+
+      if (temp_reg == NULL)
+	{
+	  gcc_assert (can_create_pseudo_p ());
+	  temp_reg = gen_reg_rtx (Pmode);
+	}
+
+      emit_move_insn (temp_reg, x);
+      emit_insn (gen_addsi3 (temp_reg, temp_reg, base_reg));
+      x = temp_reg;
+    }
+  else
+    {
+      x = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, x, GEN_INT (reloc)),
+			  UNSPEC_RELOC16);
+      x = gen_rtx_CONST (Pmode, x);
+
+      x = gen_rtx_PLUS (Pmode, base_reg, x);
+    }
+
+  return x;
+}
+
+/* Helper for m68k_unwrap_symbol.
+   Also, if unwrapping was successful (that is if (ORIG != <return value>)),
+   sets *RELOC_PTR to relocation type for the symbol.  */
+
+static rtx
+m68k_unwrap_symbol_1 (rtx orig, bool unwrap_reloc32_p,
+		      enum m68k_reloc *reloc_ptr)
+{
+  if (GET_CODE (orig) == CONST)
+    {
+      rtx x;
+      enum m68k_reloc dummy;
+
+      x = XEXP (orig, 0);
+
+      if (reloc_ptr == NULL)
+	reloc_ptr = &dummy;
+
+      /* Handle an addend.  */
+      if ((GET_CODE (x) == PLUS || GET_CODE (x) == MINUS)
+	  && CONST_INT_P (XEXP (x, 1)))
+	x = XEXP (x, 0);
+
+      if (GET_CODE (x) == UNSPEC)
+	{
+	  switch (XINT (x, 1))
+	    {
+	    case UNSPEC_RELOC16:
+	      orig = XVECEXP (x, 0, 0);
+	      *reloc_ptr = (enum m68k_reloc) INTVAL (XVECEXP (x, 0, 1));
+	      break;
+
+	    case UNSPEC_RELOC32:
+	      if (unwrap_reloc32_p)
+		{
+		  orig = XVECEXP (x, 0, 0);
+		  *reloc_ptr = (enum m68k_reloc) INTVAL (XVECEXP (x, 0, 1));
+		}
+	      break;
+
+	    default:
+	      break;
+	    }
+	}
+    }
+
+  return orig;
+}
+
+/* Unwrap symbol from UNSPEC_RELOC16 and, if unwrap_reloc32_p,
+   UNSPEC_RELOC32 wrappers.  */
+
+rtx
+m68k_unwrap_symbol (rtx orig, bool unwrap_reloc32_p)
+{
+  return m68k_unwrap_symbol_1 (orig, unwrap_reloc32_p, NULL);
+}
+
+/* Helper for m68k_final_prescan_insn.  */
+
+static int
+m68k_final_prescan_insn_1 (rtx *x_ptr, void *data ATTRIBUTE_UNUSED)
+{
+  rtx x = *x_ptr;
+
+  if (m68k_unwrap_symbol (x, true) != x)
+    /* For rationale of the below, see comment in m68k_final_prescan_insn.  */
+    {
+      rtx plus;
+
+      gcc_assert (GET_CODE (x) == CONST);
+      plus = XEXP (x, 0);
+
+      if (GET_CODE (plus) == PLUS || GET_CODE (plus) == MINUS)
+	{
+	  rtx unspec;
+	  rtx addend;
+
+	  unspec = XEXP (plus, 0);
+	  gcc_assert (GET_CODE (unspec) == UNSPEC);
+	  addend = XEXP (plus, 1);
+	  gcc_assert (CONST_INT_P (addend));
+
+	  /* We now have all the pieces, rearrange them.  */
+
+	  /* Move symbol to plus.  */
+	  XEXP (plus, 0) = XVECEXP (unspec, 0, 0);
+
+	  /* Move plus inside unspec.  */
+	  XVECEXP (unspec, 0, 0) = plus;
+
+	  /* Move unspec to top level of const.  */
+	  XEXP (x, 0) = unspec;
+	}
+
+      return -1;
+    }
+
+  return 0;
+}
+
+/* Prescan insn before outputing assembler for it.  */
+
+void
+m68k_final_prescan_insn (rtx insn ATTRIBUTE_UNUSED,
+			 rtx *operands, int n_operands)
+{
+  int i;
+
+  /* Combine and, possibly, other optimizations may do good job
+     converting
+       (const (unspec [(symbol)]))
+     into
+       (const (plus (unspec [(symbol)])
+                    (const_int N))).
+     The problem with this is emitting @TLS or @GOT decorations.
+     The decoration is emitted when processing (unspec), so the
+     result would be "#symbol@TLSLE+N" instead of "#symbol+N@TLSLE".
+
+     It seems that the easiest solution to this is to convert such
+     operands to
+       (const (unspec [(plus (symbol)
+                             (const_int N))])).
+     Note, that the top level of operand remains intact, so we don't have
+     to patch up anything outside of the operand.  */
+
+  for (i = 0; i < n_operands; ++i)
+    {
+      rtx op;
+
+      op = operands[i];
+
+      for_each_rtx (&op, m68k_final_prescan_insn_1, NULL);
+    }
+}
+
+/* Move X to a register and add REG_EQUAL note pointing to ORIG.
+   If REG is non-null, use it; generate new pseudo otherwise.  */
+
+static rtx
+m68k_move_to_reg (rtx x, rtx orig, rtx reg)
+{
+  rtx insn;
+
+  if (reg == NULL_RTX)
+    {
+      gcc_assert (can_create_pseudo_p ());
+      reg = gen_reg_rtx (Pmode);
+    }
+
+  insn = emit_move_insn (reg, x);
+  /* Put a REG_EQUAL note on this insn, so that it can be optimized
+     by loop.  */
+  set_unique_reg_note (insn, REG_EQUAL, orig);
+
+  return reg;
+}
+
+/* Does the same as m68k_wrap_symbol, but returns a memory reference to
+   GOT slot.  */
+
+static rtx
+m68k_wrap_symbol_into_got_ref (rtx x, enum m68k_reloc reloc, rtx temp_reg)
+{
+  x = m68k_wrap_symbol (x, reloc, m68k_get_gp (), temp_reg);
+
+  x = gen_rtx_MEM (Pmode, x);
+  MEM_READONLY_P (x) = 1;
+
+  return x;
+}
+
 /* Legitimize PIC addresses.  If the address is already
    position-independent, we return ORIG.  Newly generated
    position-independent addresses go to REG.  If we need more
@@ -2152,42 +2404,15 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
     {
       gcc_assert (reg);
 
-      if (TARGET_COLDFIRE && TARGET_XGOT)
-	/* When compiling with -mxgot switch the code for the above
-	   example will look like this:
-
-	   movel a5, a0
-	   addl _foo@GOT, a0
-	   movel a0@, a0
-	   movel #12345, a0@  */
-	{
-	  rtx pic_offset;
-
-	  /* Wrap ORIG in UNSPEC_GOTOFF to tip m68k_output_addr_const_extra
-	     to put @GOT after reference.  */
-	  pic_offset = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig),
-				       UNSPEC_GOTOFF);
-	  pic_offset = gen_rtx_CONST (Pmode, pic_offset);
-	  emit_move_insn (reg, pic_offset);
-	  emit_insn (gen_addsi3 (reg, reg, pic_offset_table_rtx));
-	  pic_ref = gen_rtx_MEM (Pmode, reg);
-	}
-      else
-	pic_ref = gen_rtx_MEM (Pmode,
-			       gen_rtx_PLUS (Pmode,
-					     pic_offset_table_rtx, orig));
-      crtl->uses_pic_offset_table = 1;
-      MEM_READONLY_P (pic_ref) = 1;
-      emit_move_insn (reg, pic_ref);
-      return reg;
+      pic_ref = m68k_wrap_symbol_into_got_ref (orig, RELOC_GOT, reg);
+      pic_ref = m68k_move_to_reg (pic_ref, orig, reg);
     }
   else if (GET_CODE (orig) == CONST)
     {
       rtx base;
 
       /* Make sure this has not already been legitimized.  */
-      if (GET_CODE (XEXP (orig, 0)) == PLUS
-	  && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx)
+      if (m68k_unwrap_symbol (orig, true) != orig)
 	return orig;
 
       gcc_assert (reg);
@@ -2200,13 +2425,244 @@ legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
 				     base == reg ? 0 : reg);
 
       if (GET_CODE (orig) == CONST_INT)
-	return plus_constant (base, INTVAL (orig));
-      pic_ref = gen_rtx_PLUS (Pmode, base, orig);
-      /* Likewise, should we set special REG_NOTEs here?  */
+	pic_ref = plus_constant (base, INTVAL (orig));
+      else
+	pic_ref = gen_rtx_PLUS (Pmode, base, orig);
     }
+
   return pic_ref;
 }
 
+/* The __tls_get_addr symbol.  */
+static GTY(()) rtx m68k_tls_get_addr;
+
+/* Return SYMBOL_REF for __tls_get_addr.  */
+
+static rtx
+m68k_get_tls_get_addr (void)
+{
+  if (m68k_tls_get_addr == NULL_RTX)
+    m68k_tls_get_addr = init_one_libfunc ("__tls_get_addr");
+
+  return m68k_tls_get_addr;
+}
+
+/* Return libcall result in A0 instead of usual D0.  */
+static bool m68k_libcall_value_in_a0_p = false;
+
+/* Emit instruction sequence that calls __tls_get_addr.  X is
+   the TLS symbol we are referencing and RELOC is the symbol type to use
+   (either TLSGD or TLSLDM).  EQV is the REG_EQUAL note for the sequence
+   emitted.  A pseudo register with result of __tls_get_addr call is
+   returned.  */
+
+static rtx
+m68k_call_tls_get_addr (rtx x, rtx eqv, enum m68k_reloc reloc)
+{
+  rtx a0;
+  rtx insns;
+  rtx dest;
+
+  /* Emit the call sequence.  */
+  start_sequence ();
+
+  /* FIXME: Unfortunately, emit_library_call_value does not
+     consider (plus (%a5) (const (unspec))) to be a good enough
+     operand for push, so it forces it into a register.  The bad
+     thing about this is that combiner, due to copy propagation and other
+     optimizations, sometimes can not later fix this.  As a consequence,
+     additional register may be allocated resulting in a spill.
+     For reference, see args processing loops in
+     calls.c:emit_library_call_value_1.
+     For testcase, see gcc.target/m68k/tls-{gd, ld}.c  */
+  x = m68k_wrap_symbol (x, reloc, m68k_get_gp (), NULL_RTX);
+
+  /* __tls_get_addr() is not a libcall, but emitting a libcall_value
+     is the simpliest way of generating a call.  The difference between
+     __tls_get_addr() and libcall is that the result is returned in D0
+     instead of A0.  To workaround this, we use m68k_libcall_value_in_a0_p
+     which temporarily switches returning the result to A0.  */ 
+
+  m68k_libcall_value_in_a0_p = true;
+  a0 = emit_library_call_value (m68k_get_tls_get_addr (), NULL_RTX, LCT_PURE,
+				Pmode, 1, x, Pmode);
+  m68k_libcall_value_in_a0_p = false;
+  
+  insns = get_insns ();
+  end_sequence ();
+
+  gcc_assert (can_create_pseudo_p ());
+  dest = gen_reg_rtx (Pmode);
+  emit_libcall_block (insns, dest, a0, eqv);
+
+  return dest;
+}
+
+/* The __tls_get_addr symbol.  */
+static GTY(()) rtx m68k_read_tp;
+
+/* Return SYMBOL_REF for __m68k_read_tp.  */
+
+static rtx
+m68k_get_m68k_read_tp (void)
+{
+  if (m68k_read_tp == NULL_RTX)
+    m68k_read_tp = init_one_libfunc ("__m68k_read_tp");
+
+  return m68k_read_tp;
+}
+
+/* Emit instruction sequence that calls __m68k_read_tp.
+   A pseudo register with result of __m68k_read_tp call is returned.  */
+
+static rtx 
+m68k_call_m68k_read_tp (void)
+{
+  rtx a0;
+  rtx eqv;
+  rtx insns;
+  rtx dest;
+
+  start_sequence ();
+
+  /* __m68k_read_tp() is not a libcall, but emitting a libcall_value
+     is the simpliest way of generating a call.  The difference between
+     __m68k_read_tp() and libcall is that the result is returned in D0
+     instead of A0.  To workaround this, we use m68k_libcall_value_in_a0_p
+     which temporarily switches returning the result to A0.  */ 
+
+  /* Emit the call sequence.  */
+  m68k_libcall_value_in_a0_p = true;
+  a0 = emit_library_call_value (m68k_get_m68k_read_tp (), NULL_RTX, LCT_PURE,
+				Pmode, 0);
+  m68k_libcall_value_in_a0_p = false;
+  insns = get_insns ();
+  end_sequence ();
+
+  /* Attach a unique REG_EQUIV, to allow the RTL optimizers to
+     share the m68k_read_tp result with other IE/LE model accesses.  */
+  eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const1_rtx), UNSPEC_RELOC32);
+
+  gcc_assert (can_create_pseudo_p ());
+  dest = gen_reg_rtx (Pmode);
+  emit_libcall_block (insns, dest, a0, eqv);
+
+  return dest;
+}
+
+/* Return a legitimized address for accessing TLS SYMBOL_REF X.
+   For explanations on instructions sequences see TLS/NPTL ABI for m68k and
+   ColdFire.  */
+
+rtx
+m68k_legitimize_tls_address (rtx orig)
+{
+  switch (SYMBOL_REF_TLS_MODEL (orig))
+    {
+    case TLS_MODEL_GLOBAL_DYNAMIC:
+      orig = m68k_call_tls_get_addr (orig, orig, RELOC_TLSGD);
+      break;
+
+    case TLS_MODEL_LOCAL_DYNAMIC:
+      {
+	rtx eqv;
+	rtx a0;
+	rtx x;
+ 
+	/* Attach a unique REG_EQUIV, to allow the RTL optimizers to
+	   share the LDM result with other LD model accesses.  */
+	eqv = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, const0_rtx),
+			      UNSPEC_RELOC32);
+
+	a0 = m68k_call_tls_get_addr (orig, eqv, RELOC_TLSLDM);
+
+	x = m68k_wrap_symbol (orig, RELOC_TLSLDO, a0, NULL_RTX);
+
+	if (can_create_pseudo_p ())
+	  x = m68k_move_to_reg (x, orig, NULL_RTX);
+
+	orig = x;
+	break;
+      }
+
+    case TLS_MODEL_INITIAL_EXEC:
+      {
+	rtx a0;
+	rtx x;
+
+	a0 = m68k_call_m68k_read_tp ();
+
+	x = m68k_wrap_symbol_into_got_ref (orig, RELOC_TLSIE, NULL_RTX);
+	x = gen_rtx_PLUS (Pmode, x, a0);
+
+	if (can_create_pseudo_p ())
+	  x = m68k_move_to_reg (x, orig, NULL_RTX);
+
+	orig = x;
+	break;
+      }
+
+    case TLS_MODEL_LOCAL_EXEC:
+      {
+	rtx a0;
+	rtx x;
+
+	a0 = m68k_call_m68k_read_tp ();
+
+	x = m68k_wrap_symbol (orig, RELOC_TLSLE, a0, NULL_RTX);
+
+	if (can_create_pseudo_p ())
+	  x = m68k_move_to_reg (x, orig, NULL_RTX);
+
+	orig = x;
+	break;
+      }
+
+    default:
+      gcc_unreachable ();
+    }
+
+  return orig;
+}
+
+
+/* Helper for m68k_tls_referenced_p.  */
+
+static int
+m68k_tls_reference_p_1 (rtx *x_ptr, void *data ATTRIBUTE_UNUSED)
+{
+  /* Note: this is not the same as m68k_tls_symbol_p.  */
+  if (GET_CODE (*x_ptr) == SYMBOL_REF)
+    return SYMBOL_REF_TLS_MODEL (*x_ptr) != 0 ? 1 : 0;
+
+  /* Don't recurse into legitimate TLS references.  */
+  if (m68k_tls_reference_p (*x_ptr, true))
+    return -1;
+
+  return 0;
+}
+
+/* If !LEGITIMATE_P, return true if X is a TLS symbol reference,
+   though illegitimate one.
+   If LEGITIMATE_P, return true if X is a legitimate TLS symbol reference.  */
+
+bool
+m68k_tls_reference_p (rtx x, bool legitimate_p)
+{
+  if (!TARGET_HAVE_TLS)
+    return false;
+
+  if (!legitimate_p)
+    return for_each_rtx (&x, m68k_tls_reference_p_1, NULL) == 1 ? true : false;
+  else
+    {
+      enum m68k_reloc reloc = RELOC_GOT;
+
+      return (m68k_unwrap_symbol_1 (x, true, &reloc) != x
+	      && TLS_RELOC_P (reloc));
+    }
+}
+
 
 
 #define USE_MOVQ(i)	((unsigned) ((i) + 128) <= 255)
@@ -3999,18 +4468,92 @@ print_operand (FILE *file, rtx op, int letter)
     }
 }
 
+/* Return string for TLS relocation RELOC.  */
+
+static const char *
+m68k_get_reloc_decoration (enum m68k_reloc reloc)
+{
+  /* To my knowledge, !MOTOROLA assemblers don't support TLS.  */
+  gcc_assert (MOTOROLA || reloc == RELOC_GOT);
+
+  switch (reloc)
+    {
+    case RELOC_GOT:
+      if (MOTOROLA)
+	{
+	  if (flag_pic == 1 && TARGET_68020)
+	    return "@GOT.w";
+	  else
+	    return "@GOT";
+	}
+      else
+	{
+	  if (TARGET_68020)
+	    {
+	      switch (flag_pic)
+		{
+		case 1:
+		  return ":w";
+		case 2:
+		  return ":l";
+		default:
+		  return "";
+		}
+	    }
+	}
+
+    case RELOC_TLSGD:
+      return "@TLSGD";
+
+    case RELOC_TLSLDM:
+      return "@TLSLDM";
+
+    case RELOC_TLSLDO:
+      return "@TLSLDO";
+
+    case RELOC_TLSIE:
+      return "@TLSIE";
+
+    case RELOC_TLSLE:
+      return "@TLSLE";
+
+    default:
+      gcc_unreachable ();
+    }
+}
+
 /* m68k implementation of OUTPUT_ADDR_CONST_EXTRA.  */
 
 bool
 m68k_output_addr_const_extra (FILE *file, rtx x)
 {
-  if (GET_CODE (x) != UNSPEC || XINT (x, 1) != UNSPEC_GOTOFF)
-    return false;
+  if (GET_CODE (x) == UNSPEC)
+    {
+      switch (XINT (x, 1))
+	{
+	case UNSPEC_RELOC16:
+	case UNSPEC_RELOC32:
+	  output_addr_const (file, XVECEXP (x, 0, 0));
+	  fputs (m68k_get_reloc_decoration (INTVAL (XVECEXP (x, 0, 1))), file);
+	  return true;
 
-  output_addr_const (file, XVECEXP (x, 0, 0));
-  /* ??? What is the non-MOTOROLA syntax?  */
-  fputs ("@GOT", file);
-  return true;
+	default:
+	  break;
+	}
+    }
+
+  return false;
+}
+
+/* M68K implementation of TARGET_ASM_OUTPUT_DWARF_DTPREL.  */
+
+static void
+m68k_output_dwarf_dtprel (FILE *file, int size, rtx x)
+{
+  gcc_assert (size == 4);
+  fputs ("\t.long\t", file);
+  output_addr_const (file, x);
+  fputs ("@TLSLDO+0x8000", file);
 }
 
 
@@ -4100,15 +4643,8 @@ print_operand_address (FILE *file, rtx addr)
 	  else
 	    {
 	      if (address.offset)
-		{
-		  output_addr_const (file, address.offset);
-		  if (flag_pic && address.base == pic_offset_table_rtx)
-		    {
-		      fprintf (file, "@GOT");
-		      if (flag_pic == 1 && TARGET_68020)
-			fprintf (file, ".w");
-		    }
-		}
+		output_addr_const (file, address.offset);
+
 	      putc ('(', file);
 	      if (address.base)
 		fputs (M68K_REGNAME (REGNO (address.base)), file);
@@ -4141,19 +4677,7 @@ print_operand_address (FILE *file, rtx addr)
 		    fputs (M68K_REGNAME (REGNO (address.base)), file);
 		  fprintf (file, "@(");
 		  if (address.offset)
-		    {
-		      output_addr_const (file, address.offset);
-		      if (address.base == pic_offset_table_rtx && TARGET_68020)
-			switch (flag_pic)
-			  {
-			  case 1:
-			    fprintf (file, ":w"); break;
-			  case 2:
-			    fprintf (file, ":l"); break;
-			  default:
-			    break;
-			  }
-		    }
+		    output_addr_const (file, address.offset);
 		}
 	      /* Print the ",index" component, if any.  */
 	      if (address.index)
@@ -4641,7 +5165,8 @@ m68k_libcall_value (enum machine_mode mode)
   default:
     break;
   }
-  return gen_rtx_REG (mode, D0_REG);
+
+  return gen_rtx_REG (mode, m68k_libcall_value_in_a0_p ? A0_REG : D0_REG);
 }
 
 rtx
@@ -4907,9 +5432,8 @@ sched_attr_op_type (rtx insn, bool opx_p, bool address_p)
 	  return OP_TYPE_IMM_L;
 
 	default:
-	  if (GET_CODE (op) == SYMBOL_REF)
-	    /* ??? Just a guess.  Probably we can guess better using length
-	       attribute of the instructions.  */
+	  if (symbolic_operand (m68k_unwrap_symbol (op, false), VOIDmode))
+	    /* Just a guess.  */
 	    return OP_TYPE_IMM_W;
 
 	  return OP_TYPE_IMM_L;
@@ -5854,3 +6378,5 @@ m68k_sched_indexed_address_bypass_p (rtx pro, rtx con)
       return 0;
     }
 }
+
+#include "gt-m68k.h"
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index e91ab00..2d3b592 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -750,7 +750,8 @@ __transfer_from_trampoline ()					\
 
 #define LEGITIMATE_PIC_OPERAND_P(X)				\
   (!symbolic_operand (X, VOIDmode)				\
-   || (TARGET_PCREL && REG_STRICT_P))
+   || (TARGET_PCREL && REG_STRICT_P)				\
+   || m68k_tls_reference_p (X, true))
 
 #define REG_OK_FOR_BASE_P(X) \
   m68k_legitimate_base_reg_p (X, REG_STRICT_P)
@@ -967,6 +968,9 @@ do { if (cc_prev_status.flags & CC_IN_68881)			\
   assemble_name ((FILE), (NAME)),		\
   fprintf ((FILE), ",%u\n", (int)(ROUNDED)))
 
+#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
+  m68k_final_prescan_insn (INSN, OPVEC, NOPERANDS)
+
 /* On the 68000, we use several CODE characters:
    '.' for dot needed in Motorola-style opcode names.
    '-' for an operand pushing on the stack:
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 33058fa..037bb37 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -116,7 +116,8 @@
    (UNSPEC_GOT 3)
    (UNSPEC_IB 4)
    (UNSPEC_TIE 5)
-   (UNSPEC_GOTOFF 6)
+   (UNSPEC_RELOC16 6)
+   (UNSPEC_RELOC32 7)
   ])
 
 ;; UNSPEC_VOLATILE usage:
@@ -869,7 +870,41 @@
 {
   rtx tmp, base, offset;
 
-  if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
+  /* Recognize the case where operand[1] is a reference to thread-local
+     data and load its address to a register.  */
+  if (!TARGET_PCREL && m68k_tls_reference_p (operands[1], false))
+    {
+      rtx tmp = operands[1];
+      rtx addend = NULL;
+
+      if (GET_CODE (tmp) == CONST && GET_CODE (XEXP (tmp, 0)) == PLUS)
+        {
+          addend = XEXP (XEXP (tmp, 0), 1);
+          tmp = XEXP (XEXP (tmp, 0), 0);
+        }
+
+      gcc_assert (GET_CODE (tmp) == SYMBOL_REF);
+      gcc_assert (SYMBOL_REF_TLS_MODEL (tmp) != 0);
+
+      tmp = m68k_legitimize_tls_address (tmp);
+
+      if (addend)
+        {
+	  if (!REG_P (tmp))
+	    {
+	      rtx reg;
+
+	      reg = gen_reg_rtx (Pmode);
+	      emit_move_insn (reg, tmp);
+	      tmp = reg;
+	    }
+
+          tmp = gen_rtx_PLUS (SImode, tmp, addend);
+	}
+
+      operands[1] = tmp;
+    }
+  else if (flag_pic && !TARGET_PCREL && symbolic_operand (operands[1], SImode))
     {
       /* The source is an address which requires PIC relocation.
          Call legitimize_pic_address with the source, mode, and a relocation
@@ -2428,9 +2463,9 @@
   "* return output_addsi3 (operands);")
 
 (define_insn_and_split "*addsi3_5200"
-  [(set (match_operand:SI 0 "nonimmediate_operand"         "=mr,mr,a,m,r,  ?a, ?a,?a,?a")
-	(plus:SI (match_operand:SI 1 "general_operand"     "%0, 0, 0,0,0,   a,  a, r, a")
-		 (match_operand:SI 2 "general_src_operand" " I, L, J,d,mrKi,Cj, r, a, J")))]
+  [(set (match_operand:SI 0 "nonimmediate_operand"         "=mr,mr,a,  m,r,  ?a, ?a,?a,?a")
+	(plus:SI (match_operand:SI 1 "general_operand"     "%0, 0, 0,  0,0,   a,  a, r, a")
+		 (match_operand:SI 2 "general_src_operand" " I, L, JCu,d,mrKi,Cj, r, a, JCu")))]
   "TARGET_COLDFIRE"
 {
   switch (which_alternative)
@@ -2472,9 +2507,9 @@
 	(plus:SI (match_dup 0)
 		 (match_dup 1)))]
   ""
-  [(set_attr "type" "aluq_l,aluq_l,lea,alu_l,alu_l,*,lea,lea,lea")
-   (set_attr "opy" "2,2,*,2,2,*,*,*,*")
-   (set_attr "opy_type" "*,*,mem5,*,*,*,mem6,mem6,mem5")])
+  [(set_attr "type"     "aluq_l,aluq_l,lea, alu_l,alu_l,*,lea, lea, lea")
+   (set_attr "opy"      "2,     2,     *,   2,    2,    *,*,   *,   *")
+   (set_attr "opy_type" "*,     *,     mem5,*,    *,    *,mem6,mem6,mem5")])
 
 (define_insn ""
   [(set (match_operand:SI 0 "nonimmediate_operand" "=a")
diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt
index b0d3b3c..d5aa9fa 100644
--- a/gcc/config/m68k/m68k.opt
+++ b/gcc/config/m68k/m68k.opt
@@ -182,3 +182,7 @@ Tune for the specified target CPU or architecture
 mxgot
 Target Report Mask(XGOT)
 Support more than 8192 GOT entries on ColdFire
+
+mxtls
+Target Report Mask(XTLS)
+Support TLS segment larger than 64K
diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md
index 417989f..6ca261f 100644
--- a/gcc/config/m68k/predicates.md
+++ b/gcc/config/m68k/predicates.md
@@ -135,7 +135,9 @@
   (match_code "sign_extend,zero_extend"))
 
 ;; Returns true if OP is either a symbol reference or a sum of a
-;; symbol reference and a constant.
+;; symbol reference and a constant.  This predicate is for "raw"
+;; symbol references not yet processed by legitimize*_address,
+;; hence we do not handle UNSPEC_{XGOT, TLS, XTLS} here.
 
 (define_predicate "symbolic_operand"
   (match_code "symbol_ref,label_ref,const")
diff --git a/gcc/configure b/gcc/configure
index 6033f33..4bab41d 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -21984,6 +21984,22 @@ x:
 	tls_first_minor=16
 	tls_as_opt='-32 --fatal-warnings'
 	;;
+  m68k-*-*)
+    conftest_s='
+	.section .tdata,"awT",@progbits
+x:
+	.word 2
+	.text
+foo:
+	move.l x@TLSGD(%a5),%a0
+	move.l x@TLSLDM(%a5),%a0
+	move.l x@TLSLDO(%a5),%a0
+	move.l x@TLSIE(%a5),%a0
+	move.l x@TLSLE(%a5),%a0'
+	tls_first_major=2
+	tls_first_minor=19
+	tls_as_opt='--fatal-warnings'
+	;;
   powerpc-*-*)
     conftest_s='
 	.section ".tdata","awT",@progbits
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 5f9276c..80f9422 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -2570,6 +2570,22 @@ x:
 	tls_first_minor=16
 	tls_as_opt='-32 --fatal-warnings'
 	;;
+  m68k-*-*)
+    conftest_s='
+	.section .tdata,"awT",@progbits
+x:
+	.word 2
+	.text
+foo:
+	move.l x@TLSGD(%a5),%a0
+	move.l x@TLSLDM(%a5),%a0
+	move.l x@TLSLDO(%a5),%a0
+	move.l x@TLSIE(%a5),%a0
+	move.l x@TLSLE(%a5),%a0'
+	tls_first_major=2
+	tls_first_minor=19
+	tls_as_opt='--fatal-warnings'
+	;;
   powerpc-*-*)
     conftest_s='
 	.section ".tdata","awT",@progbits
#diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
#index 545fb82..994360b 100644
#--- a/gcc/testsuite/ChangeLog
#+++ b/gcc/testsuite/ChangeLog
#@@ -1,3 +1,16 @@
#+2009-05-18  Maxim Kuvyrkov  <maxim@codesourcery.com>
#+
#+	* gcc.target/m68k/tls-ie.c: New test.
#+	* gcc.target/m68k/tls-le.c: New test.
#+	* gcc.target/m68k/tls-gd.c: New test.
#+	* gcc.target/m68k/tls-ld.c: New test.
#+	* gcc.target/m68k/tls-ie-xgot.c: New test.
#+	* gcc.target/m68k/tls-le-xtls.c: New test.
#+	* gcc.target/m68k/tls-gd-xgot.c: New test.
#+	* gcc.target/m68k/tls-ld-xgot.c: New test.
#+	* gcc.target/m68k/tls-ld-xtls.c: New test.
#+	* gcc.target/m68k/tls-ld-xgot-xtls.c: New test.
#+
# 2009-05-18  Martin Jambor  <mjambor@suse.cz>
# 
# 	* gcc.dg/ipa/modif-1.c: Do not check for unmodified int parameter.
diff --git a/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c b/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c
new file mode 100644
index 0000000..2a4900b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-gd-xgot.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic -mxgot" } */
+/* { dg-final { scan-assembler "#foo@TLSGD,\%\[ad\]\[0-7\]" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+
+extern int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-gd.c b/gcc/testsuite/gcc.target/m68k/tls-gd.c
new file mode 100644
index 0000000..2b69fbd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-gd.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-final { scan-assembler "foo@TLSGD\\(\%a5\\)" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+
+extern int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c b/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c
new file mode 100644
index 0000000..d3fbfda
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ie-xgot.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -mxgot" } */
+/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
+/* { dg-final { scan-assembler "#foo@TLSIE,\%\[ad\]\[0-7\]" } } */
+
+extern int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ie.c b/gcc/testsuite/gcc.target/m68k/tls-ie.c
new file mode 100644
index 0000000..2661f9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ie.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
+/* { dg-final { scan-assembler "foo@TLSIE\\(\%a5\\)" } } */
+
+extern int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c b/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c
new file mode 100644
index 0000000..4817de0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ld-xgot-xtls.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic -mxgot -mxtls" } */
+/* { dg-final { scan-assembler "#foo@TLSLDM,\%\[ad\]\[0-7\]" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+/* { dg-final { scan-assembler "#foo@TLSLDO,\%\[ad\]\[0-7\]" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c b/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c
new file mode 100644
index 0000000..f95f719
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ld-xgot.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic -mxgot" } */
+/* { dg-final { scan-assembler "#foo@TLSLDM,\%\[ad\]\[0-7\]" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+/* { dg-final { scan-assembler "lea \\(foo@TLSLDO,\%a0\\)" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c b/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c
new file mode 100644
index 0000000..1bc3eaf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ld-xtls.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic -mxtls" } */
+/* { dg-final { scan-assembler "foo@TLSLDM\\(\%a5\\)" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+/* { dg-final { scan-assembler "#foo@TLSLDO,\%\[ad\]\[0-7\]" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-ld.c b/gcc/testsuite/gcc.target/m68k/tls-ld.c
new file mode 100644
index 0000000..556a117
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-ld.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-final { scan-assembler "foo@TLSLDM\\(\%a5\\)" } } */
+/* { dg-final { scan-assembler "bsr.l __tls_get_addr@PLTPC" } } */
+/* { dg-final { scan-assembler "lea \\(foo@TLSLDO,\%a0\\)" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c b/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c
new file mode 100644
index 0000000..9006115
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-le-xtls.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2 -mxtls" } */
+/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
+/* { dg-final { scan-assembler "#foo@TLSLE,\%\[ad\]\[0-7\]" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/tls-le.c b/gcc/testsuite/gcc.target/m68k/tls-le.c
new file mode 100644
index 0000000..1c0eab2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/tls-le.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { ! *-linux-* } { "*" } { "" } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "jsr __m68k_read_tp" } } */
+/* { dg-final { scan-assembler "lea \\(foo@TLSLE,\%a0\\)" } } */
+
+static int __thread foo;
+
+int *
+bar (void)
+{
+  return &foo;
+}
diff -pruN gcc-4.4.4/gcc/config/m68k/m68k.h gcc-4.4.4-ft/gcc/config/m68k/m68k.h
--- gcc-4.4.4/gcc/config/m68k/m68k.h	2010-06-16 12:44:04.855797367 +1000
+++ gcc-4.4.4-ft/gcc/config/m68k/m68k.h	2010-06-16 12:30:52.000000000 +1000
@@ -778,7 +778,10 @@ __transfer_from_trampoline ()					\
 #define COPY_ONCE(Y) if (!copied) { Y = copy_rtx (Y); copied = ch = 1; }
 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)   \
 { register int ch = (X) != (OLDX);					\
-  if (GET_CODE (X) == PLUS)						\
+  if (HAVE_AS_TLS && (GET_CODE (X) == SYMBOL_REF) &&			\
+      (SYMBOL_REF_TLS_MODEL (X) != 0))					\
+    m68k_legitimize_tls_address (X);					\
+  else if (GET_CODE (X) == PLUS)					\
     { int copied = 0;							\
       if (GET_CODE (XEXP (X, 0)) == MULT)				\
 	{ COPY_ONCE (X); XEXP (X, 0) = force_operand (XEXP (X, 0), 0);}	\

--- End Message ---
--- Begin Message ---
Source: gcc-4.4
Source-Version: 4.4.4-6

We believe that the bug you reported is fixed in the latest version of
gcc-4.4, which is due to be installed in the Debian FTP archive:

cpp-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/cpp-4.4_4.4.4-6_i386.deb
fixincludes_4.4.4-6_i386.deb
  to main/g/gcc-4.4/fixincludes_4.4.4-6_i386.deb
g++-4.4-multilib_4.4.4-6_i386.deb
  to main/g/gcc-4.4/g++-4.4-multilib_4.4.4-6_i386.deb
g++-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/g++-4.4_4.4.4-6_i386.deb
gcc-4.4-base_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gcc-4.4-base_4.4.4-6_i386.deb
gcc-4.4-locales_4.4.4-6_all.deb
  to main/g/gcc-4.4/gcc-4.4-locales_4.4.4-6_all.deb
gcc-4.4-multilib_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gcc-4.4-multilib_4.4.4-6_i386.deb
gcc-4.4-source_4.4.4-6_all.deb
  to main/g/gcc-4.4/gcc-4.4-source_4.4.4-6_all.deb
gcc-4.4_4.4.4-6.diff.gz
  to main/g/gcc-4.4/gcc-4.4_4.4.4-6.diff.gz
gcc-4.4_4.4.4-6.dsc
  to main/g/gcc-4.4/gcc-4.4_4.4.4-6.dsc
gcc-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gcc-4.4_4.4.4-6_i386.deb
gfortran-4.4-multilib_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gfortran-4.4-multilib_4.4.4-6_i386.deb
gfortran-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gfortran-4.4_4.4.4-6_i386.deb
gobjc++-4.4-multilib_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gobjc++-4.4-multilib_4.4.4-6_i386.deb
gobjc++-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gobjc++-4.4_4.4.4-6_i386.deb
gobjc-4.4-multilib_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gobjc-4.4-multilib_4.4.4-6_i386.deb
gobjc-4.4_4.4.4-6_i386.deb
  to main/g/gcc-4.4/gobjc-4.4_4.4.4-6_i386.deb
lib64gcc1-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gcc1-dbg_4.4.4-6_i386.deb
lib64gcc1_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gcc1_4.4.4-6_i386.deb
lib64gfortran3-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gfortran3-dbg_4.4.4-6_i386.deb
lib64gfortran3_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gfortran3_4.4.4-6_i386.deb
lib64gomp1-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gomp1-dbg_4.4.4-6_i386.deb
lib64gomp1_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64gomp1_4.4.4-6_i386.deb
lib64mudflap0-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64mudflap0-dbg_4.4.4-6_i386.deb
lib64mudflap0_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64mudflap0_4.4.4-6_i386.deb
lib64objc2-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64objc2-dbg_4.4.4-6_i386.deb
lib64objc2_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64objc2_4.4.4-6_i386.deb
lib64stdc++6-4.4-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64stdc++6-4.4-dbg_4.4.4-6_i386.deb
lib64stdc++6_4.4.4-6_i386.deb
  to main/g/gcc-4.4/lib64stdc++6_4.4.4-6_i386.deb
libgcc1-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgcc1-dbg_4.4.4-6_i386.deb
libgcc1_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgcc1_4.4.4-6_i386.deb
libgfortran3-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgfortran3-dbg_4.4.4-6_i386.deb
libgfortran3_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgfortran3_4.4.4-6_i386.deb
libgomp1-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgomp1-dbg_4.4.4-6_i386.deb
libgomp1_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libgomp1_4.4.4-6_i386.deb
libmudflap0-4.4-dev_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libmudflap0-4.4-dev_4.4.4-6_i386.deb
libmudflap0-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libmudflap0-dbg_4.4.4-6_i386.deb
libmudflap0_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libmudflap0_4.4.4-6_i386.deb
libobjc2-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libobjc2-dbg_4.4.4-6_i386.deb
libobjc2_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libobjc2_4.4.4-6_i386.deb
libstdc++6-4.4-dbg_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libstdc++6-4.4-dbg_4.4.4-6_i386.deb
libstdc++6-4.4-dev_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libstdc++6-4.4-dev_4.4.4-6_i386.deb
libstdc++6-4.4-doc_4.4.4-6_all.deb
  to main/g/gcc-4.4/libstdc++6-4.4-doc_4.4.4-6_all.deb
libstdc++6-4.4-pic_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libstdc++6-4.4-pic_4.4.4-6_i386.deb
libstdc++6_4.4.4-6_i386.deb
  to main/g/gcc-4.4/libstdc++6_4.4.4-6_i386.deb
protoize_4.4.4-6_i386.deb
  to main/g/gcc-4.4/protoize_4.4.4-6_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 586060@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-4.4 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 25 Jun 2010 03:17:26 +0200
Source: gcc-4.4
Binary: gcc-4.4-base libgcc1 libgcc1-dbg libgcc2 libgcc2-dbg libgcc4 libgcc4-dbg lib64gcc1 lib64gcc1-dbg lib32gcc1 lib32gcc1-dbg libn32gcc1 libn32gcc1-dbg gcc-4.4 gcc-4.4-multilib gcc-4.4-hppa64 gcc-4.4-spu g++-4.4-spu gfortran-4.4-spu cpp-4.4 gcc-4.4-locales g++-4.4 g++-4.4-multilib libmudflap0 libmudflap0-dbg lib32mudflap0 lib32mudflap0-dbg lib64mudflap0 lib64mudflap0-dbg libn32mudflap0 libn32mudflap0-dbg libmudflap0-4.4-dev libgomp1 libgomp1-dbg lib32gomp1 lib32gomp1-dbg lib64gomp1 lib64gomp1-dbg libn32gomp1 libn32gomp1-dbg protoize gobjc++-4.4 gobjc++-4.4-multilib gobjc-4.4 gobjc-4.4-multilib libobjc2 libobjc2-dbg lib64objc2 lib64objc2-dbg lib32objc2 lib32objc2-dbg libn32objc2 libn32objc2-dbg gfortran-4.4 gfortran-4.4-multilib libgfortran3 libgfortran3-dbg lib64gfortran3 lib64gfortran3-dbg lib32gfortran3 lib32gfortran3-dbg libn32gfortran3 libn32gfortran3-dbg libstdc++6 lib32stdc++6 lib64stdc++6 libn32stdc++6 libstdc++6-4.4-dev libstdc++6-4.4-pic libstdc++6-4.4-dbg
 lib32stdc++6-4.4-dbg lib64stdc++6-4.4-dbg libn32stdc++6-4.4-dbg libstdc++6-4.4-doc gcc-4.4-soft-float fixincludes
 gcc-4.4-source
Architecture: source all i386
Version: 4.4.4-6
Distribution: unstable
Urgency: low
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Description: 
 cpp-4.4    - The GNU C preprocessor
 fixincludes - Fix non-ANSI header files
 g++-4.4    - The GNU C++ compiler
 g++-4.4-multilib - The GNU C++ compiler (multilib files)
 g++-4.4-spu - SPU cross-compiler (C++ compiler)
 gcc-4.4    - The GNU C compiler
 gcc-4.4-base - The GNU Compiler Collection (base package)
 gcc-4.4-hppa64 - The GNU C compiler (cross compiler for hppa64)
 gcc-4.4-locales - The GNU C compiler (native language support files)
 gcc-4.4-multilib - The GNU C compiler (multilib files)
 gcc-4.4-soft-float - The soft-floating-point gcc libraries (arm)
 gcc-4.4-source - Source of the GNU Compiler Collection
 gcc-4.4-spu - SPU cross-compiler (preprocessor and C compiler)
 gfortran-4.4 - The GNU Fortran 95 compiler
 gfortran-4.4-multilib - The GNU Fortran 95 compiler (multilib files)
 gfortran-4.4-spu - SPU cross-compiler (Fortran compiler)
 gobjc++-4.4 - The GNU Objective-C++ compiler
 gobjc++-4.4-multilib - The GNU Objective-C++ compiler (multilib files)
 gobjc-4.4  - The GNU Objective-C compiler
 gobjc-4.4-multilib - The GNU Objective-C compiler (multilib files)
 lib32gcc1  - GCC support library (32 bit Version)
 lib32gcc1-dbg - GCC support library (debug symbols)
 lib32gfortran3 - Runtime library for GNU Fortran applications (32bit)
 lib32gfortran3-dbg - Runtime library for GNU Fortran applications (32 bit debug symbol
 lib32gomp1 - GCC OpenMP (GOMP) support library (32bit)
 lib32gomp1-dbg - GCC OpenMP (GOMP) support library (32 bit debug symbols)
 lib32mudflap0 - GCC mudflap shared support libraries (32bit)
 lib32mudflap0-dbg - GCC mudflap shared support libraries (32 bit debug symbols)
 lib32objc2 - Runtime library for GNU Objective-C applications (32bit)
 lib32objc2-dbg - Runtime library for GNU Objective-C applications (32 bit debug sy
 lib32stdc++6 - The GNU Standard C++ Library v3 (32 bit Version)
 lib32stdc++6-4.4-dbg - The GNU Standard C++ Library v3 (debugging files)
 lib64gcc1  - GCC support library (64bit)
 lib64gcc1-dbg - GCC support library (debug symbols)
 lib64gfortran3 - Runtime library for GNU Fortran applications (64bit)
 lib64gfortran3-dbg - Runtime library for GNU Fortran applications (64bit debug symbols
 lib64gomp1 - GCC OpenMP (GOMP) support library (64bit)
 lib64gomp1-dbg - GCC OpenMP (GOMP) support library (64bit debug symbols)
 lib64mudflap0 - GCC mudflap shared support libraries (64bit)
 lib64mudflap0-dbg - GCC mudflap shared support libraries (64 bit debug symbols)
 lib64objc2 - Runtime library for GNU Objective-C applications (64bit)
 lib64objc2-dbg - Runtime library for GNU Objective-C applications (64 bit debug sy
 lib64stdc++6 - The GNU Standard C++ Library v3 (64bit)
 lib64stdc++6-4.4-dbg - The GNU Standard C++ Library v3 (debugging files)
 libgcc1    - GCC support library
 libgcc1-dbg - GCC support library (debug symbols)
 libgcc2    - GCC support library
 libgcc2-dbg - GCC support library (debug symbols)
 libgcc4    - GCC support library
 libgcc4-dbg - GCC support library (debug symbols)
 libgfortran3 - Runtime library for GNU Fortran applications
 libgfortran3-dbg - Runtime library for GNU Fortran applications (debug symbols)
 libgomp1   - GCC OpenMP (GOMP) support library
 libgomp1-dbg - GCC OpenMP (GOMP) support library (debug symbols)
 libmudflap0 - GCC mudflap shared support libraries
 libmudflap0-4.4-dev - GCC mudflap support libraries (development files)
 libmudflap0-dbg - GCC mudflap shared support libraries (debug symbols)
 libn32gcc1 - GCC support library (n32)
 libn32gcc1-dbg - GCC support library (debug symbols)
 libn32gfortran3 - Runtime library for GNU Fortran applications (n32)
 libn32gfortran3-dbg - Runtime library for GNU Fortran applications (n32 debug symbols)
 libn32gomp1 - GCC OpenMP (GOMP) support library (n32)
 libn32gomp1-dbg - GCC OpenMP (GOMP) support library (n32 debug symbols)
 libn32mudflap0 - GCC mudflap shared support libraries (n32)
 libn32mudflap0-dbg - GCC mudflap shared support libraries (n32 debug symbols)
 libn32objc2 - Runtime library for GNU Objective-C applications (n32)
 libn32objc2-dbg - Runtime library for GNU Objective-C applications (n32 debug symbo
 libn32stdc++6 - The GNU Standard C++ Library v3 (n32)
 libn32stdc++6-4.4-dbg - The GNU Standard C++ Library v3 (debugging files)
 libobjc2   - Runtime library for GNU Objective-C applications
 libobjc2-dbg - Runtime library for GNU Objective-C applications (debug symbols)
 libstdc++6 - The GNU Standard C++ Library v3
 libstdc++6-4.4-dbg - The GNU Standard C++ Library v3 (debugging files)
 libstdc++6-4.4-dev - The GNU Standard C++ Library v3 (development files)
 libstdc++6-4.4-doc - The GNU Standard C++ Library v3 (documentation files)
 libstdc++6-4.4-pic - The GNU Standard C++ Library v3 (shared library subset kit)
 protoize   - Create/remove ANSI prototypes from C code
Closes: 586060
Changes: 
 gcc-4.4 (4.4.4-6) unstable; urgency=low
 .
   * Update to SVN 20100622 from the gcc-4_4-branch (r161235).
     - Fix PR bootstrap/44544, PR fortran/44536, PR target/44534,
       PR tree-optimization/44508, PR target/44261, PR target/43740,
       PR bootstrap/44426. PR c++/44627 (LP: #503668), PR target/39690.
 .
   [ Matthias Klose ]
   * Add M68K TLS support, backport from the 4.5 branch. Closes: #586060.
   * Merge binary-libgcc.mk packaging changes into binary-libgcc-cross.mk
     (Loic Minier).
   * Fix Fortran cross-compiler build when not building the runtime library.
   * Apply proposed fix for PR target/44626 (backport from the 4.5 branch).
     LP: #564492.
   * Add maintainer scripts for cross packages.
 .
   [ Marcin Juszkiewicz ]
   * Merge the rules.d/binary-*-cross.mk files into rules.d/binary-*.mk.
   * ARM: speed up division on Thumb-2 (backport from the trunk). LP: #589779.
Checksums-Sha1: 
 d357963d3b5c107d0ece8e3eaf5fea60ad94edf2 3563 gcc-4.4_4.4.4-6.dsc
 765151691f9107dc71cd9f4a2f1bf30a41fdab87 681923 gcc-4.4_4.4.4-6.diff.gz
 5828b51e78aa0f1255faba647a92542175fe5a25 50236662 gcc-4.4-source_4.4.4-6_all.deb
 7775477641c25ad4acd781816dcca01fc18364ef 16357916 libstdc++6-4.4-doc_4.4.4-6_all.deb
 fdb22d050543fbdf5fab1b5c1fcb0fed89587a93 2298606 gcc-4.4-locales_4.4.4-6_all.deb
 f61e906f62cab47dd4a5a86807b64c75992aedaf 117724 gcc-4.4-base_4.4.4-6_i386.deb
 5666ad0975c6c25773cfcd807f8e7850949d1e14 55170 libgcc1_4.4.4-6_i386.deb
 11cb0ecd1d66a8794c421a02f347a744658af36e 79206 libgcc1-dbg_4.4.4-6_i386.deb
 6d96d9bf3322c141d23a31052df6d427766869e8 44928 lib64gcc1_4.4.4-6_i386.deb
 ba389e95a471e667412c79fec16419b3e0d21f5a 83152 lib64gcc1-dbg_4.4.4-6_i386.deb
 f35561b15214f267102c42bd11c8914918cac811 24054 libgomp1_4.4.4-6_i386.deb
 c62f9520a62b3f3dad97d61c194a544547f8a172 61932 libgomp1-dbg_4.4.4-6_i386.deb
 ccb688a1d8f8f4a0c7889460d83c897b8b44e681 25336 lib64gomp1_4.4.4-6_i386.deb
 07a1934566db95a9977141b9a664749506d1d9b3 58850 lib64gomp1-dbg_4.4.4-6_i386.deb
 901f2bf8db4c220e8b92d2c556a807f58a2a7390 3522590 cpp-4.4_4.4.4-6_i386.deb
 1acb7c1c11e622372e7acc82e9d0a4d626b59999 39980 protoize_4.4.4-6_i386.deb
 f9fe4e71430f2704c7cbb81b3fe90c1239ac05cd 59068 fixincludes_4.4.4-6_i386.deb
 c85735ae6be3d04026a8bfd6140fcac98bda97bf 215476 libmudflap0-4.4-dev_4.4.4-6_i386.deb
 24e8a840761dcdb458603bd2e3eda0a958277147 81950 libmudflap0_4.4.4-6_i386.deb
 b4e02ea926593835b2359a7cff3d65ecd2340591 120136 libmudflap0-dbg_4.4.4-6_i386.deb
 f24c1ce2af18f71f64273328c9f1c9ee3bd5f202 98090 lib64mudflap0_4.4.4-6_i386.deb
 1e92cf9798e338bd34e2521b551d0fc75f153e5e 122398 lib64mudflap0-dbg_4.4.4-6_i386.deb
 99d9661f848cc74cbebb23d9319f10366d50cda7 874 gobjc++-4.4-multilib_4.4.4-6_i386.deb
 d6ed9dac33b4da8faad7cf75315c17e43240979b 3770966 gobjc++-4.4_4.4.4-6_i386.deb
 5d4e8115cf84f1652133ec9981aaed496cf2b2ce 185622 gobjc-4.4-multilib_4.4.4-6_i386.deb
 05a038de15d55a7de53fdb8381471bb0099c1b4a 3662662 gobjc-4.4_4.4.4-6_i386.deb
 925d188e47f9952a05c5a8703909703998b59795 152136 libobjc2_4.4.4-6_i386.deb
 cae3baceaf0a254671fb57de0df6008464a9c5ff 268252 libobjc2-dbg_4.4.4-6_i386.deb
 53c7eb84c6ceff1f2441c8092fd8098c600ade88 160628 lib64objc2_4.4.4-6_i386.deb
 e14dae5425c0f5468cd6d3d9fe0e3f7a60550358 278552 lib64objc2-dbg_4.4.4-6_i386.deb
 1d5cf2b0cab0f039d5abc6be04d25c2527eb2fbc 1055168 g++-4.4-multilib_4.4.4-6_i386.deb
 661f577c0b1502bb9b9ff8b2e943eb60b8fb20eb 5130134 g++-4.4_4.4.4-6_i386.deb
 e49bdff2dda43df5a381ab207b6d0b7bf9452d19 347220 libstdc++6_4.4.4-6_i386.deb
 11e83258aa19f35220fe97ce62dec681d44acaf2 341202 lib64stdc++6_4.4.4-6_i386.deb
 9775a98671613b367a521b985d80ab3518baba96 6535692 lib64stdc++6-4.4-dbg_4.4.4-6_i386.deb
 19a5549c2c76c431ad354e72a0d89e190c4da006 1528794 libstdc++6-4.4-dev_4.4.4-6_i386.deb
 32534c45c5c015fc89e10cdfea61ea676913f83f 498388 libstdc++6-4.4-pic_4.4.4-6_i386.deb
 c1451f0b72151af400d2e463e6b975a974c7736e 3877968 libstdc++6-4.4-dbg_4.4.4-6_i386.deb
 8af2f8bdccb3c8810b072867dcea0e1793d7ec19 237914 libgfortran3_4.4.4-6_i386.deb
 06c522585b0f3f77ac231647ba3f65a73003cf01 390002 libgfortran3-dbg_4.4.4-6_i386.deb
 9c42ea5feebdc88460d5cec97343ebc1c45ad183 291202 lib64gfortran3_4.4.4-6_i386.deb
 bb9a7649161338c1785d17ba2a6ae893021b40c9 501806 lib64gfortran3-dbg_4.4.4-6_i386.deb
 947562d43e33ff3a64498d4fcaa420e198f89225 334818 gfortran-4.4-multilib_4.4.4-6_i386.deb
 645b500be0d4d4d14be68e32c213191a1cf3db83 3998978 gfortran-4.4_4.4.4-6_i386.deb
 ed902122c2fae6cef06962b66268510d5c76391d 2204850 gcc-4.4-multilib_4.4.4-6_i386.deb
 336371a21186429039843f9361c97b4c1e24ccb3 2792710 gcc-4.4_4.4.4-6_i386.deb
Checksums-Sha256: 
 035a54be37ae9a230fd728773bf2937670367c4ced913b6f934487e7069795b8 3563 gcc-4.4_4.4.4-6.dsc
 7853ca2d517314d5f9a228ef1914bc522f391b23e0fa9e6e5bdb2b458344f7fa 681923 gcc-4.4_4.4.4-6.diff.gz
 382fc1bae85711f9c4dd0d3342f79b878db378d1b85c09531eec810ff51f9c25 50236662 gcc-4.4-source_4.4.4-6_all.deb
 996272635bb96319809d1b1f4ee34523e3d52eeebbd006c39da9ed9d5647c89b 16357916 libstdc++6-4.4-doc_4.4.4-6_all.deb
 aa8dcbbbd60e0f8a6640846b6128f96de1a969eb2f8c4a1153bf8599ca7800d9 2298606 gcc-4.4-locales_4.4.4-6_all.deb
 6fdeeae96b23e48de99eb41b8658b473def1cde38b87d290c2bc0f01361e5567 117724 gcc-4.4-base_4.4.4-6_i386.deb
 f3a239305a21df8d1137441c1a8016fb0105768a16b19d6e8e9bf1430082772a 55170 libgcc1_4.4.4-6_i386.deb
 b3d54a3683bde0da492f42144d04f1741d70d95f1523720760b61f232fd3f0e8 79206 libgcc1-dbg_4.4.4-6_i386.deb
 eb7e1ecc103bf49f8ada7a1d374a9fc2ff78b167e3049d90ef3674a7767d8900 44928 lib64gcc1_4.4.4-6_i386.deb
 72a424682718fa56065af020ec21868f87f49288062deb67a836d4370ffd2bea 83152 lib64gcc1-dbg_4.4.4-6_i386.deb
 c7028976399079b6dd143b2964de49aedfc75d704ab1ec8ee4f85fd5547381f6 24054 libgomp1_4.4.4-6_i386.deb
 cf1e62710af95eef40338d44208e81f06b1efe6a270c1ead4757e6d7fa52a4c3 61932 libgomp1-dbg_4.4.4-6_i386.deb
 13cb12dbafc1459c2a5b42e2abc50084676337634c7c02a36a5a5d81e7062802 25336 lib64gomp1_4.4.4-6_i386.deb
 4f66ee9f7d205f8d34f6ae51a4c6905eee5b602fc11160c2af38c69c73c895b4 58850 lib64gomp1-dbg_4.4.4-6_i386.deb
 9dc4123aeb35bf49267d315ff2d48662f7118f4c318cae1c178683fd498b8c53 3522590 cpp-4.4_4.4.4-6_i386.deb
 14189d168a487f04dcdef550e0b84c371c1024755a421af3fe03991f127ce416 39980 protoize_4.4.4-6_i386.deb
 fb737bcb645790e7548759896019e653b38fa3759aece2dfa55d59b40ceebdfd 59068 fixincludes_4.4.4-6_i386.deb
 a356f150e6f63932df984d849586cc5f61fb77d21138835cf7edba23776a86e5 215476 libmudflap0-4.4-dev_4.4.4-6_i386.deb
 31c170f6d28f6a00caba2462b83d9d8831f4223e840ce97898a8364ec7640d3c 81950 libmudflap0_4.4.4-6_i386.deb
 c644c13749a33e6cdf4e0e58a63dfe393c79038f8d912f4559d61e425f562f42 120136 libmudflap0-dbg_4.4.4-6_i386.deb
 aeb172fbd2afdd04b051c9708ecb4e1ca961e7166328795df30d98b06873e1d5 98090 lib64mudflap0_4.4.4-6_i386.deb
 209da1684f21d0c8c085130e9cc416d8d7fe9d64789e60661baaafafe2342ac9 122398 lib64mudflap0-dbg_4.4.4-6_i386.deb
 2f2ddf2ecca776fa362cdab72040b660eae112704933d32a5f5783121d853f8d 874 gobjc++-4.4-multilib_4.4.4-6_i386.deb
 d837742fe6b88cc62542d659384c4d60be3aaee8e4442d97335b678ce67fc39b 3770966 gobjc++-4.4_4.4.4-6_i386.deb
 84d07905fe6f3a6bcf88aa0224d3fb183bed612644d1de7c6776a4bd4cadfefb 185622 gobjc-4.4-multilib_4.4.4-6_i386.deb
 284788ac6dc01bf9348ca392895e30ce98b7959d3fa4716cf64264932672fab2 3662662 gobjc-4.4_4.4.4-6_i386.deb
 7d127433b6716ff65cfa76c271087147bff841cfe2b38129e516fca80a4f578e 152136 libobjc2_4.4.4-6_i386.deb
 c9f22ae06bc34fdc225602eb85231e18dc6d8c607dc77badef41a456cc7ffa21 268252 libobjc2-dbg_4.4.4-6_i386.deb
 64c7d0b51ff1b8ed320d6e20c14d3de57288302d8d86b0647cd9aa760071fe4b 160628 lib64objc2_4.4.4-6_i386.deb
 a8306d1bbf8dbb052ce53ef73fa9d764d50dd74b1a079a8b6bd10815f25536c3 278552 lib64objc2-dbg_4.4.4-6_i386.deb
 efd9e73327524649f567cd2acc2d34e958794fbc3c7ba0ac2d361847470ac2eb 1055168 g++-4.4-multilib_4.4.4-6_i386.deb
 0ef524c3802b52d3de775edc4c5af3ba7d9d0cc57af79e2bd08fb4300c8760c4 5130134 g++-4.4_4.4.4-6_i386.deb
 ac693959dc293c6afa9340bc62114873383948cc37299b45def3512d7baaa564 347220 libstdc++6_4.4.4-6_i386.deb
 116e79fcfcdbd89b5ba6b5542759fdc89d50a27e3669a7ef7d4b01c3dafe1a5b 341202 lib64stdc++6_4.4.4-6_i386.deb
 950efd0c13f4e01646ea248fe0b8a93ed327b46f2950636b63d63c9c9574d371 6535692 lib64stdc++6-4.4-dbg_4.4.4-6_i386.deb
 03cd72efeb2484a769c27ffa451199cea637639f3c0a7cba713371a52aad48b3 1528794 libstdc++6-4.4-dev_4.4.4-6_i386.deb
 6d3a533c399513d99e96b646843e8b7feb6a91dad6f04368a6513de49c3265e3 498388 libstdc++6-4.4-pic_4.4.4-6_i386.deb
 6293cd043d85243b467178f2b6d0a8146acd9948886d8014886e83ae65fa871e 3877968 libstdc++6-4.4-dbg_4.4.4-6_i386.deb
 6ae2ec44dde974ba138d5bbd4da11de906ecb46d29c0a638e4bd8875c8cad43e 237914 libgfortran3_4.4.4-6_i386.deb
 43c1b378594295ae245e2735608c94bbf0b9787ee36cf7cd61782cd6ffa0c6f6 390002 libgfortran3-dbg_4.4.4-6_i386.deb
 9fb18e8144a554213c2e0d04e6ae68277b9b64c0c03c1e82ea14ad3acd17f7e7 291202 lib64gfortran3_4.4.4-6_i386.deb
 a0cf551ae0140af7da071088c4f0d7e5d1c33ee9f8085b0f3b40b123592caaa7 501806 lib64gfortran3-dbg_4.4.4-6_i386.deb
 d861d5c1f6e950a7159f88d8a21cb2e3b637f7725d8ba3fd8bd5744e4d14dd56 334818 gfortran-4.4-multilib_4.4.4-6_i386.deb
 951330db8f66044f02e6f87bbf67dcab80c0315bd17bcb302dd327072420216f 3998978 gfortran-4.4_4.4.4-6_i386.deb
 846862793c8eac8e40b7f8f143114967133308f09c715c46949b9ecae7dbe161 2204850 gcc-4.4-multilib_4.4.4-6_i386.deb
 9ea9ec34d00e261c86ad69d6b30582116970d8e9bb1c7e64965d47e7530b6ea0 2792710 gcc-4.4_4.4.4-6_i386.deb
Files: 
 b3c2de90ac6cfd4324720d477cecb547 3563 devel optional gcc-4.4_4.4.4-6.dsc
 99f4f31dcd3af1659734e89c5482570c 681923 devel optional gcc-4.4_4.4.4-6.diff.gz
 d4d3d6929a0d0133373105501e2c86b8 50236662 devel optional gcc-4.4-source_4.4.4-6_all.deb
 97d846dd1fec9da4385ecc987647bd94 16357916 doc optional libstdc++6-4.4-doc_4.4.4-6_all.deb
 7bd6e6cf0bc06e2d7cbe8407f277f833 2298606 devel optional gcc-4.4-locales_4.4.4-6_all.deb
 f8a1245965d0c0772b2766211ed48150 117724 libs required gcc-4.4-base_4.4.4-6_i386.deb
 f542016d68c567cd36f8e4a177cd544d 55170 libs required libgcc1_4.4.4-6_i386.deb
 39b255e88fba14bda943a56a344244e4 79206 debug extra libgcc1-dbg_4.4.4-6_i386.deb
 4c9bff7048c47be95294e8735db2c330 44928 libs optional lib64gcc1_4.4.4-6_i386.deb
 abb51c2ca3069d99a735d716cab1f1a9 83152 debug extra lib64gcc1-dbg_4.4.4-6_i386.deb
 22d65ea40c0a304a7a34e9fe37fe0d74 24054 libs optional libgomp1_4.4.4-6_i386.deb
 bfd7215c1dcb16c9488a197760921d15 61932 debug extra libgomp1-dbg_4.4.4-6_i386.deb
 c4be8acaeed5b97345166313705bf230 25336 libs optional lib64gomp1_4.4.4-6_i386.deb
 7d913338fbe5cb43a23d0b95362a1965 58850 debug extra lib64gomp1-dbg_4.4.4-6_i386.deb
 98d32b539024dafc022ec37526666ace 3522590 interpreters optional cpp-4.4_4.4.4-6_i386.deb
 45dacf2e29ccf137a47b32af1b1b2125 39980 devel optional protoize_4.4.4-6_i386.deb
 35b84434143e98c4176b69e042186f39 59068 devel optional fixincludes_4.4.4-6_i386.deb
 e283c00882e1e3a48b45122ee909104e 215476 libdevel optional libmudflap0-4.4-dev_4.4.4-6_i386.deb
 0311ae090962b1df15953b5667fc44cb 81950 libs optional libmudflap0_4.4.4-6_i386.deb
 55ef02869359caf363d666d091717074 120136 debug extra libmudflap0-dbg_4.4.4-6_i386.deb
 caeb265c59a32f1fcbc35d3d75e65192 98090 libs optional lib64mudflap0_4.4.4-6_i386.deb
 03b34306bc06a2b5b41ea7e22c646ca3 122398 debug extra lib64mudflap0-dbg_4.4.4-6_i386.deb
 a434f543d3675fa5312438cd2bcc7d66 874 devel optional gobjc++-4.4-multilib_4.4.4-6_i386.deb
 cf4b81f17f132d6e502b3d95769f22ff 3770966 devel optional gobjc++-4.4_4.4.4-6_i386.deb
 bd228a72fb8afbca66df1d1ac9766a81 185622 devel optional gobjc-4.4-multilib_4.4.4-6_i386.deb
 b1e87f850c1a71f11d604f6a4d6dd64b 3662662 devel optional gobjc-4.4_4.4.4-6_i386.deb
 df5d85b115e021b22d1db47417886ec8 152136 libs optional libobjc2_4.4.4-6_i386.deb
 5dc737e7f3cbcb2e9a0c1654ae44e5ae 268252 debug extra libobjc2-dbg_4.4.4-6_i386.deb
 1c430c8f9abb5991d13d4f1cc88c0b6c 160628 libs optional lib64objc2_4.4.4-6_i386.deb
 e9e7dc24c5d6761f7525ee6425eb4ce0 278552 debug extra lib64objc2-dbg_4.4.4-6_i386.deb
 668d65e4bf148af86c42cfec384c2213 1055168 devel optional g++-4.4-multilib_4.4.4-6_i386.deb
 423f637a904fa4bb26373279799d7f86 5130134 devel optional g++-4.4_4.4.4-6_i386.deb
 0da725fe44091e3149b028bb46ee3ecc 347220 libs required libstdc++6_4.4.4-6_i386.deb
 a2e94b1b620410abd8de4f99e54bef11 341202 libs optional lib64stdc++6_4.4.4-6_i386.deb
 3bf04d899339bb614f3f345cfeece095 6535692 debug extra lib64stdc++6-4.4-dbg_4.4.4-6_i386.deb
 165e33a1213380201fc02b80c68c6d23 1528794 libdevel optional libstdc++6-4.4-dev_4.4.4-6_i386.deb
 1fbc9995449e7d09881248f7da9e535b 498388 libdevel extra libstdc++6-4.4-pic_4.4.4-6_i386.deb
 0065cdc5c299f48e7a400720748cb809 3877968 debug extra libstdc++6-4.4-dbg_4.4.4-6_i386.deb
 59ff5300c64403af38458a45e6354320 237914 libs optional libgfortran3_4.4.4-6_i386.deb
 36d4f592bd1e5bdb3899a73b680b01f5 390002 debug extra libgfortran3-dbg_4.4.4-6_i386.deb
 7a90e85c42174c89c1eb26e160d3712e 291202 libs optional lib64gfortran3_4.4.4-6_i386.deb
 da7d7f9cca7c4adb1007f457066ac645 501806 debug extra lib64gfortran3-dbg_4.4.4-6_i386.deb
 eb5de1b41e5b5cbd9278558ac95793dc 334818 devel optional gfortran-4.4-multilib_4.4.4-6_i386.deb
 f6e38dee748e0fa6ec1761392a6e10b2 3998978 devel optional gfortran-4.4_4.4.4-6_i386.deb
 14af8b694185ddc9eb2a38e9a09dc989 2204850 devel optional gcc-4.4-multilib_4.4.4-6_i386.deb
 5a30c192ce6cfe5a6528721ed307f0f1 2792710 devel optional gcc-4.4_4.4.4-6_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwkrpEACgkQStlRaw+TLJwJfACfXoHPnSb1bEpG0RS3pzYeWkh6
jDMAniXa515ljbS10Wf+CocNAiluTCGW
=xZ7K
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: