rpms/gcc/devel gcc41-power6x.patch, NONE, 1.1 gcc41-pr29154.patch, NONE, 1.1 gcc41-pr29198.patch, NONE, 1.1 gcc41-pr29272.patch, 1.1, 1.2 gcc41-tests.patch, 1.2, 1.3 gcc41.spec, 1.108, 1.109

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Sat Sep 30 19:14:02 UTC 2006


Author: jakub

Update of /cvs/dist/rpms/gcc/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21936

Modified Files:
	gcc41-pr29272.patch gcc41-tests.patch gcc41.spec 
Added Files:
	gcc41-power6x.patch gcc41-pr29154.patch gcc41-pr29198.patch 
Log Message:
4.1.1-28

gcc41-power6x.patch:
 config.gcc               |    4 ++--
 config/rs6000/aix52.h    |    1 +
 config/rs6000/rs6000-c.c |    2 +-
 config/rs6000/rs6000.c   |    4 ++++
 config/rs6000/rs6000.h   |    1 +
 config/rs6000/rs6000.md  |    2 +-
 config/rs6000/rs6000.opt |    2 +-
 doc/invoke.texi          |    6 +++---
 8 files changed, 14 insertions(+), 8 deletions(-)

--- NEW FILE gcc41-power6x.patch ---
2006-09-27  Peter Bergner  <bergner at vnet.ibm.com>

	* config.gcc: Add cpu_type power6x.
	* config/rs6000/aix52.h (ASM_CPU_SPEC): Add power6x.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
	_ARCH_PWR6X, not _ARCH_PWR6, if features enabled.
	* config/rs6000/rs6000.c (processor_target_table): Add power6x.
	Remove MASK_MFPGPR from power6.
	(rs6000_issue_rate): Add CPU_POWER6X.
	* config/rs6000/rs6000.h (ASM_CPU_SPEC): Add power6x.
	* config/rs6000/rs6000.md (define_attr "cpu"): Add power6x.
	* config/rs6000/rs6000.opt (mmfpgpr): Fixup comment.
	* doc/invoke.texi: Add cpu_type power6x
	(RS/6000 and PowerPC Options): Modify -mmfpgpr to be
	a power6x option.

--- gcc/config.gcc.jj	2006-09-27 10:39:25.000000000 -0500
+++ gcc/config.gcc	2006-09-27 10:36:32.000000000 -0500
@@ -296,7 +296,7 @@ powerpc*-*-*)
 	extra_headers="ppc-asm.h altivec.h spe.h"
 	need_64bit_hwint=yes
 	case x$with_cpu in
-	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456]|xrs64a)
+	    xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[3456]|xpower6x|xrs64a)
 		cpu_is_64bit=yes
 		;;
 	esac
@@ -2719,7 +2719,7 @@ case "${target}" in
 				eval "with_$which=405"
 				;;
 			"" | common \
-			| power | power[23456] | powerpc | powerpc64 \
+			| power | power[23456] | power6x | powerpc | powerpc64 \
 			| rios | rios1 | rios2 | rsc | rsc1 | rs64a \
 			| 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
 			| 601 | 602 | 603 | 603e | ec603e | 604 \
