Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/7] Fixes to some gcc 4.5.1 bugs
@ 2011-07-19  1:00 Ilya Yanok
  2011-07-19  1:00 ` [PATCH 1/7] gcc_4.5.1: fix arm_bswapsi2.patch Ilya Yanok
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core

Hi everybody,

It seems like everybody are using GCC 4.6 already but as support for
GCC 4.5.1 is still here I'd like to publish the changes we've done to
GCC 4.5.1 recipe some time ago.

We've incorporated the patches for some know GCC 4.5.1 problems:
 PR44392: Already fixed by arm_bswapsi2 patch but the patch differs
slightly from the one in the gcc tree.
 PR43810: linking with optspace on PowerPC results in undefined
references to _savegpr_* _restgpr_*_x. Added the patch from bugzilla
but the issue is still here.
 PR44290: __naked attribute is broken on ARM.
 PR44606: Wrong SPE floating point during computation (PowerPC).
 PR45094: [arm] wrong instructions for dword move in some cases.
 PR45052: volatile ignored
 PR45886: [ARM] support for __ARM_PCS_VFP predefined symbol

Hope this will be useful for someone.

Regards, Ilya.
 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/7] gcc_4.5.1: fix arm_bswapsi2.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 2/7] gcc_4.5.1: add pr43810.patch Ilya Yanok
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Acoording to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44392
correct fix should be
TARGET_EITHER && (arm_arch6 || !optimize_size)
not
TARGET_EITHER && (arm_arch6 && !optimize_size)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 .../gcc/gcc-4.5.1/arm-bswapsi2.patch               |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/arm-bswapsi2.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/arm-bswapsi2.patch
index 9b9f874..a7a6684 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1/arm-bswapsi2.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/arm-bswapsi2.patch
@@ -9,7 +9,7 @@ Index: gcc-4.5/gcc/config/arm/arm.md
    [(set (match_operand:SI 0 "s_register_operand" "=r")
    	(bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
 -"TARGET_EITHER"
-+"TARGET_EITHER && (arm_arch6 && !optimize_size)"
++"TARGET_EITHER && (arm_arch6 || !optimize_size)"
  "
    if (!arm_arch6)
      {
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] gcc_4.5.1: add pr43810.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
  2011-07-19  1:00 ` [PATCH 1/7] gcc_4.5.1: fix arm_bswapsi2.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 3/7] gcc_4.5.1: add pr44290.patch Ilya Yanok
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR43810 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810

Building on powerpc-eabi* with --enable-target-optspace
still fails for me though.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr43810.patch |   57 +++++++++++++++++++++
 2 files changed, 58 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr43810.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index 76f9837..efed414 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -58,6 +58,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
 	   file://COLLECT_GCC_OPTIONS.patch \
 	   file://use-defaults.h-and-t-oe-in-B.patch \
+	   file://pr43810.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr43810.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr43810.patch
new file mode 100644
index 0000000..e9db4c0
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr43810.patch
@@ -0,0 +1,57 @@
+From 33ba46dc9395d7a6b1496e9f273cf953d59a8d71 Mon Sep 17 00:00:00 2001
+From: froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 23 Feb 2011 18:06:29 +0000
+Subject: [PATCH 1/6] PR target/43810
+
+	Backport from mainline:
+	2010-07-23  Nathan Froyd  <froydnj@codesourcery.com>
+
+	* config.host (powerpc*-eabispe*): Set tmake_file.
+	(powerpc*-eabi*): Likewise.
+	* config/rs6000/t-ppccomm (EXTRA_PARTS): Add crtbegin, crtend,
+	crtbeginS, crtendS, crtbeginT.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@170443 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/config.host             |    2 ++
+ libgcc/config/rs6000/t-ppccomm |    4 +++-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/libgcc/config.host b/libgcc/config.host
+index fe3465e..f85c723 100644
+--- a/libgcc/config.host
++++ b/libgcc/config.host
+@@ -454,6 +454,7 @@ powerpc*-*-freebsd*)
+ powerpc-*-netbsd*)
+ 	;;
+ powerpc-*-eabispe*)
++	tmake_file="${tmake_file} rs6000/t-ppccomm"
+ 	;;
+ powerpc-*-eabisimaltivec*)
+ 	;;
+@@ -464,6 +465,7 @@ powerpc-*-elf*)
+ powerpc-*-eabialtivec*)
+ 	;;
+ powerpc-*-eabi*)
++	tmake_file="${tmake_file} rs6000/t-ppccomm"
+ 	;;
+ powerpc-*-rtems*)
+ 	;;
+diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm
+index 1a711eb..4548cd7 100644
+--- a/libgcc/config/rs6000/t-ppccomm
++++ b/libgcc/config/rs6000/t-ppccomm
+@@ -15,7 +15,9 @@ LIB2ADD_ST += crtsavfpr.S crtresfpr.S \
+   e500crtsavg64gpr.S \
+   e500crtsavg64gprctr.S
+ 
+-EXTRA_PARTS += ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
++EXTRA_PARTS += crtbegin$(objext) crtend$(objext) \
++  crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \
++  ecrti$(objext) ecrtn$(objext) ncrti$(objext) ncrtn$(objext)
+ 
+ # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
+ # end labels to all of the special sections used when we link using gcc.
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] gcc_4.5.1: add pr44290.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
  2011-07-19  1:00 ` [PATCH 1/7] gcc_4.5.1: fix arm_bswapsi2.patch Ilya Yanok
  2011-07-19  1:00 ` [PATCH 2/7] gcc_4.5.1: add pr43810.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 4/7] gcc_4.5.1: add pr44606.patch Ilya Yanok
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR44290 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44290

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr44290.patch |  119 +++++++++++++++++++++
 2 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr44290.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index efed414..99f2ad6 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -59,6 +59,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://COLLECT_GCC_OPTIONS.patch \
 	   file://use-defaults.h-and-t-oe-in-B.patch \
 	   file://pr43810.patch \
