Module Name:    src
Committed By:   skrll
Date:           Fri Dec  2 09:44:48 UTC 2011

Modified Files:
        src/external/gpl3/gcc/dist/gcc: ChangeLog
        src/external/gpl3/gcc/dist/gcc/config/pa: pa.c pa.h
        src/tools/gcc: Makefile

Log Message:
Pull across the fix for target/50691

ok'ed by mrg@


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/ChangeLog
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/config/pa/pa.c \
    src/external/gpl3/gcc/dist/gcc/config/pa/pa.h
cvs rdiff -u -r1.46 -r1.47 src/tools/gcc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/ChangeLog
diff -u src/external/gpl3/gcc/dist/gcc/ChangeLog:1.1.1.1 src/external/gpl3/gcc/dist/gcc/ChangeLog:1.2
--- src/external/gpl3/gcc/dist/gcc/ChangeLog:1.1.1.1	Tue Jun 21 01:19:58 2011
+++ src/external/gpl3/gcc/dist/gcc/ChangeLog	Fri Dec  2 09:44:48 2011
@@ -1,3 +1,10 @@
+2011-10-29  John David Anglin  <[email protected]>
+
+	PR target/50691
+	* config/pa/pa.c (emit_move_sequence): Legitimize TLS symbol references.
+	* config/pa/pa.h (LEGITIMATE_CONSTANT_P): Return false for
+	TLS_MODEL_GLOBAL_DYNAMIC and TLS_MODEL_LOCAL_DYNAMIC symbol references.
+
 2011-04-28  Release Manager
 
 	* GCC 4.5.3 released.

Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa.c
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.2 src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.3
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa.c:1.2	Tue Jun 21 02:41:37 2011
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa.c	Fri Dec  2 09:44:48 2011
@@ -1686,6 +1686,11 @@ emit_move_sequence (rtx *operands, enum 
   /* Handle the most common case: storing into a register.  */
   else if (register_operand (operand0, mode))
     {
+      /* Legitimize TLS symbol references.  This happens for references
+	 that aren't a legitimate constant.  */
+      if (PA_SYMBOL_REF_TLS_P (operand1))
+	operand1 = legitimize_tls_address (operand1);
+
       if (register_operand (operand1, mode)
 	  || (GET_CODE (operand1) == CONST_INT
 	      && cint_ok_for_move (INTVAL (operand1)))
Index: src/external/gpl3/gcc/dist/gcc/config/pa/pa.h
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.2 src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.3
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa.h:1.2	Tue Jun 21 02:41:37 2011
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa.h	Fri Dec  2 09:44:48 2011
@@ -891,6 +891,9 @@ extern int may_call_alloca;
    && (NEW_HP_ASSEMBLER						\
        || TARGET_GAS						\
        || GET_CODE (X) != LABEL_REF)				\
+   && (!PA_SYMBOL_REF_TLS_P (X)					\
+       || (SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_GLOBAL_DYNAMIC		\
+	   && SYMBOL_REF_TLS_MODEL (X) != TLS_MODEL_LOCAL_DYNAMIC))	\
    && (!TARGET_64BIT						\
        || GET_CODE (X) != CONST_DOUBLE)				\
    && (!TARGET_64BIT						\

Index: src/tools/gcc/Makefile
diff -u src/tools/gcc/Makefile:1.46 src/tools/gcc/Makefile:1.47
--- src/tools/gcc/Makefile:1.46	Mon Sep 26 21:16:14 2011
+++ src/tools/gcc/Makefile	Fri Dec  2 09:44:48 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.46 2011/09/26 21:16:14 christos Exp $
+#	$NetBSD: Makefile,v 1.47 2011/12/02 09:44:48 skrll Exp $
 
 .include <bsd.own.mk>
 
@@ -37,7 +37,7 @@ COMMON_CONFIGURE_ARGS=	--target=${MACHIN
 			--enable-long-long \
 			--enable-threads \
 			--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html \
-			--with-pkgversion="NetBSD nb1 20110620" \
+			--with-pkgversion="NetBSD nb2 20111202" \
 			${VAX_CONFIGURE_ARGS} \
 			--enable-__cxa_atexit
 .if defined(GCC_CONFIG_ARCH.${MACHINE_ARCH})

Reply via email to