arm.c (arm_get_frame_offsets): Don't use fixed regs for stack alignment padding.
authorRoland McGrath <mcgrathr@google.com>
Tue, 24 Jul 2012 11:53:14 +0000 (11:53 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 24 Jul 2012 11:53:14 +0000 (11:53 +0000)
2012-07-24  Roland McGrath  <mcgrathr@google.com>

* arm.c (arm_get_frame_offsets): Don't use fixed regs for
stack alignment padding.

From-SVN: r189807

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

index 08722afb81be28496e0cb7a27ebfdabed1247b1a..ecb96a5ce3001e794a72fcef39f1fb5403bdc4f5 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-24  Roland McGrath  <mcgrathr@google.com>
+
+       * arm.c (arm_get_frame_offsets): Don't use fixed regs for 
+       stack alignment padding.
+
 2012-07-24  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/53961
index 376274a6cef69c2721c8ae12426c0ac8d0bdb2aa..ca84604ddea6c93888448b41ed0baf97caf34927 100644 (file)
@@ -16178,7 +16178,11 @@ arm_get_frame_offsets (void)
          else
            for (i = 4; i <= (TARGET_THUMB1 ? LAST_LO_REGNUM : 11); i++)
              {
-               if ((offsets->saved_regs_mask & (1 << i)) == 0)
+               /* Avoid fixed registers; they may be changed at
+                  arbitrary times so it's unsafe to restore them
+                  during the epilogue.  */
+               if (!fixed_regs[i]
+                   && (offsets->saved_regs_mask & (1 << i)) == 0)
                  {
                    reg = i;
                    break;