+	   file://pr44290.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr44290.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44290.patch
new file mode 100644
index 0000000..9cf187a
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44290.patch
@@ -0,0 +1,119 @@
+From cb13264f07c419149b86e19c2187729bda8dd47d Mon Sep 17 00:00:00 2001
+From: jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 23 Jul 2010 14:47:46 +0000
+Subject: [PATCH 2/6] PR target/44290 * attribs.c (decl_attributes): Insert "noinline" and "noclone" if "naked". * tree-sra.c (ipa_sra_preliminary_function_checks): Return false if ! tree_versionable_function_p.
+
+	testsuite/
+	PR target/44290
+	* gcc.dg/pr44290-1.c: New test.
+	* gcc.dg/pr44290-2.c: New test.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162466 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/attribs.c                    |   13 +++++++++++++
+ gcc/testsuite/gcc.dg/pr44290-1.c |   18 ++++++++++++++++++
+ gcc/testsuite/gcc.dg/pr44290-2.c |   24 ++++++++++++++++++++++++
+ gcc/tree-sra.c                   |    7 +++++++
+ 4 files changed, 62 insertions(+), 0 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr44290-1.c
+ create mode 100644 gcc/testsuite/gcc.dg/pr44290-2.c
+
+diff --git a/gcc/attribs.c b/gcc/attribs.c
+index 4d91a0d..2e06608 100644
+--- a/gcc/attribs.c
++++ b/gcc/attribs.c
+@@ -278,6 +278,19 @@ decl_attributes (tree *node, tree attributes, int flags)
+ 	TREE_VALUE (cur_attr) = chainon (opts, TREE_VALUE (cur_attr));
+     }
+ 
++  /* A "naked" function attribute implies "noinline" and "noclone" for
++     those targets that support it.  */
++  if (TREE_CODE (*node) == FUNCTION_DECL
++      && lookup_attribute_spec (get_identifier ("naked"))
++      && lookup_attribute ("naked", attributes) != NULL)
++    {
++      if (lookup_attribute ("noinline", attributes) == NULL)
++	attributes = tree_cons (get_identifier ("noinline"), NULL, attributes);
++
++      if (lookup_attribute ("noclone", attributes) == NULL)
++	attributes = tree_cons (get_identifier ("noclone"),  NULL, attributes);
++    }
++
+   targetm.insert_attributes (*node, &attributes);
+ 
+   for (a = attributes; a; a = TREE_CHAIN (a))
+diff --git a/gcc/testsuite/gcc.dg/pr44290-1.c b/gcc/testsuite/gcc.dg/pr44290-1.c
+new file mode 100644
+index 0000000..071a271
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr44290-1.c
+@@ -0,0 +1,18 @@
++/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */
++/* { dg-options "-O2 -fdump-tree-optimized" } */
++
++static void __attribute__((naked))
++foo(void *from, void *to)
++{
++  asm volatile("dummy"::"r"(from), "r"(to));
++}
++
++unsigned int fie[2];
++
++void fum(void *to)
++{
++  foo(fie, to);
++}
++
++/* { dg-final { scan-tree-dump "foo \\\(void \\\* from, void \\\* to\\\)" "optimized" } } */
++/* { dg-final { cleanup-tree-dump "optimized" } } */
+diff --git a/gcc/testsuite/gcc.dg/pr44290-2.c b/gcc/testsuite/gcc.dg/pr44290-2.c
+new file mode 100644
+index 0000000..1951a51
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr44290-2.c
+@@ -0,0 +1,24 @@
++/* { dg-do compile { target arm*-*-* avr-*-* mcore-*-* rx-*-* spu-*-* } } */
++/* { dg-options "-O2 -fdump-tree-optimized" } */
++
++static unsigned long __attribute__((naked))
++foo (unsigned long base)
++{
++  asm volatile ("dummy");
++}
++unsigned long
++bar (void)
++{
++  static int start, set;
++
++  if (!set)
++    {
++      set = 1;
++      start = foo (0);
++    }
++
++  return foo (start);
++}
++
++/* { dg-final { scan-tree-dump "foo \\\(long unsigned int base\\\)" "optimized" } } */
++/* { dg-final { cleanup-tree-dump "optimized" } } */
+diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
+index 6a5b577..ea37d97 100644
+--- a/gcc/tree-sra.c
++++ b/gcc/tree-sra.c
+@@ -4126,6 +4126,13 @@ modify_function (struct cgraph_node *node, ipa_parm_adjustment_vec adjustments)
+ static bool
+ ipa_sra_preliminary_function_checks (struct cgraph_node *node)
+ {
++  if (!tree_versionable_function_p (current_function_decl))
++    {
++      if (dump_file)
++	fprintf (dump_file, "Function isn't allowed to be versioned.\n");
++      return false;
++    }
++
+   if (!cgraph_node_can_be_local_p (node))
+     {
+       if (dump_file)
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] gcc_4.5.1: add pr44606.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
                   ` (2 preceding siblings ...)
  2011-07-19  1:00 ` [PATCH 3/7] gcc_4.5.1: add pr44290.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 5/7] gcc_4.5.1: add pr45094.patch Ilya Yanok
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR44606 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44606

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch |  106 +++++++++++++++++++++
 2 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index 99f2ad6..e84df82 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -60,6 +60,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://use-defaults.h-and-t-oe-in-B.patch \
 	   file://pr43810.patch \
 	   file://pr44290.patch \
