aarch64.c (aarch64_add_offset): Change to pass 'mode' to aarch64_plus_immediate and...
authorYufeng Zhang <yufeng.zhang@arm.com>
Thu, 27 Jun 2013 12:30:11 +0000 (12:30 +0000)
committerYufeng Zhang <yufeng@gcc.gnu.org>
Thu, 27 Jun 2013 12:30:11 +0000 (12:30 +0000)
gcc/

* config/aarch64/aarch64.c (aarch64_add_offset): Change to pass
'mode' to aarch64_plus_immediate and gen_rtx_PLUS.

From-SVN: r200466

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index d1d1113bfc59570bb92784901f103899939dc822..5398537904efda2b0713de2847aecf0e2031f117 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-27  Yufeng Zhang  <yufeng.zhang@arm.com>
+
+       * config/aarch64/aarch64.c (aarch64_add_offset): Change to pass
+       'mode' to aarch64_plus_immediate and gen_rtx_PLUS.
+
 2013-06-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
        * config/s390/s390.c: Rename UNSPEC_CCU_TO_INT to
index 527b00dbcaac1c6280685e0e467f32c1ac1692bf..81c6fd9f57d69e537cef1103bee75c6422af63a0 100644 (file)
@@ -804,7 +804,7 @@ aarch64_force_temporary (rtx x, rtx value)
 static rtx
 aarch64_add_offset (enum machine_mode mode, rtx temp, rtx reg, HOST_WIDE_INT offset)
 {
-  if (!aarch64_plus_immediate (GEN_INT (offset), DImode))
+  if (!aarch64_plus_immediate (GEN_INT (offset), mode))
     {
       rtx high;
       /* Load the full offset into a register.  This
@@ -812,7 +812,7 @@ aarch64_add_offset (enum machine_mode mode, rtx temp, rtx reg, HOST_WIDE_INT off
       high = GEN_INT (offset);
       offset = 0;
       high = aarch64_force_temporary (temp, high);
-      reg = aarch64_force_temporary (temp, gen_rtx_PLUS (Pmode, high, reg));
+      reg = aarch64_force_temporary (temp, gen_rtx_PLUS (mode, high, reg));
     }
   return plus_constant (mode, reg, offset);
 }