From: Richard Earnshaw Date: Wed, 25 Feb 2004 12:30:13 +0000 (+0000) Subject: arm.c (arm_legitimate_index_p): For QImode the range of an offset is -4095...+4095... X-Git-Tag: releases/gcc-4.0.0~9863 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1471c91b8215ed17e1f4dde075eee0e9f0f804b;p=thirdparty%2Fgcc.git arm.c (arm_legitimate_index_p): For QImode the range of an offset is -4095...+4095 inclusive. * arm.c (arm_legitimate_index_p): For QImode the range of an offset is -4095...+4095 inclusive. From-SVN: r78429 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78f858b455b0..ec2d741ac59f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-25 Richard Earnshaw + + * arm.c (arm_legitimate_index_p): For QImode the range of an offset + is -4095...+4095 inclusive. + 2004-02-25 Eric Botcazou * doc/install.texi (sparc-sun-solaris2* specific notes): Document diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a2ab3d65f82e..98c05cb6228c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2979,8 +2979,10 @@ arm_legitimate_index_p (enum machine_mode mode, rtx index, int strict_p) load, but that has a restricted addressing range and we are unable to tell here whether that is the case. To be safe we restrict all loads to that range. */ - range = ((mode) == HImode || (mode) == QImode) - ? (arm_arch4 ? 256 : 4095) : 4096; + if (arm_arch4) + range = (mode == HImode || mode == QImode) ? 256 : 4096; + else + range = (mode == HImode) ? 4095 : 4096; return (code == CONST_INT && INTVAL (index) < range