+	   file://pr44606.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch
new file mode 100644
index 0000000..dd590bb
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch
@@ -0,0 +1,106 @@
+From aff0ca6587a2f0849db55eef62a85bc8721869f2 Mon Sep 17 00:00:00 2001
+From: froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 1 Feb 2011 02:11:54 +0000
+Subject: [PATCH 3/6] gcc/ Backport from mainline: 2010-12-30 Nathan Froyd <froydnj@codesourcery.com>
+
+        PR target/44606
+        * reload1.c (choose_reload_regs): Don't look for equivalences for
+        output reloads of constant loads.
+
+gcc/testsuite/
+	Backport from mainline:
+	2010-12-30  Nathan Froyd  <froydnj@codesourcery.com>
+
+        PR target/44606
+        * gcc.dg/pr44606.c: New test.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@169465 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/reload1.c                  |   11 --------
+ gcc/testsuite/gcc.dg/pr44606.c |   52 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 52 insertions(+), 11 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr44606.c
+
+diff --git a/gcc/reload1.c b/gcc/reload1.c
+index 02fef2d..5732677 100644
+--- a/gcc/reload1.c
++++ b/gcc/reload1.c
+@@ -6273,17 +6273,6 @@ choose_reload_regs (struct insn_chain *chain)
+ 	      && (rld[r].nregs == max_group_size
+ 		  || ! reg_classes_intersect_p (rld[r].rclass, group_class)))
+ 	    search_equiv = rld[r].in;
+-	  /* If this is an output reload from a simple move insn, look
+-	     if an equivalence for the input is available.  */
+-	  else if (inheritance && rld[r].in == 0 && rld[r].out != 0)
+-	    {
+-	      rtx set = single_set (insn);
+-
+-	      if (set
+-		  && rtx_equal_p (rld[r].out, SET_DEST (set))
+-		  && CONSTANT_P (SET_SRC (set)))
+-		search_equiv = SET_SRC (set);
+-	    }
+ 
+ 	  if (search_equiv)
+ 	    {
+diff --git a/gcc/testsuite/gcc.dg/pr44606.c b/gcc/testsuite/gcc.dg/pr44606.c
+new file mode 100644
+index 0000000..3929775
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr44606.c
+@@ -0,0 +1,52 @@
++/* PR target/44606 */
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++#include <stdio.h>
++
++extern void abort (void);
++
++ typedef struct _PixelPacket { 	unsigned char r, g, b; }
++ PixelPacket;
++#define ARRAYLEN(X) (sizeof(X)/sizeof(X[0]))
++PixelPacket q[6];
++#define COLS (ARRAYLEN(q) - 1)
++PixelPacket p[2*COLS + 22];
++#define Minify(POS, WEIGHT) do {	\
++	total_r += (WEIGHT)*(p[POS].r);	\
++	total_g += (WEIGHT)*(p[POS].g);	\
++	total_b += (WEIGHT)*(p[POS].b);	\
++} while (0)
++unsigned long columns = COLS;
++int main(void)
++{
++	static const unsigned char answers[COLS] = { 31, 32, 34, 35, 36 };
++	unsigned long x;
++	for (x = 0; x < sizeof(p)/sizeof(p[0]); x++) {
++		p[x].b = (x + 34) | 1;
++	}
++	for (x = 0; x < columns; x++) {
++		double total_r = 0, total_g = 0, total_b = 0;
++		double saved_r = 0, saved_g = 0, saved_b = 0;
++		Minify(2*x +  0,  3.0);
++		Minify(2*x +  1,  7.0);
++		Minify(2*x +  2,  7.0);
++		saved_r = total_r;
++		saved_g = total_g;
++		Minify(2*x + 11, 15.0);
++		Minify(2*x + 12,  7.0);
++		Minify(2*x + 18,  7.0);
++		Minify(2*x + 19, 15.0);
++		Minify(2*x + 20, 15.0);
++		Minify(2*x + 21,  7.0);
++		q[x].r = (unsigned char)(total_r/128.0 + 0.5);
++		q[x].g = (unsigned char)(total_g/128.0 + 0.5);
++		q[x].b = (unsigned char)(total_b/128.0 + 0.5);
++		fprintf(stderr, "r:%f g:%f b:%f\n", saved_r, saved_g, saved_b);
++	}
++	for (x = 0; x < COLS; x++) {
++		if (answers[x] != q[x].b)
++			abort();
++	}
++	return 0;
++}
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] gcc_4.5.1: add pr45094.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
                   ` (3 preceding siblings ...)
  2011-07-19  1:00 ` [PATCH 4/7] gcc_4.5.1: add pr44606.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 6/7] gcc_4.5.1: add pr45052.patch Ilya Yanok
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR45094 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45094

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr45094.patch |   75 +++++++++++++++++++++
 2 files changed, 76 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr45094.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index e84df82..2473775 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -61,6 +61,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://pr43810.patch \
 	   file://pr44290.patch \
 	   file://pr44606.patch \
