OSDN Git Service

PR target/31232
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Mar 2008 12:32:22 +0000 (12:32 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 26 Mar 2008 12:32:22 +0000 (12:32 +0000)
   * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Do
   not allow INT+INT as a legitimate addressing mode.

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

gcc/ChangeLog
gcc/config/stormy16/stormy16.c

index 571d940..d31e6ad 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-26  Nick Clifton  <nickc@redhat.com>
+
+       PR target/31232
+       * config/stormy16/stormy16.c (xstormy16_legitimate_address_p): Do
+       not allow INT+INT as a legitimate addressing mode.
+
 2008-03-26  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (widen_bitfield): Remove declaration.
 2008-03-26  Richard Guenther  <rguenther@suse.de>
 
        * tree-flow.h (widen_bitfield): Remove declaration.
index a4c1746..078b367 100644 (file)
@@ -629,7 +629,12 @@ xstormy16_legitimate_address_p (enum machine_mode mode ATTRIBUTE_UNUSED,
 
   if (GET_CODE (x) == PLUS
       && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (x, 1), 0))
 
   if (GET_CODE (x) == PLUS
       && LEGITIMATE_ADDRESS_INTEGER_P (XEXP (x, 1), 0))
-    x = XEXP (x, 0);
+    {
+      x = XEXP (x, 0);
+      /* PR 31232: Do not allow INT+INT as an address.  */
+      if (GET_CODE (x) == CONST_INT)
+       return 0;
+    }
   
   if ((GET_CODE (x) == PRE_MODIFY
        && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)
   
   if ((GET_CODE (x) == PRE_MODIFY
        && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT)