summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/gcc/gcc-4.1.1/cse.patch75
-rw-r--r--packages/gcc/gcc-cross_4.1.1.bb2
-rw-r--r--packages/gcc/gcc_4.1.1.bb5
3 files changed, 79 insertions, 3 deletions
diff --git a/packages/gcc/gcc-4.1.1/cse.patch b/packages/gcc/gcc-4.1.1/cse.patch
new file mode 100644
index 0000000000..88b22c714f
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1/cse.patch
@@ -0,0 +1,75 @@
+-- gcc-4_1-branch/gcc/cse.c 2006/07/20 14:20:26 115619
++++ gcc-4_1-branch/gcc/cse.c 2006/07/20 15:07:25 115620
+@@ -4697,6 +4697,8 @@
+ unsigned src_const_hash;
+ /* Table entry for constant equivalent for SET_SRC, if any. */
+ struct table_elt *src_const_elt;
++ /* Table entry for the destination address. */
++ struct table_elt *dest_addr_elt;
+ };
+
+ static void
+@@ -5936,6 +5938,40 @@
+ so that the destination goes into that class. */
+ sets[i].src_elt = src_eqv_elt;
+
++ /* Record destination addresses in the hash table. This allows us to
++ check if they are invalidated by other sets. */
++ for (i = 0; i < n_sets; i++)
++ {
++ if (sets[i].rtl)
++ {
++ rtx x = sets[i].inner_dest;
++ struct table_elt *elt;
++ enum machine_mode mode;
++ unsigned hash;
++
++ if (MEM_P (x))
++ {
++ x = XEXP (x, 0);
++ mode = GET_MODE (x);
++ hash = HASH (x, mode);
++ elt = lookup (x, hash, mode);
++ if (!elt)
++ {
++ if (insert_regs (x, NULL, 0))
++ {
++ rehash_using_reg (x);
++ hash = HASH (x, mode);
++ }
++ elt = insert (x, NULL, hash, mode);
++ }
++
++ sets[i].dest_addr_elt = elt;
++ }
++ else
++ sets[i].dest_addr_elt = NULL;
++ }
++ }
++
+ invalidate_from_clobbers (x);
+
+ /* Some registers are invalidated by subroutine calls. Memory is
+@@ -6028,12 +6064,20 @@
+ }
+
+ /* We may have just removed some of the src_elt's from the hash table.
+- So replace each one with the current head of the same class. */
++ So replace each one with the current head of the same class.
++ Also check if destination addresses have been removed. */
+
+ for (i = 0; i < n_sets; i++)
+ if (sets[i].rtl)
+ {
+- if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
++ if (sets[i].dest_addr_elt
++ && sets[i].dest_addr_elt->first_same_value == 0)
++ {
++ /* The elt was removed, which means this destination s not
++ valid after this instruction. */
++ sets[i].rtl = NULL_RTX;
++ }
++ else if (sets[i].src_elt && sets[i].src_elt->first_same_value == 0)
+ /* If elt was removed, find current head of same class,
+ or 0 if nothing remains of that class. */
+ {
diff --git a/packages/gcc/gcc-cross_4.1.1.bb b/packages/gcc/gcc-cross_4.1.1.bb
index 4e3805b676..12053f43d8 100644
--- a/packages/gcc/gcc-cross_4.1.1.bb
+++ b/packages/gcc/gcc-cross_4.1.1.bb
@@ -5,7 +5,7 @@ inherit cross
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
# NOTE: split PR. If the main .oe changes something that affects its *build*
# remember to increment this one too.
-PR = "r5"
+PR = "r6"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/packages/gcc/gcc_4.1.1.bb b/packages/gcc/gcc_4.1.1.bb
index c5af490b17..f9706649db 100644
--- a/packages/gcc/gcc_4.1.1.bb
+++ b/packages/gcc/gcc_4.1.1.bb
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -25,7 +25,8 @@ SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
file://gcc41-configure.in.patch;patch=1 \
file://arm-thumb.patch;patch=1 \
file://arm-thumb-cache.patch;patch=1 \
- file://ldflags.patch;patch=1"
+ file://ldflags.patch;patch=1 \
+ file://cse.patch;patch=1"
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "