summaryrefslogtreecommitdiffstats
path: root/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-21 06:19:43 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-06-21 06:19:43 +0000
commit94266d638908a140ef5cdd9b27d2eb367f97249f (patch)
treee2cb8f4754b0d67846b3be0dfc38c64e83bffd78 /toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch
parent1b14a20c70b78c037ef4bcc6d1edb61ea8b27e68 (diff)
massive cleanup of toolchain/
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4038 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch')
-rw-r--r--toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch b/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch
new file mode 100644
index 000000000..27f7c07db
--- /dev/null
+++ b/toolchain/gcc/patches/3.4.5/601-gcc34-arm-ldm-peephole2.patch
@@ -0,0 +1,42 @@
+The 30_all_gcc34-arm-ldm-peephole.patch from Debian was conflicting
+with the newer 36_all_pr16201-fix.patch, so i cut out the hunk from
+it that was causing problems and grabbed an updated version from
+upstream cvs.
+
+Index: gcc/config/arm/arm.c
+===================================================================
+RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v
+retrieving revision 1.432
+retrieving revision 1.433
+diff -u -r1.432 -r1.433
+--- gcc-3.4.4/gcc/config/arm/arm.c 29 Mar 2005 03:00:23 -0000 1.432
++++ gcc-3.4.4/gcc/config/arm/arm.c 1 Apr 2005 11:02:22 -0000 1.433
+@@ -5139,6 +5139,10 @@
+ int
+ adjacent_mem_locations (rtx a, rtx b)
+ {
++ /* We don't guarantee to preserve the order of these memory refs. */
++ if (volatile_refs_p (a) || volatile_refs_p (b))
++ return 0;
++
+ if ((GET_CODE (XEXP (a, 0)) == REG
+ || (GET_CODE (XEXP (a, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (a, 0), 1)) == CONST_INT))
+@@ -5178,6 +5182,17 @@
+ return 0;
+
+ val_diff = val1 - val0;
++
++ if (arm_ld_sched)
++ {
++ /* If the target has load delay slots, then there's no benefit
++ to using an ldm instruction unless the offset is zero and
++ we are optimizing for size. */
++ return (optimize_size && (REGNO (reg0) == REGNO (reg1))
++ && (val0 == 0 || val1 == 0 || val0 == 4 || val1 == 4)
++ && (val_diff == 4 || val_diff == -4));
++ }
++
+ return ((REGNO (reg0) == REGNO (reg1))
+ && (val_diff == 4 || val_diff == -4));
+ }