]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gcc/gcc-3.3.3/arm-10730.dpatch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gcc / gcc-3.3.3 / arm-10730.dpatch
1 #! /bin/sh -e
2
3 dir=
4 if [ $# -eq 3 -a "$2" = '-d' ]; then
5     pdir="-d $3"
6     dir="$3/"
7 elif [ $# -ne 1 ]; then
8     echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
9     exit 1
10 fi
11 case "$1" in
12     -patch)
13         patch $pdir -f --no-backup-if-mismatch -p0 < $0
14         #cd ${dir}gcc && autoconf
15         ;;
16     -unpatch)
17         patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
18         #rm ${dir}gcc/configure
19         ;;
20     *)
21         echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
22         exit 1
23 esac
24 exit 0
25
26 # DP: 2003-05-15  Philip Blundell  <philb@gnu.org>
27 # DP: 
28 # DP:   PR target/10730
29 # DP:   * config/arm/arm.c (adjacent_mem_locations): Reject offsets
30 # DP:   involving invalid constants.
31
32 Index: arm.c
33 ===================================================================
34 RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
35 retrieving revision 1.271
36 diff -u -p -r1.271 arm.c
37 --- gcc/config/arm/arm.c        10 May 2003 13:10:46 -0000      1.271
38 +++ gcc/config/arm/arm.c        14 May 2003 21:26:26 -0000
39 @@ -4567,6 +4571,12 @@ adjacent_mem_locations (a, b)
40        else
41         reg1 = REGNO (XEXP (b, 0));
42  
43 +      /* Don't accept any offset that will require multiple instructions to handle,
44 +        since this would cause the arith_adjacentmem pattern to output an overlong
45 +        sequence.  */
46 +      if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
47 +       return 0;
48 +      
49        return (reg0 == reg1) && ((val1 - val0) == 4 || (val0 - val1) == 4);
50      }
51    return 0;