+	   file://pr45094.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr45094.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45094.patch
new file mode 100644
index 0000000..182e005
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45094.patch
@@ -0,0 +1,75 @@
+From 34bd4baaa0f6583f9ff99544c732350c199ec0e2 Mon Sep 17 00:00:00 2001
+From: qiyao <qiyao@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 18 Aug 2010 12:33:43 +0000
+Subject: [PATCH 4/6] gcc/ PR target/45094 * config/arm/arm.c (output_move_double): Fix typo generating instructions ('ldr'->'str').
+
+gcc/testsuite/
+
+        PR target/45094
+        * gcc.target/arm/pr45094.c: New test.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163338 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/arm/arm.c                   |    8 ++++----
+ gcc/testsuite/gcc.target/arm/pr45094.c |   27 +++++++++++++++++++++++++++
+ 2 files changed, 31 insertions(+), 4 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/arm/pr45094.c
+
+diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
+index a06a38b..0382b24 100644
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -12182,13 +12182,13 @@ output_move_double (rtx *operands)
+ 	    {
+ 	      if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
+ 		{
+-		  output_asm_insn ("ldr%?\t%0, [%1, %2]!", otherops);
+-		  output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
++		  output_asm_insn ("str%?\t%0, [%1, %2]!", otherops);
++		  output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
+ 		}
+ 	      else
+ 		{
+-		  output_asm_insn ("ldr%?\t%H0, [%1, #4]", otherops);
+-		  output_asm_insn ("ldr%?\t%0, [%1], %2", otherops);
++		  output_asm_insn ("str%?\t%H0, [%1, #4]", otherops);
++		  output_asm_insn ("str%?\t%0, [%1], %2", otherops);
+ 		}
+ 	    }
+ 	  else if (GET_CODE (XEXP (operands[0], 0)) == PRE_MODIFY)
+diff --git a/gcc/testsuite/gcc.target/arm/pr45094.c b/gcc/testsuite/gcc.target/arm/pr45094.c
+new file mode 100644
+index 0000000..05f16d8
+--- /dev/null
++++ b/gcc/testsuite/gcc.target/arm/pr45094.c
+@@ -0,0 +1,27 @@
++/* { dg-do run } */
++/* { dg-require-effective-target arm_neon_hw } */
++/* { dg-options "-O2 -mcpu=cortex-a8" } */
++/* { dg-add-options arm_neon } */
++
++#include <stdlib.h>
++
++long long buffer[32];
++
++void __attribute__((noinline)) f(long long *p, int n)
++{
++  while (--n >= 0)
++    {
++      *p = 1;
++      p += 32;
++    }
++}
++
++int main(void)
++{
++  f(buffer, 1);
++  
++  if (!buffer[0])
++    abort();
++
++  return 0;
++}
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] gcc_4.5.1: add pr45052.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
                   ` (4 preceding siblings ...)
  2011-07-19  1:00 ` [PATCH 5/7] gcc_4.5.1: add pr45094.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-19  1:00 ` [PATCH 7/7] gcc_4.5.1: add pr45886.patch Ilya Yanok
  2011-07-20 16:48 ` [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Saul Wold
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR45052 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45052

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr45052.patch |   30 +++++++++++++++++++++
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr45052.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index 2473775..03dca08 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -62,6 +62,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://pr44290.patch \
 	   file://pr44606.patch \
 	   file://pr45094.patch \
+	   file://pr45052.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr45052.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45052.patch
new file mode 100644
index 0000000..855a823
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45052.patch
@@ -0,0 +1,30 @@
+From 138f1af2d77d56762a2c2af4759efd53c275b67e Mon Sep 17 00:00:00 2001
+From: Ilya Yanok <yanok@emcraft.com>
+Date: Mon, 21 Mar 2011 00:49:43 +0100
+Subject: [PATCH 5/6] PR45052
+
+---
+ gcc/ipa-pure-const.c |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
+index 166dabb..da9d5d6 100644
+--- a/gcc/ipa-pure-const.c
++++ b/gcc/ipa-pure-const.c
+@@ -416,6 +416,13 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa)
+       print_gimple_stmt (dump_file, stmt, 0, 0);
+     }
+ 
++  if (gimple_has_volatile_ops (stmt))
++    {
++      local->pure_const_state = IPA_NEITHER;
++      if (dump_file)
++	fprintf (dump_file, "    Volatile stmt is not const/pure\n");
++    }
++
+   /* Look for loads and stores.  */
+   walk_stmt_load_store_ops (stmt, local, check_load, check_store);
+ 
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] gcc_4.5.1: add pr45886.patch
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
                   ` (5 preceding siblings ...)
  2011-07-19  1:00 ` [PATCH 6/7] gcc_4.5.1: add pr45052.patch Ilya Yanok
