]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm.c (arm_legitimate_index_p): For QImode the range of an offset is -4095...+4095...
authorRichard Earnshaw <rearnsha@arm.com>
Wed, 25 Feb 2004 12:30:13 +0000 (12:30 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Wed, 25 Feb 2004 12:30:13 +0000 (12:30 +0000)
* arm.c (arm_legitimate_index_p): For QImode the range of an offset
is -4095...+4095 inclusive.

From-SVN: r78429

gcc/ChangeLog
gcc/config/arm/arm.c

index 78f858b455b09c901a093e3f0870ac9984fcdc5b..ec2d741ac59f16f8ef6c34d3aba1fef3b5baad5b 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-25  Richard Earnshaw  <rearnsha@arm.com>
+
+       * arm.c (arm_legitimate_index_p): For QImode the range of an offset
+       is -4095...+4095 inclusive.
+
 2004-02-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * doc/install.texi (sparc-sun-solaris2* specific notes): Document
index a2ab3d65f82ee4504bde292ab972d6c453d40878..98c05cb6228c724fba652bd10bba3feab42960f8 100644 (file)
@@ -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