--- gcc/config/rs6000/aix52.h.jj	2006-09-27 10:39:41.462677579 -0500
+++ gcc/config/rs6000/aix52.h	2006-09-27 10:36:40.000000000 -0500
@@ -69,6 +69,7 @@ do {									\
 %{mcpu=power5: -m620} \
 %{mcpu=power5+: -m620} \
 %{mcpu=power6: -m620} \
+%{mcpu=power6x: -m620} \
 %{mcpu=powerpc: -mppc} \
 %{mcpu=rs64a: -mppc} \
 %{mcpu=603: -m603} \
--- gcc/config/rs6000/rs6000-c.c.jj	2006-09-27 10:39:51.096655963 -0500
+++ gcc/config/rs6000/rs6000-c.c	2006-09-27 10:36:49.000000000 -0500
@@ -107,7 +107,7 @@ rs6000_cpu_cpp_builtins (cpp_reader *pfi
   if (TARGET_FPRND)
     builtin_define ("_ARCH_PWR5X");
   if (TARGET_MFPGPR)
-    builtin_define ("_ARCH_PWR6");
+    builtin_define ("_ARCH_PWR6X");
   if (! TARGET_POWER && ! TARGET_POWER2 && ! TARGET_POWERPC)
     builtin_define ("_ARCH_COM");
   if (TARGET_ALTIVEC)
--- gcc/config/rs6000/rs6000.c.jj	2006-09-27 10:39:55.649757533 -0500
+++ gcc/config/rs6000/rs6000.c	2006-09-27 13:02:34.643862118 -0500
@@ -1197,6 +1197,9 @@ rs6000_override_options (const char *def
 	  | MASK_MFCRF | MASK_POPCNTB | MASK_FPRND},
 	 {"power6", PROCESSOR_POWER6,
 	  POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB
+	  | MASK_FPRND},
+	 {"power6x", PROCESSOR_POWER6,
+	  POWERPC_7400_MASK | MASK_POWERPC64 | MASK_MFCRF | MASK_POPCNTB
 	  | MASK_FPRND | MASK_MFPGPR},
 	 {"powerpc", PROCESSOR_POWERPC, POWERPC_BASE_MASK},
 	 {"powerpc64", PROCESSOR_POWERPC64,
@@ -16950,6 +16953,7 @@ rs6000_issue_rate (void)
   case CPU_POWER4:
   case CPU_POWER5:
   case CPU_POWER6:
+  case CPU_POWER6X:
     return 5;
   default:
     return 1;
--- gcc/config/rs6000/rs6000.h.jj	2006-09-27 10:39:58.361737453 -0500
+++ gcc/config/rs6000/rs6000.h	2006-09-27 10:37:03.000000000 -0500
@@ -75,6 +75,7 @@
 %{mcpu=power5: -mpower5} \
 %{mcpu=power5+: -mpower5} \
 %{mcpu=power6: -mpower6} \
+%{mcpu=power6x: -mpower6} \
 %{mcpu=powerpc: -mppc} \
 %{mcpu=rios: -mpwr} \
 %{mcpu=rios1: -mpwr} \
--- gcc/config/rs6000/rs6000.md.jj	2006-09-27 10:40:01.804739533 -0500
+++ gcc/config/rs6000/rs6000.md	2006-09-27 10:37:09.000000000 -0500
@@ -103,7 +103,7 @@
 ;; Processor type -- this attribute must exactly match the processor_type
 ;; enumeration in rs6000.h.
 
-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6"
+(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5,power6,power6x"
   (const (symbol_ref "rs6000_cpu_attr")))
 
 (automata_option "ndfa")
--- gcc/config/rs6000/rs6000.opt.jj	2006-09-27 10:40:05.343725685 -0500
+++ gcc/config/rs6000/rs6000.opt	2006-09-27 10:37:15.000000000 -0500
@@ -66,7 +66,7 @@ Use PowerPC V2.02 floating point roundin
 
 mmfpgpr
 Target Report Mask(MFPGPR)
-Use PowerPC V2.05 move floating point to/from GPR instructions
+Use extended PowerPC V2.05 move floating point to/from GPR instructions
 
 maltivec
 Target Report Mask(ALTIVEC)
--- gcc/doc/invoke.texi.jj	2006-09-27 10:40:14.000000000 -0500
+++ gcc/doc/invoke.texi	2006-09-27 10:37:23.000000000 -0500
@@ -10936,8 +10936,8 @@ The @option{-mfprnd} option allows GCC t
 integer instructions implemented on the POWER5+ processor and other
 processors that support the PowerPC V2.03 architecture.
 The @option{-mfpgpr} option allows GCC to generate the FP move to/from
-general purpose register instructions implemented on the POWER6
-processor and other processors that support the PowerPC V2.05
+general purpose register instructions implemented on the POWER6X
+processor and other processors that support the extended PowerPC V2.05
 architecture.
 
 The @option{-mpowerpc64} option allows GCC to generate the additional
@@ -10981,7 +10981,7 @@ Supported values for @var{cpu_type} are 
 @samp{860}, @samp{970}, @samp{8540}, @samp{ec603e}, @samp{G3},
 @samp{G4}, @samp{G5}, @samp{power}, @samp{power2}, @samp{power3},
 @samp{power4}, @samp{power5}, @samp{power5+}, @samp{power6},
- at samp{common}, @samp{powerpc}, @samp{powerpc64},
+ at samp{power6x}, @samp{common}, @samp{powerpc}, @samp{powerpc64},
 @samp{rios}, @samp{rios1}, @samp{rios2}, @samp{rsc}, and @samp{rs64}.
 
 @option{-mcpu=common} selects a completely generic processor.  Code

gcc41-pr29154.patch:
 gimplify.c                                   |   10 ++++--
 testsuite/gcc.c-torture/execute/20060929-1.c |   44 +++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 2 deletions(-)

--- NEW FILE gcc41-pr29154.patch ---
2006-09-29  Jakub Jelinek  <jakub at redhat.com>

	PR c/29154
	* gimplify.c (gimplify_self_mod_expr): Run inner expression's post
	side effects after the outer expression's post side effects.

	* gcc.c-torture/execute/20060929-1.c: New test.

--- gcc/gimplify.c.jj	2006-09-20 00:43:21.000000000 +0200
+++ gcc/gimplify.c	2006-09-29 17:15:06.000000000 +0200
@@ -1896,7 +1896,7 @@ gimplify_self_mod_expr (tree *expr_p, tr
 			bool want_value)
 {
   enum tree_code code;
-  tree lhs, lvalue, rhs, t1;
+  tree lhs, lvalue, rhs, t1, post = NULL, *orig_post_p = post_p;
   bool postfix;
   enum tree_code arith_code;
   enum gimplify_status ret;
@@ -1913,6 +1913,11 @@ gimplify_self_mod_expr (tree *expr_p, tr
   else
     postfix = false;
 
+  /* For postfix, make sure the inner expression's post side effects
+     are executed after side effects from this expression.  */
+  if (postfix)
+    post_p = &post;
+
   /* Add or subtract?  */
   if (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
     arith_code = PLUS_EXPR;
@@ -1943,7 +1948,8 @@ gimplify_self_mod_expr (tree *expr_p, tr
 
   if (postfix)
     {
-      gimplify_and_add (t1, post_p);
+      gimplify_and_add (t1, orig_post_p);
+      append_to_statement_list (post, orig_post_p);
       *expr_p = lhs;
       return GS_ALL_DONE;
     }
--- gcc/testsuite/gcc.c-torture/execute/20060929-1.c.jj	2006-09-29 17:44:46.000000000 +0200
+++ gcc/testsuite/gcc.c-torture/execute/20060929-1.c	2006-09-29 17:44:29.000000000 +0200
@@ -0,0 +1,44 @@
+/* PR c/29154 */
+
+extern void abort (void);
+
+void
+foo (int **p, int *q)
+{
+  *(*p++)++ = *q++;
+}
+
+void
+bar (int **p, int *q)
+{
+  **p = *q++;
+  *(*p++)++;
+}
+
+void
+baz (int **p, int *q)
+{
+  **p = *q++;
+  (*p++)++;
+}
+
+int
+main (void)
+{
+  int i = 42, j = 0;
+  int *p = &i;
+  foo (&p, &j);
+  if (p - 1 != &i || j != 0 || i != 0)
+    abort ();
+  i = 43;
+  p = &i;
+  bar (&p, &j);
+  if (p - 1 != &i || j != 0 || i != 0)
+    abort ();
+  i = 44;
+  p = &i;
+  baz (&p, &j);
+  if (p - 1 != &i || j != 0 || i != 0)
+    abort ();
+  return 0;
+}

gcc41-pr29198.patch:
 config/i386/i386.c            |    2 -
 config/i386/predicates.md     |    3 ++
 testsuite/gcc.dg/tls/opt-12.c |   50 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 1 deletion(-)

--- NEW FILE gcc41-pr29198.patch ---
2006-09-29  Jakub Jelinek  <jakub at redhat.com>

	PR target/29198
	* config/i386/i386.c (legitimize_pic_address): Reject TLS symbols.
	* config/i386/predicates.md (local_symbolic_operand): Likewise.

	* gcc.dg/tls/opt-12.c: New test.

--- gcc/config/i386/predicates.md.jj	2006-08-28 12:59:54.000000000 +0200
+++ gcc/config/i386/predicates.md	2006-09-29 13:23:23.000000000 +0200
@@ -447,6 +447,9 @@
   if (GET_CODE (op) != SYMBOL_REF)
     return 0;
 
+  if (SYMBOL_REF_TLS_MODEL (op) != 0)
+    return 0;
+
   if (SYMBOL_REF_LOCAL_P (op))
     return 1;
 
--- gcc/config/i386/i386.c.jj	2006-09-29 13:07:26.000000000 +0200
+++ gcc/config/i386/i386.c	2006-09-29 13:24:31.000000000 +0200
@@ -6623,7 +6623,7 @@ legitimize_pic_address (rtx orig, rtx re
 	  new = reg;
 	}
     }
-  else if (GET_CODE (addr) == SYMBOL_REF)
+  else if (GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_TLS_MODEL (addr) == 0)
     {
       if (TARGET_64BIT)
 	{
--- gcc/testsuite/gcc.dg/tls/opt-12.c.jj	2006-09-29 13:44:56.000000000 +0200
+++ gcc/testsuite/gcc.dg/tls/opt-12.c	2006-09-29 13:47:11.000000000 +0200
@@ -0,0 +1,50 @@
+/* PR target/29198 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-require-effective-target tls_runtime } */
+/* { dg-require-effective-target fpic } */
+
+extern void abort (void);
+
+int f2 (int, int, int, int);
+struct s { char b[4]; };
+__thread struct s thra[2];
+
+void
+__attribute__((noinline))
+f1 (int a1, int a2)
+{
+  int i, j;
+  for (i = 0; i < 4; i++)
+    {
+      int tot = 0;
+      for (j = 0; j < 4; j++)
+	tot += f2 (a1, a2, i, j);
+      *(&thra[0].b[0] + i) = tot;
+    }
+}
+
+int
+__attribute__((noinline))
+f2 (int a, int b, int c, int d)
+{
+  return a + b + c + d;
+}
+
+int
+main (void)
+{
+  f1 (0, 0);
+  if (thra[0].b[0] != 6
+      || thra[0].b[1] != 10
+      || thra[0].b[2] != 14
+      || thra[0].b[3] != 18)
+    abort ();
+  f1 (2, 3);
+  if (thra[0].b[0] != 26
+      || thra[0].b[1] != 30
+      || thra[0].b[2] != 34
+      || thra[0].b[3] != 38)
+    abort ();
+  return 0;
+}

gcc41-pr29272.patch:
 builtins.c                                   |   31 +++++++++++++++++++++++++--
 testsuite/gcc.c-torture/execute/20060930-1.c |   31 +++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 2 deletions(-)

Index: gcc41-pr29272.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41-pr29272.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gcc41-pr29272.patch	28 Sep 2006 19:13:28 -0000	1.1
+++ gcc41-pr29272.patch	30 Sep 2006 19:13:59 -0000	1.2
@@ -4,6 +4,8 @@
 	* builtins.c (fold_builtin_memset, fold_builtin_memory_op): Restrict
 	single entry optimization to variables and components thereof.
 
+	* gcc.c-torture/execute/20060930-1.c: New test.
+
 --- gcc/builtins.c.jj	2006-09-22 10:29:55.000000000 +0200
 +++ gcc/builtins.c	2006-09-28 20:31:30.000000000 +0200
 @@ -7905,7 +7905,7 @@ fold_builtin_exponent (tree fndecl, tree
@@ -72,3 +74,37 @@
        length = tree_low_cst (len, 1);
        if (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (destvar))) != length
  	  || get_pointer_alignment (dest, BIGGEST_ALIGNMENT) / BITS_PER_UNIT
+--- gcc/testsuite/gcc.c-torture/execute/20060930-1.c.jj	2006-09-30 21:10:17.000000000 +0200
++++ gcc/testsuite/gcc.c-torture/execute/20060930-1.c	2006-09-30 21:09:33.000000000 +0200
+@@ -0,0 +1,31 @@
++/* PR middle-end/29272 */
++
++extern void abort (void);
++
++struct S { struct S *s; } s;
++struct T { struct T *t; } t;
++
++static inline void
++foo (void *s)
++{
++  struct T *p = s;
++  __builtin_memcpy (&p->t, &t.t, sizeof (t.t));
++}
++
++void *
++__attribute__((noinline))
++bar (void *p, struct S *q)
++{
++  q->s = &s;
++  foo (p);
++  return q->s;
++}
++
++int
++main (void)
++{
++  t.t = &t;
++  if (bar (&s, &s) != (void *) &t)
++    abort ();
++  return 0;
++}

gcc41-tests.patch:
 g++.dg/opt/pr15054-2.C             |   39 ++++++++++++++++++++
 gcc.c-torture/execute/20060412-1.c |   33 +++++++++++++++++
 gcc.c-torture/execute/20060420-1.c |   71 +++++++++++++++++++++++++++++++++++++
 gcc.dg/20060425-2.c                |   10 +++++
 gcc.dg/tls/opt-13.c                |   16 ++++++++
 gcc.target/powerpc/altivec-23.c    |   25 +++++++++++++
 6 files changed, 194 insertions(+)

Index: gcc41-tests.patch
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41-tests.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gcc41-tests.patch	8 May 2006 11:07:21 -0000	1.2
+++ gcc41-tests.patch	30 Sep 2006 19:13:59 -0000	1.3
@@ -1,6 +1,6 @@
 2006-05-05  Jakub Jelinek  <jakub at redhat.com>
 
-	* gcc.dg/tls/opt-12.c: New test.
+	* gcc.dg/tls/opt-13.c: New test.
 
 2006-04-25  Jakub Jelinek  <jakub at redhat.com>
 
@@ -213,8 +213,8 @@
 +    v = 0.;
 +  return v;
 +}
---- gcc/testsuite/gcc.dg/tls/opt-12.c	2006-04-19 19:21:31.748476000 +0200
-+++ gcc/testsuite/gcc.dg/tls/opt-12.c	2006-05-05 11:01:33.000000000 +0200
+--- gcc/testsuite/gcc.dg/tls/opt-13.c	2006-04-19 19:21:31.748476000 +0200
++++ gcc/testsuite/gcc.dg/tls/opt-13.c	2006-05-05 11:01:33.000000000 +0200
 @@ -0,0 +1,16 @@
 +/* { dg-do compile } */
 +/* { dg-options "-O2" } */


Index: gcc41.spec
===================================================================
RCS file: /cvs/dist/rpms/gcc/devel/gcc41.spec,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- gcc41.spec	28 Sep 2006 19:13:28 -0000	1.108
+++ gcc41.spec	30 Sep 2006 19:13:59 -0000	1.109
@@ -1,6 +1,6 @@
 %define DATE 20060928
 %define gcc_version 4.1.1
-%define gcc_release 27
+%define gcc_release 28
 %define _unpackaged_files_terminate_build 0
 %define multilib_64_archs sparc64 ppc64 s390x x86_64
 %ifarch %{ix86} x86_64 ia64
@@ -135,6 +135,9 @@
 Patch27: gcc41-pr29272.patch
 Patch28: gcc41-pr29059.patch
 Patch29: gcc41-strncat-chk.patch
+Patch30: gcc41-pr29154.patch
+Patch31: gcc41-pr29198.patch
+Patch32: gcc41-power6x.patch
 
 %define _gnu %{nil}
 %ifarch sparc
@@ -447,6 +450,9 @@
 %patch27 -p0 -b .pr29272~
 %patch28 -p0 -b .pr29059~
 %patch29 -p0 -b .strncat-chk~
+%patch30 -p0 -b .pr29154~
+%patch31 -p0 -b .pr29198~
+%patch32 -p0 -b .power6x~
 
 sed -i -e 's/4\.1\.2/4.1.1/' gcc/BASE-VER gcc/version.c
 sed -i -e 's/" (Red Hat[^)]*)"/" (Red Hat %{version}-%{gcc_release})"/' gcc/version.c
@@ -1508,6 +1514,11 @@
 %doc rpm.doc/changelogs/libmudflap/ChangeLog*
 
 %changelog
+* Sat Sep 30 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-28
+- fix i386/x86_64 legitimize_pic_address with TLS symbols (PR target/29198)
+- fix gimplification of post-increment with side-effects on the inner
+  expression (PR c/29154)
+
 * Thu Sep 28 2006 Jakub Jelinek <jakub at redhat.com> 4.1.1-27
 - update from gcc-4_1-branch (-r117225:117266)
   - PR target/29230




More information about the fedora-cvs-commits mailing list