Wed Oct 20 15:36:11 1999 Andrew Haley <aph@cygnus.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1999 15:36:33 +0000 (15:36 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1999 15:36:33 +0000 (15:36 +0000)
* config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Take account of
the mode size when finding out if an offset is legal.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30104 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/thumb.h

index 18d7629..fdbde3f 100644 (file)
@@ -1,3 +1,8 @@
+Wed Oct 20 15:36:11 1999  Andrew Haley  <aph@cygnus.com>
+
+       * config/arm/thumb.h (GO_IF_LEGITIMATE_ADDRESS): Take account of
+       the mode size when finding out if an offset is legal.
+
 Wed Oct 20 06:26:58 1999  Richard Henderson  <rth@cygnus.com>
 
        * basic-block.h (PROP_*): Move constants from ...
index 9c30a30..baefb83 100644 (file)
@@ -1007,7 +1007,8 @@ extern int making_const_table;
               && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM           \
               && GET_MODE_SIZE (MODE) >= 4                             \
               && GET_CODE (XEXP (X, 1)) == CONST_INT                   \
-              && (unsigned HOST_WIDE_INT) INTVAL (XEXP (X, 1)) < 1024  \
+              && ((unsigned HOST_WIDE_INT) INTVAL (XEXP (X, 1))        \
+                  + GET_MODE_SIZE (MODE)) <= 1024                      \
               && (INTVAL (XEXP (X, 1)) & 3) == 0)                      \
        goto WIN;                                                       \
     }                                                                  \