mips.c (mips_get_unaligned_mem): Copy *op after calling adjust_address.
authorAndrew Pinski <apinski@cavium.com>
Sat, 21 Jul 2012 08:39:13 +0000 (08:39 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sat, 21 Jul 2012 08:39:13 +0000 (01:39 -0700)
2012-07-21  Andrew Pinski  <apinski@cavium.com>

* config/mips/mips.c (mips_get_unaligned_mem): Copy *op after calling
adjust_address.

From-SVN: r189738

gcc/ChangeLog
gcc/config/mips/mips.c

index 34c9ac6c7da0e27524f51e6be9822eeeabd9e339..fec3d36a271929b03ca14067f96599f091bc8a65 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-21  Andrew Pinski  <apinski@cavium.com>
+
+       * config/mips/mips.c (mips_get_unaligned_mem): Copy *op after calling
+       adjust_address.
+
 2012-07-20  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        * config/mips/mips.md (define_attr sync_*): Move before "type".
index 00360f7820bd62afaa700dc7a0a8af5aa074cf4b..498dc27797a240eedcbf661548b6267ca64f1c22 100644 (file)
@@ -7217,9 +7217,10 @@ mips_get_unaligned_mem (rtx *op, HOST_WIDE_INT width, HOST_WIDE_INT bitpos,
   if (MEM_ALIGN (*op) >= width)
     return false;
 
-  /* Adjust *OP to refer to the whole field.  This also has the effect
-     of legitimizing *OP's address for BLKmode, possibly simplifying it.  */
-  *op = adjust_address (*op, BLKmode, 0);
+  /* Create a copy of *OP that refers to the whole field.  This also has
+     the effect of legitimizing *OP's address for BLKmode, possibly
+     simplifying it.  */
+  *op = copy_rtx (adjust_address (*op, BLKmode, 0));
   set_mem_size (*op, width / BITS_PER_UNIT);
 
   /* Get references to both ends of the field.  We deliberately don't