@ 2011-07-19  1:00 ` Ilya Yanok
  2011-07-20 16:48 ` [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Saul Wold
  7 siblings, 0 replies; 9+ messages in thread
From: Ilya Yanok @ 2011-07-19  1:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ilya Yanok

Add fix for PR45886 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45886

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---
 meta/recipes-devtools/gcc/gcc-4.5.1.inc           |    1 +
 meta/recipes-devtools/gcc/gcc-4.5.1/pr45886.patch |   55 +++++++++++++++++++++
 2 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/pr45886.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
index 03dca08..1b21a75 100644
--- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc
@@ -63,6 +63,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   file://pr44606.patch \
 	   file://pr45094.patch \
 	   file://pr45052.patch \
+	   file://pr45886.patch \
 	  "
 	
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr45886.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45886.patch
new file mode 100644
index 0000000..36aa37e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr45886.patch
@@ -0,0 +1,55 @@
+From d066d0682da4e60b811d9282b00128244caa5c29 Mon Sep 17 00:00:00 2001
+From: Ilya Yanok <yanok@emcraft.com>
+Date: Mon, 21 Mar 2011 00:55:25 +0100
+Subject: [PATCH 6/6] PR45886
+
+---
+ gcc/config/arm/arm.c |    2 +-
+ gcc/config/arm/arm.h |   11 ++++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
+index 0382b24..5634829 100644
+--- a/gcc/config/arm/arm.c
++++ b/gcc/config/arm/arm.c
+@@ -700,7 +700,7 @@ static int after_arm_reorg = 0;
+ /* The maximum number of insns to be used when loading a constant.  */
+ static int arm_constant_limit = 3;
+ 
+-static enum arm_pcs arm_pcs_default;
++enum arm_pcs arm_pcs_default;
+ 
+ /* For an explanation of these variables, see final_prescan_insn below.  */
+ int arm_ccfsm_state;
+diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
+index 26ffaf8..ac7bbb3 100644
+--- a/gcc/config/arm/arm.h
++++ b/gcc/config/arm/arm.h
+@@ -94,7 +94,13 @@ extern char arm_arch_name[];
+ 	if (arm_arch_iwmmxt)				\
+ 	  builtin_define ("__IWMMXT__");		\
+ 	if (TARGET_AAPCS_BASED)				\
+-	  builtin_define ("__ARM_EABI__");		\
++	  {						\
++	    if (arm_pcs_default == ARM_PCS_AAPCS_VFP)	\
++	      builtin_define ("__ARM_PCS_VFP");		\
++	    else if (arm_pcs_default == ARM_PCS_AAPCS)	\
++	      builtin_define ("__ARM_PCS");		\
++	    builtin_define ("__ARM_EABI__");		\
++	  }						\
+     } while (0)
+ 
+ /* The various ARM cores.  */
+@@ -1648,6 +1654,9 @@ enum arm_pcs
+   ARM_PCS_UNKNOWN
+ };
+ 
++/* Default procedure calling standard of current compilation unit. */
++extern enum arm_pcs arm_pcs_default;
++
+ /* A C type for declaring a variable that is used as the first argument of
+    `FUNCTION_ARG' and other related values.  */
+ typedef struct
+-- 
+1.7.4
+
-- 
1.7.6




^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/7] Fixes to some gcc 4.5.1 bugs
  2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
                   ` (6 preceding siblings ...)
  2011-07-19  1:00 ` [PATCH 7/7] gcc_4.5.1: add pr45886.patch Ilya Yanok
@ 2011-07-20 16:48 ` Saul Wold
  7 siblings, 0 replies; 9+ messages in thread
From: Saul Wold @ 2011-07-20 16:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Ilya Yanok

On 07/18/2011 06:00 PM, Ilya Yanok wrote:
> Hi everybody,
>
> It seems like everybody are using GCC 4.6 already but as support for
> GCC 4.5.1 is still here I'd like to publish the changes we've done to
> GCC 4.5.1 recipe some time ago.
>
> We've incorporated the patches for some know GCC 4.5.1 problems:
>   PR44392: Already fixed by arm_bswapsi2 patch but the patch differs
> slightly from the one in the gcc tree.
>   PR43810: linking with optspace on PowerPC results in undefined
> references to _savegpr_* _restgpr_*_x. Added the patch from bugzilla
> but the issue is still here.
>   PR44290: __naked attribute is broken on ARM.
>   PR44606: Wrong SPE floating point during computation (PowerPC).
>   PR45094: [arm] wrong instructions for dword move in some cases.
>   PR45052: volatile ignored
>   PR45886: [ARM] support for __ARM_PCS_VFP predefined symbol
>
> Hope this will be useful for someone.
>
> Regards, Ilya.
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-07-20 16:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19  1:00 [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Ilya Yanok
2011-07-19  1:00 ` [PATCH 1/7] gcc_4.5.1: fix arm_bswapsi2.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 2/7] gcc_4.5.1: add pr43810.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 3/7] gcc_4.5.1: add pr44290.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 4/7] gcc_4.5.1: add pr44606.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 5/7] gcc_4.5.1: add pr45094.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 6/7] gcc_4.5.1: add pr45052.patch Ilya Yanok
2011-07-19  1:00 ` [PATCH 7/7] gcc_4.5.1: add pr45886.patch Ilya Yanok
2011-07-20 16:48 ` [PATCH 0/7] Fixes to some gcc 4.5.1 bugs Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox