3 # DP: Patch for invalid QImode insn resulting from HImode reload on ARMv3
6 if [ $# -eq 3 -a "$2" = '-d' ]; then
9 elif [ $# -ne 1 ]; then
10 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
15 patch $pdir -f --no-backup-if-mismatch -p0 < $0
16 #cd ${dir}gcc && autoconf
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 #rm ${dir}gcc/configure
23 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
28 --- gcc/config/arm/arm.h.old Thu Feb 19 13:48:41 2004
29 +++ gcc/config/arm/arm.h Thu Feb 19 13:56:31 2004
30 @@ -2003,10 +2003,17 @@
31 && INTVAL (op) <= 31) \
34 - /* NASTY: Since this limits the addressing of unsigned \
36 - range = ((MODE) == HImode || (MODE) == QImode) \
37 - ? (arm_arch4 ? 256 : 4095) : 4096; \
38 + /* XXX For ARM v4 we may be doing a sign-extend operation \
39 + during the load, but that has a restricted addressing \
40 + range and we are unable to tell here whether that is the \
41 + case. To be safe we restrict all loads to that \
44 + range = (mode == HImode || mode == QImode) ? 256 : 4096; \
45 + else if (mode == HImode) \
49 if (code == CONST_INT && INTVAL (INDEX) < range \
50 && INTVAL (INDEX) > -range) \